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