1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _LINUX_XFRM_H
20 #define _LINUX_XFRM_H
21 #include <linux/in6.h>
22 #include <linux/types.h>
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 typedef union {
25   __be32 a4;
26   __be32 a6[4];
27   struct in6_addr in6;
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 } xfrm_address_t;
30 struct xfrm_id {
31   xfrm_address_t daddr;
32   __be32 spi;
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34   __u8 proto;
35 };
36 struct xfrm_sec_ctx {
37   __u8 ctx_doi;
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39   __u8 ctx_alg;
40   __u16 ctx_len;
41   __u32 ctx_sid;
42   char ctx_str[0];
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 };
45 #define XFRM_SC_DOI_RESERVED 0
46 #define XFRM_SC_DOI_LSM 1
47 #define XFRM_SC_ALG_RESERVED 0
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 #define XFRM_SC_ALG_SELINUX 1
50 struct xfrm_selector {
51   xfrm_address_t daddr;
52   xfrm_address_t saddr;
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54   __be16 dport;
55   __be16 dport_mask;
56   __be16 sport;
57   __be16 sport_mask;
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59   __u16 family;
60   __u8 prefixlen_d;
61   __u8 prefixlen_s;
62   __u8 proto;
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64   int ifindex;
65   __kernel_uid32_t user;
66 };
67 #define XFRM_INF (~(__u64) 0)
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 struct xfrm_lifetime_cfg {
70   __u64 soft_byte_limit;
71   __u64 hard_byte_limit;
72   __u64 soft_packet_limit;
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74   __u64 hard_packet_limit;
75   __u64 soft_add_expires_seconds;
76   __u64 hard_add_expires_seconds;
77   __u64 soft_use_expires_seconds;
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79   __u64 hard_use_expires_seconds;
80 };
81 struct xfrm_lifetime_cur {
82   __u64 bytes;
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84   __u64 packets;
85   __u64 add_time;
86   __u64 use_time;
87 };
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 struct xfrm_replay_state {
90   __u32 oseq;
91   __u32 seq;
92   __u32 bitmap;
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 };
95 #define XFRMA_REPLAY_ESN_MAX 4096
96 struct xfrm_replay_state_esn {
97   unsigned int bmp_len;
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99   __u32 oseq;
100   __u32 seq;
101   __u32 oseq_hi;
102   __u32 seq_hi;
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104   __u32 replay_window;
105   __u32 bmp[0];
106 };
107 struct xfrm_algo {
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109   char alg_name[64];
110   unsigned int alg_key_len;
111   char alg_key[0];
112 };
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 struct xfrm_algo_auth {
115   char alg_name[64];
116   unsigned int alg_key_len;
117   unsigned int alg_trunc_len;
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119   char alg_key[0];
120 };
121 struct xfrm_algo_aead {
122   char alg_name[64];
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124   unsigned int alg_key_len;
125   unsigned int alg_icv_len;
126   char alg_key[0];
127 };
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 struct xfrm_stats {
130   __u32 replay_window;
131   __u32 replay;
132   __u32 integrity_failed;
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 };
135 enum {
136   XFRM_POLICY_TYPE_MAIN = 0,
137   XFRM_POLICY_TYPE_SUB = 1,
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139   XFRM_POLICY_TYPE_MAX = 2,
140   XFRM_POLICY_TYPE_ANY = 255
141 };
142 enum {
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144   XFRM_POLICY_IN = 0,
145   XFRM_POLICY_OUT = 1,
146   XFRM_POLICY_FWD = 2,
147   XFRM_POLICY_MASK = 3,
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149   XFRM_POLICY_MAX = 3
150 };
151 enum {
152   XFRM_SHARE_ANY,
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154   XFRM_SHARE_SESSION,
155   XFRM_SHARE_USER,
156   XFRM_SHARE_UNIQUE
157 };
158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159 #define XFRM_MODE_TRANSPORT 0
160 #define XFRM_MODE_TUNNEL 1
161 #define XFRM_MODE_ROUTEOPTIMIZATION 2
162 #define XFRM_MODE_IN_TRIGGER 3
163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 #define XFRM_MODE_BEET 4
165 #define XFRM_MODE_MAX 5
166 enum {
167   XFRM_MSG_BASE = 0x10,
168 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169   XFRM_MSG_NEWSA = 0x10,
170 #define XFRM_MSG_NEWSA XFRM_MSG_NEWSA
171   XFRM_MSG_DELSA,
172 #define XFRM_MSG_DELSA XFRM_MSG_DELSA
173 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174   XFRM_MSG_GETSA,
175 #define XFRM_MSG_GETSA XFRM_MSG_GETSA
176   XFRM_MSG_NEWPOLICY,
177 #define XFRM_MSG_NEWPOLICY XFRM_MSG_NEWPOLICY
178 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179   XFRM_MSG_DELPOLICY,
180 #define XFRM_MSG_DELPOLICY XFRM_MSG_DELPOLICY
181   XFRM_MSG_GETPOLICY,
182 #define XFRM_MSG_GETPOLICY XFRM_MSG_GETPOLICY
183 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184   XFRM_MSG_ALLOCSPI,
185 #define XFRM_MSG_ALLOCSPI XFRM_MSG_ALLOCSPI
186   XFRM_MSG_ACQUIRE,
187 #define XFRM_MSG_ACQUIRE XFRM_MSG_ACQUIRE
188 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189   XFRM_MSG_EXPIRE,
190 #define XFRM_MSG_EXPIRE XFRM_MSG_EXPIRE
191   XFRM_MSG_UPDPOLICY,
192 #define XFRM_MSG_UPDPOLICY XFRM_MSG_UPDPOLICY
193 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194   XFRM_MSG_UPDSA,
195 #define XFRM_MSG_UPDSA XFRM_MSG_UPDSA
196   XFRM_MSG_POLEXPIRE,
197 #define XFRM_MSG_POLEXPIRE XFRM_MSG_POLEXPIRE
198 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199   XFRM_MSG_FLUSHSA,
200 #define XFRM_MSG_FLUSHSA XFRM_MSG_FLUSHSA
201   XFRM_MSG_FLUSHPOLICY,
202 #define XFRM_MSG_FLUSHPOLICY XFRM_MSG_FLUSHPOLICY
203 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204   XFRM_MSG_NEWAE,
205 #define XFRM_MSG_NEWAE XFRM_MSG_NEWAE
206   XFRM_MSG_GETAE,
207 #define XFRM_MSG_GETAE XFRM_MSG_GETAE
208 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209   XFRM_MSG_REPORT,
210 #define XFRM_MSG_REPORT XFRM_MSG_REPORT
211   XFRM_MSG_MIGRATE,
212 #define XFRM_MSG_MIGRATE XFRM_MSG_MIGRATE
213 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214   XFRM_MSG_NEWSADINFO,
215 #define XFRM_MSG_NEWSADINFO XFRM_MSG_NEWSADINFO
216   XFRM_MSG_GETSADINFO,
217 #define XFRM_MSG_GETSADINFO XFRM_MSG_GETSADINFO
218 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219   XFRM_MSG_NEWSPDINFO,
220 #define XFRM_MSG_NEWSPDINFO XFRM_MSG_NEWSPDINFO
221   XFRM_MSG_GETSPDINFO,
222 #define XFRM_MSG_GETSPDINFO XFRM_MSG_GETSPDINFO
223 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224   XFRM_MSG_MAPPING,
225 #define XFRM_MSG_MAPPING XFRM_MSG_MAPPING
226   __XFRM_MSG_MAX
227 };
228 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229 #define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1)
230 #define XFRM_NR_MSGTYPES (XFRM_MSG_MAX + 1 - XFRM_MSG_BASE)
231 struct xfrm_user_sec_ctx {
232   __u16 len;
233 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234   __u16 exttype;
235   __u8 ctx_alg;
236   __u8 ctx_doi;
237   __u16 ctx_len;
238 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239 };
240 struct xfrm_user_tmpl {
241   struct xfrm_id id;
242   __u16 family;
243 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244   xfrm_address_t saddr;
245   __u32 reqid;
246   __u8 mode;
247   __u8 share;
248 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249   __u8 optional;
250   __u32 aalgos;
251   __u32 ealgos;
252   __u32 calgos;
253 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254 };
255 struct xfrm_encap_tmpl {
256   __u16 encap_type;
257   __be16 encap_sport;
258 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259   __be16 encap_dport;
260   xfrm_address_t encap_oa;
261 };
262 enum xfrm_ae_ftype_t {
263 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264   XFRM_AE_UNSPEC,
265   XFRM_AE_RTHR = 1,
266   XFRM_AE_RVAL = 2,
267   XFRM_AE_LVAL = 4,
268 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269   XFRM_AE_ETHR = 8,
270   XFRM_AE_CR = 16,
271   XFRM_AE_CE = 32,
272   XFRM_AE_CU = 64,
273 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274   __XFRM_AE_MAX
275 #define XFRM_AE_MAX (__XFRM_AE_MAX - 1)
276 };
277 struct xfrm_userpolicy_type {
278 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279   __u8 type;
280   __u16 reserved1;
281   __u8 reserved2;
282 };
283 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284 enum xfrm_attr_type_t {
285   XFRMA_UNSPEC,
286   XFRMA_ALG_AUTH,
287   XFRMA_ALG_CRYPT,
288 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
289   XFRMA_ALG_COMP,
290   XFRMA_ENCAP,
291   XFRMA_TMPL,
292   XFRMA_SA,
293 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
294   XFRMA_POLICY,
295   XFRMA_SEC_CTX,
296   XFRMA_LTIME_VAL,
297   XFRMA_REPLAY_VAL,
298 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299   XFRMA_REPLAY_THRESH,
300   XFRMA_ETIMER_THRESH,
301   XFRMA_SRCADDR,
302   XFRMA_COADDR,
303 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304   XFRMA_LASTUSED,
305   XFRMA_POLICY_TYPE,
306   XFRMA_MIGRATE,
307   XFRMA_ALG_AEAD,
308 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
309   XFRMA_KMADDRESS,
310   XFRMA_ALG_AUTH_TRUNC,
311   XFRMA_MARK,
312   XFRMA_TFCPAD,
313 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
314   XFRMA_REPLAY_ESN_VAL,
315   XFRMA_SA_EXTRA_FLAGS,
316   XFRMA_PROTO,
317   XFRMA_ADDRESS_FILTER,
318 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
319   __XFRMA_MAX
320 #define XFRMA_MAX (__XFRMA_MAX - 1)
321 };
322 struct xfrm_mark {
323 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
324   __u32 v;
325   __u32 m;
326 };
327 enum xfrm_sadattr_type_t {
328 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
329   XFRMA_SAD_UNSPEC,
330   XFRMA_SAD_CNT,
331   XFRMA_SAD_HINFO,
332   __XFRMA_SAD_MAX
333 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
334 #define XFRMA_SAD_MAX (__XFRMA_SAD_MAX - 1)
335 };
336 struct xfrmu_sadhinfo {
337   __u32 sadhcnt;
338 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
339   __u32 sadhmcnt;
340 };
341 enum xfrm_spdattr_type_t {
342   XFRMA_SPD_UNSPEC,
343 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
344   XFRMA_SPD_INFO,
345   XFRMA_SPD_HINFO,
346   XFRMA_SPD_IPV4_HTHRESH,
347   XFRMA_SPD_IPV6_HTHRESH,
348 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
349   __XFRMA_SPD_MAX
350 #define XFRMA_SPD_MAX (__XFRMA_SPD_MAX - 1)
351 };
352 struct xfrmu_spdinfo {
353 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
354   __u32 incnt;
355   __u32 outcnt;
356   __u32 fwdcnt;
357   __u32 inscnt;
358 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
359   __u32 outscnt;
360   __u32 fwdscnt;
361 };
362 struct xfrmu_spdhinfo {
363 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
364   __u32 spdhcnt;
365   __u32 spdhmcnt;
366 };
367 struct xfrmu_spdhthresh {
368 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
369   __u8 lbits;
370   __u8 rbits;
371 };
372 struct xfrm_usersa_info {
373 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
374   struct xfrm_selector sel;
375   struct xfrm_id id;
376   xfrm_address_t saddr;
377   struct xfrm_lifetime_cfg lft;
378 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
379   struct xfrm_lifetime_cur curlft;
380   struct xfrm_stats stats;
381   __u32 seq;
382   __u32 reqid;
383 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
384   __u16 family;
385   __u8 mode;
386   __u8 replay_window;
387   __u8 flags;
388 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
389 #define XFRM_STATE_NOECN 1
390 #define XFRM_STATE_DECAP_DSCP 2
391 #define XFRM_STATE_NOPMTUDISC 4
392 #define XFRM_STATE_WILDRECV 8
393 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
394 #define XFRM_STATE_ICMP 16
395 #define XFRM_STATE_AF_UNSPEC 32
396 #define XFRM_STATE_ALIGN4 64
397 #define XFRM_STATE_ESN 128
398 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
399 };
400 #define XFRM_SA_XFLAG_DONT_ENCAP_DSCP 1
401 struct xfrm_usersa_id {
402   xfrm_address_t daddr;
403 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
404   __be32 spi;
405   __u16 family;
406   __u8 proto;
407 };
408 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
409 struct xfrm_aevent_id {
410   struct xfrm_usersa_id sa_id;
411   xfrm_address_t saddr;
412   __u32 flags;
413 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
414   __u32 reqid;
415 };
416 struct xfrm_userspi_info {
417   struct xfrm_usersa_info info;
418 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
419   __u32 min;
420   __u32 max;
421 };
422 struct xfrm_userpolicy_info {
423 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
424   struct xfrm_selector sel;
425   struct xfrm_lifetime_cfg lft;
426   struct xfrm_lifetime_cur curlft;
427   __u32 priority;
428 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
429   __u32 index;
430   __u8 dir;
431   __u8 action;
432 #define XFRM_POLICY_ALLOW 0
433 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
434 #define XFRM_POLICY_BLOCK 1
435   __u8 flags;
436 #define XFRM_POLICY_LOCALOK 1
437 #define XFRM_POLICY_ICMP 2
438 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
439   __u8 share;
440 };
441 struct xfrm_userpolicy_id {
442   struct xfrm_selector sel;
443 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
444   __u32 index;
445   __u8 dir;
446 };
447 struct xfrm_user_acquire {
448 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
449   struct xfrm_id id;
450   xfrm_address_t saddr;
451   struct xfrm_selector sel;
452   struct xfrm_userpolicy_info policy;
453 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
454   __u32 aalgos;
455   __u32 ealgos;
456   __u32 calgos;
457   __u32 seq;
458 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
459 };
460 struct xfrm_user_expire {
461   struct xfrm_usersa_info state;
462   __u8 hard;
463 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
464 };
465 struct xfrm_user_polexpire {
466   struct xfrm_userpolicy_info pol;
467   __u8 hard;
468 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
469 };
470 struct xfrm_usersa_flush {
471   __u8 proto;
472 };
473 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
474 struct xfrm_user_report {
475   __u8 proto;
476   struct xfrm_selector sel;
477 };
478 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
479 struct xfrm_user_kmaddress {
480   xfrm_address_t local;
481   xfrm_address_t remote;
482   __u32 reserved;
483 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
484   __u16 family;
485 };
486 struct xfrm_user_migrate {
487   xfrm_address_t old_daddr;
488 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
489   xfrm_address_t old_saddr;
490   xfrm_address_t new_daddr;
491   xfrm_address_t new_saddr;
492   __u8 proto;
493 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
494   __u8 mode;
495   __u16 reserved;
496   __u32 reqid;
497   __u16 old_family;
498 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
499   __u16 new_family;
500 };
501 struct xfrm_user_mapping {
502   struct xfrm_usersa_id id;
503 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
504   __u32 reqid;
505   xfrm_address_t old_saddr;
506   xfrm_address_t new_saddr;
507   __be16 old_sport;
508 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
509   __be16 new_sport;
510 };
511 struct xfrm_address_filter {
512   xfrm_address_t saddr;
513 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
514   xfrm_address_t daddr;
515   __u16 family;
516   __u8 splen;
517   __u8 dplen;
518 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
519 };
520 #define XFRMGRP_ACQUIRE 1
521 #define XFRMGRP_EXPIRE 2
522 #define XFRMGRP_SA 4
523 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
524 #define XFRMGRP_POLICY 8
525 #define XFRMGRP_REPORT 0x20
526 enum xfrm_nlgroups {
527   XFRMNLGRP_NONE,
528 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
529 #define XFRMNLGRP_NONE XFRMNLGRP_NONE
530   XFRMNLGRP_ACQUIRE,
531 #define XFRMNLGRP_ACQUIRE XFRMNLGRP_ACQUIRE
532   XFRMNLGRP_EXPIRE,
533 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
534 #define XFRMNLGRP_EXPIRE XFRMNLGRP_EXPIRE
535   XFRMNLGRP_SA,
536 #define XFRMNLGRP_SA XFRMNLGRP_SA
537   XFRMNLGRP_POLICY,
538 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
539 #define XFRMNLGRP_POLICY XFRMNLGRP_POLICY
540   XFRMNLGRP_AEVENTS,
541 #define XFRMNLGRP_AEVENTS XFRMNLGRP_AEVENTS
542   XFRMNLGRP_REPORT,
543 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
544 #define XFRMNLGRP_REPORT XFRMNLGRP_REPORT
545   XFRMNLGRP_MIGRATE,
546 #define XFRMNLGRP_MIGRATE XFRMNLGRP_MIGRATE
547   XFRMNLGRP_MAPPING,
548 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
549 #define XFRMNLGRP_MAPPING XFRMNLGRP_MAPPING
550   __XFRMNLGRP_MAX
551 };
552 #define XFRMNLGRP_MAX (__XFRMNLGRP_MAX - 1)
553 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
554 #endif
555