pfkeyv2.h revision d7db594b8d1dab36b711bd887a9dd21675c87243
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_PFKEY2_H
20#define _LINUX_PFKEY2_H
21#include <linux/types.h>
22#define PF_KEY_V2 2
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define PFKEYV2_REVISION 199806L
25struct sadb_msg {
26  __u8 sadb_msg_version;
27  __u8 sadb_msg_type;
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29  __u8 sadb_msg_errno;
30  __u8 sadb_msg_satype;
31  __u16 sadb_msg_len;
32  __u16 sadb_msg_reserved;
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34  __u32 sadb_msg_seq;
35  __u32 sadb_msg_pid;
36} __attribute__((packed));
37struct sadb_ext {
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39  __u16 sadb_ext_len;
40  __u16 sadb_ext_type;
41} __attribute__((packed));
42struct sadb_sa {
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44  __u16 sadb_sa_len;
45  __u16 sadb_sa_exttype;
46  __be32 sadb_sa_spi;
47  __u8 sadb_sa_replay;
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49  __u8 sadb_sa_state;
50  __u8 sadb_sa_auth;
51  __u8 sadb_sa_encrypt;
52  __u32 sadb_sa_flags;
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54} __attribute__((packed));
55struct sadb_lifetime {
56  __u16 sadb_lifetime_len;
57  __u16 sadb_lifetime_exttype;
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59  __u32 sadb_lifetime_allocations;
60  __u64 sadb_lifetime_bytes;
61  __u64 sadb_lifetime_addtime;
62  __u64 sadb_lifetime_usetime;
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64} __attribute__((packed));
65struct sadb_address {
66  __u16 sadb_address_len;
67  __u16 sadb_address_exttype;
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69  __u8 sadb_address_proto;
70  __u8 sadb_address_prefixlen;
71  __u16 sadb_address_reserved;
72} __attribute__((packed));
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74struct sadb_key {
75  __u16 sadb_key_len;
76  __u16 sadb_key_exttype;
77  __u16 sadb_key_bits;
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79  __u16 sadb_key_reserved;
80} __attribute__((packed));
81struct sadb_ident {
82  __u16 sadb_ident_len;
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84  __u16 sadb_ident_exttype;
85  __u16 sadb_ident_type;
86  __u16 sadb_ident_reserved;
87  __u64 sadb_ident_id;
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89} __attribute__((packed));
90struct sadb_sens {
91  __u16 sadb_sens_len;
92  __u16 sadb_sens_exttype;
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94  __u32 sadb_sens_dpd;
95  __u8 sadb_sens_sens_level;
96  __u8 sadb_sens_sens_len;
97  __u8 sadb_sens_integ_level;
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99  __u8 sadb_sens_integ_len;
100  __u32 sadb_sens_reserved;
101} __attribute__((packed));
102struct sadb_prop {
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104  __u16 sadb_prop_len;
105  __u16 sadb_prop_exttype;
106  __u8 sadb_prop_replay;
107  __u8 sadb_prop_reserved[3];
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109} __attribute__((packed));
110struct sadb_comb {
111  __u8 sadb_comb_auth;
112  __u8 sadb_comb_encrypt;
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114  __u16 sadb_comb_flags;
115  __u16 sadb_comb_auth_minbits;
116  __u16 sadb_comb_auth_maxbits;
117  __u16 sadb_comb_encrypt_minbits;
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119  __u16 sadb_comb_encrypt_maxbits;
120  __u32 sadb_comb_reserved;
121  __u32 sadb_comb_soft_allocations;
122  __u32 sadb_comb_hard_allocations;
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124  __u64 sadb_comb_soft_bytes;
125  __u64 sadb_comb_hard_bytes;
126  __u64 sadb_comb_soft_addtime;
127  __u64 sadb_comb_hard_addtime;
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129  __u64 sadb_comb_soft_usetime;
130  __u64 sadb_comb_hard_usetime;
131} __attribute__((packed));
132struct sadb_supported {
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134  __u16 sadb_supported_len;
135  __u16 sadb_supported_exttype;
136  __u32 sadb_supported_reserved;
137} __attribute__((packed));
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139struct sadb_alg {
140  __u8 sadb_alg_id;
141  __u8 sadb_alg_ivlen;
142  __u16 sadb_alg_minbits;
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144  __u16 sadb_alg_maxbits;
145  __u16 sadb_alg_reserved;
146} __attribute__((packed));
147struct sadb_spirange {
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149  __u16 sadb_spirange_len;
150  __u16 sadb_spirange_exttype;
151  __u32 sadb_spirange_min;
152  __u32 sadb_spirange_max;
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154  __u32 sadb_spirange_reserved;
155} __attribute__((packed));
156struct sadb_x_kmprivate {
157  __u16 sadb_x_kmprivate_len;
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159  __u16 sadb_x_kmprivate_exttype;
160  __u32 sadb_x_kmprivate_reserved;
161} __attribute__((packed));
162struct sadb_x_sa2 {
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164  __u16 sadb_x_sa2_len;
165  __u16 sadb_x_sa2_exttype;
166  __u8 sadb_x_sa2_mode;
167  __u8 sadb_x_sa2_reserved1;
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169  __u16 sadb_x_sa2_reserved2;
170  __u32 sadb_x_sa2_sequence;
171  __u32 sadb_x_sa2_reqid;
172} __attribute__((packed));
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174struct sadb_x_policy {
175  __u16 sadb_x_policy_len;
176  __u16 sadb_x_policy_exttype;
177  __u16 sadb_x_policy_type;
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179  __u8 sadb_x_policy_dir;
180  __u8 sadb_x_policy_reserved;
181  __u32 sadb_x_policy_id;
182  __u32 sadb_x_policy_priority;
183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184} __attribute__((packed));
185struct sadb_x_ipsecrequest {
186  __u16 sadb_x_ipsecrequest_len;
187  __u16 sadb_x_ipsecrequest_proto;
188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189  __u8 sadb_x_ipsecrequest_mode;
190  __u8 sadb_x_ipsecrequest_level;
191  __u16 sadb_x_ipsecrequest_reserved1;
192  __u32 sadb_x_ipsecrequest_reqid;
193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194  __u32 sadb_x_ipsecrequest_reserved2;
195} __attribute__((packed));
196struct sadb_x_nat_t_type {
197  __u16 sadb_x_nat_t_type_len;
198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199  __u16 sadb_x_nat_t_type_exttype;
200  __u8 sadb_x_nat_t_type_type;
201  __u8 sadb_x_nat_t_type_reserved[3];
202} __attribute__((packed));
203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204struct sadb_x_nat_t_port {
205  __u16 sadb_x_nat_t_port_len;
206  __u16 sadb_x_nat_t_port_exttype;
207  __be16 sadb_x_nat_t_port_port;
208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209  __u16 sadb_x_nat_t_port_reserved;
210} __attribute__((packed));
211struct sadb_x_sec_ctx {
212  __u16 sadb_x_sec_len;
213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214  __u16 sadb_x_sec_exttype;
215  __u8 sadb_x_ctx_alg;
216  __u8 sadb_x_ctx_doi;
217  __u16 sadb_x_ctx_len;
218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219} __attribute__((packed));
220struct sadb_x_kmaddress {
221  __u16 sadb_x_kmaddress_len;
222  __u16 sadb_x_kmaddress_exttype;
223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224  __u32 sadb_x_kmaddress_reserved;
225} __attribute__((packed));
226struct sadb_x_filter {
227  __u16 sadb_x_filter_len;
228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229  __u16 sadb_x_filter_exttype;
230  __u32 sadb_x_filter_saddr[4];
231  __u32 sadb_x_filter_daddr[4];
232  __u16 sadb_x_filter_family;
233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234  __u8 sadb_x_filter_splen;
235  __u8 sadb_x_filter_dplen;
236} __attribute__((packed));
237#define SADB_RESERVED 0
238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239#define SADB_GETSPI 1
240#define SADB_UPDATE 2
241#define SADB_ADD 3
242#define SADB_DELETE 4
243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244#define SADB_GET 5
245#define SADB_ACQUIRE 6
246#define SADB_REGISTER 7
247#define SADB_EXPIRE 8
248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249#define SADB_FLUSH 9
250#define SADB_DUMP 10
251#define SADB_X_PROMISC 11
252#define SADB_X_PCHANGE 12
253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254#define SADB_X_SPDUPDATE 13
255#define SADB_X_SPDADD 14
256#define SADB_X_SPDDELETE 15
257#define SADB_X_SPDGET 16
258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259#define SADB_X_SPDACQUIRE 17
260#define SADB_X_SPDDUMP 18
261#define SADB_X_SPDFLUSH 19
262#define SADB_X_SPDSETIDX 20
263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264#define SADB_X_SPDEXPIRE 21
265#define SADB_X_SPDDELETE2 22
266#define SADB_X_NAT_T_NEW_MAPPING 23
267#define SADB_X_MIGRATE 24
268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269#define SADB_MAX 24
270#define SADB_SAFLAGS_PFS 1
271#define SADB_SAFLAGS_NOPMTUDISC 0x20000000
272#define SADB_SAFLAGS_DECAP_DSCP 0x40000000
273/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274#define SADB_SAFLAGS_NOECN 0x80000000
275#define SADB_SASTATE_LARVAL 0
276#define SADB_SASTATE_MATURE 1
277#define SADB_SASTATE_DYING 2
278/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279#define SADB_SASTATE_DEAD 3
280#define SADB_SASTATE_MAX 3
281#define SADB_SATYPE_UNSPEC 0
282#define SADB_SATYPE_AH 2
283/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284#define SADB_SATYPE_ESP 3
285#define SADB_SATYPE_RSVP 5
286#define SADB_SATYPE_OSPFV2 6
287#define SADB_SATYPE_RIPV2 7
288/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
289#define SADB_SATYPE_MIP 8
290#define SADB_X_SATYPE_IPCOMP 9
291#define SADB_SATYPE_MAX 9
292#define SADB_AALG_NONE 0
293/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
294#define SADB_AALG_MD5HMAC 2
295#define SADB_AALG_SHA1HMAC 3
296#define SADB_X_AALG_SHA2_256HMAC 5
297#define SADB_X_AALG_SHA2_384HMAC 6
298/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299#define SADB_X_AALG_SHA2_512HMAC 7
300#define SADB_X_AALG_RIPEMD160HMAC 8
301#define SADB_X_AALG_AES_XCBC_MAC 9
302#define SADB_X_AALG_NULL 251
303/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304#define SADB_AALG_MAX 251
305#define SADB_EALG_NONE 0
306#define SADB_EALG_DESCBC 2
307#define SADB_EALG_3DESCBC 3
308/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
309#define SADB_X_EALG_CASTCBC 6
310#define SADB_X_EALG_BLOWFISHCBC 7
311#define SADB_EALG_NULL 11
312#define SADB_X_EALG_AESCBC 12
313/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
314#define SADB_X_EALG_AESCTR 13
315#define SADB_X_EALG_AES_CCM_ICV8 14
316#define SADB_X_EALG_AES_CCM_ICV12 15
317#define SADB_X_EALG_AES_CCM_ICV16 16
318/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
319#define SADB_X_EALG_AES_GCM_ICV8 18
320#define SADB_X_EALG_AES_GCM_ICV12 19
321#define SADB_X_EALG_AES_GCM_ICV16 20
322#define SADB_X_EALG_CAMELLIACBC 22
323/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
324#define SADB_X_EALG_NULL_AES_GMAC 23
325#define SADB_EALG_MAX 253
326#define SADB_X_EALG_SERPENTCBC 252
327#define SADB_X_EALG_TWOFISHCBC 253
328/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
329#define SADB_X_CALG_NONE 0
330#define SADB_X_CALG_OUI 1
331#define SADB_X_CALG_DEFLATE 2
332#define SADB_X_CALG_LZS 3
333/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
334#define SADB_X_CALG_LZJH 4
335#define SADB_X_CALG_MAX 4
336#define SADB_EXT_RESERVED 0
337#define SADB_EXT_SA 1
338/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
339#define SADB_EXT_LIFETIME_CURRENT 2
340#define SADB_EXT_LIFETIME_HARD 3
341#define SADB_EXT_LIFETIME_SOFT 4
342#define SADB_EXT_ADDRESS_SRC 5
343/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
344#define SADB_EXT_ADDRESS_DST 6
345#define SADB_EXT_ADDRESS_PROXY 7
346#define SADB_EXT_KEY_AUTH 8
347#define SADB_EXT_KEY_ENCRYPT 9
348/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
349#define SADB_EXT_IDENTITY_SRC 10
350#define SADB_EXT_IDENTITY_DST 11
351#define SADB_EXT_SENSITIVITY 12
352#define SADB_EXT_PROPOSAL 13
353/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
354#define SADB_EXT_SUPPORTED_AUTH 14
355#define SADB_EXT_SUPPORTED_ENCRYPT 15
356#define SADB_EXT_SPIRANGE 16
357#define SADB_X_EXT_KMPRIVATE 17
358/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
359#define SADB_X_EXT_POLICY 18
360#define SADB_X_EXT_SA2 19
361#define SADB_X_EXT_NAT_T_TYPE 20
362#define SADB_X_EXT_NAT_T_SPORT 21
363/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
364#define SADB_X_EXT_NAT_T_DPORT 22
365#define SADB_X_EXT_NAT_T_OA 23
366#define SADB_X_EXT_SEC_CTX 24
367#define SADB_X_EXT_KMADDRESS 25
368/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
369#define SADB_X_EXT_FILTER 26
370#define SADB_EXT_MAX 26
371#define SADB_IDENTTYPE_RESERVED 0
372#define SADB_IDENTTYPE_PREFIX 1
373/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
374#define SADB_IDENTTYPE_FQDN 2
375#define SADB_IDENTTYPE_USERFQDN 3
376#define SADB_IDENTTYPE_MAX 3
377#endif
378/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
379