34#ifndef NETLINK_XFRM_AE_H_
35#define NETLINK_XFRM_AE_H_
37#include <netlink/netlink.h>
38#include <netlink/cache.h>
39#include <netlink/addr.h>
40#include <linux/xfrm.h>
48extern struct xfrmnl_ae*xfrmnl_ae_alloc(
void);
49extern void xfrmnl_ae_put(
struct xfrmnl_ae *);
51extern int xfrmnl_ae_get_kernel(
struct nl_sock*,
struct nl_addr*,
unsigned int,
unsigned int,
52 unsigned int,
unsigned int,
struct xfrmnl_ae**);
53extern int xfrmnl_ae_set(
struct nl_sock*,
struct xfrmnl_ae*,
int);
55extern int xfrmnl_ae_parse(
struct nlmsghdr*,
struct xfrmnl_ae **);
56extern int xfrmnl_ae_build_get_request(
struct nl_addr*,
unsigned int,
unsigned int,
57 unsigned int,
unsigned int,
struct nl_msg **);
59extern struct nl_addr* xfrmnl_ae_get_daddr (
struct xfrmnl_ae*);
60extern int xfrmnl_ae_set_daddr (
struct xfrmnl_ae*,
struct nl_addr*);
62extern int xfrmnl_ae_get_spi (
struct xfrmnl_ae*);
63extern int xfrmnl_ae_set_spi (
struct xfrmnl_ae*,
unsigned int);
65extern int xfrmnl_ae_get_family (
struct xfrmnl_ae*);
66extern int xfrmnl_ae_set_family (
struct xfrmnl_ae*,
unsigned int);
68extern int xfrmnl_ae_get_proto (
struct xfrmnl_ae*);
69extern int xfrmnl_ae_set_proto (
struct xfrmnl_ae*,
unsigned int);
71extern struct nl_addr* xfrmnl_ae_get_saddr (
struct xfrmnl_ae*);
72extern int xfrmnl_ae_set_saddr (
struct xfrmnl_ae*,
struct nl_addr*);
74extern int xfrmnl_ae_get_flags (
struct xfrmnl_ae*);
75extern int xfrmnl_ae_set_flags (
struct xfrmnl_ae*,
unsigned int);
77extern int xfrmnl_ae_get_reqid (
struct xfrmnl_ae*);
78extern int xfrmnl_ae_set_reqid (
struct xfrmnl_ae*,
unsigned int);
80extern int xfrmnl_ae_get_mark (
struct xfrmnl_ae*,
unsigned int*,
unsigned int*);
81extern int xfrmnl_ae_set_mark (
struct xfrmnl_ae*,
unsigned int,
unsigned int);
83extern int xfrmnl_ae_get_curlifetime (
struct xfrmnl_ae*,
unsigned long long int*,
84 unsigned long long int*,
unsigned long long int*,
85 unsigned long long int*);
86extern int xfrmnl_ae_set_curlifetime (
struct xfrmnl_ae*,
unsigned long long int,
87 unsigned long long int,
unsigned long long int,
88 unsigned long long int);
90extern int xfrmnl_ae_get_replay_maxage (
struct xfrmnl_ae*);
91extern int xfrmnl_ae_set_replay_maxage (
struct xfrmnl_ae*,
unsigned int);
93extern int xfrmnl_ae_get_replay_maxdiff (
struct xfrmnl_ae*);
94extern int xfrmnl_ae_set_replay_maxdiff (
struct xfrmnl_ae*,
unsigned int);
96extern int xfrmnl_ae_get_replay_state (
struct xfrmnl_ae*,
unsigned int*,
unsigned int*,
unsigned int*);
97extern int xfrmnl_ae_set_replay_state (
struct xfrmnl_ae*,
unsigned int,
unsigned int,
unsigned int);
99extern int xfrmnl_ae_get_replay_state_esn (
struct xfrmnl_ae*,
unsigned int*,
unsigned int*,
unsigned int*,
100 unsigned int*,
unsigned int*,
unsigned int*,
unsigned int*);
101extern int xfrmnl_ae_set_replay_state_esn (
struct xfrmnl_ae*,
unsigned int,
unsigned int,
unsigned int,
102 unsigned int,
unsigned int,
unsigned int,
unsigned int*);
104extern char* xfrmnl_ae_flags2str(
int,
char *,
size_t);
105extern int xfrmnl_ae_str2flag(
const char *);