diff options
Diffstat (limited to 'include/linux/xfrm.h')
-rw-r--r-- | include/linux/xfrm.h | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index 46a15c7a1a13..14ecd19f4cdc 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
@@ -104,6 +104,13 @@ struct xfrm_stats { | |||
104 | 104 | ||
105 | enum | 105 | enum |
106 | { | 106 | { |
107 | XFRM_POLICY_TYPE_MAIN = 0, | ||
108 | XFRM_POLICY_TYPE_SUB = 1, | ||
109 | XFRM_POLICY_TYPE_MAX = 2 | ||
110 | }; | ||
111 | |||
112 | enum | ||
113 | { | ||
107 | XFRM_POLICY_IN = 0, | 114 | XFRM_POLICY_IN = 0, |
108 | XFRM_POLICY_OUT = 1, | 115 | XFRM_POLICY_OUT = 1, |
109 | XFRM_POLICY_FWD = 2, | 116 | XFRM_POLICY_FWD = 2, |
@@ -120,7 +127,9 @@ enum | |||
120 | 127 | ||
121 | #define XFRM_MODE_TRANSPORT 0 | 128 | #define XFRM_MODE_TRANSPORT 0 |
122 | #define XFRM_MODE_TUNNEL 1 | 129 | #define XFRM_MODE_TUNNEL 1 |
123 | #define XFRM_MODE_MAX 2 | 130 | #define XFRM_MODE_ROUTEOPTIMIZATION 2 |
131 | #define XFRM_MODE_IN_TRIGGER 3 | ||
132 | #define XFRM_MODE_MAX 4 | ||
124 | 133 | ||
125 | /* Netlink configuration messages. */ | 134 | /* Netlink configuration messages. */ |
126 | enum { | 135 | enum { |
@@ -164,6 +173,10 @@ enum { | |||
164 | #define XFRM_MSG_NEWAE XFRM_MSG_NEWAE | 173 | #define XFRM_MSG_NEWAE XFRM_MSG_NEWAE |
165 | XFRM_MSG_GETAE, | 174 | XFRM_MSG_GETAE, |
166 | #define XFRM_MSG_GETAE XFRM_MSG_GETAE | 175 | #define XFRM_MSG_GETAE XFRM_MSG_GETAE |
176 | |||
177 | XFRM_MSG_REPORT, | ||
178 | #define XFRM_MSG_REPORT XFRM_MSG_REPORT | ||
179 | |||
167 | __XFRM_MSG_MAX | 180 | __XFRM_MSG_MAX |
168 | }; | 181 | }; |
169 | #define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1) | 182 | #define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1) |
@@ -217,6 +230,12 @@ enum xfrm_ae_ftype_t { | |||
217 | #define XFRM_AE_MAX (__XFRM_AE_MAX - 1) | 230 | #define XFRM_AE_MAX (__XFRM_AE_MAX - 1) |
218 | }; | 231 | }; |
219 | 232 | ||
233 | struct xfrm_userpolicy_type { | ||
234 | __u8 type; | ||
235 | __u16 reserved1; | ||
236 | __u8 reserved2; | ||
237 | }; | ||
238 | |||
220 | /* Netlink message attributes. */ | 239 | /* Netlink message attributes. */ |
221 | enum xfrm_attr_type_t { | 240 | enum xfrm_attr_type_t { |
222 | XFRMA_UNSPEC, | 241 | XFRMA_UNSPEC, |
@@ -232,6 +251,10 @@ enum xfrm_attr_type_t { | |||
232 | XFRMA_REPLAY_VAL, | 251 | XFRMA_REPLAY_VAL, |
233 | XFRMA_REPLAY_THRESH, | 252 | XFRMA_REPLAY_THRESH, |
234 | XFRMA_ETIMER_THRESH, | 253 | XFRMA_ETIMER_THRESH, |
254 | XFRMA_SRCADDR, /* xfrm_address_t */ | ||
255 | XFRMA_COADDR, /* xfrm_address_t */ | ||
256 | XFRMA_LASTUSED, | ||
257 | XFRMA_POLICY_TYPE, /* struct xfrm_userpolicy_type */ | ||
235 | __XFRMA_MAX | 258 | __XFRMA_MAX |
236 | 259 | ||
237 | #define XFRMA_MAX (__XFRMA_MAX - 1) | 260 | #define XFRMA_MAX (__XFRMA_MAX - 1) |
@@ -247,12 +270,13 @@ struct xfrm_usersa_info { | |||
247 | __u32 seq; | 270 | __u32 seq; |
248 | __u32 reqid; | 271 | __u32 reqid; |
249 | __u16 family; | 272 | __u16 family; |
250 | __u8 mode; /* 0=transport,1=tunnel */ | 273 | __u8 mode; /* XFRM_MODE_xxx */ |
251 | __u8 replay_window; | 274 | __u8 replay_window; |
252 | __u8 flags; | 275 | __u8 flags; |
253 | #define XFRM_STATE_NOECN 1 | 276 | #define XFRM_STATE_NOECN 1 |
254 | #define XFRM_STATE_DECAP_DSCP 2 | 277 | #define XFRM_STATE_DECAP_DSCP 2 |
255 | #define XFRM_STATE_NOPMTUDISC 4 | 278 | #define XFRM_STATE_NOPMTUDISC 4 |
279 | #define XFRM_STATE_WILDRECV 8 | ||
256 | }; | 280 | }; |
257 | 281 | ||
258 | struct xfrm_usersa_id { | 282 | struct xfrm_usersa_id { |
@@ -319,12 +343,18 @@ struct xfrm_usersa_flush { | |||
319 | __u8 proto; | 343 | __u8 proto; |
320 | }; | 344 | }; |
321 | 345 | ||
346 | struct xfrm_user_report { | ||
347 | __u8 proto; | ||
348 | struct xfrm_selector sel; | ||
349 | }; | ||
350 | |||
322 | #ifndef __KERNEL__ | 351 | #ifndef __KERNEL__ |
323 | /* backwards compatibility for userspace */ | 352 | /* backwards compatibility for userspace */ |
324 | #define XFRMGRP_ACQUIRE 1 | 353 | #define XFRMGRP_ACQUIRE 1 |
325 | #define XFRMGRP_EXPIRE 2 | 354 | #define XFRMGRP_EXPIRE 2 |
326 | #define XFRMGRP_SA 4 | 355 | #define XFRMGRP_SA 4 |
327 | #define XFRMGRP_POLICY 8 | 356 | #define XFRMGRP_POLICY 8 |
357 | #define XFRMGRP_REPORT 0x10 | ||
328 | #endif | 358 | #endif |
329 | 359 | ||
330 | enum xfrm_nlgroups { | 360 | enum xfrm_nlgroups { |
@@ -340,6 +370,8 @@ enum xfrm_nlgroups { | |||
340 | #define XFRMNLGRP_POLICY XFRMNLGRP_POLICY | 370 | #define XFRMNLGRP_POLICY XFRMNLGRP_POLICY |
341 | XFRMNLGRP_AEVENTS, | 371 | XFRMNLGRP_AEVENTS, |
342 | #define XFRMNLGRP_AEVENTS XFRMNLGRP_AEVENTS | 372 | #define XFRMNLGRP_AEVENTS XFRMNLGRP_AEVENTS |
373 | XFRMNLGRP_REPORT, | ||
374 | #define XFRMNLGRP_REPORT XFRMNLGRP_REPORT | ||
343 | __XFRMNLGRP_MAX | 375 | __XFRMNLGRP_MAX |
344 | }; | 376 | }; |
345 | #define XFRMNLGRP_MAX (__XFRMNLGRP_MAX - 1) | 377 | #define XFRMNLGRP_MAX (__XFRMNLGRP_MAX - 1) |