34 #ifndef NETLINK_XFRM_TEMPL_H_
35 #define NETLINK_XFRM_TEMPL_H_
37 #include <netlink/netlink.h>
38 #include <netlink/cache.h>
39 #include <netlink/addr.h>
40 #include <linux/xfrm.h>
46 struct xfrmnl_user_tmpl;
51 extern void xfrmnl_user_tmpl_free(
struct xfrmnl_user_tmpl* utmpl);
55 extern void xfrmnl_user_tmpl_dump(
struct xfrmnl_user_tmpl*,
struct nl_dump_params*);
58 extern struct nl_addr* xfrmnl_user_tmpl_get_daddr (
struct xfrmnl_user_tmpl*);
59 extern int xfrmnl_user_tmpl_set_daddr (
struct xfrmnl_user_tmpl*,
struct nl_addr*);
61 extern int xfrmnl_user_tmpl_get_spi (
struct xfrmnl_user_tmpl*);
62 extern int xfrmnl_user_tmpl_set_spi (
struct xfrmnl_user_tmpl*,
unsigned int);
64 extern int xfrmnl_user_tmpl_get_proto (
struct xfrmnl_user_tmpl*);
65 extern int xfrmnl_user_tmpl_set_proto (
struct xfrmnl_user_tmpl*,
unsigned int);
67 extern int xfrmnl_user_tmpl_get_family (
struct xfrmnl_user_tmpl*);
68 extern int xfrmnl_user_tmpl_set_family (
struct xfrmnl_user_tmpl*,
unsigned int);
70 extern struct nl_addr* xfrmnl_user_tmpl_get_saddr (
struct xfrmnl_user_tmpl*);
71 extern int xfrmnl_user_tmpl_set_saddr (
struct xfrmnl_user_tmpl*,
struct nl_addr*);
73 extern int xfrmnl_user_tmpl_get_reqid (
struct xfrmnl_user_tmpl*);
74 extern int xfrmnl_user_tmpl_set_reqid (
struct xfrmnl_user_tmpl*,
unsigned int);
76 extern int xfrmnl_user_tmpl_get_mode (
struct xfrmnl_user_tmpl*);
77 extern int xfrmnl_user_tmpl_set_mode (
struct xfrmnl_user_tmpl*,
unsigned int);
79 extern int xfrmnl_user_tmpl_get_share (
struct xfrmnl_user_tmpl*);
80 extern int xfrmnl_user_tmpl_set_share (
struct xfrmnl_user_tmpl*,
unsigned int);
82 extern int xfrmnl_user_tmpl_get_optional (
struct xfrmnl_user_tmpl*);
83 extern int xfrmnl_user_tmpl_set_optional (
struct xfrmnl_user_tmpl*,
unsigned int);
85 extern int xfrmnl_user_tmpl_get_aalgos (
struct xfrmnl_user_tmpl*);
86 extern int xfrmnl_user_tmpl_set_aalgos (
struct xfrmnl_user_tmpl*,
unsigned int);
88 extern int xfrmnl_user_tmpl_get_ealgos (
struct xfrmnl_user_tmpl*);
89 extern int xfrmnl_user_tmpl_set_ealgos (
struct xfrmnl_user_tmpl*,
unsigned int);
91 extern int xfrmnl_user_tmpl_get_calgos (
struct xfrmnl_user_tmpl*);
92 extern int xfrmnl_user_tmpl_set_calgos (
struct xfrmnl_user_tmpl*,
unsigned int);
94 extern char* xfrmnl_user_tmpl_mode2str(
int,
char *,
size_t);
95 extern int xfrmnl_user_tmpl_str2mode(
const char *);
struct xfrmnl_user_tmpl * xfrmnl_user_tmpl_clone(struct xfrmnl_user_tmpl *)
Clone existing user template object.
struct xfrmnl_user_tmpl * xfrmnl_user_tmpl_alloc(void)
Allocate new user template object.
int xfrmnl_user_tmpl_cmp(struct xfrmnl_user_tmpl *, struct xfrmnl_user_tmpl *)
Compares two user template objects.