diff options
Diffstat (limited to 'include/linux/xfrm.h')
-rw-r--r-- | include/linux/xfrm.h | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 2d4ec15abaca..3246f0e66bcc 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 | */ |
13 | typedef union | 13 | typedef 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 | */ |
23 | struct xfrm_id | 22 | struct 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 | ||
48 | struct xfrm_selector | 46 | struct 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 | ||
66 | struct xfrm_lifetime_cfg | 63 | struct 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 | ||
78 | struct xfrm_lifetime_cur | 74 | struct 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 | ||
86 | struct xfrm_replay_state | 81 | struct xfrm_replay_state { |
87 | { | ||
88 | __u32 oseq; | 82 | __u32 oseq; |
89 | __u32 seq; | 83 | __u32 seq; |
90 | __u32 bitmap; | 84 | __u32 bitmap; |
@@ -109,16 +103,14 @@ struct xfrm_stats { | |||
109 | __u32 integrity_failed; | 103 | __u32 integrity_failed; |
110 | }; | 104 | }; |
111 | 105 | ||
112 | enum | 106 | enum { |
113 | { | ||
114 | XFRM_POLICY_TYPE_MAIN = 0, | 107 | XFRM_POLICY_TYPE_MAIN = 0, |
115 | XFRM_POLICY_TYPE_SUB = 1, | 108 | XFRM_POLICY_TYPE_SUB = 1, |
116 | XFRM_POLICY_TYPE_MAX = 2, | 109 | XFRM_POLICY_TYPE_MAX = 2, |
117 | XFRM_POLICY_TYPE_ANY = 255 | 110 | XFRM_POLICY_TYPE_ANY = 255 |
118 | }; | 111 | }; |
119 | 112 | ||
120 | enum | 113 | enum { |
121 | { | ||
122 | XFRM_POLICY_IN = 0, | 114 | XFRM_POLICY_IN = 0, |
123 | XFRM_POLICY_OUT = 1, | 115 | XFRM_POLICY_OUT = 1, |
124 | XFRM_POLICY_FWD = 2, | 116 | XFRM_POLICY_FWD = 2, |
@@ -126,8 +118,7 @@ enum | |||
126 | XFRM_POLICY_MAX = 3 | 118 | XFRM_POLICY_MAX = 3 |
127 | }; | 119 | }; |
128 | 120 | ||
129 | enum | 121 | enum { |
130 | { | ||
131 | XFRM_SHARE_ANY, /* No limitations */ | 122 | XFRM_SHARE_ANY, /* No limitations */ |
132 | XFRM_SHARE_SESSION, /* For this session only */ | 123 | XFRM_SHARE_SESSION, /* For this session only */ |
133 | XFRM_SHARE_USER, /* For this user only */ | 124 | XFRM_SHARE_USER, /* For this user only */ |