Skip to main content

nftnl_sys/
nftnl_1_0_6.rs

1/* automatically generated by rust-bindgen 0.72.1 */
2
3use core::option::Option;
4use libc::{FILE, c_char, c_int, c_uint, c_void, iovec, nlmsghdr};
5
6pub const NFTNL_UDATA_COMMENT_MAXLEN: u32 = 128;
7#[repr(C)]
8pub struct nftnl_batch(c_void);
9
10unsafe extern "C" {
11    pub fn nftnl_batch_alloc(pg_size: u32, pg_overrun_size: u32) -> *mut nftnl_batch;
12}
13unsafe extern "C" {
14    pub fn nftnl_batch_update(batch: *mut nftnl_batch) -> c_int;
15}
16unsafe extern "C" {
17    pub fn nftnl_batch_free(batch: *mut nftnl_batch);
18}
19unsafe extern "C" {
20    pub fn nftnl_batch_buffer(batch: *mut nftnl_batch) -> *mut c_void;
21}
22unsafe extern "C" {
23    pub fn nftnl_batch_buffer_len(batch: *mut nftnl_batch) -> u32;
24}
25unsafe extern "C" {
26    pub fn nftnl_batch_iovec_len(batch: *mut nftnl_batch) -> c_int;
27}
28unsafe extern "C" {
29    pub fn nftnl_batch_iovec(batch: *mut nftnl_batch, iov: *mut iovec, iovlen: u32);
30}
31pub const NFTNL_PARSE_EBADINPUT: u32 = 0;
32pub const NFTNL_PARSE_EMISSINGNODE: u32 = 1;
33pub const NFTNL_PARSE_EBADTYPE: u32 = 2;
34pub const NFTNL_PARSE_EOPNOTSUPP: u32 = 3;
35
36pub const NFTNL_OUTPUT_DEFAULT: nftnl_output_type = 0;
37pub const NFTNL_OUTPUT_XML: nftnl_output_type = 1;
38pub const NFTNL_OUTPUT_JSON: nftnl_output_type = 2;
39pub type nftnl_output_type = c_uint;
40pub const NFTNL_OF_EVENT_NEW: nftnl_output_flags = 1;
41pub const NFTNL_OF_EVENT_DEL: nftnl_output_flags = 2;
42pub const NFTNL_OF_EVENT_ANY: nftnl_output_flags = 3;
43pub type nftnl_output_flags = c_uint;
44pub const NFTNL_CMD_UNSPEC: nftnl_cmd_type = 0;
45pub const NFTNL_CMD_ADD: nftnl_cmd_type = 1;
46pub const NFTNL_CMD_INSERT: nftnl_cmd_type = 2;
47pub const NFTNL_CMD_DELETE: nftnl_cmd_type = 3;
48pub const NFTNL_CMD_REPLACE: nftnl_cmd_type = 4;
49pub const NFTNL_CMD_FLUSH: nftnl_cmd_type = 5;
50pub const NFTNL_CMD_MAX: nftnl_cmd_type = 6;
51pub type nftnl_cmd_type = c_uint;
52pub const NFTNL_PARSE_NONE: nftnl_parse_type = 0;
53pub const NFTNL_PARSE_XML: nftnl_parse_type = 1;
54pub const NFTNL_PARSE_JSON: nftnl_parse_type = 2;
55pub const NFTNL_PARSE_MAX: nftnl_parse_type = 3;
56pub type nftnl_parse_type = c_uint;
57#[repr(C)]
58pub struct nftnl_parse_err(c_void);
59
60unsafe extern "C" {
61    pub fn nftnl_nlmsg_build_hdr(
62        buf: *mut c_char,
63        type_: u16,
64        family: u16,
65        flags: u16,
66        seq: u32,
67    ) -> *mut nlmsghdr;
68}
69unsafe extern "C" {
70    pub fn nftnl_parse_err_alloc() -> *mut nftnl_parse_err;
71}
72unsafe extern "C" {
73    pub fn nftnl_parse_err_free(arg1: *mut nftnl_parse_err);
74}
75unsafe extern "C" {
76    pub fn nftnl_parse_perror(str_: *const c_char, err: *mut nftnl_parse_err) -> c_int;
77}
78unsafe extern "C" {
79    pub fn nftnl_batch_is_supported() -> c_int;
80}
81unsafe extern "C" {
82    pub fn nftnl_batch_begin(buf: *mut c_char, seq: u32) -> *mut nlmsghdr;
83}
84unsafe extern "C" {
85    pub fn nftnl_batch_end(buf: *mut c_char, seq: u32) -> *mut nlmsghdr;
86}
87#[repr(C)]
88pub struct nftnl_chain(c_void);
89
90#[repr(C)]
91pub struct nftnl_rule(c_void);
92
93unsafe extern "C" {
94    pub fn nftnl_chain_alloc() -> *mut nftnl_chain;
95}
96unsafe extern "C" {
97    pub fn nftnl_chain_free(arg1: *const nftnl_chain);
98}
99pub const NFTNL_CHAIN_NAME: nftnl_chain_attr = 0;
100pub const NFTNL_CHAIN_FAMILY: nftnl_chain_attr = 1;
101pub const NFTNL_CHAIN_TABLE: nftnl_chain_attr = 2;
102pub const NFTNL_CHAIN_HOOKNUM: nftnl_chain_attr = 3;
103pub const NFTNL_CHAIN_PRIO: nftnl_chain_attr = 4;
104pub const NFTNL_CHAIN_POLICY: nftnl_chain_attr = 5;
105pub const NFTNL_CHAIN_USE: nftnl_chain_attr = 6;
106pub const NFTNL_CHAIN_BYTES: nftnl_chain_attr = 7;
107pub const NFTNL_CHAIN_PACKETS: nftnl_chain_attr = 8;
108pub const NFTNL_CHAIN_HANDLE: nftnl_chain_attr = 9;
109pub const NFTNL_CHAIN_TYPE: nftnl_chain_attr = 10;
110pub const NFTNL_CHAIN_DEV: nftnl_chain_attr = 11;
111pub const NFTNL_CHAIN_DEVICES: nftnl_chain_attr = 12;
112pub const NFTNL_CHAIN_FLAGS: nftnl_chain_attr = 13;
113pub const NFTNL_CHAIN_ID: nftnl_chain_attr = 14;
114pub const NFTNL_CHAIN_USERDATA: nftnl_chain_attr = 15;
115pub const __NFTNL_CHAIN_MAX: nftnl_chain_attr = 16;
116pub type nftnl_chain_attr = c_uint;
117unsafe extern "C" {
118    pub fn nftnl_chain_is_set(c: *const nftnl_chain, attr: u16) -> bool;
119}
120unsafe extern "C" {
121    pub fn nftnl_chain_unset(c: *mut nftnl_chain, attr: u16);
122}
123unsafe extern "C" {
124    pub fn nftnl_chain_set(t: *mut nftnl_chain, attr: u16, data: *const c_void);
125}
126unsafe extern "C" {
127    pub fn nftnl_chain_set_data(
128        t: *mut nftnl_chain,
129        attr: u16,
130        data: *const c_void,
131        data_len: u32,
132    ) -> c_int;
133}
134unsafe extern "C" {
135    pub fn nftnl_chain_set_u8(t: *mut nftnl_chain, attr: u16, data: u8);
136}
137unsafe extern "C" {
138    pub fn nftnl_chain_set_u32(t: *mut nftnl_chain, attr: u16, data: u32);
139}
140unsafe extern "C" {
141    pub fn nftnl_chain_set_s32(t: *mut nftnl_chain, attr: u16, data: i32);
142}
143unsafe extern "C" {
144    pub fn nftnl_chain_set_u64(t: *mut nftnl_chain, attr: u16, data: u64);
145}
146unsafe extern "C" {
147    pub fn nftnl_chain_set_str(t: *mut nftnl_chain, attr: u16, str_: *const c_char) -> c_int;
148}
149unsafe extern "C" {
150    pub fn nftnl_chain_set_array(t: *mut nftnl_chain, attr: u16, data: *mut *const c_char)
151    -> c_int;
152}
153unsafe extern "C" {
154    pub fn nftnl_chain_get(c: *const nftnl_chain, attr: u16) -> *const c_void;
155}
156unsafe extern "C" {
157    pub fn nftnl_chain_get_data(
158        c: *const nftnl_chain,
159        attr: u16,
160        data_len: *mut u32,
161    ) -> *const c_void;
162}
163unsafe extern "C" {
164    pub fn nftnl_chain_get_str(c: *const nftnl_chain, attr: u16) -> *const c_char;
165}
166unsafe extern "C" {
167    pub fn nftnl_chain_get_u8(c: *const nftnl_chain, attr: u16) -> u8;
168}
169unsafe extern "C" {
170    pub fn nftnl_chain_get_u32(c: *const nftnl_chain, attr: u16) -> u32;
171}
172unsafe extern "C" {
173    pub fn nftnl_chain_get_s32(c: *const nftnl_chain, attr: u16) -> i32;
174}
175unsafe extern "C" {
176    pub fn nftnl_chain_get_u64(c: *const nftnl_chain, attr: u16) -> u64;
177}
178unsafe extern "C" {
179    pub fn nftnl_chain_get_array(c: *const nftnl_chain, attr: u16) -> *const *const c_char;
180}
181unsafe extern "C" {
182    pub fn nftnl_chain_rule_add(rule: *mut nftnl_rule, c: *mut nftnl_chain);
183}
184unsafe extern "C" {
185    pub fn nftnl_chain_rule_del(rule: *mut nftnl_rule);
186}
187unsafe extern "C" {
188    pub fn nftnl_chain_rule_add_tail(rule: *mut nftnl_rule, c: *mut nftnl_chain);
189}
190unsafe extern "C" {
191    pub fn nftnl_chain_rule_insert_at(rule: *mut nftnl_rule, pos: *mut nftnl_rule);
192}
193unsafe extern "C" {
194    pub fn nftnl_chain_rule_append_at(rule: *mut nftnl_rule, pos: *mut nftnl_rule);
195}
196unsafe extern "C" {
197    pub fn nftnl_chain_nlmsg_build_payload(nlh: *mut nlmsghdr, t: *const nftnl_chain);
198}
199unsafe extern "C" {
200    pub fn nftnl_chain_snprintf(
201        buf: *mut c_char,
202        size: usize,
203        t: *const nftnl_chain,
204        type_: u32,
205        flags: u32,
206    ) -> c_int;
207}
208unsafe extern "C" {
209    pub fn nftnl_chain_fprintf(
210        fp: *mut FILE,
211        c: *const nftnl_chain,
212        type_: u32,
213        flags: u32,
214    ) -> c_int;
215}
216unsafe extern "C" {
217    pub fn nftnl_chain_nlmsg_parse(nlh: *const nlmsghdr, t: *mut nftnl_chain) -> c_int;
218}
219unsafe extern "C" {
220    pub fn nftnl_rule_foreach(
221        c: *mut nftnl_chain,
222        cb: Option<unsafe extern "C" fn(r: *mut nftnl_rule, data: *mut c_void) -> c_int>,
223        data: *mut c_void,
224    ) -> c_int;
225}
226unsafe extern "C" {
227    pub fn nftnl_rule_lookup_byindex(c: *mut nftnl_chain, index: u32) -> *mut nftnl_rule;
228}
229#[repr(C)]
230pub struct nftnl_rule_iter(c_void);
231
232unsafe extern "C" {
233    pub fn nftnl_rule_iter_create(c: *const nftnl_chain) -> *mut nftnl_rule_iter;
234}
235unsafe extern "C" {
236    pub fn nftnl_rule_iter_next(iter: *mut nftnl_rule_iter) -> *mut nftnl_rule;
237}
238unsafe extern "C" {
239    pub fn nftnl_rule_iter_destroy(iter: *mut nftnl_rule_iter);
240}
241#[repr(C)]
242pub struct nftnl_chain_list(c_void);
243
244unsafe extern "C" {
245    pub fn nftnl_chain_list_alloc() -> *mut nftnl_chain_list;
246}
247unsafe extern "C" {
248    pub fn nftnl_chain_list_free(list: *mut nftnl_chain_list);
249}
250unsafe extern "C" {
251    pub fn nftnl_chain_list_is_empty(list: *const nftnl_chain_list) -> c_int;
252}
253unsafe extern "C" {
254    pub fn nftnl_chain_list_foreach(
255        chain_list: *mut nftnl_chain_list,
256        cb: Option<unsafe extern "C" fn(t: *mut nftnl_chain, data: *mut c_void) -> c_int>,
257        data: *mut c_void,
258    ) -> c_int;
259}
260unsafe extern "C" {
261    pub fn nftnl_chain_list_lookup_byname(
262        chain_list: *mut nftnl_chain_list,
263        chain: *const c_char,
264    ) -> *mut nftnl_chain;
265}
266unsafe extern "C" {
267    pub fn nftnl_chain_list_add(r: *mut nftnl_chain, list: *mut nftnl_chain_list);
268}
269unsafe extern "C" {
270    pub fn nftnl_chain_list_add_tail(r: *mut nftnl_chain, list: *mut nftnl_chain_list);
271}
272unsafe extern "C" {
273    pub fn nftnl_chain_list_del(c: *mut nftnl_chain);
274}
275#[repr(C)]
276pub struct nftnl_chain_list_iter(c_void);
277
278unsafe extern "C" {
279    pub fn nftnl_chain_list_iter_create(l: *const nftnl_chain_list) -> *mut nftnl_chain_list_iter;
280}
281unsafe extern "C" {
282    pub fn nftnl_chain_list_iter_next(iter: *mut nftnl_chain_list_iter) -> *mut nftnl_chain;
283}
284unsafe extern "C" {
285    pub fn nftnl_chain_list_iter_destroy(iter: *mut nftnl_chain_list_iter);
286}
287#[repr(C)]
288pub struct nftnl_expr(c_void);
289
290pub const NFTNL_EXPR_NAME: u32 = 0;
291pub const NFTNL_EXPR_BASE: u32 = 1;
292
293unsafe extern "C" {
294    pub fn nftnl_expr_alloc(name: *const c_char) -> *mut nftnl_expr;
295}
296unsafe extern "C" {
297    pub fn nftnl_expr_free(expr: *const nftnl_expr);
298}
299unsafe extern "C" {
300    pub fn nftnl_expr_is_set(expr: *const nftnl_expr, type_: u16) -> bool;
301}
302unsafe extern "C" {
303    pub fn nftnl_expr_set(
304        expr: *mut nftnl_expr,
305        type_: u16,
306        data: *const c_void,
307        data_len: u32,
308    ) -> c_int;
309}
310unsafe extern "C" {
311    pub fn nftnl_expr_set_u8(expr: *mut nftnl_expr, type_: u16, data: u8);
312}
313unsafe extern "C" {
314    pub fn nftnl_expr_set_u16(expr: *mut nftnl_expr, type_: u16, data: u16);
315}
316unsafe extern "C" {
317    pub fn nftnl_expr_set_u32(expr: *mut nftnl_expr, type_: u16, data: u32);
318}
319unsafe extern "C" {
320    pub fn nftnl_expr_set_u64(expr: *mut nftnl_expr, type_: u16, data: u64);
321}
322unsafe extern "C" {
323    pub fn nftnl_expr_set_str(expr: *mut nftnl_expr, type_: u16, str_: *const c_char) -> c_int;
324}
325unsafe extern "C" {
326    pub fn nftnl_expr_get(expr: *const nftnl_expr, type_: u16, data_len: *mut u32)
327    -> *const c_void;
328}
329unsafe extern "C" {
330    pub fn nftnl_expr_get_u8(expr: *const nftnl_expr, type_: u16) -> u8;
331}
332unsafe extern "C" {
333    pub fn nftnl_expr_get_u16(expr: *const nftnl_expr, type_: u16) -> u16;
334}
335unsafe extern "C" {
336    pub fn nftnl_expr_get_u32(expr: *const nftnl_expr, type_: u16) -> u32;
337}
338unsafe extern "C" {
339    pub fn nftnl_expr_get_u64(expr: *const nftnl_expr, type_: u16) -> u64;
340}
341unsafe extern "C" {
342    pub fn nftnl_expr_get_str(expr: *const nftnl_expr, type_: u16) -> *const c_char;
343}
344unsafe extern "C" {
345    pub fn nftnl_expr_build_payload(nlh: *mut nlmsghdr, expr: *mut nftnl_expr);
346}
347unsafe extern "C" {
348    pub fn nftnl_expr_add_expr(expr: *mut nftnl_expr, type_: u32, e: *mut nftnl_expr);
349}
350unsafe extern "C" {
351    pub fn nftnl_expr_expr_foreach(
352        e: *const nftnl_expr,
353        cb: Option<unsafe extern "C" fn(e: *mut nftnl_expr, data: *mut c_void) -> c_int>,
354        data: *mut c_void,
355    ) -> c_int;
356}
357unsafe extern "C" {
358    pub fn nftnl_expr_snprintf(
359        buf: *mut c_char,
360        buflen: usize,
361        expr: *const nftnl_expr,
362        type_: u32,
363        flags: u32,
364    ) -> c_int;
365}
366unsafe extern "C" {
367    pub fn nftnl_expr_fprintf(
368        fp: *mut FILE,
369        expr: *const nftnl_expr,
370        type_: u32,
371        flags: u32,
372    ) -> c_int;
373}
374pub const NFTNL_EXPR_PAYLOAD_DREG: u32 = 1;
375pub const NFTNL_EXPR_PAYLOAD_BASE: u32 = 2;
376pub const NFTNL_EXPR_PAYLOAD_OFFSET: u32 = 3;
377pub const NFTNL_EXPR_PAYLOAD_LEN: u32 = 4;
378pub const NFTNL_EXPR_PAYLOAD_SREG: u32 = 5;
379pub const NFTNL_EXPR_PAYLOAD_CSUM_TYPE: u32 = 6;
380pub const NFTNL_EXPR_PAYLOAD_CSUM_OFFSET: u32 = 7;
381pub const NFTNL_EXPR_PAYLOAD_FLAGS: u32 = 8;
382pub const __NFTNL_EXPR_PAYLOAD_MAX: u32 = 9;
383
384pub const NFTNL_EXPR_NG_DREG: u32 = 1;
385pub const NFTNL_EXPR_NG_MODULUS: u32 = 2;
386pub const NFTNL_EXPR_NG_TYPE: u32 = 3;
387pub const NFTNL_EXPR_NG_OFFSET: u32 = 4;
388pub const NFTNL_EXPR_NG_SET_NAME: u32 = 5;
389pub const NFTNL_EXPR_NG_SET_ID: u32 = 6;
390pub const __NFTNL_EXPR_NG_MAX: u32 = 7;
391
392pub const NFTNL_EXPR_META_KEY: u32 = 1;
393pub const NFTNL_EXPR_META_DREG: u32 = 2;
394pub const NFTNL_EXPR_META_SREG: u32 = 3;
395pub const __NFTNL_EXPR_META_MAX: u32 = 4;
396
397pub const NFTNL_EXPR_RT_KEY: u32 = 1;
398pub const NFTNL_EXPR_RT_DREG: u32 = 2;
399pub const __NFTNL_EXPR_RT_MAX: u32 = 3;
400
401pub const NFTNL_EXPR_SOCKET_KEY: u32 = 1;
402pub const NFTNL_EXPR_SOCKET_DREG: u32 = 2;
403pub const NFTNL_EXPR_SOCKET_LEVEL: u32 = 3;
404pub const __NFTNL_EXPR_SOCKET_MAX: u32 = 4;
405
406pub const NFTNL_EXPR_TUNNEL_KEY: u32 = 1;
407pub const NFTNL_EXPR_TUNNEL_DREG: u32 = 2;
408pub const __NFTNL_EXPR_TUNNEL_MAX: u32 = 3;
409
410pub const NFTNL_EXPR_CMP_SREG: u32 = 1;
411pub const NFTNL_EXPR_CMP_OP: u32 = 2;
412pub const NFTNL_EXPR_CMP_DATA: u32 = 3;
413pub const __NFTNL_EXPR_CMP_MAX: u32 = 4;
414
415pub const NFTNL_EXPR_RANGE_SREG: u32 = 1;
416pub const NFTNL_EXPR_RANGE_OP: u32 = 2;
417pub const NFTNL_EXPR_RANGE_FROM_DATA: u32 = 3;
418pub const NFTNL_EXPR_RANGE_TO_DATA: u32 = 4;
419pub const __NFTNL_EXPR_RANGE_MAX: u32 = 5;
420
421pub const NFTNL_EXPR_IMM_DREG: u32 = 1;
422pub const NFTNL_EXPR_IMM_DATA: u32 = 2;
423pub const NFTNL_EXPR_IMM_VERDICT: u32 = 3;
424pub const NFTNL_EXPR_IMM_CHAIN: u32 = 4;
425pub const NFTNL_EXPR_IMM_CHAIN_ID: u32 = 5;
426pub const __NFTNL_EXPR_IMM_MAX: u32 = 6;
427
428pub const NFTNL_EXPR_CTR_PACKETS: u32 = 1;
429pub const NFTNL_EXPR_CTR_BYTES: u32 = 2;
430pub const __NFTNL_EXPR_CTR_MAX: u32 = 3;
431
432pub const NFTNL_EXPR_CONNLIMIT_COUNT: u32 = 1;
433pub const NFTNL_EXPR_CONNLIMIT_FLAGS: u32 = 2;
434pub const __NFTNL_EXPR_CONNLIMIT_MAX: u32 = 3;
435
436pub const NFTNL_EXPR_BITWISE_SREG: u32 = 1;
437pub const NFTNL_EXPR_BITWISE_DREG: u32 = 2;
438pub const NFTNL_EXPR_BITWISE_LEN: u32 = 3;
439pub const NFTNL_EXPR_BITWISE_MASK: u32 = 4;
440pub const NFTNL_EXPR_BITWISE_XOR: u32 = 5;
441pub const NFTNL_EXPR_BITWISE_OP: u32 = 6;
442pub const NFTNL_EXPR_BITWISE_DATA: u32 = 7;
443pub const NFTNL_EXPR_BITWISE_SREG2: u32 = 8;
444pub const __NFTNL_EXPR_BITWISE_MAX: u32 = 9;
445
446pub const NFTNL_EXPR_TG_NAME: u32 = 1;
447pub const NFTNL_EXPR_TG_REV: u32 = 2;
448pub const NFTNL_EXPR_TG_INFO: u32 = 3;
449pub const __NFTNL_EXPR_TG_MAX: u32 = 4;
450
451pub const NFTNL_EXPR_MT_NAME: u32 = 1;
452pub const NFTNL_EXPR_MT_REV: u32 = 2;
453pub const NFTNL_EXPR_MT_INFO: u32 = 3;
454pub const __NFTNL_EXPR_MT_MAX: u32 = 4;
455
456pub const NFTNL_EXPR_NAT_TYPE: u32 = 1;
457pub const NFTNL_EXPR_NAT_FAMILY: u32 = 2;
458pub const NFTNL_EXPR_NAT_REG_ADDR_MIN: u32 = 3;
459pub const NFTNL_EXPR_NAT_REG_ADDR_MAX: u32 = 4;
460pub const NFTNL_EXPR_NAT_REG_PROTO_MIN: u32 = 5;
461pub const NFTNL_EXPR_NAT_REG_PROTO_MAX: u32 = 6;
462pub const NFTNL_EXPR_NAT_FLAGS: u32 = 7;
463pub const __NFTNL_EXPR_NAT_MAX: u32 = 8;
464
465pub const NFTNL_EXPR_TPROXY_FAMILY: u32 = 1;
466pub const NFTNL_EXPR_TPROXY_REG_ADDR: u32 = 2;
467pub const NFTNL_EXPR_TPROXY_REG_PORT: u32 = 3;
468pub const __NFTNL_EXPR_TPROXY_MAX: u32 = 4;
469
470pub const NFTNL_EXPR_LOOKUP_SREG: u32 = 1;
471pub const NFTNL_EXPR_LOOKUP_DREG: u32 = 2;
472pub const NFTNL_EXPR_LOOKUP_SET: u32 = 3;
473pub const NFTNL_EXPR_LOOKUP_SET_ID: u32 = 4;
474pub const NFTNL_EXPR_LOOKUP_FLAGS: u32 = 5;
475pub const __NFTNL_EXPR_LOOKUP_MAX: u32 = 6;
476
477pub const NFTNL_EXPR_DYNSET_SREG_KEY: u32 = 1;
478pub const NFTNL_EXPR_DYNSET_SREG_DATA: u32 = 2;
479pub const NFTNL_EXPR_DYNSET_OP: u32 = 3;
480pub const NFTNL_EXPR_DYNSET_TIMEOUT: u32 = 4;
481pub const NFTNL_EXPR_DYNSET_SET_NAME: u32 = 5;
482pub const NFTNL_EXPR_DYNSET_SET_ID: u32 = 6;
483pub const NFTNL_EXPR_DYNSET_EXPR: u32 = 7;
484pub const NFTNL_EXPR_DYNSET_EXPRESSIONS: u32 = 8;
485pub const NFTNL_EXPR_DYNSET_FLAGS: u32 = 9;
486pub const __NFTNL_EXPR_DYNSET_MAX: u32 = 10;
487
488pub const NFTNL_EXPR_LOG_PREFIX: u32 = 1;
489pub const NFTNL_EXPR_LOG_GROUP: u32 = 2;
490pub const NFTNL_EXPR_LOG_SNAPLEN: u32 = 3;
491pub const NFTNL_EXPR_LOG_QTHRESHOLD: u32 = 4;
492pub const NFTNL_EXPR_LOG_LEVEL: u32 = 5;
493pub const NFTNL_EXPR_LOG_FLAGS: u32 = 6;
494pub const __NFTNL_EXPR_LOG_MAX: u32 = 7;
495
496pub const NFTNL_EXPR_EXTHDR_DREG: u32 = 1;
497pub const NFTNL_EXPR_EXTHDR_TYPE: u32 = 2;
498pub const NFTNL_EXPR_EXTHDR_OFFSET: u32 = 3;
499pub const NFTNL_EXPR_EXTHDR_LEN: u32 = 4;
500pub const NFTNL_EXPR_EXTHDR_FLAGS: u32 = 5;
501pub const NFTNL_EXPR_EXTHDR_OP: u32 = 6;
502pub const NFTNL_EXPR_EXTHDR_SREG: u32 = 7;
503pub const __NFTNL_EXPR_EXTHDR_MAX: u32 = 8;
504
505pub const NFTNL_EXPR_CT_DREG: u32 = 1;
506pub const NFTNL_EXPR_CT_KEY: u32 = 2;
507pub const NFTNL_EXPR_CT_DIR: u32 = 3;
508pub const NFTNL_EXPR_CT_SREG: u32 = 4;
509pub const __NFTNL_EXPR_CT_MAX: u32 = 5;
510
511pub const NFTNL_EXPR_BYTEORDER_DREG: u32 = 1;
512pub const NFTNL_EXPR_BYTEORDER_SREG: u32 = 2;
513pub const NFTNL_EXPR_BYTEORDER_OP: u32 = 3;
514pub const NFTNL_EXPR_BYTEORDER_LEN: u32 = 4;
515pub const NFTNL_EXPR_BYTEORDER_SIZE: u32 = 5;
516pub const __NFTNL_EXPR_BYTEORDER_MAX: u32 = 6;
517
518pub const NFTNL_EXPR_LIMIT_RATE: u32 = 1;
519pub const NFTNL_EXPR_LIMIT_UNIT: u32 = 2;
520pub const NFTNL_EXPR_LIMIT_BURST: u32 = 3;
521pub const NFTNL_EXPR_LIMIT_TYPE: u32 = 4;
522pub const NFTNL_EXPR_LIMIT_FLAGS: u32 = 5;
523pub const __NFTNL_EXPR_LIMIT_MAX: u32 = 6;
524
525pub const NFTNL_EXPR_REJECT_TYPE: u32 = 1;
526pub const NFTNL_EXPR_REJECT_CODE: u32 = 2;
527pub const __NFTNL_EXPR_REJECT_MAX: u32 = 3;
528
529pub const NFTNL_EXPR_QUEUE_NUM: u32 = 1;
530pub const NFTNL_EXPR_QUEUE_TOTAL: u32 = 2;
531pub const NFTNL_EXPR_QUEUE_FLAGS: u32 = 3;
532pub const NFTNL_EXPR_QUEUE_SREG_QNUM: u32 = 4;
533pub const __NFTNL_EXPR_QUEUE_MAX: u32 = 5;
534
535pub const NFTNL_EXPR_QUOTA_BYTES: u32 = 1;
536pub const NFTNL_EXPR_QUOTA_FLAGS: u32 = 2;
537pub const NFTNL_EXPR_QUOTA_CONSUMED: u32 = 3;
538pub const __NFTNL_EXPR_QUOTA_MAX: u32 = 4;
539
540pub const NFTNL_EXPR_MASQ_FLAGS: u32 = 1;
541pub const NFTNL_EXPR_MASQ_REG_PROTO_MIN: u32 = 2;
542pub const NFTNL_EXPR_MASQ_REG_PROTO_MAX: u32 = 3;
543pub const __NFTNL_EXPR_MASQ_MAX: u32 = 4;
544
545pub const NFTNL_EXPR_REDIR_REG_PROTO_MIN: u32 = 1;
546pub const NFTNL_EXPR_REDIR_REG_PROTO_MAX: u32 = 2;
547pub const NFTNL_EXPR_REDIR_FLAGS: u32 = 3;
548pub const __NFTNL_EXPR_REDIR_MAX: u32 = 4;
549
550pub const NFTNL_EXPR_DUP_SREG_ADDR: u32 = 1;
551pub const NFTNL_EXPR_DUP_SREG_DEV: u32 = 2;
552pub const __NFTNL_EXPR_DUP_MAX: u32 = 3;
553
554pub const NFTNL_EXPR_FLOW_TABLE_NAME: u32 = 1;
555pub const __NFTNL_EXPR_FLOW_MAX: u32 = 2;
556
557pub const NFTNL_EXPR_FWD_SREG_DEV: u32 = 1;
558pub const NFTNL_EXPR_FWD_SREG_ADDR: u32 = 2;
559pub const NFTNL_EXPR_FWD_NFPROTO: u32 = 3;
560pub const __NFTNL_EXPR_FWD_MAX: u32 = 4;
561
562pub const NFTNL_EXPR_HASH_SREG: u32 = 1;
563pub const NFTNL_EXPR_HASH_DREG: u32 = 2;
564pub const NFTNL_EXPR_HASH_LEN: u32 = 3;
565pub const NFTNL_EXPR_HASH_MODULUS: u32 = 4;
566pub const NFTNL_EXPR_HASH_SEED: u32 = 5;
567pub const NFTNL_EXPR_HASH_OFFSET: u32 = 6;
568pub const NFTNL_EXPR_HASH_TYPE: u32 = 7;
569pub const NFTNL_EXPR_HASH_SET_NAME: u32 = 8;
570pub const NFTNL_EXPR_HASH_SET_ID: u32 = 9;
571pub const __NFTNL_EXPR_HASH_MAX: u32 = 10;
572
573pub const NFTNL_EXPR_FIB_DREG: u32 = 1;
574pub const NFTNL_EXPR_FIB_RESULT: u32 = 2;
575pub const NFTNL_EXPR_FIB_FLAGS: u32 = 3;
576pub const __NFTNL_EXPR_FIB_MAX: u32 = 4;
577
578pub const NFTNL_EXPR_OBJREF_IMM_TYPE: u32 = 1;
579pub const NFTNL_EXPR_OBJREF_IMM_NAME: u32 = 2;
580pub const NFTNL_EXPR_OBJREF_SET_SREG: u32 = 3;
581pub const NFTNL_EXPR_OBJREF_SET_NAME: u32 = 4;
582pub const NFTNL_EXPR_OBJREF_SET_ID: u32 = 5;
583pub const __NFTNL_EXPR_OBJREF_MAX: u32 = 6;
584
585pub const NFTNL_EXPR_OSF_DREG: u32 = 1;
586pub const NFTNL_EXPR_OSF_TTL: u32 = 2;
587pub const NFTNL_EXPR_OSF_FLAGS: u32 = 3;
588pub const __NFTNL_EXPR_OSF_MAX: u32 = 4;
589
590pub const NFTNL_EXPR_XFRM_DREG: u32 = 1;
591pub const NFTNL_EXPR_XFRM_SREG: u32 = 2;
592pub const NFTNL_EXPR_XFRM_KEY: u32 = 3;
593pub const NFTNL_EXPR_XFRM_DIR: u32 = 4;
594pub const NFTNL_EXPR_XFRM_SPNUM: u32 = 5;
595pub const __NFTNL_EXPR_XFRM_MAX: u32 = 6;
596
597pub const NFTNL_EXPR_SYNPROXY_MSS: u32 = 1;
598pub const NFTNL_EXPR_SYNPROXY_WSCALE: u32 = 2;
599pub const NFTNL_EXPR_SYNPROXY_FLAGS: u32 = 3;
600pub const __NFTNL_EXPR_SYNPROXY_MAX: u32 = 4;
601
602pub const NFTNL_EXPR_LAST_MSECS: u32 = 1;
603pub const NFTNL_EXPR_LAST_SET: u32 = 2;
604pub const __NFTNL_EXPR_LAST_MAX: u32 = 3;
605
606pub const NFTNL_EXPR_INNER_TYPE: u32 = 1;
607pub const NFTNL_EXPR_INNER_FLAGS: u32 = 2;
608pub const NFTNL_EXPR_INNER_HDRSIZE: u32 = 3;
609pub const NFTNL_EXPR_INNER_EXPR: u32 = 4;
610pub const __NFTNL_EXPR_INNER_MAX: u32 = 5;
611
612#[repr(C)]
613pub struct nftnl_flowtable(c_void);
614
615unsafe extern "C" {
616    pub fn nftnl_flowtable_alloc() -> *mut nftnl_flowtable;
617}
618unsafe extern "C" {
619    pub fn nftnl_flowtable_free(arg1: *const nftnl_flowtable);
620}
621pub const NFTNL_FLOWTABLE_NAME: nftnl_flowtable_attr = 0;
622pub const NFTNL_FLOWTABLE_FAMILY: nftnl_flowtable_attr = 1;
623pub const NFTNL_FLOWTABLE_TABLE: nftnl_flowtable_attr = 2;
624pub const NFTNL_FLOWTABLE_HOOKNUM: nftnl_flowtable_attr = 3;
625pub const NFTNL_FLOWTABLE_PRIO: nftnl_flowtable_attr = 4;
626pub const NFTNL_FLOWTABLE_USE: nftnl_flowtable_attr = 5;
627pub const NFTNL_FLOWTABLE_DEVICES: nftnl_flowtable_attr = 6;
628pub const NFTNL_FLOWTABLE_SIZE: nftnl_flowtable_attr = 7;
629pub const NFTNL_FLOWTABLE_FLAGS: nftnl_flowtable_attr = 8;
630pub const NFTNL_FLOWTABLE_HANDLE: nftnl_flowtable_attr = 9;
631pub const __NFTNL_FLOWTABLE_MAX: nftnl_flowtable_attr = 10;
632pub type nftnl_flowtable_attr = c_uint;
633unsafe extern "C" {
634    pub fn nftnl_flowtable_is_set(c: *const nftnl_flowtable, attr: u16) -> bool;
635}
636unsafe extern "C" {
637    pub fn nftnl_flowtable_unset(c: *mut nftnl_flowtable, attr: u16);
638}
639unsafe extern "C" {
640    pub fn nftnl_flowtable_set(t: *mut nftnl_flowtable, attr: u16, data: *const c_void);
641}
642unsafe extern "C" {
643    pub fn nftnl_flowtable_set_data(
644        t: *mut nftnl_flowtable,
645        attr: u16,
646        data: *const c_void,
647        data_len: u32,
648    ) -> c_int;
649}
650unsafe extern "C" {
651    pub fn nftnl_flowtable_set_u32(t: *mut nftnl_flowtable, attr: u16, data: u32);
652}
653unsafe extern "C" {
654    pub fn nftnl_flowtable_set_s32(t: *mut nftnl_flowtable, attr: u16, data: i32);
655}
656unsafe extern "C" {
657    pub fn nftnl_flowtable_set_u64(t: *mut nftnl_flowtable, attr: u16, data: u64);
658}
659unsafe extern "C" {
660    pub fn nftnl_flowtable_set_str(
661        t: *mut nftnl_flowtable,
662        attr: u16,
663        str_: *const c_char,
664    ) -> c_int;
665}
666unsafe extern "C" {
667    pub fn nftnl_flowtable_set_array(
668        t: *mut nftnl_flowtable,
669        attr: u16,
670        data: *mut *const c_char,
671    ) -> c_int;
672}
673unsafe extern "C" {
674    pub fn nftnl_flowtable_get(c: *const nftnl_flowtable, attr: u16) -> *const c_void;
675}
676unsafe extern "C" {
677    pub fn nftnl_flowtable_get_data(
678        c: *const nftnl_flowtable,
679        attr: u16,
680        data_len: *mut u32,
681    ) -> *const c_void;
682}
683unsafe extern "C" {
684    pub fn nftnl_flowtable_get_str(c: *const nftnl_flowtable, attr: u16) -> *const c_char;
685}
686unsafe extern "C" {
687    pub fn nftnl_flowtable_get_u32(c: *const nftnl_flowtable, attr: u16) -> u32;
688}
689unsafe extern "C" {
690    pub fn nftnl_flowtable_get_s32(c: *const nftnl_flowtable, attr: u16) -> i32;
691}
692unsafe extern "C" {
693    pub fn nftnl_flowtable_get_u64(c: *const nftnl_flowtable, attr: u16) -> u64;
694}
695unsafe extern "C" {
696    pub fn nftnl_flowtable_get_array(t: *const nftnl_flowtable, attr: u16) -> *const *const c_char;
697}
698unsafe extern "C" {
699    pub fn nftnl_flowtable_nlmsg_build_payload(nlh: *mut nlmsghdr, t: *const nftnl_flowtable);
700}
701unsafe extern "C" {
702    pub fn nftnl_flowtable_parse(
703        c: *mut nftnl_flowtable,
704        type_: nftnl_parse_type,
705        data: *const c_char,
706        err: *mut nftnl_parse_err,
707    ) -> c_int;
708}
709unsafe extern "C" {
710    pub fn nftnl_flowtable_parse_file(
711        c: *mut nftnl_flowtable,
712        type_: nftnl_parse_type,
713        fp: *mut FILE,
714        err: *mut nftnl_parse_err,
715    ) -> c_int;
716}
717unsafe extern "C" {
718    pub fn nftnl_flowtable_snprintf(
719        buf: *mut c_char,
720        size: usize,
721        t: *const nftnl_flowtable,
722        type_: u32,
723        flags: u32,
724    ) -> c_int;
725}
726unsafe extern "C" {
727    pub fn nftnl_flowtable_fprintf(
728        fp: *mut FILE,
729        c: *const nftnl_flowtable,
730        type_: u32,
731        flags: u32,
732    ) -> c_int;
733}
734unsafe extern "C" {
735    pub fn nftnl_flowtable_nlmsg_parse(nlh: *const nlmsghdr, t: *mut nftnl_flowtable) -> c_int;
736}
737#[repr(C)]
738pub struct nftnl_flowtable_list(c_void);
739
740unsafe extern "C" {
741    pub fn nftnl_flowtable_list_alloc() -> *mut nftnl_flowtable_list;
742}
743unsafe extern "C" {
744    pub fn nftnl_flowtable_list_free(list: *mut nftnl_flowtable_list);
745}
746unsafe extern "C" {
747    pub fn nftnl_flowtable_list_is_empty(list: *const nftnl_flowtable_list) -> c_int;
748}
749unsafe extern "C" {
750    pub fn nftnl_flowtable_list_add(s: *mut nftnl_flowtable, list: *mut nftnl_flowtable_list);
751}
752unsafe extern "C" {
753    pub fn nftnl_flowtable_list_add_tail(s: *mut nftnl_flowtable, list: *mut nftnl_flowtable_list);
754}
755unsafe extern "C" {
756    pub fn nftnl_flowtable_list_del(s: *mut nftnl_flowtable);
757}
758unsafe extern "C" {
759    pub fn nftnl_flowtable_list_foreach(
760        flowtable_list: *mut nftnl_flowtable_list,
761        cb: Option<unsafe extern "C" fn(t: *mut nftnl_flowtable, data: *mut c_void) -> c_int>,
762        data: *mut c_void,
763    ) -> c_int;
764}
765#[repr(C)]
766pub struct nftnl_gen(c_void);
767
768unsafe extern "C" {
769    pub fn nftnl_gen_alloc() -> *mut nftnl_gen;
770}
771unsafe extern "C" {
772    pub fn nftnl_gen_free(arg1: *const nftnl_gen);
773}
774pub const NFTNL_GEN_ID: u32 = 0;
775pub const __NFTNL_GEN_MAX: u32 = 1;
776
777unsafe extern "C" {
778    pub fn nftnl_gen_is_set(gen_: *const nftnl_gen, attr: u16) -> bool;
779}
780unsafe extern "C" {
781    pub fn nftnl_gen_unset(gen_: *mut nftnl_gen, attr: u16);
782}
783unsafe extern "C" {
784    pub fn nftnl_gen_set(gen_: *mut nftnl_gen, attr: u16, data: *const c_void) -> c_int;
785}
786unsafe extern "C" {
787    pub fn nftnl_gen_set_data(
788        gen_: *mut nftnl_gen,
789        attr: u16,
790        data: *const c_void,
791        data_len: u32,
792    ) -> c_int;
793}
794unsafe extern "C" {
795    pub fn nftnl_gen_get(gen_: *const nftnl_gen, attr: u16) -> *const c_void;
796}
797unsafe extern "C" {
798    pub fn nftnl_gen_get_data(
799        gen_: *const nftnl_gen,
800        attr: u16,
801        data_len: *mut u32,
802    ) -> *const c_void;
803}
804unsafe extern "C" {
805    pub fn nftnl_gen_set_u32(gen_: *mut nftnl_gen, attr: u16, data: u32);
806}
807unsafe extern "C" {
808    pub fn nftnl_gen_get_u32(gen_: *const nftnl_gen, attr: u16) -> u32;
809}
810unsafe extern "C" {
811    pub fn nftnl_gen_nlmsg_parse(nlh: *const nlmsghdr, gen_: *mut nftnl_gen) -> c_int;
812}
813unsafe extern "C" {
814    pub fn nftnl_gen_snprintf(
815        buf: *mut c_char,
816        size: usize,
817        gen_: *const nftnl_gen,
818        type_: u32,
819        flags: u32,
820    ) -> c_int;
821}
822unsafe extern "C" {
823    pub fn nftnl_gen_fprintf(
824        fp: *mut FILE,
825        gen_: *const nftnl_gen,
826        type_: u32,
827        flags: u32,
828    ) -> c_int;
829}
830pub const NFTNL_OBJ_TABLE: u32 = 0;
831pub const NFTNL_OBJ_NAME: u32 = 1;
832pub const NFTNL_OBJ_TYPE: u32 = 2;
833pub const NFTNL_OBJ_FAMILY: u32 = 3;
834pub const NFTNL_OBJ_USE: u32 = 4;
835pub const NFTNL_OBJ_HANDLE: u32 = 5;
836pub const NFTNL_OBJ_USERDATA: u32 = 6;
837pub const NFTNL_OBJ_BASE: u32 = 16;
838pub const __NFTNL_OBJ_MAX: u32 = 17;
839
840pub const NFTNL_OBJ_CTR_PKTS: u32 = 16;
841pub const NFTNL_OBJ_CTR_BYTES: u32 = 17;
842pub const __NFTNL_OBJ_CTR_MAX: u32 = 18;
843
844pub const NFTNL_OBJ_QUOTA_BYTES: u32 = 16;
845pub const NFTNL_OBJ_QUOTA_CONSUMED: u32 = 17;
846pub const NFTNL_OBJ_QUOTA_FLAGS: u32 = 18;
847pub const __NFTNL_OBJ_QUOTA_MAX: u32 = 19;
848
849pub const NFTNL_OBJ_CT_HELPER_NAME: u32 = 16;
850pub const NFTNL_OBJ_CT_HELPER_L3PROTO: u32 = 17;
851pub const NFTNL_OBJ_CT_HELPER_L4PROTO: u32 = 18;
852pub const __NFTNL_OBJ_CT_HELPER_MAX: u32 = 19;
853
854pub const NFTNL_CTTIMEOUT_TCP_SYN_SENT: nftnl_cttimeout_array_tcp = 0;
855pub const NFTNL_CTTIMEOUT_TCP_SYN_RECV: nftnl_cttimeout_array_tcp = 1;
856pub const NFTNL_CTTIMEOUT_TCP_ESTABLISHED: nftnl_cttimeout_array_tcp = 2;
857pub const NFTNL_CTTIMEOUT_TCP_FIN_WAIT: nftnl_cttimeout_array_tcp = 3;
858pub const NFTNL_CTTIMEOUT_TCP_CLOSE_WAIT: nftnl_cttimeout_array_tcp = 4;
859pub const NFTNL_CTTIMEOUT_TCP_LAST_ACK: nftnl_cttimeout_array_tcp = 5;
860pub const NFTNL_CTTIMEOUT_TCP_TIME_WAIT: nftnl_cttimeout_array_tcp = 6;
861pub const NFTNL_CTTIMEOUT_TCP_CLOSE: nftnl_cttimeout_array_tcp = 7;
862pub const NFTNL_CTTIMEOUT_TCP_SYN_SENT2: nftnl_cttimeout_array_tcp = 8;
863pub const NFTNL_CTTIMEOUT_TCP_RETRANS: nftnl_cttimeout_array_tcp = 9;
864pub const NFTNL_CTTIMEOUT_TCP_UNACK: nftnl_cttimeout_array_tcp = 10;
865pub const NFTNL_CTTIMEOUT_TCP_MAX: nftnl_cttimeout_array_tcp = 11;
866pub type nftnl_cttimeout_array_tcp = c_uint;
867pub const NFTNL_CTTIMEOUT_UDP_UNREPLIED: nftnl_cttimeout_array_udp = 0;
868pub const NFTNL_CTTIMEOUT_UDP_REPLIED: nftnl_cttimeout_array_udp = 1;
869pub const NFTNL_CTTIMEOUT_UDP_MAX: nftnl_cttimeout_array_udp = 2;
870pub type nftnl_cttimeout_array_udp = c_uint;
871pub const NFTNL_OBJ_CT_TIMEOUT_L3PROTO: u32 = 16;
872pub const NFTNL_OBJ_CT_TIMEOUT_L4PROTO: u32 = 17;
873pub const NFTNL_OBJ_CT_TIMEOUT_ARRAY: u32 = 18;
874pub const __NFTNL_OBJ_CT_TIMEOUT_MAX: u32 = 19;
875
876pub const NFTNL_OBJ_CT_EXPECT_L3PROTO: u32 = 16;
877pub const NFTNL_OBJ_CT_EXPECT_L4PROTO: u32 = 17;
878pub const NFTNL_OBJ_CT_EXPECT_DPORT: u32 = 18;
879pub const NFTNL_OBJ_CT_EXPECT_TIMEOUT: u32 = 19;
880pub const NFTNL_OBJ_CT_EXPECT_SIZE: u32 = 20;
881pub const __NFTNL_OBJ_CT_EXPECT_MAX: u32 = 21;
882
883pub const NFTNL_OBJ_LIMIT_RATE: u32 = 16;
884pub const NFTNL_OBJ_LIMIT_UNIT: u32 = 17;
885pub const NFTNL_OBJ_LIMIT_BURST: u32 = 18;
886pub const NFTNL_OBJ_LIMIT_TYPE: u32 = 19;
887pub const NFTNL_OBJ_LIMIT_FLAGS: u32 = 20;
888pub const __NFTNL_OBJ_LIMIT_MAX: u32 = 21;
889
890pub const NFTNL_OBJ_SYNPROXY_MSS: u32 = 16;
891pub const NFTNL_OBJ_SYNPROXY_WSCALE: u32 = 17;
892pub const NFTNL_OBJ_SYNPROXY_FLAGS: u32 = 18;
893pub const __NFTNL_OBJ_SYNPROXY_MAX: u32 = 19;
894
895pub const NFTNL_OBJ_TUNNEL_ID: u32 = 16;
896pub const NFTNL_OBJ_TUNNEL_IPV4_SRC: u32 = 17;
897pub const NFTNL_OBJ_TUNNEL_IPV4_DST: u32 = 18;
898pub const NFTNL_OBJ_TUNNEL_IPV6_SRC: u32 = 19;
899pub const NFTNL_OBJ_TUNNEL_IPV6_DST: u32 = 20;
900pub const NFTNL_OBJ_TUNNEL_IPV6_FLOWLABEL: u32 = 21;
901pub const NFTNL_OBJ_TUNNEL_SPORT: u32 = 22;
902pub const NFTNL_OBJ_TUNNEL_DPORT: u32 = 23;
903pub const NFTNL_OBJ_TUNNEL_FLAGS: u32 = 24;
904pub const NFTNL_OBJ_TUNNEL_TOS: u32 = 25;
905pub const NFTNL_OBJ_TUNNEL_TTL: u32 = 26;
906pub const NFTNL_OBJ_TUNNEL_VXLAN_GBP: u32 = 27;
907pub const NFTNL_OBJ_TUNNEL_ERSPAN_VERSION: u32 = 28;
908pub const NFTNL_OBJ_TUNNEL_ERSPAN_V1_INDEX: u32 = 29;
909pub const NFTNL_OBJ_TUNNEL_ERSPAN_V2_HWID: u32 = 30;
910pub const NFTNL_OBJ_TUNNEL_ERSPAN_V2_DIR: u32 = 31;
911pub const __NFTNL_OBJ_TUNNEL_MAX: u32 = 32;
912
913pub const NFTNL_OBJ_SECMARK_CTX: u32 = 16;
914pub const __NFTNL_OBJ_SECMARK_MAX: u32 = 17;
915
916#[repr(C)]
917pub struct nftnl_obj(c_void);
918
919unsafe extern "C" {
920    pub fn nftnl_obj_alloc() -> *mut nftnl_obj;
921}
922unsafe extern "C" {
923    pub fn nftnl_obj_free(ne: *const nftnl_obj);
924}
925unsafe extern "C" {
926    pub fn nftnl_obj_is_set(ne: *const nftnl_obj, attr: u16) -> bool;
927}
928unsafe extern "C" {
929    pub fn nftnl_obj_unset(ne: *mut nftnl_obj, attr: u16);
930}
931unsafe extern "C" {
932    pub fn nftnl_obj_set_data(
933        ne: *mut nftnl_obj,
934        attr: u16,
935        data: *const c_void,
936        data_len: u32,
937    ) -> c_int;
938}
939unsafe extern "C" {
940    pub fn nftnl_obj_set(ne: *mut nftnl_obj, attr: u16, data: *const c_void);
941}
942unsafe extern "C" {
943    pub fn nftnl_obj_set_u8(ne: *mut nftnl_obj, attr: u16, val: u8) -> c_int;
944}
945unsafe extern "C" {
946    pub fn nftnl_obj_set_u16(ne: *mut nftnl_obj, attr: u16, val: u16) -> c_int;
947}
948unsafe extern "C" {
949    pub fn nftnl_obj_set_u32(ne: *mut nftnl_obj, attr: u16, val: u32) -> c_int;
950}
951unsafe extern "C" {
952    pub fn nftnl_obj_set_u64(obj: *mut nftnl_obj, attr: u16, val: u64) -> c_int;
953}
954unsafe extern "C" {
955    pub fn nftnl_obj_set_str(ne: *mut nftnl_obj, attr: u16, str_: *const c_char) -> c_int;
956}
957unsafe extern "C" {
958    pub fn nftnl_obj_get_data(ne: *const nftnl_obj, attr: u16, data_len: *mut u32)
959    -> *const c_void;
960}
961unsafe extern "C" {
962    pub fn nftnl_obj_get(ne: *const nftnl_obj, attr: u16) -> *const c_void;
963}
964unsafe extern "C" {
965    pub fn nftnl_obj_get_u8(ne: *const nftnl_obj, attr: u16) -> u8;
966}
967unsafe extern "C" {
968    pub fn nftnl_obj_get_u16(obj: *const nftnl_obj, attr: u16) -> u16;
969}
970unsafe extern "C" {
971    pub fn nftnl_obj_get_u32(ne: *const nftnl_obj, attr: u16) -> u32;
972}
973unsafe extern "C" {
974    pub fn nftnl_obj_get_u64(obj: *const nftnl_obj, attr: u16) -> u64;
975}
976unsafe extern "C" {
977    pub fn nftnl_obj_get_str(ne: *const nftnl_obj, attr: u16) -> *const c_char;
978}
979unsafe extern "C" {
980    pub fn nftnl_obj_nlmsg_build_payload(nlh: *mut nlmsghdr, ne: *const nftnl_obj);
981}
982unsafe extern "C" {
983    pub fn nftnl_obj_nlmsg_parse(nlh: *const nlmsghdr, ne: *mut nftnl_obj) -> c_int;
984}
985unsafe extern "C" {
986    pub fn nftnl_obj_parse(
987        ne: *mut nftnl_obj,
988        type_: nftnl_parse_type,
989        data: *const c_char,
990        err: *mut nftnl_parse_err,
991    ) -> c_int;
992}
993unsafe extern "C" {
994    pub fn nftnl_obj_parse_file(
995        ne: *mut nftnl_obj,
996        type_: nftnl_parse_type,
997        fp: *mut FILE,
998        err: *mut nftnl_parse_err,
999    ) -> c_int;
1000}
1001unsafe extern "C" {
1002    pub fn nftnl_obj_snprintf(
1003        buf: *mut c_char,
1004        size: usize,
1005        ne: *const nftnl_obj,
1006        type_: u32,
1007        flags: u32,
1008    ) -> c_int;
1009}
1010unsafe extern "C" {
1011    pub fn nftnl_obj_fprintf(fp: *mut FILE, ne: *const nftnl_obj, type_: u32, flags: u32) -> c_int;
1012}
1013#[repr(C)]
1014pub struct nftnl_obj_list(c_void);
1015
1016unsafe extern "C" {
1017    pub fn nftnl_obj_list_alloc() -> *mut nftnl_obj_list;
1018}
1019unsafe extern "C" {
1020    pub fn nftnl_obj_list_free(list: *mut nftnl_obj_list);
1021}
1022unsafe extern "C" {
1023    pub fn nftnl_obj_list_is_empty(list: *mut nftnl_obj_list) -> c_int;
1024}
1025unsafe extern "C" {
1026    pub fn nftnl_obj_list_add(r: *mut nftnl_obj, list: *mut nftnl_obj_list);
1027}
1028unsafe extern "C" {
1029    pub fn nftnl_obj_list_add_tail(r: *mut nftnl_obj, list: *mut nftnl_obj_list);
1030}
1031unsafe extern "C" {
1032    pub fn nftnl_obj_list_del(t: *mut nftnl_obj);
1033}
1034unsafe extern "C" {
1035    pub fn nftnl_obj_list_foreach(
1036        table_list: *mut nftnl_obj_list,
1037        cb: Option<unsafe extern "C" fn(t: *mut nftnl_obj, data: *mut c_void) -> c_int>,
1038        data: *mut c_void,
1039    ) -> c_int;
1040}
1041#[repr(C)]
1042pub struct nftnl_obj_list_iter(c_void);
1043
1044unsafe extern "C" {
1045    pub fn nftnl_obj_list_iter_create(l: *mut nftnl_obj_list) -> *mut nftnl_obj_list_iter;
1046}
1047unsafe extern "C" {
1048    pub fn nftnl_obj_list_iter_next(iter: *mut nftnl_obj_list_iter) -> *mut nftnl_obj;
1049}
1050unsafe extern "C" {
1051    pub fn nftnl_obj_list_iter_destroy(iter: *mut nftnl_obj_list_iter);
1052}
1053unsafe extern "C" {
1054    pub fn nftnl_rule_alloc() -> *mut nftnl_rule;
1055}
1056unsafe extern "C" {
1057    pub fn nftnl_rule_free(arg1: *const nftnl_rule);
1058}
1059pub const NFTNL_RULE_FAMILY: nftnl_rule_attr = 0;
1060pub const NFTNL_RULE_TABLE: nftnl_rule_attr = 1;
1061pub const NFTNL_RULE_CHAIN: nftnl_rule_attr = 2;
1062pub const NFTNL_RULE_HANDLE: nftnl_rule_attr = 3;
1063pub const NFTNL_RULE_COMPAT_PROTO: nftnl_rule_attr = 4;
1064pub const NFTNL_RULE_COMPAT_FLAGS: nftnl_rule_attr = 5;
1065pub const NFTNL_RULE_POSITION: nftnl_rule_attr = 6;
1066pub const NFTNL_RULE_USERDATA: nftnl_rule_attr = 7;
1067pub const NFTNL_RULE_ID: nftnl_rule_attr = 8;
1068pub const NFTNL_RULE_POSITION_ID: nftnl_rule_attr = 9;
1069pub const __NFTNL_RULE_MAX: nftnl_rule_attr = 10;
1070pub type nftnl_rule_attr = c_uint;
1071unsafe extern "C" {
1072    pub fn nftnl_rule_unset(r: *mut nftnl_rule, attr: u16);
1073}
1074unsafe extern "C" {
1075    pub fn nftnl_rule_is_set(r: *const nftnl_rule, attr: u16) -> bool;
1076}
1077unsafe extern "C" {
1078    pub fn nftnl_rule_set(r: *mut nftnl_rule, attr: u16, data: *const c_void) -> c_int;
1079}
1080unsafe extern "C" {
1081    pub fn nftnl_rule_set_data(
1082        r: *mut nftnl_rule,
1083        attr: u16,
1084        data: *const c_void,
1085        data_len: u32,
1086    ) -> c_int;
1087}
1088unsafe extern "C" {
1089    pub fn nftnl_rule_set_u32(r: *mut nftnl_rule, attr: u16, val: u32);
1090}
1091unsafe extern "C" {
1092    pub fn nftnl_rule_set_u64(r: *mut nftnl_rule, attr: u16, val: u64);
1093}
1094unsafe extern "C" {
1095    pub fn nftnl_rule_set_str(r: *mut nftnl_rule, attr: u16, str_: *const c_char) -> c_int;
1096}
1097unsafe extern "C" {
1098    pub fn nftnl_rule_get(r: *const nftnl_rule, attr: u16) -> *const c_void;
1099}
1100unsafe extern "C" {
1101    pub fn nftnl_rule_get_data(
1102        r: *const nftnl_rule,
1103        attr: u16,
1104        data_len: *mut u32,
1105    ) -> *const c_void;
1106}
1107unsafe extern "C" {
1108    pub fn nftnl_rule_get_str(r: *const nftnl_rule, attr: u16) -> *const c_char;
1109}
1110unsafe extern "C" {
1111    pub fn nftnl_rule_get_u8(r: *const nftnl_rule, attr: u16) -> u8;
1112}
1113unsafe extern "C" {
1114    pub fn nftnl_rule_get_u32(r: *const nftnl_rule, attr: u16) -> u32;
1115}
1116unsafe extern "C" {
1117    pub fn nftnl_rule_get_u64(r: *const nftnl_rule, attr: u16) -> u64;
1118}
1119unsafe extern "C" {
1120    pub fn nftnl_rule_add_expr(r: *mut nftnl_rule, expr: *mut nftnl_expr);
1121}
1122unsafe extern "C" {
1123    pub fn nftnl_rule_del_expr(expr: *mut nftnl_expr);
1124}
1125unsafe extern "C" {
1126    pub fn nftnl_rule_nlmsg_build_payload(nlh: *mut nlmsghdr, t: *mut nftnl_rule);
1127}
1128unsafe extern "C" {
1129    pub fn nftnl_rule_parse(
1130        r: *mut nftnl_rule,
1131        type_: nftnl_parse_type,
1132        data: *const c_char,
1133        err: *mut nftnl_parse_err,
1134    ) -> c_int;
1135}
1136unsafe extern "C" {
1137    pub fn nftnl_rule_parse_file(
1138        r: *mut nftnl_rule,
1139        type_: nftnl_parse_type,
1140        fp: *mut FILE,
1141        err: *mut nftnl_parse_err,
1142    ) -> c_int;
1143}
1144unsafe extern "C" {
1145    pub fn nftnl_rule_snprintf(
1146        buf: *mut c_char,
1147        size: usize,
1148        t: *const nftnl_rule,
1149        type_: u32,
1150        flags: u32,
1151    ) -> c_int;
1152}
1153unsafe extern "C" {
1154    pub fn nftnl_rule_fprintf(fp: *mut FILE, r: *const nftnl_rule, type_: u32, flags: u32)
1155    -> c_int;
1156}
1157unsafe extern "C" {
1158    pub fn nftnl_rule_nlmsg_parse(nlh: *const nlmsghdr, t: *mut nftnl_rule) -> c_int;
1159}
1160unsafe extern "C" {
1161    pub fn nftnl_expr_foreach(
1162        r: *mut nftnl_rule,
1163        cb: Option<unsafe extern "C" fn(e: *mut nftnl_expr, data: *mut c_void) -> c_int>,
1164        data: *mut c_void,
1165    ) -> c_int;
1166}
1167#[repr(C)]
1168pub struct nftnl_expr_iter(c_void);
1169
1170unsafe extern "C" {
1171    pub fn nftnl_expr_iter_create(r: *const nftnl_rule) -> *mut nftnl_expr_iter;
1172}
1173unsafe extern "C" {
1174    pub fn nftnl_expr_iter_next(iter: *mut nftnl_expr_iter) -> *mut nftnl_expr;
1175}
1176unsafe extern "C" {
1177    pub fn nftnl_expr_iter_destroy(iter: *mut nftnl_expr_iter);
1178}
1179#[repr(C)]
1180pub struct nftnl_rule_list(c_void);
1181
1182unsafe extern "C" {
1183    pub fn nftnl_rule_list_alloc() -> *mut nftnl_rule_list;
1184}
1185unsafe extern "C" {
1186    pub fn nftnl_rule_list_free(list: *mut nftnl_rule_list);
1187}
1188unsafe extern "C" {
1189    pub fn nftnl_rule_list_is_empty(list: *const nftnl_rule_list) -> c_int;
1190}
1191unsafe extern "C" {
1192    pub fn nftnl_rule_list_add(r: *mut nftnl_rule, list: *mut nftnl_rule_list);
1193}
1194unsafe extern "C" {
1195    pub fn nftnl_rule_list_add_tail(r: *mut nftnl_rule, list: *mut nftnl_rule_list);
1196}
1197unsafe extern "C" {
1198    pub fn nftnl_rule_list_insert_at(r: *mut nftnl_rule, pos: *mut nftnl_rule);
1199}
1200unsafe extern "C" {
1201    pub fn nftnl_rule_list_del(r: *mut nftnl_rule);
1202}
1203unsafe extern "C" {
1204    pub fn nftnl_rule_list_foreach(
1205        rule_list: *mut nftnl_rule_list,
1206        cb: Option<unsafe extern "C" fn(t: *mut nftnl_rule, data: *mut c_void) -> c_int>,
1207        data: *mut c_void,
1208    ) -> c_int;
1209}
1210#[repr(C)]
1211pub struct nftnl_rule_list_iter(c_void);
1212
1213unsafe extern "C" {
1214    pub fn nftnl_rule_list_iter_create(l: *const nftnl_rule_list) -> *mut nftnl_rule_list_iter;
1215}
1216unsafe extern "C" {
1217    pub fn nftnl_rule_list_iter_cur(iter: *mut nftnl_rule_list_iter) -> *mut nftnl_rule;
1218}
1219unsafe extern "C" {
1220    pub fn nftnl_rule_list_iter_next(iter: *mut nftnl_rule_list_iter) -> *mut nftnl_rule;
1221}
1222unsafe extern "C" {
1223    pub fn nftnl_rule_list_iter_destroy(iter: *const nftnl_rule_list_iter);
1224}
1225#[repr(C)]
1226pub struct nftnl_ruleset(c_void);
1227
1228unsafe extern "C" {
1229    pub fn nftnl_ruleset_alloc() -> *mut nftnl_ruleset;
1230}
1231unsafe extern "C" {
1232    pub fn nftnl_ruleset_free(r: *const nftnl_ruleset);
1233}
1234pub const NFTNL_RULESET_TABLELIST: u32 = 0;
1235pub const NFTNL_RULESET_CHAINLIST: u32 = 1;
1236pub const NFTNL_RULESET_SETLIST: u32 = 2;
1237pub const NFTNL_RULESET_RULELIST: u32 = 3;
1238
1239pub const NFTNL_RULESET_UNSPEC: nftnl_ruleset_type = 0;
1240pub const NFTNL_RULESET_RULESET: nftnl_ruleset_type = 1;
1241pub const NFTNL_RULESET_TABLE: nftnl_ruleset_type = 2;
1242pub const NFTNL_RULESET_CHAIN: nftnl_ruleset_type = 3;
1243pub const NFTNL_RULESET_RULE: nftnl_ruleset_type = 4;
1244pub const NFTNL_RULESET_SET: nftnl_ruleset_type = 5;
1245pub const NFTNL_RULESET_SET_ELEMS: nftnl_ruleset_type = 6;
1246pub type nftnl_ruleset_type = c_uint;
1247unsafe extern "C" {
1248    pub fn nftnl_ruleset_is_set(r: *const nftnl_ruleset, attr: u16) -> bool;
1249}
1250unsafe extern "C" {
1251    pub fn nftnl_ruleset_unset(r: *mut nftnl_ruleset, attr: u16);
1252}
1253unsafe extern "C" {
1254    pub fn nftnl_ruleset_set(r: *mut nftnl_ruleset, attr: u16, data: *mut c_void);
1255}
1256unsafe extern "C" {
1257    pub fn nftnl_ruleset_get(r: *const nftnl_ruleset, attr: u16) -> *mut c_void;
1258}
1259pub const NFTNL_RULESET_CTX_CMD: u32 = 0;
1260pub const NFTNL_RULESET_CTX_TYPE: u32 = 1;
1261pub const NFTNL_RULESET_CTX_TABLE: u32 = 2;
1262pub const NFTNL_RULESET_CTX_CHAIN: u32 = 3;
1263pub const NFTNL_RULESET_CTX_RULE: u32 = 4;
1264pub const NFTNL_RULESET_CTX_SET: u32 = 5;
1265pub const NFTNL_RULESET_CTX_DATA: u32 = 6;
1266
1267#[repr(C)]
1268pub struct nftnl_parse_ctx(c_void);
1269
1270unsafe extern "C" {
1271    pub fn nftnl_ruleset_ctx_free(ctx: *const nftnl_parse_ctx);
1272}
1273unsafe extern "C" {
1274    pub fn nftnl_ruleset_ctx_is_set(ctx: *const nftnl_parse_ctx, attr: u16) -> bool;
1275}
1276unsafe extern "C" {
1277    pub fn nftnl_ruleset_ctx_get(ctx: *const nftnl_parse_ctx, attr: u16) -> *mut c_void;
1278}
1279unsafe extern "C" {
1280    pub fn nftnl_ruleset_ctx_get_u32(ctx: *const nftnl_parse_ctx, attr: u16) -> u32;
1281}
1282unsafe extern "C" {
1283    pub fn nftnl_ruleset_parse_file_cb(
1284        type_: nftnl_parse_type,
1285        fp: *mut FILE,
1286        err: *mut nftnl_parse_err,
1287        data: *mut c_void,
1288        cb: Option<unsafe extern "C" fn(ctx: *const nftnl_parse_ctx) -> c_int>,
1289    ) -> c_int;
1290}
1291unsafe extern "C" {
1292    pub fn nftnl_ruleset_parse_buffer_cb(
1293        type_: nftnl_parse_type,
1294        buffer: *const c_char,
1295        err: *mut nftnl_parse_err,
1296        data: *mut c_void,
1297        cb: Option<unsafe extern "C" fn(ctx: *const nftnl_parse_ctx) -> c_int>,
1298    ) -> c_int;
1299}
1300unsafe extern "C" {
1301    pub fn nftnl_ruleset_parse(
1302        rs: *mut nftnl_ruleset,
1303        type_: nftnl_parse_type,
1304        data: *const c_char,
1305        err: *mut nftnl_parse_err,
1306    ) -> c_int;
1307}
1308unsafe extern "C" {
1309    pub fn nftnl_ruleset_parse_file(
1310        rs: *mut nftnl_ruleset,
1311        type_: nftnl_parse_type,
1312        fp: *mut FILE,
1313        err: *mut nftnl_parse_err,
1314    ) -> c_int;
1315}
1316unsafe extern "C" {
1317    pub fn nftnl_ruleset_snprintf(
1318        buf: *mut c_char,
1319        size: usize,
1320        rs: *const nftnl_ruleset,
1321        type_: u32,
1322        flags: u32,
1323    ) -> c_int;
1324}
1325unsafe extern "C" {
1326    pub fn nftnl_ruleset_fprintf(
1327        fp: *mut FILE,
1328        rs: *const nftnl_ruleset,
1329        type_: u32,
1330        flags: u32,
1331    ) -> c_int;
1332}
1333pub const NFTNL_SET_TABLE: nftnl_set_attr = 0;
1334pub const NFTNL_SET_NAME: nftnl_set_attr = 1;
1335pub const NFTNL_SET_FLAGS: nftnl_set_attr = 2;
1336pub const NFTNL_SET_KEY_TYPE: nftnl_set_attr = 3;
1337pub const NFTNL_SET_KEY_LEN: nftnl_set_attr = 4;
1338pub const NFTNL_SET_DATA_TYPE: nftnl_set_attr = 5;
1339pub const NFTNL_SET_DATA_LEN: nftnl_set_attr = 6;
1340pub const NFTNL_SET_FAMILY: nftnl_set_attr = 7;
1341pub const NFTNL_SET_ID: nftnl_set_attr = 8;
1342pub const NFTNL_SET_POLICY: nftnl_set_attr = 9;
1343pub const NFTNL_SET_DESC_SIZE: nftnl_set_attr = 10;
1344pub const NFTNL_SET_TIMEOUT: nftnl_set_attr = 11;
1345pub const NFTNL_SET_GC_INTERVAL: nftnl_set_attr = 12;
1346pub const NFTNL_SET_USERDATA: nftnl_set_attr = 13;
1347pub const NFTNL_SET_OBJ_TYPE: nftnl_set_attr = 14;
1348pub const NFTNL_SET_HANDLE: nftnl_set_attr = 15;
1349pub const NFTNL_SET_DESC_CONCAT: nftnl_set_attr = 16;
1350pub const NFTNL_SET_EXPR: nftnl_set_attr = 17;
1351pub const NFTNL_SET_EXPRESSIONS: nftnl_set_attr = 18;
1352pub const NFTNL_SET_COUNT: nftnl_set_attr = 19;
1353pub const __NFTNL_SET_MAX: nftnl_set_attr = 20;
1354pub type nftnl_set_attr = c_uint;
1355#[repr(C)]
1356pub struct nftnl_set(c_void);
1357
1358unsafe extern "C" {
1359    pub fn nftnl_set_alloc() -> *mut nftnl_set;
1360}
1361unsafe extern "C" {
1362    pub fn nftnl_set_free(s: *const nftnl_set);
1363}
1364unsafe extern "C" {
1365    pub fn nftnl_set_clone(set: *const nftnl_set) -> *mut nftnl_set;
1366}
1367unsafe extern "C" {
1368    pub fn nftnl_set_is_set(s: *const nftnl_set, attr: u16) -> bool;
1369}
1370unsafe extern "C" {
1371    pub fn nftnl_set_unset(s: *mut nftnl_set, attr: u16);
1372}
1373unsafe extern "C" {
1374    pub fn nftnl_set_set(s: *mut nftnl_set, attr: u16, data: *const c_void) -> c_int;
1375}
1376unsafe extern "C" {
1377    pub fn nftnl_set_set_data(
1378        s: *mut nftnl_set,
1379        attr: u16,
1380        data: *const c_void,
1381        data_len: u32,
1382    ) -> c_int;
1383}
1384unsafe extern "C" {
1385    pub fn nftnl_set_set_u32(s: *mut nftnl_set, attr: u16, val: u32);
1386}
1387unsafe extern "C" {
1388    pub fn nftnl_set_set_u64(s: *mut nftnl_set, attr: u16, val: u64);
1389}
1390unsafe extern "C" {
1391    pub fn nftnl_set_set_str(s: *mut nftnl_set, attr: u16, str_: *const c_char) -> c_int;
1392}
1393unsafe extern "C" {
1394    pub fn nftnl_set_get(s: *const nftnl_set, attr: u16) -> *const c_void;
1395}
1396unsafe extern "C" {
1397    pub fn nftnl_set_get_data(s: *const nftnl_set, attr: u16, data_len: *mut u32) -> *const c_void;
1398}
1399unsafe extern "C" {
1400    pub fn nftnl_set_get_str(s: *const nftnl_set, attr: u16) -> *const c_char;
1401}
1402unsafe extern "C" {
1403    pub fn nftnl_set_get_u32(s: *const nftnl_set, attr: u16) -> u32;
1404}
1405unsafe extern "C" {
1406    pub fn nftnl_set_get_u64(s: *const nftnl_set, attr: u16) -> u64;
1407}
1408unsafe extern "C" {
1409    pub fn nftnl_set_nlmsg_build_payload(nlh: *mut nlmsghdr, s: *mut nftnl_set);
1410}
1411unsafe extern "C" {
1412    pub fn nftnl_set_nlmsg_parse(nlh: *const nlmsghdr, s: *mut nftnl_set) -> c_int;
1413}
1414unsafe extern "C" {
1415    pub fn nftnl_set_elems_nlmsg_parse(nlh: *const nlmsghdr, s: *mut nftnl_set) -> c_int;
1416}
1417unsafe extern "C" {
1418    pub fn nftnl_set_snprintf(
1419        buf: *mut c_char,
1420        size: usize,
1421        s: *const nftnl_set,
1422        type_: u32,
1423        flags: u32,
1424    ) -> c_int;
1425}
1426unsafe extern "C" {
1427    pub fn nftnl_set_fprintf(fp: *mut FILE, s: *const nftnl_set, type_: u32, flags: u32) -> c_int;
1428}
1429#[repr(C)]
1430pub struct nftnl_set_list(c_void);
1431
1432unsafe extern "C" {
1433    pub fn nftnl_set_list_alloc() -> *mut nftnl_set_list;
1434}
1435unsafe extern "C" {
1436    pub fn nftnl_set_list_free(list: *mut nftnl_set_list);
1437}
1438unsafe extern "C" {
1439    pub fn nftnl_set_list_is_empty(list: *const nftnl_set_list) -> c_int;
1440}
1441unsafe extern "C" {
1442    pub fn nftnl_set_list_add(s: *mut nftnl_set, list: *mut nftnl_set_list);
1443}
1444unsafe extern "C" {
1445    pub fn nftnl_set_list_add_tail(s: *mut nftnl_set, list: *mut nftnl_set_list);
1446}
1447unsafe extern "C" {
1448    pub fn nftnl_set_list_del(s: *mut nftnl_set);
1449}
1450unsafe extern "C" {
1451    pub fn nftnl_set_list_foreach(
1452        set_list: *mut nftnl_set_list,
1453        cb: Option<unsafe extern "C" fn(t: *mut nftnl_set, data: *mut c_void) -> c_int>,
1454        data: *mut c_void,
1455    ) -> c_int;
1456}
1457unsafe extern "C" {
1458    pub fn nftnl_set_list_lookup_byname(
1459        set_list: *mut nftnl_set_list,
1460        set: *const c_char,
1461    ) -> *mut nftnl_set;
1462}
1463unsafe extern "C" {
1464    pub fn nftnl_set_add_expr(s: *mut nftnl_set, expr: *mut nftnl_expr);
1465}
1466unsafe extern "C" {
1467    pub fn nftnl_set_expr_foreach(
1468        s: *const nftnl_set,
1469        cb: Option<unsafe extern "C" fn(e: *mut nftnl_expr, data: *mut c_void) -> c_int>,
1470        data: *mut c_void,
1471    ) -> c_int;
1472}
1473#[repr(C)]
1474pub struct nftnl_set_list_iter(c_void);
1475
1476unsafe extern "C" {
1477    pub fn nftnl_set_list_iter_create(l: *const nftnl_set_list) -> *mut nftnl_set_list_iter;
1478}
1479unsafe extern "C" {
1480    pub fn nftnl_set_list_iter_cur(iter: *const nftnl_set_list_iter) -> *mut nftnl_set;
1481}
1482unsafe extern "C" {
1483    pub fn nftnl_set_list_iter_next(iter: *mut nftnl_set_list_iter) -> *mut nftnl_set;
1484}
1485unsafe extern "C" {
1486    pub fn nftnl_set_list_iter_destroy(iter: *const nftnl_set_list_iter);
1487}
1488unsafe extern "C" {
1489    pub fn nftnl_set_parse(
1490        s: *mut nftnl_set,
1491        type_: nftnl_parse_type,
1492        data: *const c_char,
1493        err: *mut nftnl_parse_err,
1494    ) -> c_int;
1495}
1496unsafe extern "C" {
1497    pub fn nftnl_set_parse_file(
1498        s: *mut nftnl_set,
1499        type_: nftnl_parse_type,
1500        fp: *mut FILE,
1501        err: *mut nftnl_parse_err,
1502    ) -> c_int;
1503}
1504pub const NFTNL_SET_ELEM_FLAGS: u32 = 0;
1505pub const NFTNL_SET_ELEM_KEY: u32 = 1;
1506pub const NFTNL_SET_ELEM_VERDICT: u32 = 2;
1507pub const NFTNL_SET_ELEM_CHAIN: u32 = 3;
1508pub const NFTNL_SET_ELEM_DATA: u32 = 4;
1509pub const NFTNL_SET_ELEM_TIMEOUT: u32 = 5;
1510pub const NFTNL_SET_ELEM_EXPIRATION: u32 = 6;
1511pub const NFTNL_SET_ELEM_USERDATA: u32 = 7;
1512pub const NFTNL_SET_ELEM_EXPR: u32 = 8;
1513pub const NFTNL_SET_ELEM_OBJREF: u32 = 9;
1514pub const NFTNL_SET_ELEM_KEY_END: u32 = 10;
1515pub const NFTNL_SET_ELEM_EXPRESSIONS: u32 = 11;
1516pub const __NFTNL_SET_ELEM_MAX: u32 = 12;
1517
1518#[repr(C)]
1519pub struct nftnl_set_elem(c_void);
1520
1521unsafe extern "C" {
1522    pub fn nftnl_set_elem_alloc() -> *mut nftnl_set_elem;
1523}
1524unsafe extern "C" {
1525    pub fn nftnl_set_elem_free(s: *mut nftnl_set_elem);
1526}
1527unsafe extern "C" {
1528    pub fn nftnl_set_elem_clone(elem: *mut nftnl_set_elem) -> *mut nftnl_set_elem;
1529}
1530unsafe extern "C" {
1531    pub fn nftnl_set_elem_add(s: *mut nftnl_set, elem: *mut nftnl_set_elem);
1532}
1533unsafe extern "C" {
1534    pub fn nftnl_set_elem_unset(s: *mut nftnl_set_elem, attr: u16);
1535}
1536unsafe extern "C" {
1537    pub fn nftnl_set_elem_set(
1538        s: *mut nftnl_set_elem,
1539        attr: u16,
1540        data: *const c_void,
1541        data_len: u32,
1542    ) -> c_int;
1543}
1544unsafe extern "C" {
1545    pub fn nftnl_set_elem_set_u32(s: *mut nftnl_set_elem, attr: u16, val: u32);
1546}
1547unsafe extern "C" {
1548    pub fn nftnl_set_elem_set_u64(s: *mut nftnl_set_elem, attr: u16, val: u64);
1549}
1550unsafe extern "C" {
1551    pub fn nftnl_set_elem_set_str(s: *mut nftnl_set_elem, attr: u16, str_: *const c_char) -> c_int;
1552}
1553unsafe extern "C" {
1554    pub fn nftnl_set_elem_get(
1555        s: *mut nftnl_set_elem,
1556        attr: u16,
1557        data_len: *mut u32,
1558    ) -> *const c_void;
1559}
1560unsafe extern "C" {
1561    pub fn nftnl_set_elem_get_str(s: *mut nftnl_set_elem, attr: u16) -> *const c_char;
1562}
1563unsafe extern "C" {
1564    pub fn nftnl_set_elem_get_u32(s: *mut nftnl_set_elem, attr: u16) -> u32;
1565}
1566unsafe extern "C" {
1567    pub fn nftnl_set_elem_get_u64(s: *mut nftnl_set_elem, attr: u16) -> u64;
1568}
1569unsafe extern "C" {
1570    pub fn nftnl_set_elem_is_set(s: *const nftnl_set_elem, attr: u16) -> bool;
1571}
1572unsafe extern "C" {
1573    pub fn nftnl_set_elems_nlmsg_build_payload(nlh: *mut nlmsghdr, s: *mut nftnl_set);
1574}
1575unsafe extern "C" {
1576    pub fn nftnl_set_elem_nlmsg_build_payload(nlh: *mut nlmsghdr, e: *mut nftnl_set_elem);
1577}
1578#[repr(C)]
1579pub struct nlattr(c_void);
1580
1581unsafe extern "C" {
1582    pub fn nftnl_set_elem_nlmsg_build(
1583        nlh: *mut nlmsghdr,
1584        elem: *mut nftnl_set_elem,
1585        i: c_int,
1586    ) -> *mut nlattr;
1587}
1588unsafe extern "C" {
1589    pub fn nftnl_set_elem_parse(
1590        e: *mut nftnl_set_elem,
1591        type_: nftnl_parse_type,
1592        data: *const c_char,
1593        err: *mut nftnl_parse_err,
1594    ) -> c_int;
1595}
1596unsafe extern "C" {
1597    pub fn nftnl_set_elem_parse_file(
1598        e: *mut nftnl_set_elem,
1599        type_: nftnl_parse_type,
1600        fp: *mut FILE,
1601        err: *mut nftnl_parse_err,
1602    ) -> c_int;
1603}
1604unsafe extern "C" {
1605    pub fn nftnl_set_elem_snprintf(
1606        buf: *mut c_char,
1607        size: usize,
1608        s: *const nftnl_set_elem,
1609        type_: u32,
1610        flags: u32,
1611    ) -> c_int;
1612}
1613unsafe extern "C" {
1614    pub fn nftnl_set_elem_fprintf(
1615        fp: *mut FILE,
1616        se: *const nftnl_set_elem,
1617        type_: u32,
1618        flags: u32,
1619    ) -> c_int;
1620}
1621unsafe extern "C" {
1622    pub fn nftnl_set_elem_add_expr(e: *mut nftnl_set_elem, expr: *mut nftnl_expr);
1623}
1624unsafe extern "C" {
1625    pub fn nftnl_set_elem_expr_foreach(
1626        e: *mut nftnl_set_elem,
1627        cb: Option<unsafe extern "C" fn(e: *mut nftnl_expr, data: *mut c_void) -> c_int>,
1628        data: *mut c_void,
1629    ) -> c_int;
1630}
1631unsafe extern "C" {
1632    pub fn nftnl_set_elem_foreach(
1633        s: *mut nftnl_set,
1634        cb: Option<unsafe extern "C" fn(e: *mut nftnl_set_elem, data: *mut c_void) -> c_int>,
1635        data: *mut c_void,
1636    ) -> c_int;
1637}
1638#[repr(C)]
1639pub struct nftnl_set_elems_iter(c_void);
1640
1641unsafe extern "C" {
1642    pub fn nftnl_set_elems_iter_create(s: *const nftnl_set) -> *mut nftnl_set_elems_iter;
1643}
1644unsafe extern "C" {
1645    pub fn nftnl_set_elems_iter_cur(iter: *const nftnl_set_elems_iter) -> *mut nftnl_set_elem;
1646}
1647unsafe extern "C" {
1648    pub fn nftnl_set_elems_iter_next(iter: *mut nftnl_set_elems_iter) -> *mut nftnl_set_elem;
1649}
1650unsafe extern "C" {
1651    pub fn nftnl_set_elems_iter_destroy(iter: *mut nftnl_set_elems_iter);
1652}
1653unsafe extern "C" {
1654    pub fn nftnl_set_elems_nlmsg_build_payload_iter(
1655        nlh: *mut nlmsghdr,
1656        iter: *mut nftnl_set_elems_iter,
1657    ) -> c_int;
1658}
1659#[repr(C)]
1660pub struct nftnl_table(c_void);
1661
1662unsafe extern "C" {
1663    pub fn nftnl_table_alloc() -> *mut nftnl_table;
1664}
1665unsafe extern "C" {
1666    pub fn nftnl_table_free(arg1: *const nftnl_table);
1667}
1668pub const NFTNL_TABLE_NAME: nftnl_table_attr = 0;
1669pub const NFTNL_TABLE_FAMILY: nftnl_table_attr = 1;
1670pub const NFTNL_TABLE_FLAGS: nftnl_table_attr = 2;
1671pub const NFTNL_TABLE_USE: nftnl_table_attr = 3;
1672pub const NFTNL_TABLE_HANDLE: nftnl_table_attr = 4;
1673pub const NFTNL_TABLE_USERDATA: nftnl_table_attr = 5;
1674pub const NFTNL_TABLE_OWNER: nftnl_table_attr = 6;
1675pub const __NFTNL_TABLE_MAX: nftnl_table_attr = 7;
1676pub type nftnl_table_attr = c_uint;
1677unsafe extern "C" {
1678    pub fn nftnl_table_is_set(t: *const nftnl_table, attr: u16) -> bool;
1679}
1680unsafe extern "C" {
1681    pub fn nftnl_table_unset(t: *mut nftnl_table, attr: u16);
1682}
1683unsafe extern "C" {
1684    pub fn nftnl_table_set(t: *mut nftnl_table, attr: u16, data: *const c_void);
1685}
1686unsafe extern "C" {
1687    pub fn nftnl_table_set_data(
1688        t: *mut nftnl_table,
1689        attr: u16,
1690        data: *const c_void,
1691        data_len: u32,
1692    ) -> c_int;
1693}
1694unsafe extern "C" {
1695    pub fn nftnl_table_get(t: *const nftnl_table, attr: u16) -> *const c_void;
1696}
1697unsafe extern "C" {
1698    pub fn nftnl_table_get_data(
1699        t: *const nftnl_table,
1700        attr: u16,
1701        data_len: *mut u32,
1702    ) -> *const c_void;
1703}
1704unsafe extern "C" {
1705    pub fn nftnl_table_set_u8(t: *mut nftnl_table, attr: u16, data: u8);
1706}
1707unsafe extern "C" {
1708    pub fn nftnl_table_set_u32(t: *mut nftnl_table, attr: u16, data: u32);
1709}
1710unsafe extern "C" {
1711    pub fn nftnl_table_set_u64(t: *mut nftnl_table, attr: u16, data: u64);
1712}
1713unsafe extern "C" {
1714    pub fn nftnl_table_set_str(t: *mut nftnl_table, attr: u16, str_: *const c_char) -> c_int;
1715}
1716unsafe extern "C" {
1717    pub fn nftnl_table_get_u8(t: *const nftnl_table, attr: u16) -> u8;
1718}
1719unsafe extern "C" {
1720    pub fn nftnl_table_get_u32(t: *const nftnl_table, attr: u16) -> u32;
1721}
1722unsafe extern "C" {
1723    pub fn nftnl_table_get_u64(t: *const nftnl_table, attr: u16) -> u64;
1724}
1725unsafe extern "C" {
1726    pub fn nftnl_table_get_str(t: *const nftnl_table, attr: u16) -> *const c_char;
1727}
1728unsafe extern "C" {
1729    pub fn nftnl_table_nlmsg_build_payload(nlh: *mut nlmsghdr, t: *const nftnl_table);
1730}
1731unsafe extern "C" {
1732    pub fn nftnl_table_parse(
1733        t: *mut nftnl_table,
1734        type_: nftnl_parse_type,
1735        data: *const c_char,
1736        err: *mut nftnl_parse_err,
1737    ) -> c_int;
1738}
1739unsafe extern "C" {
1740    pub fn nftnl_table_parse_file(
1741        t: *mut nftnl_table,
1742        type_: nftnl_parse_type,
1743        fp: *mut FILE,
1744        err: *mut nftnl_parse_err,
1745    ) -> c_int;
1746}
1747unsafe extern "C" {
1748    pub fn nftnl_table_snprintf(
1749        buf: *mut c_char,
1750        size: usize,
1751        t: *const nftnl_table,
1752        type_: u32,
1753        flags: u32,
1754    ) -> c_int;
1755}
1756unsafe extern "C" {
1757    pub fn nftnl_table_fprintf(
1758        fp: *mut FILE,
1759        t: *const nftnl_table,
1760        type_: u32,
1761        flags: u32,
1762    ) -> c_int;
1763}
1764unsafe extern "C" {
1765    pub fn nftnl_table_nlmsg_parse(nlh: *const nlmsghdr, t: *mut nftnl_table) -> c_int;
1766}
1767#[repr(C)]
1768pub struct nftnl_table_list(c_void);
1769
1770unsafe extern "C" {
1771    pub fn nftnl_table_list_alloc() -> *mut nftnl_table_list;
1772}
1773unsafe extern "C" {
1774    pub fn nftnl_table_list_free(list: *mut nftnl_table_list);
1775}
1776unsafe extern "C" {
1777    pub fn nftnl_table_list_is_empty(list: *const nftnl_table_list) -> c_int;
1778}
1779unsafe extern "C" {
1780    pub fn nftnl_table_list_foreach(
1781        table_list: *mut nftnl_table_list,
1782        cb: Option<unsafe extern "C" fn(t: *mut nftnl_table, data: *mut c_void) -> c_int>,
1783        data: *mut c_void,
1784    ) -> c_int;
1785}
1786unsafe extern "C" {
1787    pub fn nftnl_table_list_add(r: *mut nftnl_table, list: *mut nftnl_table_list);
1788}
1789unsafe extern "C" {
1790    pub fn nftnl_table_list_add_tail(r: *mut nftnl_table, list: *mut nftnl_table_list);
1791}
1792unsafe extern "C" {
1793    pub fn nftnl_table_list_del(r: *mut nftnl_table);
1794}
1795#[repr(C)]
1796pub struct nftnl_table_list_iter(c_void);
1797
1798unsafe extern "C" {
1799    pub fn nftnl_table_list_iter_create(l: *const nftnl_table_list) -> *mut nftnl_table_list_iter;
1800}
1801unsafe extern "C" {
1802    pub fn nftnl_table_list_iter_next(iter: *mut nftnl_table_list_iter) -> *mut nftnl_table;
1803}
1804unsafe extern "C" {
1805    pub fn nftnl_table_list_iter_destroy(iter: *const nftnl_table_list_iter);
1806}
1807pub const NFTNL_TRACE_CHAIN: nftnl_trace_attr = 0;
1808pub const NFTNL_TRACE_FAMILY: nftnl_trace_attr = 1;
1809pub const NFTNL_TRACE_ID: nftnl_trace_attr = 2;
1810pub const NFTNL_TRACE_IIF: nftnl_trace_attr = 3;
1811pub const NFTNL_TRACE_IIFTYPE: nftnl_trace_attr = 4;
1812pub const NFTNL_TRACE_JUMP_TARGET: nftnl_trace_attr = 5;
1813pub const NFTNL_TRACE_OIF: nftnl_trace_attr = 6;
1814pub const NFTNL_TRACE_OIFTYPE: nftnl_trace_attr = 7;
1815pub const NFTNL_TRACE_MARK: nftnl_trace_attr = 8;
1816pub const NFTNL_TRACE_LL_HEADER: nftnl_trace_attr = 9;
1817pub const NFTNL_TRACE_NETWORK_HEADER: nftnl_trace_attr = 10;
1818pub const NFTNL_TRACE_TRANSPORT_HEADER: nftnl_trace_attr = 11;
1819pub const NFTNL_TRACE_TABLE: nftnl_trace_attr = 12;
1820pub const NFTNL_TRACE_TYPE: nftnl_trace_attr = 13;
1821pub const NFTNL_TRACE_RULE_HANDLE: nftnl_trace_attr = 14;
1822pub const NFTNL_TRACE_VERDICT: nftnl_trace_attr = 15;
1823pub const NFTNL_TRACE_NFPROTO: nftnl_trace_attr = 16;
1824pub const NFTNL_TRACE_POLICY: nftnl_trace_attr = 17;
1825pub const NFTNL_TRACE_CT_DIRECTION: nftnl_trace_attr = 18;
1826pub const NFTNL_TRACE_CT_ID: nftnl_trace_attr = 19;
1827pub const NFTNL_TRACE_CT_STATE: nftnl_trace_attr = 20;
1828pub const NFTNL_TRACE_CT_STATUS: nftnl_trace_attr = 21;
1829pub const __NFTNL_TRACE_MAX: nftnl_trace_attr = 22;
1830pub type nftnl_trace_attr = c_uint;
1831#[repr(C)]
1832pub struct nftnl_trace(c_void);
1833
1834unsafe extern "C" {
1835    pub fn nftnl_trace_alloc() -> *mut nftnl_trace;
1836}
1837unsafe extern "C" {
1838    pub fn nftnl_trace_free(trace: *const nftnl_trace);
1839}
1840unsafe extern "C" {
1841    pub fn nftnl_trace_is_set(trace: *const nftnl_trace, type_: u16) -> bool;
1842}
1843unsafe extern "C" {
1844    pub fn nftnl_trace_get_data(
1845        trace: *const nftnl_trace,
1846        type_: u16,
1847        data_len: *mut u32,
1848    ) -> *const c_void;
1849}
1850unsafe extern "C" {
1851    pub fn nftnl_trace_get_u16(trace: *const nftnl_trace, type_: u16) -> u16;
1852}
1853unsafe extern "C" {
1854    pub fn nftnl_trace_get_u32(trace: *const nftnl_trace, type_: u16) -> u32;
1855}
1856unsafe extern "C" {
1857    pub fn nftnl_trace_get_u64(trace: *const nftnl_trace, type_: u16) -> u64;
1858}
1859unsafe extern "C" {
1860    pub fn nftnl_trace_get_str(trace: *const nftnl_trace, type_: u16) -> *const c_char;
1861}
1862unsafe extern "C" {
1863    pub fn nftnl_trace_nlmsg_parse(nlh: *const nlmsghdr, t: *mut nftnl_trace) -> c_int;
1864}
1865pub const NFTNL_UDATA_TABLE_COMMENT: nftnl_udata_table_types = 0;
1866pub const __NFTNL_UDATA_TABLE_MAX: nftnl_udata_table_types = 1;
1867pub type nftnl_udata_table_types = c_uint;
1868pub const NFTNL_UDATA_CHAIN_COMMENT: nftnl_udata_chain_types = 0;
1869pub const __NFTNL_UDATA_CHAIN_MAX: nftnl_udata_chain_types = 1;
1870pub type nftnl_udata_chain_types = c_uint;
1871pub const NFTNL_UDATA_RULE_COMMENT: nftnl_udata_rule_types = 0;
1872pub const NFTNL_UDATA_RULE_EBTABLES_POLICY: nftnl_udata_rule_types = 1;
1873pub const __NFTNL_UDATA_RULE_MAX: nftnl_udata_rule_types = 2;
1874pub type nftnl_udata_rule_types = c_uint;
1875pub const NFTNL_UDATA_OBJ_COMMENT: nftnl_udata_obj_types = 0;
1876pub const __NFTNL_UDATA_OBJ_MAX: nftnl_udata_obj_types = 1;
1877pub type nftnl_udata_obj_types = c_uint;
1878pub const NFTNL_UDATA_SET_KEYBYTEORDER: nftnl_udata_set_types = 0;
1879pub const NFTNL_UDATA_SET_DATABYTEORDER: nftnl_udata_set_types = 1;
1880pub const NFTNL_UDATA_SET_MERGE_ELEMENTS: nftnl_udata_set_types = 2;
1881pub const NFTNL_UDATA_SET_KEY_TYPEOF: nftnl_udata_set_types = 3;
1882pub const NFTNL_UDATA_SET_DATA_TYPEOF: nftnl_udata_set_types = 4;
1883pub const NFTNL_UDATA_SET_EXPR: nftnl_udata_set_types = 5;
1884pub const NFTNL_UDATA_SET_DATA_INTERVAL: nftnl_udata_set_types = 6;
1885pub const NFTNL_UDATA_SET_COMMENT: nftnl_udata_set_types = 7;
1886pub const __NFTNL_UDATA_SET_MAX: nftnl_udata_set_types = 8;
1887pub type nftnl_udata_set_types = c_uint;
1888pub const NFTNL_UDATA_SET_TYPEOF_EXPR: u32 = 0;
1889pub const NFTNL_UDATA_SET_TYPEOF_DATA: u32 = 1;
1890pub const __NFTNL_UDATA_SET_TYPEOF_MAX: u32 = 2;
1891
1892pub const NFTNL_UDATA_SET_ELEM_COMMENT: nftnl_udata_set_elem_types = 0;
1893pub const NFTNL_UDATA_SET_ELEM_FLAGS: nftnl_udata_set_elem_types = 1;
1894pub const __NFTNL_UDATA_SET_ELEM_MAX: nftnl_udata_set_elem_types = 2;
1895pub type nftnl_udata_set_elem_types = c_uint;
1896pub const NFTNL_SET_ELEM_F_INTERVAL_OPEN: nftnl_udata_set_elem_flags = 1;
1897pub type nftnl_udata_set_elem_flags = c_uint;
1898#[repr(C)]
1899pub struct nftnl_udata(c_void);
1900
1901#[repr(C)]
1902pub struct nftnl_udata_buf(c_void);
1903
1904unsafe extern "C" {
1905    pub fn nftnl_udata_buf_alloc(data_size: u32) -> *mut nftnl_udata_buf;
1906}
1907unsafe extern "C" {
1908    pub fn nftnl_udata_buf_free(buf: *const nftnl_udata_buf);
1909}
1910unsafe extern "C" {
1911    pub fn nftnl_udata_buf_len(buf: *const nftnl_udata_buf) -> u32;
1912}
1913unsafe extern "C" {
1914    pub fn nftnl_udata_buf_data(buf: *const nftnl_udata_buf) -> *mut c_void;
1915}
1916unsafe extern "C" {
1917    pub fn nftnl_udata_buf_put(buf: *mut nftnl_udata_buf, data: *const c_void, len: u32);
1918}
1919unsafe extern "C" {
1920    pub fn nftnl_udata_start(buf: *const nftnl_udata_buf) -> *mut nftnl_udata;
1921}
1922unsafe extern "C" {
1923    pub fn nftnl_udata_end(buf: *const nftnl_udata_buf) -> *mut nftnl_udata;
1924}
1925unsafe extern "C" {
1926    pub fn nftnl_udata_put(
1927        buf: *mut nftnl_udata_buf,
1928        type_: u8,
1929        len: u32,
1930        value: *const c_void,
1931    ) -> bool;
1932}
1933unsafe extern "C" {
1934    pub fn nftnl_udata_put_u32(buf: *mut nftnl_udata_buf, type_: u8, data: u32) -> bool;
1935}
1936unsafe extern "C" {
1937    pub fn nftnl_udata_put_strz(buf: *mut nftnl_udata_buf, type_: u8, strz: *const c_char) -> bool;
1938}
1939unsafe extern "C" {
1940    pub fn nftnl_udata_nest_start(buf: *mut nftnl_udata_buf, type_: u8) -> *mut nftnl_udata;
1941}
1942unsafe extern "C" {
1943    pub fn nftnl_udata_nest_end(buf: *mut nftnl_udata_buf, ud: *mut nftnl_udata);
1944}
1945unsafe extern "C" {
1946    pub fn nftnl_udata_type(attr: *const nftnl_udata) -> u8;
1947}
1948unsafe extern "C" {
1949    pub fn nftnl_udata_len(attr: *const nftnl_udata) -> u8;
1950}
1951unsafe extern "C" {
1952    pub fn nftnl_udata_get(attr: *const nftnl_udata) -> *mut c_void;
1953}
1954unsafe extern "C" {
1955    pub fn nftnl_udata_get_u32(attr: *const nftnl_udata) -> u32;
1956}
1957unsafe extern "C" {
1958    pub fn nftnl_udata_next(attr: *const nftnl_udata) -> *mut nftnl_udata;
1959}
1960pub type nftnl_udata_cb_t =
1961    Option<unsafe extern "C" fn(attr: *const nftnl_udata, data: *mut c_void) -> c_int>;
1962unsafe extern "C" {
1963    pub fn nftnl_udata_parse(
1964        data: *const c_void,
1965        data_len: u32,
1966        cb: nftnl_udata_cb_t,
1967        cb_data: *mut c_void,
1968    ) -> c_int;
1969}