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>
46struct xfrmnl_user_tmpl;
51extern void xfrmnl_user_tmpl_free(
struct xfrmnl_user_tmpl* utmpl);
55extern void xfrmnl_user_tmpl_dump(
struct xfrmnl_user_tmpl*,
struct nl_dump_params*);
58extern struct nl_addr* xfrmnl_user_tmpl_get_daddr (
struct xfrmnl_user_tmpl*);
59extern int xfrmnl_user_tmpl_set_daddr (
struct xfrmnl_user_tmpl*,
struct nl_addr*);
61extern int xfrmnl_user_tmpl_get_spi (
struct xfrmnl_user_tmpl*);
62extern int xfrmnl_user_tmpl_set_spi (
struct xfrmnl_user_tmpl*,
unsigned int);
64extern int xfrmnl_user_tmpl_get_proto (
struct xfrmnl_user_tmpl*);
65extern int xfrmnl_user_tmpl_set_proto (
struct xfrmnl_user_tmpl*,
unsigned int);
67extern int xfrmnl_user_tmpl_get_family (
struct xfrmnl_user_tmpl*);
68extern int xfrmnl_user_tmpl_set_family (
struct xfrmnl_user_tmpl*,
unsigned int);
70extern struct nl_addr* xfrmnl_user_tmpl_get_saddr (
struct xfrmnl_user_tmpl*);
71extern int xfrmnl_user_tmpl_set_saddr (
struct xfrmnl_user_tmpl*,
struct nl_addr*);
73extern int xfrmnl_user_tmpl_get_reqid (
struct xfrmnl_user_tmpl*);
74extern int xfrmnl_user_tmpl_set_reqid (
struct xfrmnl_user_tmpl*,
unsigned int);
76extern int xfrmnl_user_tmpl_get_mode (
struct xfrmnl_user_tmpl*);
77extern int xfrmnl_user_tmpl_set_mode (
struct xfrmnl_user_tmpl*,
unsigned int);
79extern int xfrmnl_user_tmpl_get_share (
struct xfrmnl_user_tmpl*);
80extern int xfrmnl_user_tmpl_set_share (
struct xfrmnl_user_tmpl*,
unsigned int);
82extern int xfrmnl_user_tmpl_get_optional (
struct xfrmnl_user_tmpl*);
83extern int xfrmnl_user_tmpl_set_optional (
struct xfrmnl_user_tmpl*,
unsigned int);
85extern int xfrmnl_user_tmpl_get_aalgos (
struct xfrmnl_user_tmpl*);
86extern int xfrmnl_user_tmpl_set_aalgos (
struct xfrmnl_user_tmpl*,
unsigned int);
88extern int xfrmnl_user_tmpl_get_ealgos (
struct xfrmnl_user_tmpl*);
89extern int xfrmnl_user_tmpl_set_ealgos (
struct xfrmnl_user_tmpl*,
unsigned int);
91extern int xfrmnl_user_tmpl_get_calgos (
struct xfrmnl_user_tmpl*);
92extern int xfrmnl_user_tmpl_set_calgos (
struct xfrmnl_user_tmpl*,
unsigned int);
94extern char* xfrmnl_user_tmpl_mode2str(
int,
char *,
size_t);
95extern int xfrmnl_user_tmpl_str2mode(
const char *);
struct xfrmnl_user_tmpl * xfrmnl_user_tmpl_clone(struct xfrmnl_user_tmpl *)
Clone existing user template object.
int xfrmnl_user_tmpl_cmp(struct xfrmnl_user_tmpl *, struct xfrmnl_user_tmpl *)
Compares two user template objects.
struct xfrmnl_user_tmpl * xfrmnl_user_tmpl_alloc(void)
Allocate new user template object.