aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/xfrm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/xfrm.h')
-rw-r--r--include/linux/xfrm.h35
1 files changed, 17 insertions, 18 deletions
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index 2d4ec15abaca..29e04beb1fc9 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -10,8 +10,7 @@
10/* Structure to encapsulate addresses. I do not want to use 10/* Structure to encapsulate addresses. I do not want to use
11 * "standard" structure. My apologies. 11 * "standard" structure. My apologies.
12 */ 12 */
13typedef union 13typedef union {
14{
15 __be32 a4; 14 __be32 a4;
16 __be32 a6[4]; 15 __be32 a6[4];
17} xfrm_address_t; 16} xfrm_address_t;
@@ -20,8 +19,7 @@ typedef union
20 * the state by (spi,daddr,ah/esp) or to store information about 19 * the state by (spi,daddr,ah/esp) or to store information about
21 * spi, protocol and tunnel address on output. 20 * spi, protocol and tunnel address on output.
22 */ 21 */
23struct xfrm_id 22struct xfrm_id {
24{
25 xfrm_address_t daddr; 23 xfrm_address_t daddr;
26 __be32 spi; 24 __be32 spi;
27 __u8 proto; 25 __u8 proto;
@@ -45,8 +43,7 @@ struct xfrm_sec_ctx {
45 43
46/* Selector, used as selector both on policy rules (SPD) and SAs. */ 44/* Selector, used as selector both on policy rules (SPD) and SAs. */
47 45
48struct xfrm_selector 46struct xfrm_selector {
49{
50 xfrm_address_t daddr; 47 xfrm_address_t daddr;
51 xfrm_address_t saddr; 48 xfrm_address_t saddr;
52 __be16 dport; 49 __be16 dport;
@@ -63,8 +60,7 @@ struct xfrm_selector
63 60
64#define XFRM_INF (~(__u64)0) 61#define XFRM_INF (~(__u64)0)
65 62
66struct xfrm_lifetime_cfg 63struct xfrm_lifetime_cfg {
67{
68 __u64 soft_byte_limit; 64 __u64 soft_byte_limit;
69 __u64 hard_byte_limit; 65 __u64 hard_byte_limit;
70 __u64 soft_packet_limit; 66 __u64 soft_packet_limit;
@@ -75,16 +71,14 @@ struct xfrm_lifetime_cfg
75 __u64 hard_use_expires_seconds; 71 __u64 hard_use_expires_seconds;
76}; 72};
77 73
78struct xfrm_lifetime_cur 74struct xfrm_lifetime_cur {
79{
80 __u64 bytes; 75 __u64 bytes;
81 __u64 packets; 76 __u64 packets;
82 __u64 add_time; 77 __u64 add_time;
83 __u64 use_time; 78 __u64 use_time;
84}; 79};
85 80
86struct xfrm_replay_state 81struct xfrm_replay_state {
87{
88 __u32 oseq; 82 __u32 oseq;
89 __u32 seq; 83 __u32 seq;
90 __u32 bitmap; 84 __u32 bitmap;
@@ -96,6 +90,13 @@ struct xfrm_algo {
96 char alg_key[0]; 90 char alg_key[0];
97}; 91};
98 92
93struct xfrm_algo_auth {
94 char alg_name[64];
95 unsigned int alg_key_len; /* in bits */
96 unsigned int alg_trunc_len; /* in bits */
97 char alg_key[0];
98};
99
99struct xfrm_algo_aead { 100struct xfrm_algo_aead {
100 char alg_name[64]; 101 char alg_name[64];
101 unsigned int alg_key_len; /* in bits */ 102 unsigned int alg_key_len; /* in bits */
@@ -109,16 +110,14 @@ struct xfrm_stats {
109 __u32 integrity_failed; 110 __u32 integrity_failed;
110}; 111};
111 112
112enum 113enum {
113{
114 XFRM_POLICY_TYPE_MAIN = 0, 114 XFRM_POLICY_TYPE_MAIN = 0,
115 XFRM_POLICY_TYPE_SUB = 1, 115 XFRM_POLICY_TYPE_SUB = 1,
116 XFRM_POLICY_TYPE_MAX = 2, 116 XFRM_POLICY_TYPE_MAX = 2,
117 XFRM_POLICY_TYPE_ANY = 255 117 XFRM_POLICY_TYPE_ANY = 255
118}; 118};
119 119
120enum 120enum {
121{
122 XFRM_POLICY_IN = 0, 121 XFRM_POLICY_IN = 0,
123 XFRM_POLICY_OUT = 1, 122 XFRM_POLICY_OUT = 1,
124 XFRM_POLICY_FWD = 2, 123 XFRM_POLICY_FWD = 2,
@@ -126,8 +125,7 @@ enum
126 XFRM_POLICY_MAX = 3 125 XFRM_POLICY_MAX = 3
127}; 126};
128 127
129enum 128enum {
130{
131 XFRM_SHARE_ANY, /* No limitations */ 129 XFRM_SHARE_ANY, /* No limitations */
132 XFRM_SHARE_SESSION, /* For this session only */ 130 XFRM_SHARE_SESSION, /* For this session only */
133 XFRM_SHARE_USER, /* For this user only */ 131 XFRM_SHARE_USER, /* For this user only */
@@ -283,6 +281,7 @@ enum xfrm_attr_type_t {
283 XFRMA_MIGRATE, 281 XFRMA_MIGRATE,
284 XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */ 282 XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */
285 XFRMA_KMADDRESS, /* struct xfrm_user_kmaddress */ 283 XFRMA_KMADDRESS, /* struct xfrm_user_kmaddress */
284 XFRMA_ALG_AUTH_TRUNC, /* struct xfrm_algo_auth */
286 __XFRMA_MAX 285 __XFRMA_MAX
287 286
288#define XFRMA_MAX (__XFRMA_MAX - 1) 287#define XFRMA_MAX (__XFRMA_MAX - 1)