1#![allow(
2 dead_code,
3 non_camel_case_types,
4 non_snake_case,
5 clippy::all,
6 missing_docs,
7 clippy::module_inception
8)]
9
10use int_enum::IntEnum;
11#[repr(u32)]
12#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, IntEnum)]
13pub enum BpfMapType {
14 BPF_MAP_TYPE_UNSPEC = 0,
15 BPF_MAP_TYPE_HASH = 1,
16 BPF_MAP_TYPE_ARRAY = 2,
17 BPF_MAP_TYPE_PROG_ARRAY = 3,
18 BPF_MAP_TYPE_PERF_EVENT_ARRAY = 4,
19 BPF_MAP_TYPE_PERCPU_HASH = 5,
20 BPF_MAP_TYPE_PERCPU_ARRAY = 6,
21 BPF_MAP_TYPE_STACK_TRACE = 7,
22 BPF_MAP_TYPE_CGROUP_ARRAY = 8,
23 BPF_MAP_TYPE_LRU_HASH = 9,
24 BPF_MAP_TYPE_LRU_PERCPU_HASH = 10,
25 BPF_MAP_TYPE_LPM_TRIE = 11,
26 BPF_MAP_TYPE_ARRAY_OF_MAPS = 12,
27 BPF_MAP_TYPE_HASH_OF_MAPS = 13,
28 BPF_MAP_TYPE_DEVMAP = 14,
29 BPF_MAP_TYPE_SOCKMAP = 15,
30 BPF_MAP_TYPE_CPUMAP = 16,
31 BPF_MAP_TYPE_XSKMAP = 17,
32 BPF_MAP_TYPE_SOCKHASH = 18,
33 BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED = 19,
34 BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 20,
35 BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED = 21,
36 BPF_MAP_TYPE_QUEUE = 22,
37 BPF_MAP_TYPE_STACK = 23,
38 BPF_MAP_TYPE_SK_STORAGE = 24,
39 BPF_MAP_TYPE_DEVMAP_HASH = 25,
40 BPF_MAP_TYPE_STRUCT_OPS = 26,
41 BPF_MAP_TYPE_RINGBUF = 27,
42 BPF_MAP_TYPE_INODE_STORAGE = 28,
43 BPF_MAP_TYPE_TASK_STORAGE = 29,
44 BPF_MAP_TYPE_BLOOM_FILTER = 30,
45 BPF_MAP_TYPE_USER_RINGBUF = 31,
46 BPF_MAP_TYPE_CGRP_STORAGE = 32,
47 BPF_MAP_TYPE_ARENA = 33,
48 __MAX_BPF_MAP_TYPE = 34,
49}
50
51impl Default for BpfMapType {
52 fn default() -> Self {
53 BpfMapType::BPF_MAP_TYPE_UNSPEC
54 }
55}
56
57#[repr(C)]
60#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
61pub struct __BindgenBitfieldUnit<Storage> {
62 storage: Storage,
63}
64impl<Storage> __BindgenBitfieldUnit<Storage> {
65 #[inline]
66 pub const fn new(storage: Storage) -> Self {
67 Self { storage }
68 }
69}
70impl<Storage> __BindgenBitfieldUnit<Storage>
71where
72 Storage: AsRef<[u8]> + AsMut<[u8]>,
73{
74 #[inline]
75 pub fn get_bit(&self, index: usize) -> bool {
76 debug_assert!(index / 8 < self.storage.as_ref().len());
77 let byte_index = index / 8;
78 let byte = self.storage.as_ref()[byte_index];
79 let bit_index = if cfg!(target_endian = "big") {
80 7 - (index % 8)
81 } else {
82 index % 8
83 };
84 let mask = 1 << bit_index;
85 byte & mask == mask
86 }
87 #[inline]
88 pub fn set_bit(&mut self, index: usize, val: bool) {
89 debug_assert!(index / 8 < self.storage.as_ref().len());
90 let byte_index = index / 8;
91 let byte = &mut self.storage.as_mut()[byte_index];
92 let bit_index = if cfg!(target_endian = "big") {
93 7 - (index % 8)
94 } else {
95 index % 8
96 };
97 let mask = 1 << bit_index;
98 if val {
99 *byte |= mask;
100 } else {
101 *byte &= !mask;
102 }
103 }
104 #[inline]
105 pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
106 debug_assert!(bit_width <= 64);
107 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
108 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
109 let mut val = 0;
110 for i in 0..(bit_width as usize) {
111 if self.get_bit(i + bit_offset) {
112 let index = if cfg!(target_endian = "big") {
113 bit_width as usize - 1 - i
114 } else {
115 i
116 };
117 val |= 1 << index;
118 }
119 }
120 val
121 }
122 #[inline]
123 pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
124 debug_assert!(bit_width <= 64);
125 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
126 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
127 for i in 0..(bit_width as usize) {
128 let mask = 1 << i;
129 let val_bit_is_set = val & mask == mask;
130 let index = if cfg!(target_endian = "big") {
131 bit_width as usize - 1 - i
132 } else {
133 i
134 };
135 self.set_bit(index + bit_offset, val_bit_is_set);
136 }
137 }
138}
139#[repr(C)]
140#[derive(Default)]
141pub struct __IncompleteArrayField<T>(::core::marker::PhantomData<T>, [T; 0]);
142impl<T> __IncompleteArrayField<T> {
143 #[inline]
144 pub const fn new() -> Self {
145 __IncompleteArrayField(::core::marker::PhantomData, [])
146 }
147 #[inline]
148 pub fn as_ptr(&self) -> *const T {
149 self as *const _ as *const T
150 }
151 #[inline]
152 pub fn as_mut_ptr(&mut self) -> *mut T {
153 self as *mut _ as *mut T
154 }
155 #[inline]
156 pub unsafe fn as_slice(&self, len: usize) -> &[T] {
157 unsafe { ::core::slice::from_raw_parts(self.as_ptr(), len) }
158 }
159 #[inline]
160 pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
161 unsafe { ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) }
162 }
163}
164impl<T> ::core::fmt::Debug for __IncompleteArrayField<T> {
165 fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
166 fmt.write_str("__IncompleteArrayField")
167 }
168}
169pub const SO_ATTACH_BPF: u32 = 50;
170pub const SO_DETACH_BPF: u32 = 27;
171pub const BPF_LD: u32 = 0;
172pub const BPF_LDX: u32 = 1;
173pub const BPF_ST: u32 = 2;
174pub const BPF_STX: u32 = 3;
175pub const BPF_ALU: u32 = 4;
176pub const BPF_JMP: u32 = 5;
177pub const BPF_W: u32 = 0;
178pub const BPF_H: u32 = 8;
179pub const BPF_B: u32 = 16;
180pub const BPF_K: u32 = 0;
181pub const BPF_ALU64: u32 = 7;
182pub const BPF_DW: u32 = 24;
183pub const BPF_CALL: u32 = 128;
184pub const BPF_F_ALLOW_OVERRIDE: u32 = 1;
185pub const BPF_F_ALLOW_MULTI: u32 = 2;
186pub const BPF_F_REPLACE: u32 = 4;
187pub const BPF_F_BEFORE: u32 = 8;
188pub const BPF_F_AFTER: u32 = 16;
189pub const BPF_F_ID: u32 = 32;
190pub const BPF_F_STRICT_ALIGNMENT: u32 = 1;
191pub const BPF_F_ANY_ALIGNMENT: u32 = 2;
192pub const BPF_F_TEST_RND_HI32: u32 = 4;
193pub const BPF_F_TEST_STATE_FREQ: u32 = 8;
194pub const BPF_F_SLEEPABLE: u32 = 16;
195pub const BPF_F_XDP_HAS_FRAGS: u32 = 32;
196pub const BPF_F_XDP_DEV_BOUND_ONLY: u32 = 64;
197pub const BPF_F_TEST_REG_INVARIANTS: u32 = 128;
198pub const BPF_F_NETFILTER_IP_DEFRAG: u32 = 1;
199pub const BPF_PSEUDO_MAP_FD: u32 = 1;
200pub const BPF_PSEUDO_MAP_IDX: u32 = 5;
201pub const BPF_PSEUDO_MAP_VALUE: u32 = 2;
202pub const BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6;
203pub const BPF_PSEUDO_BTF_ID: u32 = 3;
204pub const BPF_PSEUDO_FUNC: u32 = 4;
205pub const BPF_PSEUDO_CALL: u32 = 1;
206pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2;
207pub const BPF_F_QUERY_EFFECTIVE: u32 = 1;
208pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1;
209pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2;
210pub const BTF_INT_SIGNED: u32 = 1;
211pub const BTF_INT_CHAR: u32 = 2;
212pub const BTF_INT_BOOL: u32 = 4;
213pub const NLMSG_ALIGNTO: u32 = 4;
214pub const XDP_FLAGS_UPDATE_IF_NOEXIST: u32 = 1;
215pub const XDP_FLAGS_SKB_MODE: u32 = 2;
216pub const XDP_FLAGS_DRV_MODE: u32 = 4;
217pub const XDP_FLAGS_HW_MODE: u32 = 8;
218pub const XDP_FLAGS_REPLACE: u32 = 16;
219pub const XDP_FLAGS_MODES: u32 = 14;
220pub const XDP_FLAGS_MASK: u32 = 31;
221pub const PERF_MAX_STACK_DEPTH: u32 = 127;
222pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8;
223pub const PERF_FLAG_FD_NO_GROUP: u32 = 1;
224pub const PERF_FLAG_FD_OUTPUT: u32 = 2;
225pub const PERF_FLAG_PID_CGROUP: u32 = 4;
226pub const PERF_FLAG_FD_CLOEXEC: u32 = 8;
227pub const TC_H_MAJ_MASK: u32 = 4294901760;
228pub const TC_H_MIN_MASK: u32 = 65535;
229pub const TC_H_UNSPEC: u32 = 0;
230pub const TC_H_ROOT: u32 = 4294967295;
231pub const TC_H_INGRESS: u32 = 4294967281;
232pub const TC_H_CLSACT: u32 = 4294967281;
233pub const TC_H_MIN_PRIORITY: u32 = 65504;
234pub const TC_H_MIN_INGRESS: u32 = 65522;
235pub const TC_H_MIN_EGRESS: u32 = 65523;
236pub const TCA_BPF_FLAG_ACT_DIRECT: u32 = 1;
237pub type __u8 = ::core::ffi::c_uchar;
238pub type __s16 = ::core::ffi::c_short;
239pub type __u16 = ::core::ffi::c_ushort;
240pub type __s32 = ::core::ffi::c_int;
241pub type __u32 = ::core::ffi::c_uint;
242pub type __s64 = ::core::ffi::c_longlong;
243pub type __u64 = ::core::ffi::c_ulonglong;
244#[repr(C)]
245#[derive(Debug, Copy, Clone)]
246pub struct bpf_insn {
247 pub code: __u8,
248 pub _bitfield_align_1: [u8; 0],
249 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
250 pub off: __s16,
251 pub imm: __s32,
252}
253impl bpf_insn {
254 #[inline]
255 pub fn dst_reg(&self) -> __u8 {
256 unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) }
257 }
258 #[inline]
259 pub fn set_dst_reg(&mut self, val: __u8) {
260 unsafe {
261 let val: u8 = ::core::mem::transmute(val);
262 self._bitfield_1.set(0usize, 4u8, val as u64)
263 }
264 }
265 #[inline]
266 pub fn src_reg(&self) -> __u8 {
267 unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) }
268 }
269 #[inline]
270 pub fn set_src_reg(&mut self, val: __u8) {
271 unsafe {
272 let val: u8 = ::core::mem::transmute(val);
273 self._bitfield_1.set(4usize, 4u8, val as u64)
274 }
275 }
276 #[inline]
277 pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> {
278 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
279 __bindgen_bitfield_unit.set(0usize, 4u8, {
280 let dst_reg: u8 = unsafe { ::core::mem::transmute(dst_reg) };
281 dst_reg as u64
282 });
283 __bindgen_bitfield_unit.set(4usize, 4u8, {
284 let src_reg: u8 = unsafe { ::core::mem::transmute(src_reg) };
285 src_reg as u64
286 });
287 __bindgen_bitfield_unit
288 }
289}
290#[repr(C)]
291#[derive(Debug)]
292pub struct bpf_lpm_trie_key {
293 pub prefixlen: __u32,
294 pub data: __IncompleteArrayField<__u8>,
295}
296impl bpf_cmd {
297 pub const BPF_PROG_RUN: bpf_cmd = bpf_cmd::BPF_PROG_TEST_RUN;
298}
299#[repr(u32)]
300#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, IntEnum)]
301pub enum bpf_cmd {
302 BPF_MAP_CREATE = 0,
303 BPF_MAP_LOOKUP_ELEM = 1,
304 BPF_MAP_UPDATE_ELEM = 2,
305 BPF_MAP_DELETE_ELEM = 3,
306 BPF_MAP_GET_NEXT_KEY = 4,
307 BPF_PROG_LOAD = 5,
308 BPF_OBJ_PIN = 6,
309 BPF_OBJ_GET = 7,
310 BPF_PROG_ATTACH = 8,
311 BPF_PROG_DETACH = 9,
312 BPF_PROG_TEST_RUN = 10,
313 BPF_PROG_GET_NEXT_ID = 11,
314 BPF_MAP_GET_NEXT_ID = 12,
315 BPF_PROG_GET_FD_BY_ID = 13,
316 BPF_MAP_GET_FD_BY_ID = 14,
317 BPF_OBJ_GET_INFO_BY_FD = 15,
318 BPF_PROG_QUERY = 16,
319 BPF_RAW_TRACEPOINT_OPEN = 17,
320 BPF_BTF_LOAD = 18,
321 BPF_BTF_GET_FD_BY_ID = 19,
322 BPF_TASK_FD_QUERY = 20,
323 BPF_MAP_LOOKUP_AND_DELETE_ELEM = 21,
324 BPF_MAP_FREEZE = 22,
325 BPF_BTF_GET_NEXT_ID = 23,
326 BPF_MAP_LOOKUP_BATCH = 24,
327 BPF_MAP_LOOKUP_AND_DELETE_BATCH = 25,
328 BPF_MAP_UPDATE_BATCH = 26,
329 BPF_MAP_DELETE_BATCH = 27,
330 BPF_LINK_CREATE = 28,
331 BPF_LINK_UPDATE = 29,
332 BPF_LINK_GET_FD_BY_ID = 30,
333 BPF_LINK_GET_NEXT_ID = 31,
334 BPF_ENABLE_STATS = 32,
335 BPF_ITER_CREATE = 33,
336 BPF_LINK_DETACH = 34,
337 BPF_PROG_BIND_MAP = 35,
338 BPF_TOKEN_CREATE = 36,
339 __MAX_BPF_CMD = 37,
340}
341impl bpf_map_type {
342 pub const BPF_MAP_TYPE_CGROUP_STORAGE: bpf_map_type =
343 bpf_map_type::BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED;
344}
345impl bpf_map_type {
346 pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE: bpf_map_type =
347 bpf_map_type::BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED;
348}
349#[repr(u32)]
350#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, IntEnum)]
351pub enum bpf_map_type {
352 BPF_MAP_TYPE_UNSPEC = 0,
353 BPF_MAP_TYPE_HASH = 1,
354 BPF_MAP_TYPE_ARRAY = 2,
355 BPF_MAP_TYPE_PROG_ARRAY = 3,
356 BPF_MAP_TYPE_PERF_EVENT_ARRAY = 4,
357 BPF_MAP_TYPE_PERCPU_HASH = 5,
358 BPF_MAP_TYPE_PERCPU_ARRAY = 6,
359 BPF_MAP_TYPE_STACK_TRACE = 7,
360 BPF_MAP_TYPE_CGROUP_ARRAY = 8,
361 BPF_MAP_TYPE_LRU_HASH = 9,
362 BPF_MAP_TYPE_LRU_PERCPU_HASH = 10,
363 BPF_MAP_TYPE_LPM_TRIE = 11,
364 BPF_MAP_TYPE_ARRAY_OF_MAPS = 12,
365 BPF_MAP_TYPE_HASH_OF_MAPS = 13,
366 BPF_MAP_TYPE_DEVMAP = 14,
367 BPF_MAP_TYPE_SOCKMAP = 15,
368 BPF_MAP_TYPE_CPUMAP = 16,
369 BPF_MAP_TYPE_XSKMAP = 17,
370 BPF_MAP_TYPE_SOCKHASH = 18,
371 BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED = 19,
372 BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 20,
373 BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED = 21,
374 BPF_MAP_TYPE_QUEUE = 22,
375 BPF_MAP_TYPE_STACK = 23,
376 BPF_MAP_TYPE_SK_STORAGE = 24,
377 BPF_MAP_TYPE_DEVMAP_HASH = 25,
378 BPF_MAP_TYPE_STRUCT_OPS = 26,
379 BPF_MAP_TYPE_RINGBUF = 27,
380 BPF_MAP_TYPE_INODE_STORAGE = 28,
381 BPF_MAP_TYPE_TASK_STORAGE = 29,
382 BPF_MAP_TYPE_BLOOM_FILTER = 30,
383 BPF_MAP_TYPE_USER_RINGBUF = 31,
384 BPF_MAP_TYPE_CGRP_STORAGE = 32,
385 BPF_MAP_TYPE_ARENA = 33,
386 __MAX_BPF_MAP_TYPE = 34,
387}
388#[repr(u32)]
389#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, IntEnum)]
390pub enum bpf_prog_type {
391 BPF_PROG_TYPE_UNSPEC = 0,
392 BPF_PROG_TYPE_SOCKET_FILTER = 1,
393 BPF_PROG_TYPE_KPROBE = 2,
394 BPF_PROG_TYPE_SCHED_CLS = 3,
395 BPF_PROG_TYPE_SCHED_ACT = 4,
396 BPF_PROG_TYPE_TRACEPOINT = 5,
397 BPF_PROG_TYPE_XDP = 6,
398 BPF_PROG_TYPE_PERF_EVENT = 7,
399 BPF_PROG_TYPE_CGROUP_SKB = 8,
400 BPF_PROG_TYPE_CGROUP_SOCK = 9,
401 BPF_PROG_TYPE_LWT_IN = 10,
402 BPF_PROG_TYPE_LWT_OUT = 11,
403 BPF_PROG_TYPE_LWT_XMIT = 12,
404 BPF_PROG_TYPE_SOCK_OPS = 13,
405 BPF_PROG_TYPE_SK_SKB = 14,
406 BPF_PROG_TYPE_CGROUP_DEVICE = 15,
407 BPF_PROG_TYPE_SK_MSG = 16,
408 BPF_PROG_TYPE_RAW_TRACEPOINT = 17,
409 BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 18,
410 BPF_PROG_TYPE_LWT_SEG6LOCAL = 19,
411 BPF_PROG_TYPE_LIRC_MODE2 = 20,
412 BPF_PROG_TYPE_SK_REUSEPORT = 21,
413 BPF_PROG_TYPE_FLOW_DISSECTOR = 22,
414 BPF_PROG_TYPE_CGROUP_SYSCTL = 23,
415 BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 24,
416 BPF_PROG_TYPE_CGROUP_SOCKOPT = 25,
417 BPF_PROG_TYPE_TRACING = 26,
418 BPF_PROG_TYPE_STRUCT_OPS = 27,
419 BPF_PROG_TYPE_EXT = 28,
420 BPF_PROG_TYPE_LSM = 29,
421 BPF_PROG_TYPE_SK_LOOKUP = 30,
422 BPF_PROG_TYPE_SYSCALL = 31,
423 BPF_PROG_TYPE_NETFILTER = 32,
424 __MAX_BPF_PROG_TYPE = 33,
425}
426#[repr(u32)]
427#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, IntEnum)]
428pub enum bpf_attach_type {
429 BPF_CGROUP_INET_INGRESS = 0,
430 BPF_CGROUP_INET_EGRESS = 1,
431 BPF_CGROUP_INET_SOCK_CREATE = 2,
432 BPF_CGROUP_SOCK_OPS = 3,
433 BPF_SK_SKB_STREAM_PARSER = 4,
434 BPF_SK_SKB_STREAM_VERDICT = 5,
435 BPF_CGROUP_DEVICE = 6,
436 BPF_SK_MSG_VERDICT = 7,
437 BPF_CGROUP_INET4_BIND = 8,
438 BPF_CGROUP_INET6_BIND = 9,
439 BPF_CGROUP_INET4_CONNECT = 10,
440 BPF_CGROUP_INET6_CONNECT = 11,
441 BPF_CGROUP_INET4_POST_BIND = 12,
442 BPF_CGROUP_INET6_POST_BIND = 13,
443 BPF_CGROUP_UDP4_SENDMSG = 14,
444 BPF_CGROUP_UDP6_SENDMSG = 15,
445 BPF_LIRC_MODE2 = 16,
446 BPF_FLOW_DISSECTOR = 17,
447 BPF_CGROUP_SYSCTL = 18,
448 BPF_CGROUP_UDP4_RECVMSG = 19,
449 BPF_CGROUP_UDP6_RECVMSG = 20,
450 BPF_CGROUP_GETSOCKOPT = 21,
451 BPF_CGROUP_SETSOCKOPT = 22,
452 BPF_TRACE_RAW_TP = 23,
453 BPF_TRACE_FENTRY = 24,
454 BPF_TRACE_FEXIT = 25,
455 BPF_MODIFY_RETURN = 26,
456 BPF_LSM_MAC = 27,
457 BPF_TRACE_ITER = 28,
458 BPF_CGROUP_INET4_GETPEERNAME = 29,
459 BPF_CGROUP_INET6_GETPEERNAME = 30,
460 BPF_CGROUP_INET4_GETSOCKNAME = 31,
461 BPF_CGROUP_INET6_GETSOCKNAME = 32,
462 BPF_XDP_DEVMAP = 33,
463 BPF_CGROUP_INET_SOCK_RELEASE = 34,
464 BPF_XDP_CPUMAP = 35,
465 BPF_SK_LOOKUP = 36,
466 BPF_XDP = 37,
467 BPF_SK_SKB_VERDICT = 38,
468 BPF_SK_REUSEPORT_SELECT = 39,
469 BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 40,
470 BPF_PERF_EVENT = 41,
471 BPF_TRACE_KPROBE_MULTI = 42,
472 BPF_LSM_CGROUP = 43,
473 BPF_STRUCT_OPS = 44,
474 BPF_NETFILTER = 45,
475 BPF_TCX_INGRESS = 46,
476 BPF_TCX_EGRESS = 47,
477 BPF_TRACE_UPROBE_MULTI = 48,
478 BPF_CGROUP_UNIX_CONNECT = 49,
479 BPF_CGROUP_UNIX_SENDMSG = 50,
480 BPF_CGROUP_UNIX_RECVMSG = 51,
481 BPF_CGROUP_UNIX_GETPEERNAME = 52,
482 BPF_CGROUP_UNIX_GETSOCKNAME = 53,
483 BPF_NETKIT_PRIMARY = 54,
484 BPF_NETKIT_PEER = 55,
485 __MAX_BPF_ATTACH_TYPE = 56,
486}
487#[repr(u32)]
488#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
489pub enum bpf_link_type {
490 BPF_LINK_TYPE_UNSPEC = 0,
491 BPF_LINK_TYPE_RAW_TRACEPOINT = 1,
492 BPF_LINK_TYPE_TRACING = 2,
493 BPF_LINK_TYPE_CGROUP = 3,
494 BPF_LINK_TYPE_ITER = 4,
495 BPF_LINK_TYPE_NETNS = 5,
496 BPF_LINK_TYPE_XDP = 6,
497 BPF_LINK_TYPE_PERF_EVENT = 7,
498 BPF_LINK_TYPE_KPROBE_MULTI = 8,
499 BPF_LINK_TYPE_STRUCT_OPS = 9,
500 BPF_LINK_TYPE_NETFILTER = 10,
501 BPF_LINK_TYPE_TCX = 11,
502 BPF_LINK_TYPE_UPROBE_MULTI = 12,
503 BPF_LINK_TYPE_NETKIT = 13,
504 __MAX_BPF_LINK_TYPE = 14,
505}
506pub const BPF_F_KPROBE_MULTI_RETURN: _bindgen_ty_2 = 1;
507pub type _bindgen_ty_2 = ::core::ffi::c_uint;
508pub const BPF_F_UPROBE_MULTI_RETURN: _bindgen_ty_3 = 1;
509pub type _bindgen_ty_3 = ::core::ffi::c_uint;
510pub const BPF_ANY: _bindgen_ty_4 = 0;
511pub const BPF_NOEXIST: _bindgen_ty_4 = 1;
512pub const BPF_EXIST: _bindgen_ty_4 = 2;
513pub const BPF_F_LOCK: _bindgen_ty_4 = 4;
514pub type _bindgen_ty_4 = ::core::ffi::c_uint;
515pub const BPF_F_NO_PREALLOC: _bindgen_ty_5 = 1;
516pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_5 = 2;
517pub const BPF_F_NUMA_NODE: _bindgen_ty_5 = 4;
518pub const BPF_F_RDONLY: _bindgen_ty_5 = 8;
519pub const BPF_F_WRONLY: _bindgen_ty_5 = 16;
520pub const BPF_F_STACK_BUILD_ID: _bindgen_ty_5 = 32;
521pub const BPF_F_ZERO_SEED: _bindgen_ty_5 = 64;
522pub const BPF_F_RDONLY_PROG: _bindgen_ty_5 = 128;
523pub const BPF_F_WRONLY_PROG: _bindgen_ty_5 = 256;
524pub const BPF_F_CLONE: _bindgen_ty_5 = 512;
525pub const BPF_F_MMAPABLE: _bindgen_ty_5 = 1024;
526pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_5 = 2048;
527pub const BPF_F_INNER_MAP: _bindgen_ty_5 = 4096;
528pub const BPF_F_LINK: _bindgen_ty_5 = 8192;
529pub const BPF_F_PATH_FD: _bindgen_ty_5 = 16384;
530pub const BPF_F_VTYPE_BTF_OBJ_FD: _bindgen_ty_5 = 32768;
531pub const BPF_F_TOKEN_FD: _bindgen_ty_5 = 65536;
532pub const BPF_F_SEGV_ON_FAULT: _bindgen_ty_5 = 131072;
533pub const BPF_F_NO_USER_CONV: _bindgen_ty_5 = 262144;
534pub type _bindgen_ty_5 = ::core::ffi::c_uint;
535#[repr(u32)]
536#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
537pub enum bpf_stats_type {
538 BPF_STATS_RUN_TIME = 0,
539}
540#[repr(C)]
541#[derive(Copy, Clone)]
542pub union bpf_attr {
543 pub __bindgen_anon_1: bpf_attr__bindgen_ty_1,
544 pub __bindgen_anon_2: bpf_attr__bindgen_ty_2,
545 pub batch: bpf_attr__bindgen_ty_3,
546 pub __bindgen_anon_3: bpf_attr__bindgen_ty_4,
547 pub __bindgen_anon_4: bpf_attr__bindgen_ty_5,
548 pub __bindgen_anon_5: bpf_attr__bindgen_ty_6,
549 pub test: bpf_attr__bindgen_ty_7,
550 pub __bindgen_anon_6: bpf_attr__bindgen_ty_8,
551 pub info: bpf_attr__bindgen_ty_9,
552 pub query: bpf_attr__bindgen_ty_10,
553 pub raw_tracepoint: bpf_attr__bindgen_ty_11,
554 pub __bindgen_anon_7: bpf_attr__bindgen_ty_12,
555 pub task_fd_query: bpf_attr__bindgen_ty_13,
556 pub link_create: bpf_attr__bindgen_ty_14,
557 pub link_update: bpf_attr__bindgen_ty_15,
558 pub link_detach: bpf_attr__bindgen_ty_16,
559 pub enable_stats: bpf_attr__bindgen_ty_17,
560 pub iter_create: bpf_attr__bindgen_ty_18,
561 pub prog_bind_map: bpf_attr__bindgen_ty_19,
562 pub token_create: bpf_attr__bindgen_ty_20,
563}
564#[repr(C)]
565#[derive(Debug, Copy, Clone)]
566pub struct bpf_attr__bindgen_ty_1 {
567 pub map_type: __u32,
568 pub key_size: __u32,
569 pub value_size: __u32,
570 pub max_entries: __u32,
571 pub map_flags: __u32,
572 pub inner_map_fd: __u32,
573 pub numa_node: __u32,
574 pub map_name: [::core::ffi::c_char; 16usize],
575 pub map_ifindex: __u32,
576 pub btf_fd: __u32,
577 pub btf_key_type_id: __u32,
578 pub btf_value_type_id: __u32,
579 pub btf_vmlinux_value_type_id: __u32,
580 pub map_extra: __u64,
581 pub value_type_btf_obj_fd: __s32,
582 pub map_token_fd: __s32,
583}
584#[repr(C)]
585#[derive(Copy, Clone)]
586pub struct bpf_attr__bindgen_ty_2 {
587 pub map_fd: __u32,
588 pub key: __u64,
589 pub __bindgen_anon_1: bpf_attr__bindgen_ty_2__bindgen_ty_1,
590 pub flags: __u64,
591}
592#[repr(C)]
593#[derive(Copy, Clone)]
594pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 {
595 pub value: __u64,
596 pub next_key: __u64,
597}
598#[repr(C)]
599#[derive(Debug, Copy, Clone)]
600pub struct bpf_attr__bindgen_ty_3 {
601 pub in_batch: __u64,
602 pub out_batch: __u64,
603 pub keys: __u64,
604 pub values: __u64,
605 pub count: __u32,
606 pub map_fd: __u32,
607 pub elem_flags: __u64,
608 pub flags: __u64,
609}
610#[repr(C)]
611#[derive(Copy, Clone)]
612pub struct bpf_attr__bindgen_ty_4 {
613 pub prog_type: __u32,
614 pub insn_cnt: __u32,
615 pub insns: __u64,
616 pub license: __u64,
617 pub log_level: __u32,
618 pub log_size: __u32,
619 pub log_buf: __u64,
620 pub kern_version: __u32,
621 pub prog_flags: __u32,
622 pub prog_name: [::core::ffi::c_char; 16usize],
623 pub prog_ifindex: __u32,
624 pub expected_attach_type: __u32,
625 pub prog_btf_fd: __u32,
626 pub func_info_rec_size: __u32,
627 pub func_info: __u64,
628 pub func_info_cnt: __u32,
629 pub line_info_rec_size: __u32,
630 pub line_info: __u64,
631 pub line_info_cnt: __u32,
632 pub attach_btf_id: __u32,
633 pub __bindgen_anon_1: bpf_attr__bindgen_ty_4__bindgen_ty_1,
634 pub core_relo_cnt: __u32,
635 pub fd_array: __u64,
636 pub core_relos: __u64,
637 pub core_relo_rec_size: __u32,
638 pub log_true_size: __u32,
639 pub prog_token_fd: __s32,
640}
641#[repr(C)]
642#[derive(Copy, Clone)]
643pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 {
644 pub attach_prog_fd: __u32,
645 pub attach_btf_obj_fd: __u32,
646}
647#[repr(C)]
648#[derive(Debug, Copy, Clone)]
649pub struct bpf_attr__bindgen_ty_5 {
650 pub pathname: __u64,
651 pub bpf_fd: __u32,
652 pub file_flags: __u32,
653 pub path_fd: __s32,
654}
655#[repr(C)]
656#[derive(Copy, Clone)]
657pub struct bpf_attr__bindgen_ty_6 {
658 pub __bindgen_anon_1: bpf_attr__bindgen_ty_6__bindgen_ty_1,
659 pub attach_bpf_fd: __u32,
660 pub attach_type: __u32,
661 pub attach_flags: __u32,
662 pub replace_bpf_fd: __u32,
663 pub __bindgen_anon_2: bpf_attr__bindgen_ty_6__bindgen_ty_2,
664 pub expected_revision: __u64,
665}
666#[repr(C)]
667#[derive(Copy, Clone)]
668pub union bpf_attr__bindgen_ty_6__bindgen_ty_1 {
669 pub target_fd: __u32,
670 pub target_ifindex: __u32,
671}
672#[repr(C)]
673#[derive(Copy, Clone)]
674pub union bpf_attr__bindgen_ty_6__bindgen_ty_2 {
675 pub relative_fd: __u32,
676 pub relative_id: __u32,
677}
678#[repr(C)]
679#[derive(Debug, Copy, Clone)]
680pub struct bpf_attr__bindgen_ty_7 {
681 pub prog_fd: __u32,
682 pub retval: __u32,
683 pub data_size_in: __u32,
684 pub data_size_out: __u32,
685 pub data_in: __u64,
686 pub data_out: __u64,
687 pub repeat: __u32,
688 pub duration: __u32,
689 pub ctx_size_in: __u32,
690 pub ctx_size_out: __u32,
691 pub ctx_in: __u64,
692 pub ctx_out: __u64,
693 pub flags: __u32,
694 pub cpu: __u32,
695 pub batch_size: __u32,
696}
697#[repr(C)]
698#[derive(Copy, Clone)]
699pub struct bpf_attr__bindgen_ty_8 {
700 pub __bindgen_anon_1: bpf_attr__bindgen_ty_8__bindgen_ty_1,
701 pub next_id: __u32,
702 pub open_flags: __u32,
703}
704#[repr(C)]
705#[derive(Copy, Clone)]
706pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 {
707 pub start_id: __u32,
708 pub prog_id: __u32,
709 pub map_id: __u32,
710 pub btf_id: __u32,
711 pub link_id: __u32,
712}
713#[repr(C)]
714#[derive(Debug, Copy, Clone)]
715pub struct bpf_attr__bindgen_ty_9 {
716 pub bpf_fd: __u32,
717 pub info_len: __u32,
718 pub info: __u64,
719}
720#[repr(C)]
721#[derive(Copy, Clone)]
722pub struct bpf_attr__bindgen_ty_10 {
723 pub __bindgen_anon_1: bpf_attr__bindgen_ty_10__bindgen_ty_1,
724 pub attach_type: __u32,
725 pub query_flags: __u32,
726 pub attach_flags: __u32,
727 pub prog_ids: __u64,
728 pub __bindgen_anon_2: bpf_attr__bindgen_ty_10__bindgen_ty_2,
729 pub _bitfield_align_1: [u8; 0],
730 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
731 pub prog_attach_flags: __u64,
732 pub link_ids: __u64,
733 pub link_attach_flags: __u64,
734 pub revision: __u64,
735}
736#[repr(C)]
737#[derive(Copy, Clone)]
738pub union bpf_attr__bindgen_ty_10__bindgen_ty_1 {
739 pub target_fd: __u32,
740 pub target_ifindex: __u32,
741}
742#[repr(C)]
743#[derive(Copy, Clone)]
744pub union bpf_attr__bindgen_ty_10__bindgen_ty_2 {
745 pub prog_cnt: __u32,
746 pub count: __u32,
747}
748impl bpf_attr__bindgen_ty_10 {
749 #[inline]
750 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> {
751 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
752 __bindgen_bitfield_unit
753 }
754}
755#[repr(C)]
756#[derive(Debug, Copy, Clone)]
757pub struct bpf_attr__bindgen_ty_11 {
758 pub name: __u64,
759 pub prog_fd: __u32,
760 pub _bitfield_align_1: [u8; 0],
761 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
762 pub cookie: __u64,
763}
764impl bpf_attr__bindgen_ty_11 {
765 #[inline]
766 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> {
767 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
768 __bindgen_bitfield_unit
769 }
770}
771#[repr(C)]
772#[derive(Debug, Copy, Clone)]
773pub struct bpf_attr__bindgen_ty_12 {
774 pub btf: __u64,
775 pub btf_log_buf: __u64,
776 pub btf_size: __u32,
777 pub btf_log_size: __u32,
778 pub btf_log_level: __u32,
779 pub btf_log_true_size: __u32,
780 pub btf_flags: __u32,
781 pub btf_token_fd: __s32,
782}
783#[repr(C)]
784#[derive(Debug, Copy, Clone)]
785pub struct bpf_attr__bindgen_ty_13 {
786 pub pid: __u32,
787 pub fd: __u32,
788 pub flags: __u32,
789 pub buf_len: __u32,
790 pub buf: __u64,
791 pub prog_id: __u32,
792 pub fd_type: __u32,
793 pub probe_offset: __u64,
794 pub probe_addr: __u64,
795}
796#[repr(C)]
797#[derive(Copy, Clone)]
798pub struct bpf_attr__bindgen_ty_14 {
799 pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1,
800 pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2,
801 pub attach_type: __u32,
802 pub flags: __u32,
803 pub __bindgen_anon_3: bpf_attr__bindgen_ty_14__bindgen_ty_3,
804}
805#[repr(C)]
806#[derive(Copy, Clone)]
807pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 {
808 pub prog_fd: __u32,
809 pub map_fd: __u32,
810}
811#[repr(C)]
812#[derive(Copy, Clone)]
813pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 {
814 pub target_fd: __u32,
815 pub target_ifindex: __u32,
816}
817#[repr(C)]
818#[derive(Copy, Clone)]
819pub union bpf_attr__bindgen_ty_14__bindgen_ty_3 {
820 pub target_btf_id: __u32,
821 pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1,
822 pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2,
823 pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3,
824 pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4,
825 pub netfilter: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5,
826 pub tcx: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6,
827 pub uprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7,
828 pub netkit: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8,
829}
830#[repr(C)]
831#[derive(Debug, Copy, Clone)]
832pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 {
833 pub iter_info: __u64,
834 pub iter_info_len: __u32,
835}
836#[repr(C)]
837#[derive(Debug, Copy, Clone)]
838pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 {
839 pub bpf_cookie: __u64,
840}
841#[repr(C)]
842#[derive(Debug, Copy, Clone)]
843pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 {
844 pub flags: __u32,
845 pub cnt: __u32,
846 pub syms: __u64,
847 pub addrs: __u64,
848 pub cookies: __u64,
849}
850#[repr(C)]
851#[derive(Debug, Copy, Clone)]
852pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 {
853 pub target_btf_id: __u32,
854 pub cookie: __u64,
855}
856#[repr(C)]
857#[derive(Debug, Copy, Clone)]
858pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 {
859 pub pf: __u32,
860 pub hooknum: __u32,
861 pub priority: __s32,
862 pub flags: __u32,
863}
864#[repr(C)]
865#[derive(Copy, Clone)]
866pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 {
867 pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1,
868 pub expected_revision: __u64,
869}
870#[repr(C)]
871#[derive(Copy, Clone)]
872pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 {
873 pub relative_fd: __u32,
874 pub relative_id: __u32,
875}
876#[repr(C)]
877#[derive(Debug, Copy, Clone)]
878pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 {
879 pub path: __u64,
880 pub offsets: __u64,
881 pub ref_ctr_offsets: __u64,
882 pub cookies: __u64,
883 pub cnt: __u32,
884 pub flags: __u32,
885 pub pid: __u32,
886}
887#[repr(C)]
888#[derive(Copy, Clone)]
889pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 {
890 pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1,
891 pub expected_revision: __u64,
892}
893#[repr(C)]
894#[derive(Copy, Clone)]
895pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 {
896 pub relative_fd: __u32,
897 pub relative_id: __u32,
898}
899#[repr(C)]
900#[derive(Copy, Clone)]
901pub struct bpf_attr__bindgen_ty_15 {
902 pub link_fd: __u32,
903 pub __bindgen_anon_1: bpf_attr__bindgen_ty_15__bindgen_ty_1,
904 pub flags: __u32,
905 pub __bindgen_anon_2: bpf_attr__bindgen_ty_15__bindgen_ty_2,
906}
907#[repr(C)]
908#[derive(Copy, Clone)]
909pub union bpf_attr__bindgen_ty_15__bindgen_ty_1 {
910 pub new_prog_fd: __u32,
911 pub new_map_fd: __u32,
912}
913#[repr(C)]
914#[derive(Copy, Clone)]
915pub union bpf_attr__bindgen_ty_15__bindgen_ty_2 {
916 pub old_prog_fd: __u32,
917 pub old_map_fd: __u32,
918}
919#[repr(C)]
920#[derive(Debug, Copy, Clone)]
921pub struct bpf_attr__bindgen_ty_16 {
922 pub link_fd: __u32,
923}
924#[repr(C)]
925#[derive(Debug, Copy, Clone)]
926pub struct bpf_attr__bindgen_ty_17 {
927 pub type_: __u32,
928}
929#[repr(C)]
930#[derive(Debug, Copy, Clone)]
931pub struct bpf_attr__bindgen_ty_18 {
932 pub link_fd: __u32,
933 pub flags: __u32,
934}
935#[repr(C)]
936#[derive(Debug, Copy, Clone)]
937pub struct bpf_attr__bindgen_ty_19 {
938 pub prog_fd: __u32,
939 pub map_fd: __u32,
940 pub flags: __u32,
941}
942#[repr(C)]
943#[derive(Debug, Copy, Clone)]
944pub struct bpf_attr__bindgen_ty_20 {
945 pub flags: __u32,
946 pub bpffs_fd: __u32,
947}
948pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_6 = 1;
949pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_6 = 2;
950pub type _bindgen_ty_6 = ::core::ffi::c_uint;
951pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_7 = 15;
952pub type _bindgen_ty_7 = ::core::ffi::c_uint;
953pub const BPF_F_PSEUDO_HDR: _bindgen_ty_8 = 16;
954pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_8 = 32;
955pub const BPF_F_MARK_ENFORCE: _bindgen_ty_8 = 64;
956pub type _bindgen_ty_8 = ::core::ffi::c_uint;
957pub const BPF_F_INGRESS: _bindgen_ty_9 = 1;
958pub type _bindgen_ty_9 = ::core::ffi::c_uint;
959pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_10 = 1;
960pub type _bindgen_ty_10 = ::core::ffi::c_uint;
961pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_11 = 255;
962pub const BPF_F_USER_STACK: _bindgen_ty_11 = 256;
963pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_11 = 512;
964pub const BPF_F_REUSE_STACKID: _bindgen_ty_11 = 1024;
965pub const BPF_F_USER_BUILD_ID: _bindgen_ty_11 = 2048;
966pub type _bindgen_ty_11 = ::core::ffi::c_uint;
967pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_12 = 2;
968pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_12 = 4;
969pub const BPF_F_SEQ_NUMBER: _bindgen_ty_12 = 8;
970pub const BPF_F_NO_TUNNEL_KEY: _bindgen_ty_12 = 16;
971pub type _bindgen_ty_12 = ::core::ffi::c_uint;
972pub const BPF_F_TUNINFO_FLAGS: _bindgen_ty_13 = 16;
973pub type _bindgen_ty_13 = ::core::ffi::c_uint;
974pub const BPF_F_INDEX_MASK: _bindgen_ty_14 = 4294967295;
975pub const BPF_F_CURRENT_CPU: _bindgen_ty_14 = 4294967295;
976pub const BPF_F_CTXLEN_MASK: _bindgen_ty_14 = 4503595332403200;
977pub type _bindgen_ty_14 = ::core::ffi::c_ulong;
978pub const BPF_F_CURRENT_NETNS: _bindgen_ty_15 = -1;
979pub type _bindgen_ty_15 = ::core::ffi::c_int;
980pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_17 = 1;
981pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_17 = 2;
982pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_17 = 4;
983pub const BPF_F_ADJ_ROOM_ENCAP_L4_GRE: _bindgen_ty_17 = 8;
984pub const BPF_F_ADJ_ROOM_ENCAP_L4_UDP: _bindgen_ty_17 = 16;
985pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_17 = 32;
986pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_17 = 64;
987pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_17 = 128;
988pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_17 = 256;
989pub type _bindgen_ty_17 = ::core::ffi::c_uint;
990pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_19 = 1;
991pub type _bindgen_ty_19 = ::core::ffi::c_uint;
992pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_21 = 1;
993pub type _bindgen_ty_21 = ::core::ffi::c_uint;
994pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_24 = 2147483648;
995pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_24 = 1073741824;
996pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_24 = 8;
997pub type _bindgen_ty_24 = ::core::ffi::c_uint;
998pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_26 = 1;
999pub type _bindgen_ty_26 = ::core::ffi::c_uint;
1000pub const BPF_F_BROADCAST: _bindgen_ty_27 = 8;
1001pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_27 = 16;
1002pub type _bindgen_ty_27 = ::core::ffi::c_uint;
1003#[repr(C)]
1004#[derive(Copy, Clone)]
1005pub struct bpf_devmap_val {
1006 pub ifindex: __u32,
1007 pub bpf_prog: bpf_devmap_val__bindgen_ty_1,
1008}
1009#[repr(C)]
1010#[derive(Copy, Clone)]
1011pub union bpf_devmap_val__bindgen_ty_1 {
1012 pub fd: ::core::ffi::c_int,
1013 pub id: __u32,
1014}
1015#[repr(C)]
1016#[derive(Copy, Clone)]
1017pub struct bpf_cpumap_val {
1018 pub qsize: __u32,
1019 pub bpf_prog: bpf_cpumap_val__bindgen_ty_1,
1020}
1021#[repr(C)]
1022#[derive(Copy, Clone)]
1023pub union bpf_cpumap_val__bindgen_ty_1 {
1024 pub fd: ::core::ffi::c_int,
1025 pub id: __u32,
1026}
1027#[repr(C)]
1028#[derive(Debug, Copy, Clone)]
1029pub struct bpf_prog_info {
1030 pub type_: __u32,
1031 pub id: __u32,
1032 pub tag: [__u8; 8usize],
1033 pub jited_prog_len: __u32,
1034 pub xlated_prog_len: __u32,
1035 pub jited_prog_insns: __u64,
1036 pub xlated_prog_insns: __u64,
1037 pub load_time: __u64,
1038 pub created_by_uid: __u32,
1039 pub nr_map_ids: __u32,
1040 pub map_ids: __u64,
1041 pub name: [::core::ffi::c_char; 16usize],
1042 pub ifindex: __u32,
1043 pub _bitfield_align_1: [u8; 0],
1044 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
1045 pub netns_dev: __u64,
1046 pub netns_ino: __u64,
1047 pub nr_jited_ksyms: __u32,
1048 pub nr_jited_func_lens: __u32,
1049 pub jited_ksyms: __u64,
1050 pub jited_func_lens: __u64,
1051 pub btf_id: __u32,
1052 pub func_info_rec_size: __u32,
1053 pub func_info: __u64,
1054 pub nr_func_info: __u32,
1055 pub nr_line_info: __u32,
1056 pub line_info: __u64,
1057 pub jited_line_info: __u64,
1058 pub nr_jited_line_info: __u32,
1059 pub line_info_rec_size: __u32,
1060 pub jited_line_info_rec_size: __u32,
1061 pub nr_prog_tags: __u32,
1062 pub prog_tags: __u64,
1063 pub run_time_ns: __u64,
1064 pub run_cnt: __u64,
1065 pub recursion_misses: __u64,
1066 pub verified_insns: __u32,
1067 pub attach_btf_obj_id: __u32,
1068 pub attach_btf_id: __u32,
1069}
1070impl bpf_prog_info {
1071 #[inline]
1072 pub fn gpl_compatible(&self) -> __u32 {
1073 unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
1074 }
1075 #[inline]
1076 pub fn set_gpl_compatible(&mut self, val: __u32) {
1077 unsafe {
1078 let val: u32 = ::core::mem::transmute(val);
1079 self._bitfield_1.set(0usize, 1u8, val as u64)
1080 }
1081 }
1082 #[inline]
1083 pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> {
1084 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
1085 __bindgen_bitfield_unit.set(0usize, 1u8, {
1086 let gpl_compatible: u32 = unsafe { ::core::mem::transmute(gpl_compatible) };
1087 gpl_compatible as u64
1088 });
1089 __bindgen_bitfield_unit
1090 }
1091}
1092#[repr(C)]
1093#[derive(Debug, Copy, Clone)]
1094pub struct bpf_map_info {
1095 pub type_: __u32,
1096 pub id: __u32,
1097 pub key_size: __u32,
1098 pub value_size: __u32,
1099 pub max_entries: __u32,
1100 pub map_flags: __u32,
1101 pub name: [::core::ffi::c_char; 16usize],
1102 pub ifindex: __u32,
1103 pub btf_vmlinux_value_type_id: __u32,
1104 pub netns_dev: __u64,
1105 pub netns_ino: __u64,
1106 pub btf_id: __u32,
1107 pub btf_key_type_id: __u32,
1108 pub btf_value_type_id: __u32,
1109 pub btf_vmlinux_id: __u32,
1110 pub map_extra: __u64,
1111}
1112#[repr(C)]
1113#[derive(Debug, Copy, Clone)]
1114pub struct bpf_btf_info {
1115 pub btf: __u64,
1116 pub btf_size: __u32,
1117 pub id: __u32,
1118 pub name: __u64,
1119 pub name_len: __u32,
1120 pub kernel_btf: __u32,
1121}
1122#[repr(C)]
1123#[derive(Copy, Clone)]
1124pub struct bpf_link_info {
1125 pub type_: __u32,
1126 pub id: __u32,
1127 pub prog_id: __u32,
1128 pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1,
1129}
1130#[repr(C)]
1131#[derive(Copy, Clone)]
1132pub union bpf_link_info__bindgen_ty_1 {
1133 pub raw_tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_1,
1134 pub tracing: bpf_link_info__bindgen_ty_1__bindgen_ty_2,
1135 pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_3,
1136 pub iter: bpf_link_info__bindgen_ty_1__bindgen_ty_4,
1137 pub netns: bpf_link_info__bindgen_ty_1__bindgen_ty_5,
1138 pub xdp: bpf_link_info__bindgen_ty_1__bindgen_ty_6,
1139 pub struct_ops: bpf_link_info__bindgen_ty_1__bindgen_ty_7,
1140 pub netfilter: bpf_link_info__bindgen_ty_1__bindgen_ty_8,
1141 pub kprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_9,
1142 pub uprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_10,
1143 pub perf_event: bpf_link_info__bindgen_ty_1__bindgen_ty_11,
1144 pub tcx: bpf_link_info__bindgen_ty_1__bindgen_ty_12,
1145 pub netkit: bpf_link_info__bindgen_ty_1__bindgen_ty_13,
1146}
1147#[repr(C)]
1148#[derive(Debug, Copy, Clone)]
1149pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_1 {
1150 pub tp_name: __u64,
1151 pub tp_name_len: __u32,
1152}
1153#[repr(C)]
1154#[derive(Debug, Copy, Clone)]
1155pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_2 {
1156 pub attach_type: __u32,
1157 pub target_obj_id: __u32,
1158 pub target_btf_id: __u32,
1159}
1160#[repr(C)]
1161#[derive(Debug, Copy, Clone)]
1162pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_3 {
1163 pub cgroup_id: __u64,
1164 pub attach_type: __u32,
1165}
1166#[repr(C)]
1167#[derive(Copy, Clone)]
1168pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4 {
1169 pub target_name: __u64,
1170 pub target_name_len: __u32,
1171 pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1,
1172 pub __bindgen_anon_2: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2,
1173}
1174#[repr(C)]
1175#[derive(Copy, Clone)]
1176pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 {
1177 pub map: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1,
1178}
1179#[repr(C)]
1180#[derive(Debug, Copy, Clone)]
1181pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 {
1182 pub map_id: __u32,
1183}
1184#[repr(C)]
1185#[derive(Copy, Clone)]
1186pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 {
1187 pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1,
1188 pub task: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2,
1189}
1190#[repr(C)]
1191#[derive(Debug, Copy, Clone)]
1192pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 {
1193 pub cgroup_id: __u64,
1194 pub order: __u32,
1195}
1196#[repr(C)]
1197#[derive(Debug, Copy, Clone)]
1198pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 {
1199 pub tid: __u32,
1200 pub pid: __u32,
1201}
1202#[repr(C)]
1203#[derive(Debug, Copy, Clone)]
1204pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 {
1205 pub netns_ino: __u32,
1206 pub attach_type: __u32,
1207}
1208#[repr(C)]
1209#[derive(Debug, Copy, Clone)]
1210pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 {
1211 pub ifindex: __u32,
1212}
1213#[repr(C)]
1214#[derive(Debug, Copy, Clone)]
1215pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_7 {
1216 pub map_id: __u32,
1217}
1218#[repr(C)]
1219#[derive(Debug, Copy, Clone)]
1220pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_8 {
1221 pub pf: __u32,
1222 pub hooknum: __u32,
1223 pub priority: __s32,
1224 pub flags: __u32,
1225}
1226#[repr(C)]
1227#[derive(Debug, Copy, Clone)]
1228pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_9 {
1229 pub addrs: __u64,
1230 pub count: __u32,
1231 pub flags: __u32,
1232 pub missed: __u64,
1233 pub cookies: __u64,
1234}
1235#[repr(C)]
1236#[derive(Debug, Copy, Clone)]
1237pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_10 {
1238 pub path: __u64,
1239 pub offsets: __u64,
1240 pub ref_ctr_offsets: __u64,
1241 pub cookies: __u64,
1242 pub path_size: __u32,
1243 pub count: __u32,
1244 pub flags: __u32,
1245 pub pid: __u32,
1246}
1247#[repr(C)]
1248#[derive(Copy, Clone)]
1249pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11 {
1250 pub type_: __u32,
1251 pub _bitfield_align_1: [u8; 0],
1252 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
1253 pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1,
1254}
1255#[repr(C)]
1256#[derive(Copy, Clone)]
1257pub union bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 {
1258 pub uprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1,
1259 pub kprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2,
1260 pub tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3,
1261 pub event: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4,
1262}
1263#[repr(C)]
1264#[derive(Debug, Copy, Clone)]
1265pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 {
1266 pub file_name: __u64,
1267 pub name_len: __u32,
1268 pub offset: __u32,
1269 pub cookie: __u64,
1270}
1271#[repr(C)]
1272#[derive(Debug, Copy, Clone)]
1273pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 {
1274 pub func_name: __u64,
1275 pub name_len: __u32,
1276 pub offset: __u32,
1277 pub addr: __u64,
1278 pub missed: __u64,
1279 pub cookie: __u64,
1280}
1281#[repr(C)]
1282#[derive(Debug, Copy, Clone)]
1283pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 {
1284 pub tp_name: __u64,
1285 pub name_len: __u32,
1286 pub _bitfield_align_1: [u8; 0],
1287 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
1288 pub cookie: __u64,
1289}
1290impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 {
1291 #[inline]
1292 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> {
1293 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
1294 __bindgen_bitfield_unit
1295 }
1296}
1297#[repr(C)]
1298#[derive(Debug, Copy, Clone)]
1299pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 {
1300 pub config: __u64,
1301 pub type_: __u32,
1302 pub _bitfield_align_1: [u8; 0],
1303 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
1304 pub cookie: __u64,
1305}
1306impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 {
1307 #[inline]
1308 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> {
1309 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
1310 __bindgen_bitfield_unit
1311 }
1312}
1313impl bpf_link_info__bindgen_ty_1__bindgen_ty_11 {
1314 #[inline]
1315 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> {
1316 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
1317 __bindgen_bitfield_unit
1318 }
1319}
1320#[repr(C)]
1321#[derive(Debug, Copy, Clone)]
1322pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_12 {
1323 pub ifindex: __u32,
1324 pub attach_type: __u32,
1325}
1326#[repr(C)]
1327#[derive(Debug, Copy, Clone)]
1328pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 {
1329 pub ifindex: __u32,
1330 pub attach_type: __u32,
1331}
1332#[repr(C)]
1333#[derive(Debug, Copy, Clone)]
1334pub struct bpf_func_info {
1335 pub insn_off: __u32,
1336 pub type_id: __u32,
1337}
1338#[repr(C)]
1339#[derive(Debug, Copy, Clone)]
1340pub struct bpf_line_info {
1341 pub insn_off: __u32,
1342 pub file_name_off: __u32,
1343 pub line_off: __u32,
1344 pub line_col: __u32,
1345}
1346pub const BPF_F_TIMER_ABS: _bindgen_ty_41 = 1;
1347pub const BPF_F_TIMER_CPU_PIN: _bindgen_ty_41 = 2;
1348pub type _bindgen_ty_41 = ::core::ffi::c_uint;
1349#[repr(C)]
1350#[derive(Debug, Copy, Clone)]
1351pub struct btf_header {
1352 pub magic: __u16,
1353 pub version: __u8,
1354 pub flags: __u8,
1355 pub hdr_len: __u32,
1356 pub type_off: __u32,
1357 pub type_len: __u32,
1358 pub str_off: __u32,
1359 pub str_len: __u32,
1360}
1361#[repr(C)]
1362#[derive(Copy, Clone)]
1363pub struct btf_type {
1364 pub name_off: __u32,
1365 pub info: __u32,
1366 pub __bindgen_anon_1: btf_type__bindgen_ty_1,
1367}
1368#[repr(C)]
1369#[derive(Copy, Clone)]
1370pub union btf_type__bindgen_ty_1 {
1371 pub size: __u32,
1372 pub type_: __u32,
1373}
1374pub const BTF_KIND_UNKN: _bindgen_ty_42 = 0;
1375pub const BTF_KIND_INT: _bindgen_ty_42 = 1;
1376pub const BTF_KIND_PTR: _bindgen_ty_42 = 2;
1377pub const BTF_KIND_ARRAY: _bindgen_ty_42 = 3;
1378pub const BTF_KIND_STRUCT: _bindgen_ty_42 = 4;
1379pub const BTF_KIND_UNION: _bindgen_ty_42 = 5;
1380pub const BTF_KIND_ENUM: _bindgen_ty_42 = 6;
1381pub const BTF_KIND_FWD: _bindgen_ty_42 = 7;
1382pub const BTF_KIND_TYPEDEF: _bindgen_ty_42 = 8;
1383pub const BTF_KIND_VOLATILE: _bindgen_ty_42 = 9;
1384pub const BTF_KIND_CONST: _bindgen_ty_42 = 10;
1385pub const BTF_KIND_RESTRICT: _bindgen_ty_42 = 11;
1386pub const BTF_KIND_FUNC: _bindgen_ty_42 = 12;
1387pub const BTF_KIND_FUNC_PROTO: _bindgen_ty_42 = 13;
1388pub const BTF_KIND_VAR: _bindgen_ty_42 = 14;
1389pub const BTF_KIND_DATASEC: _bindgen_ty_42 = 15;
1390pub const BTF_KIND_FLOAT: _bindgen_ty_42 = 16;
1391pub const BTF_KIND_DECL_TAG: _bindgen_ty_42 = 17;
1392pub const BTF_KIND_TYPE_TAG: _bindgen_ty_42 = 18;
1393pub const BTF_KIND_ENUM64: _bindgen_ty_42 = 19;
1394pub const NR_BTF_KINDS: _bindgen_ty_42 = 20;
1395pub const BTF_KIND_MAX: _bindgen_ty_42 = 19;
1396pub type _bindgen_ty_42 = ::core::ffi::c_uint;
1397#[repr(C)]
1398#[derive(Debug, Copy, Clone)]
1399pub struct btf_enum {
1400 pub name_off: __u32,
1401 pub val: __s32,
1402}
1403#[repr(C)]
1404#[derive(Debug, Copy, Clone)]
1405pub struct btf_array {
1406 pub type_: __u32,
1407 pub index_type: __u32,
1408 pub nelems: __u32,
1409}
1410#[repr(C)]
1411#[derive(Debug, Copy, Clone)]
1412pub struct btf_member {
1413 pub name_off: __u32,
1414 pub type_: __u32,
1415 pub offset: __u32,
1416}
1417#[repr(C)]
1418#[derive(Debug, Copy, Clone)]
1419pub struct btf_param {
1420 pub name_off: __u32,
1421 pub type_: __u32,
1422}
1423pub const BTF_VAR_STATIC: _bindgen_ty_43 = 0;
1424pub const BTF_VAR_GLOBAL_ALLOCATED: _bindgen_ty_43 = 1;
1425pub const BTF_VAR_GLOBAL_EXTERN: _bindgen_ty_43 = 2;
1426pub type _bindgen_ty_43 = ::core::ffi::c_uint;
1427#[repr(u32)]
1428#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1429pub enum btf_func_linkage {
1430 BTF_FUNC_STATIC = 0,
1431 BTF_FUNC_GLOBAL = 1,
1432 BTF_FUNC_EXTERN = 2,
1433}
1434#[repr(C)]
1435#[derive(Debug, Copy, Clone)]
1436pub struct btf_var {
1437 pub linkage: __u32,
1438}
1439#[repr(C)]
1440#[derive(Debug, Copy, Clone)]
1441pub struct btf_var_secinfo {
1442 pub type_: __u32,
1443 pub offset: __u32,
1444 pub size: __u32,
1445}
1446#[repr(C)]
1447#[derive(Debug, Copy, Clone)]
1448pub struct btf_decl_tag {
1449 pub component_idx: __s32,
1450}
1451pub const IFLA_XDP_UNSPEC: _bindgen_ty_92 = 0;
1452pub const IFLA_XDP_FD: _bindgen_ty_92 = 1;
1453pub const IFLA_XDP_ATTACHED: _bindgen_ty_92 = 2;
1454pub const IFLA_XDP_FLAGS: _bindgen_ty_92 = 3;
1455pub const IFLA_XDP_PROG_ID: _bindgen_ty_92 = 4;
1456pub const IFLA_XDP_DRV_PROG_ID: _bindgen_ty_92 = 5;
1457pub const IFLA_XDP_SKB_PROG_ID: _bindgen_ty_92 = 6;
1458pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_92 = 7;
1459pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_92 = 8;
1460pub const __IFLA_XDP_MAX: _bindgen_ty_92 = 9;
1461pub type _bindgen_ty_92 = ::core::ffi::c_uint;
1462#[repr(u32)]
1463#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, IntEnum)]
1464pub enum perf_type_id {
1465 PERF_TYPE_HARDWARE = 0,
1466 PERF_TYPE_SOFTWARE = 1,
1467 PERF_TYPE_TRACEPOINT = 2,
1468 PERF_TYPE_HW_CACHE = 3,
1469 PERF_TYPE_RAW = 4,
1470 PERF_TYPE_BREAKPOINT = 5,
1471 PERF_TYPE_MAX = 6,
1472}
1473#[repr(u32)]
1474#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1475pub enum perf_hw_id {
1476 PERF_COUNT_HW_CPU_CYCLES = 0,
1477 PERF_COUNT_HW_INSTRUCTIONS = 1,
1478 PERF_COUNT_HW_CACHE_REFERENCES = 2,
1479 PERF_COUNT_HW_CACHE_MISSES = 3,
1480 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4,
1481 PERF_COUNT_HW_BRANCH_MISSES = 5,
1482 PERF_COUNT_HW_BUS_CYCLES = 6,
1483 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7,
1484 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8,
1485 PERF_COUNT_HW_REF_CPU_CYCLES = 9,
1486 PERF_COUNT_HW_MAX = 10,
1487}
1488#[repr(u32)]
1489#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1490pub enum perf_hw_cache_id {
1491 PERF_COUNT_HW_CACHE_L1D = 0,
1492 PERF_COUNT_HW_CACHE_L1I = 1,
1493 PERF_COUNT_HW_CACHE_LL = 2,
1494 PERF_COUNT_HW_CACHE_DTLB = 3,
1495 PERF_COUNT_HW_CACHE_ITLB = 4,
1496 PERF_COUNT_HW_CACHE_BPU = 5,
1497 PERF_COUNT_HW_CACHE_NODE = 6,
1498 PERF_COUNT_HW_CACHE_MAX = 7,
1499}
1500#[repr(u32)]
1501#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1502pub enum perf_hw_cache_op_id {
1503 PERF_COUNT_HW_CACHE_OP_READ = 0,
1504 PERF_COUNT_HW_CACHE_OP_WRITE = 1,
1505 PERF_COUNT_HW_CACHE_OP_PREFETCH = 2,
1506 PERF_COUNT_HW_CACHE_OP_MAX = 3,
1507}
1508#[repr(u32)]
1509#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1510pub enum perf_hw_cache_op_result_id {
1511 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0,
1512 PERF_COUNT_HW_CACHE_RESULT_MISS = 1,
1513 PERF_COUNT_HW_CACHE_RESULT_MAX = 2,
1514}
1515#[repr(u32)]
1516#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, IntEnum)]
1517pub enum perf_sw_ids {
1518 PERF_COUNT_SW_CPU_CLOCK = 0,
1519 PERF_COUNT_SW_TASK_CLOCK = 1,
1520 PERF_COUNT_SW_PAGE_FAULTS = 2,
1521 PERF_COUNT_SW_CONTEXT_SWITCHES = 3,
1522 PERF_COUNT_SW_CPU_MIGRATIONS = 4,
1523 PERF_COUNT_SW_PAGE_FAULTS_MIN = 5,
1524 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 6,
1525 PERF_COUNT_SW_ALIGNMENT_FAULTS = 7,
1526 PERF_COUNT_SW_EMULATION_FAULTS = 8,
1527 PERF_COUNT_SW_DUMMY = 9,
1528 PERF_COUNT_SW_BPF_OUTPUT = 10,
1529 PERF_COUNT_SW_CGROUP_SWITCHES = 11,
1530 PERF_COUNT_SW_MAX = 12,
1531}
1532#[repr(u32)]
1533#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, IntEnum)]
1534pub enum perf_event_sample_format {
1535 PERF_SAMPLE_IP = 1,
1536 PERF_SAMPLE_TID = 2,
1537 PERF_SAMPLE_TIME = 4,
1538 PERF_SAMPLE_ADDR = 8,
1539 PERF_SAMPLE_READ = 16,
1540 PERF_SAMPLE_CALLCHAIN = 32,
1541 PERF_SAMPLE_ID = 64,
1542 PERF_SAMPLE_CPU = 128,
1543 PERF_SAMPLE_PERIOD = 256,
1544 PERF_SAMPLE_STREAM_ID = 512,
1545 PERF_SAMPLE_RAW = 1024,
1546 PERF_SAMPLE_BRANCH_STACK = 2048,
1547 PERF_SAMPLE_REGS_USER = 4096,
1548 PERF_SAMPLE_STACK_USER = 8192,
1549 PERF_SAMPLE_WEIGHT = 16384,
1550 PERF_SAMPLE_DATA_SRC = 32768,
1551 PERF_SAMPLE_IDENTIFIER = 65536,
1552 PERF_SAMPLE_TRANSACTION = 131072,
1553 PERF_SAMPLE_REGS_INTR = 262144,
1554 PERF_SAMPLE_PHYS_ADDR = 524288,
1555 PERF_SAMPLE_AUX = 1048576,
1556 PERF_SAMPLE_CGROUP = 2097152,
1557 PERF_SAMPLE_DATA_PAGE_SIZE = 4194304,
1558 PERF_SAMPLE_CODE_PAGE_SIZE = 8388608,
1559 PERF_SAMPLE_WEIGHT_STRUCT = 16777216,
1560 PERF_SAMPLE_MAX = 33554432,
1561}
1562#[repr(C)]
1563#[derive(Copy, Clone)]
1564pub struct perf_event_attr {
1565 pub type_: __u32,
1566 pub size: __u32,
1567 pub config: __u64,
1568 pub __bindgen_anon_1: perf_event_attr__bindgen_ty_1,
1569 pub sample_type: __u64,
1570 pub read_format: __u64,
1571 pub _bitfield_align_1: [u32; 0],
1572 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
1573 pub __bindgen_anon_2: perf_event_attr__bindgen_ty_2,
1574 pub bp_type: __u32,
1575 pub __bindgen_anon_3: perf_event_attr__bindgen_ty_3,
1576 pub __bindgen_anon_4: perf_event_attr__bindgen_ty_4,
1577 pub branch_sample_type: __u64,
1578 pub sample_regs_user: __u64,
1579 pub sample_stack_user: __u32,
1580 pub clockid: __s32,
1581 pub sample_regs_intr: __u64,
1582 pub aux_watermark: __u32,
1583 pub sample_max_stack: __u16,
1584 pub __reserved_2: __u16,
1585 pub aux_sample_size: __u32,
1586 pub __reserved_3: __u32,
1587 pub sig_data: __u64,
1588 pub config3: __u64,
1589}
1590#[repr(C)]
1591#[derive(Copy, Clone)]
1592pub union perf_event_attr__bindgen_ty_1 {
1593 pub sample_period: __u64,
1594 pub sample_freq: __u64,
1595}
1596#[repr(C)]
1597#[derive(Copy, Clone)]
1598pub union perf_event_attr__bindgen_ty_2 {
1599 pub wakeup_events: __u32,
1600 pub wakeup_watermark: __u32,
1601}
1602#[repr(C)]
1603#[derive(Copy, Clone)]
1604pub union perf_event_attr__bindgen_ty_3 {
1605 pub bp_addr: __u64,
1606 pub kprobe_func: __u64,
1607 pub uprobe_path: __u64,
1608 pub config1: __u64,
1609}
1610#[repr(C)]
1611#[derive(Copy, Clone)]
1612pub union perf_event_attr__bindgen_ty_4 {
1613 pub bp_len: __u64,
1614 pub kprobe_addr: __u64,
1615 pub probe_offset: __u64,
1616 pub config2: __u64,
1617}
1618impl perf_event_attr {
1619 #[inline]
1620 pub fn disabled(&self) -> __u64 {
1621 unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) }
1622 }
1623 #[inline]
1624 pub fn set_disabled(&mut self, val: __u64) {
1625 unsafe {
1626 let val: u64 = ::core::mem::transmute(val);
1627 self._bitfield_1.set(0usize, 1u8, val as u64)
1628 }
1629 }
1630 #[inline]
1631 pub fn inherit(&self) -> __u64 {
1632 unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) }
1633 }
1634 #[inline]
1635 pub fn set_inherit(&mut self, val: __u64) {
1636 unsafe {
1637 let val: u64 = ::core::mem::transmute(val);
1638 self._bitfield_1.set(1usize, 1u8, val as u64)
1639 }
1640 }
1641 #[inline]
1642 pub fn pinned(&self) -> __u64 {
1643 unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) }
1644 }
1645 #[inline]
1646 pub fn set_pinned(&mut self, val: __u64) {
1647 unsafe {
1648 let val: u64 = ::core::mem::transmute(val);
1649 self._bitfield_1.set(2usize, 1u8, val as u64)
1650 }
1651 }
1652 #[inline]
1653 pub fn exclusive(&self) -> __u64 {
1654 unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) }
1655 }
1656 #[inline]
1657 pub fn set_exclusive(&mut self, val: __u64) {
1658 unsafe {
1659 let val: u64 = ::core::mem::transmute(val);
1660 self._bitfield_1.set(3usize, 1u8, val as u64)
1661 }
1662 }
1663 #[inline]
1664 pub fn exclude_user(&self) -> __u64 {
1665 unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) }
1666 }
1667 #[inline]
1668 pub fn set_exclude_user(&mut self, val: __u64) {
1669 unsafe {
1670 let val: u64 = ::core::mem::transmute(val);
1671 self._bitfield_1.set(4usize, 1u8, val as u64)
1672 }
1673 }
1674 #[inline]
1675 pub fn exclude_kernel(&self) -> __u64 {
1676 unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) }
1677 }
1678 #[inline]
1679 pub fn set_exclude_kernel(&mut self, val: __u64) {
1680 unsafe {
1681 let val: u64 = ::core::mem::transmute(val);
1682 self._bitfield_1.set(5usize, 1u8, val as u64)
1683 }
1684 }
1685 #[inline]
1686 pub fn exclude_hv(&self) -> __u64 {
1687 unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) }
1688 }
1689 #[inline]
1690 pub fn set_exclude_hv(&mut self, val: __u64) {
1691 unsafe {
1692 let val: u64 = ::core::mem::transmute(val);
1693 self._bitfield_1.set(6usize, 1u8, val as u64)
1694 }
1695 }
1696 #[inline]
1697 pub fn exclude_idle(&self) -> __u64 {
1698 unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) }
1699 }
1700 #[inline]
1701 pub fn set_exclude_idle(&mut self, val: __u64) {
1702 unsafe {
1703 let val: u64 = ::core::mem::transmute(val);
1704 self._bitfield_1.set(7usize, 1u8, val as u64)
1705 }
1706 }
1707 #[inline]
1708 pub fn mmap(&self) -> __u64 {
1709 unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) }
1710 }
1711 #[inline]
1712 pub fn set_mmap(&mut self, val: __u64) {
1713 unsafe {
1714 let val: u64 = ::core::mem::transmute(val);
1715 self._bitfield_1.set(8usize, 1u8, val as u64)
1716 }
1717 }
1718 #[inline]
1719 pub fn comm(&self) -> __u64 {
1720 unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) }
1721 }
1722 #[inline]
1723 pub fn set_comm(&mut self, val: __u64) {
1724 unsafe {
1725 let val: u64 = ::core::mem::transmute(val);
1726 self._bitfield_1.set(9usize, 1u8, val as u64)
1727 }
1728 }
1729 #[inline]
1730 pub fn freq(&self) -> __u64 {
1731 unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) }
1732 }
1733 #[inline]
1734 pub fn set_freq(&mut self, val: __u64) {
1735 unsafe {
1736 let val: u64 = ::core::mem::transmute(val);
1737 self._bitfield_1.set(10usize, 1u8, val as u64)
1738 }
1739 }
1740 #[inline]
1741 pub fn inherit_stat(&self) -> __u64 {
1742 unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) }
1743 }
1744 #[inline]
1745 pub fn set_inherit_stat(&mut self, val: __u64) {
1746 unsafe {
1747 let val: u64 = ::core::mem::transmute(val);
1748 self._bitfield_1.set(11usize, 1u8, val as u64)
1749 }
1750 }
1751 #[inline]
1752 pub fn enable_on_exec(&self) -> __u64 {
1753 unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) }
1754 }
1755 #[inline]
1756 pub fn set_enable_on_exec(&mut self, val: __u64) {
1757 unsafe {
1758 let val: u64 = ::core::mem::transmute(val);
1759 self._bitfield_1.set(12usize, 1u8, val as u64)
1760 }
1761 }
1762 #[inline]
1763 pub fn task(&self) -> __u64 {
1764 unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) }
1765 }
1766 #[inline]
1767 pub fn set_task(&mut self, val: __u64) {
1768 unsafe {
1769 let val: u64 = ::core::mem::transmute(val);
1770 self._bitfield_1.set(13usize, 1u8, val as u64)
1771 }
1772 }
1773 #[inline]
1774 pub fn watermark(&self) -> __u64 {
1775 unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) }
1776 }
1777 #[inline]
1778 pub fn set_watermark(&mut self, val: __u64) {
1779 unsafe {
1780 let val: u64 = ::core::mem::transmute(val);
1781 self._bitfield_1.set(14usize, 1u8, val as u64)
1782 }
1783 }
1784 #[inline]
1785 pub fn precise_ip(&self) -> __u64 {
1786 unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) }
1787 }
1788 #[inline]
1789 pub fn set_precise_ip(&mut self, val: __u64) {
1790 unsafe {
1791 let val: u64 = ::core::mem::transmute(val);
1792 self._bitfield_1.set(15usize, 2u8, val as u64)
1793 }
1794 }
1795 #[inline]
1796 pub fn mmap_data(&self) -> __u64 {
1797 unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) }
1798 }
1799 #[inline]
1800 pub fn set_mmap_data(&mut self, val: __u64) {
1801 unsafe {
1802 let val: u64 = ::core::mem::transmute(val);
1803 self._bitfield_1.set(17usize, 1u8, val as u64)
1804 }
1805 }
1806 #[inline]
1807 pub fn sample_id_all(&self) -> __u64 {
1808 unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) }
1809 }
1810 #[inline]
1811 pub fn set_sample_id_all(&mut self, val: __u64) {
1812 unsafe {
1813 let val: u64 = ::core::mem::transmute(val);
1814 self._bitfield_1.set(18usize, 1u8, val as u64)
1815 }
1816 }
1817 #[inline]
1818 pub fn exclude_host(&self) -> __u64 {
1819 unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) }
1820 }
1821 #[inline]
1822 pub fn set_exclude_host(&mut self, val: __u64) {
1823 unsafe {
1824 let val: u64 = ::core::mem::transmute(val);
1825 self._bitfield_1.set(19usize, 1u8, val as u64)
1826 }
1827 }
1828 #[inline]
1829 pub fn exclude_guest(&self) -> __u64 {
1830 unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) }
1831 }
1832 #[inline]
1833 pub fn set_exclude_guest(&mut self, val: __u64) {
1834 unsafe {
1835 let val: u64 = ::core::mem::transmute(val);
1836 self._bitfield_1.set(20usize, 1u8, val as u64)
1837 }
1838 }
1839 #[inline]
1840 pub fn exclude_callchain_kernel(&self) -> __u64 {
1841 unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) }
1842 }
1843 #[inline]
1844 pub fn set_exclude_callchain_kernel(&mut self, val: __u64) {
1845 unsafe {
1846 let val: u64 = ::core::mem::transmute(val);
1847 self._bitfield_1.set(21usize, 1u8, val as u64)
1848 }
1849 }
1850 #[inline]
1851 pub fn exclude_callchain_user(&self) -> __u64 {
1852 unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) }
1853 }
1854 #[inline]
1855 pub fn set_exclude_callchain_user(&mut self, val: __u64) {
1856 unsafe {
1857 let val: u64 = ::core::mem::transmute(val);
1858 self._bitfield_1.set(22usize, 1u8, val as u64)
1859 }
1860 }
1861 #[inline]
1862 pub fn mmap2(&self) -> __u64 {
1863 unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) }
1864 }
1865 #[inline]
1866 pub fn set_mmap2(&mut self, val: __u64) {
1867 unsafe {
1868 let val: u64 = ::core::mem::transmute(val);
1869 self._bitfield_1.set(23usize, 1u8, val as u64)
1870 }
1871 }
1872 #[inline]
1873 pub fn comm_exec(&self) -> __u64 {
1874 unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) }
1875 }
1876 #[inline]
1877 pub fn set_comm_exec(&mut self, val: __u64) {
1878 unsafe {
1879 let val: u64 = ::core::mem::transmute(val);
1880 self._bitfield_1.set(24usize, 1u8, val as u64)
1881 }
1882 }
1883 #[inline]
1884 pub fn use_clockid(&self) -> __u64 {
1885 unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) }
1886 }
1887 #[inline]
1888 pub fn set_use_clockid(&mut self, val: __u64) {
1889 unsafe {
1890 let val: u64 = ::core::mem::transmute(val);
1891 self._bitfield_1.set(25usize, 1u8, val as u64)
1892 }
1893 }
1894 #[inline]
1895 pub fn context_switch(&self) -> __u64 {
1896 unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) }
1897 }
1898 #[inline]
1899 pub fn set_context_switch(&mut self, val: __u64) {
1900 unsafe {
1901 let val: u64 = ::core::mem::transmute(val);
1902 self._bitfield_1.set(26usize, 1u8, val as u64)
1903 }
1904 }
1905 #[inline]
1906 pub fn write_backward(&self) -> __u64 {
1907 unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) }
1908 }
1909 #[inline]
1910 pub fn set_write_backward(&mut self, val: __u64) {
1911 unsafe {
1912 let val: u64 = ::core::mem::transmute(val);
1913 self._bitfield_1.set(27usize, 1u8, val as u64)
1914 }
1915 }
1916 #[inline]
1917 pub fn namespaces(&self) -> __u64 {
1918 unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) }
1919 }
1920 #[inline]
1921 pub fn set_namespaces(&mut self, val: __u64) {
1922 unsafe {
1923 let val: u64 = ::core::mem::transmute(val);
1924 self._bitfield_1.set(28usize, 1u8, val as u64)
1925 }
1926 }
1927 #[inline]
1928 pub fn ksymbol(&self) -> __u64 {
1929 unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) }
1930 }
1931 #[inline]
1932 pub fn set_ksymbol(&mut self, val: __u64) {
1933 unsafe {
1934 let val: u64 = ::core::mem::transmute(val);
1935 self._bitfield_1.set(29usize, 1u8, val as u64)
1936 }
1937 }
1938 #[inline]
1939 pub fn bpf_event(&self) -> __u64 {
1940 unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) }
1941 }
1942 #[inline]
1943 pub fn set_bpf_event(&mut self, val: __u64) {
1944 unsafe {
1945 let val: u64 = ::core::mem::transmute(val);
1946 self._bitfield_1.set(30usize, 1u8, val as u64)
1947 }
1948 }
1949 #[inline]
1950 pub fn aux_output(&self) -> __u64 {
1951 unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) }
1952 }
1953 #[inline]
1954 pub fn set_aux_output(&mut self, val: __u64) {
1955 unsafe {
1956 let val: u64 = ::core::mem::transmute(val);
1957 self._bitfield_1.set(31usize, 1u8, val as u64)
1958 }
1959 }
1960 #[inline]
1961 pub fn cgroup(&self) -> __u64 {
1962 unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) }
1963 }
1964 #[inline]
1965 pub fn set_cgroup(&mut self, val: __u64) {
1966 unsafe {
1967 let val: u64 = ::core::mem::transmute(val);
1968 self._bitfield_1.set(32usize, 1u8, val as u64)
1969 }
1970 }
1971 #[inline]
1972 pub fn text_poke(&self) -> __u64 {
1973 unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) }
1974 }
1975 #[inline]
1976 pub fn set_text_poke(&mut self, val: __u64) {
1977 unsafe {
1978 let val: u64 = ::core::mem::transmute(val);
1979 self._bitfield_1.set(33usize, 1u8, val as u64)
1980 }
1981 }
1982 #[inline]
1983 pub fn build_id(&self) -> __u64 {
1984 unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) }
1985 }
1986 #[inline]
1987 pub fn set_build_id(&mut self, val: __u64) {
1988 unsafe {
1989 let val: u64 = ::core::mem::transmute(val);
1990 self._bitfield_1.set(34usize, 1u8, val as u64)
1991 }
1992 }
1993 #[inline]
1994 pub fn inherit_thread(&self) -> __u64 {
1995 unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) }
1996 }
1997 #[inline]
1998 pub fn set_inherit_thread(&mut self, val: __u64) {
1999 unsafe {
2000 let val: u64 = ::core::mem::transmute(val);
2001 self._bitfield_1.set(35usize, 1u8, val as u64)
2002 }
2003 }
2004 #[inline]
2005 pub fn remove_on_exec(&self) -> __u64 {
2006 unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) }
2007 }
2008 #[inline]
2009 pub fn set_remove_on_exec(&mut self, val: __u64) {
2010 unsafe {
2011 let val: u64 = ::core::mem::transmute(val);
2012 self._bitfield_1.set(36usize, 1u8, val as u64)
2013 }
2014 }
2015 #[inline]
2016 pub fn sigtrap(&self) -> __u64 {
2017 unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) }
2018 }
2019 #[inline]
2020 pub fn set_sigtrap(&mut self, val: __u64) {
2021 unsafe {
2022 let val: u64 = ::core::mem::transmute(val);
2023 self._bitfield_1.set(37usize, 1u8, val as u64)
2024 }
2025 }
2026 #[inline]
2027 pub fn __reserved_1(&self) -> __u64 {
2028 unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) }
2029 }
2030 #[inline]
2031 pub fn set___reserved_1(&mut self, val: __u64) {
2032 unsafe {
2033 let val: u64 = ::core::mem::transmute(val);
2034 self._bitfield_1.set(38usize, 26u8, val as u64)
2035 }
2036 }
2037 #[inline]
2038 pub fn new_bitfield_1(
2039 disabled: __u64,
2040 inherit: __u64,
2041 pinned: __u64,
2042 exclusive: __u64,
2043 exclude_user: __u64,
2044 exclude_kernel: __u64,
2045 exclude_hv: __u64,
2046 exclude_idle: __u64,
2047 mmap: __u64,
2048 comm: __u64,
2049 freq: __u64,
2050 inherit_stat: __u64,
2051 enable_on_exec: __u64,
2052 task: __u64,
2053 watermark: __u64,
2054 precise_ip: __u64,
2055 mmap_data: __u64,
2056 sample_id_all: __u64,
2057 exclude_host: __u64,
2058 exclude_guest: __u64,
2059 exclude_callchain_kernel: __u64,
2060 exclude_callchain_user: __u64,
2061 mmap2: __u64,
2062 comm_exec: __u64,
2063 use_clockid: __u64,
2064 context_switch: __u64,
2065 write_backward: __u64,
2066 namespaces: __u64,
2067 ksymbol: __u64,
2068 bpf_event: __u64,
2069 aux_output: __u64,
2070 cgroup: __u64,
2071 text_poke: __u64,
2072 build_id: __u64,
2073 inherit_thread: __u64,
2074 remove_on_exec: __u64,
2075 sigtrap: __u64,
2076 __reserved_1: __u64,
2077 ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
2078 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
2079 __bindgen_bitfield_unit.set(0usize, 1u8, {
2080 let disabled: u64 = unsafe { ::core::mem::transmute(disabled) };
2081 disabled as u64
2082 });
2083 __bindgen_bitfield_unit.set(1usize, 1u8, {
2084 let inherit: u64 = unsafe { ::core::mem::transmute(inherit) };
2085 inherit as u64
2086 });
2087 __bindgen_bitfield_unit.set(2usize, 1u8, {
2088 let pinned: u64 = unsafe { ::core::mem::transmute(pinned) };
2089 pinned as u64
2090 });
2091 __bindgen_bitfield_unit.set(3usize, 1u8, {
2092 let exclusive: u64 = unsafe { ::core::mem::transmute(exclusive) };
2093 exclusive as u64
2094 });
2095 __bindgen_bitfield_unit.set(4usize, 1u8, {
2096 let exclude_user: u64 = unsafe { ::core::mem::transmute(exclude_user) };
2097 exclude_user as u64
2098 });
2099 __bindgen_bitfield_unit.set(5usize, 1u8, {
2100 let exclude_kernel: u64 = unsafe { ::core::mem::transmute(exclude_kernel) };
2101 exclude_kernel as u64
2102 });
2103 __bindgen_bitfield_unit.set(6usize, 1u8, {
2104 let exclude_hv: u64 = unsafe { ::core::mem::transmute(exclude_hv) };
2105 exclude_hv as u64
2106 });
2107 __bindgen_bitfield_unit.set(7usize, 1u8, {
2108 let exclude_idle: u64 = unsafe { ::core::mem::transmute(exclude_idle) };
2109 exclude_idle as u64
2110 });
2111 __bindgen_bitfield_unit.set(8usize, 1u8, {
2112 let mmap: u64 = unsafe { ::core::mem::transmute(mmap) };
2113 mmap as u64
2114 });
2115 __bindgen_bitfield_unit.set(9usize, 1u8, {
2116 let comm: u64 = unsafe { ::core::mem::transmute(comm) };
2117 comm as u64
2118 });
2119 __bindgen_bitfield_unit.set(10usize, 1u8, {
2120 let freq: u64 = unsafe { ::core::mem::transmute(freq) };
2121 freq as u64
2122 });
2123 __bindgen_bitfield_unit.set(11usize, 1u8, {
2124 let inherit_stat: u64 = unsafe { ::core::mem::transmute(inherit_stat) };
2125 inherit_stat as u64
2126 });
2127 __bindgen_bitfield_unit.set(12usize, 1u8, {
2128 let enable_on_exec: u64 = unsafe { ::core::mem::transmute(enable_on_exec) };
2129 enable_on_exec as u64
2130 });
2131 __bindgen_bitfield_unit.set(13usize, 1u8, {
2132 let task: u64 = unsafe { ::core::mem::transmute(task) };
2133 task as u64
2134 });
2135 __bindgen_bitfield_unit.set(14usize, 1u8, {
2136 let watermark: u64 = unsafe { ::core::mem::transmute(watermark) };
2137 watermark as u64
2138 });
2139 __bindgen_bitfield_unit.set(15usize, 2u8, {
2140 let precise_ip: u64 = unsafe { ::core::mem::transmute(precise_ip) };
2141 precise_ip as u64
2142 });
2143 __bindgen_bitfield_unit.set(17usize, 1u8, {
2144 let mmap_data: u64 = unsafe { ::core::mem::transmute(mmap_data) };
2145 mmap_data as u64
2146 });
2147 __bindgen_bitfield_unit.set(18usize, 1u8, {
2148 let sample_id_all: u64 = unsafe { ::core::mem::transmute(sample_id_all) };
2149 sample_id_all as u64
2150 });
2151 __bindgen_bitfield_unit.set(19usize, 1u8, {
2152 let exclude_host: u64 = unsafe { ::core::mem::transmute(exclude_host) };
2153 exclude_host as u64
2154 });
2155 __bindgen_bitfield_unit.set(20usize, 1u8, {
2156 let exclude_guest: u64 = unsafe { ::core::mem::transmute(exclude_guest) };
2157 exclude_guest as u64
2158 });
2159 __bindgen_bitfield_unit.set(21usize, 1u8, {
2160 let exclude_callchain_kernel: u64 =
2161 unsafe { ::core::mem::transmute(exclude_callchain_kernel) };
2162 exclude_callchain_kernel as u64
2163 });
2164 __bindgen_bitfield_unit.set(22usize, 1u8, {
2165 let exclude_callchain_user: u64 =
2166 unsafe { ::core::mem::transmute(exclude_callchain_user) };
2167 exclude_callchain_user as u64
2168 });
2169 __bindgen_bitfield_unit.set(23usize, 1u8, {
2170 let mmap2: u64 = unsafe { ::core::mem::transmute(mmap2) };
2171 mmap2 as u64
2172 });
2173 __bindgen_bitfield_unit.set(24usize, 1u8, {
2174 let comm_exec: u64 = unsafe { ::core::mem::transmute(comm_exec) };
2175 comm_exec as u64
2176 });
2177 __bindgen_bitfield_unit.set(25usize, 1u8, {
2178 let use_clockid: u64 = unsafe { ::core::mem::transmute(use_clockid) };
2179 use_clockid as u64
2180 });
2181 __bindgen_bitfield_unit.set(26usize, 1u8, {
2182 let context_switch: u64 = unsafe { ::core::mem::transmute(context_switch) };
2183 context_switch as u64
2184 });
2185 __bindgen_bitfield_unit.set(27usize, 1u8, {
2186 let write_backward: u64 = unsafe { ::core::mem::transmute(write_backward) };
2187 write_backward as u64
2188 });
2189 __bindgen_bitfield_unit.set(28usize, 1u8, {
2190 let namespaces: u64 = unsafe { ::core::mem::transmute(namespaces) };
2191 namespaces as u64
2192 });
2193 __bindgen_bitfield_unit.set(29usize, 1u8, {
2194 let ksymbol: u64 = unsafe { ::core::mem::transmute(ksymbol) };
2195 ksymbol as u64
2196 });
2197 __bindgen_bitfield_unit.set(30usize, 1u8, {
2198 let bpf_event: u64 = unsafe { ::core::mem::transmute(bpf_event) };
2199 bpf_event as u64
2200 });
2201 __bindgen_bitfield_unit.set(31usize, 1u8, {
2202 let aux_output: u64 = unsafe { ::core::mem::transmute(aux_output) };
2203 aux_output as u64
2204 });
2205 __bindgen_bitfield_unit.set(32usize, 1u8, {
2206 let cgroup: u64 = unsafe { ::core::mem::transmute(cgroup) };
2207 cgroup as u64
2208 });
2209 __bindgen_bitfield_unit.set(33usize, 1u8, {
2210 let text_poke: u64 = unsafe { ::core::mem::transmute(text_poke) };
2211 text_poke as u64
2212 });
2213 __bindgen_bitfield_unit.set(34usize, 1u8, {
2214 let build_id: u64 = unsafe { ::core::mem::transmute(build_id) };
2215 build_id as u64
2216 });
2217 __bindgen_bitfield_unit.set(35usize, 1u8, {
2218 let inherit_thread: u64 = unsafe { ::core::mem::transmute(inherit_thread) };
2219 inherit_thread as u64
2220 });
2221 __bindgen_bitfield_unit.set(36usize, 1u8, {
2222 let remove_on_exec: u64 = unsafe { ::core::mem::transmute(remove_on_exec) };
2223 remove_on_exec as u64
2224 });
2225 __bindgen_bitfield_unit.set(37usize, 1u8, {
2226 let sigtrap: u64 = unsafe { ::core::mem::transmute(sigtrap) };
2227 sigtrap as u64
2228 });
2229 __bindgen_bitfield_unit.set(38usize, 26u8, {
2230 let __reserved_1: u64 = unsafe { ::core::mem::transmute(__reserved_1) };
2231 __reserved_1 as u64
2232 });
2233 __bindgen_bitfield_unit
2234 }
2235}
2236#[repr(C)]
2237#[derive(Copy, Clone)]
2238pub struct perf_event_mmap_page {
2239 pub version: __u32,
2240 pub compat_version: __u32,
2241 pub lock: __u32,
2242 pub index: __u32,
2243 pub offset: __s64,
2244 pub time_enabled: __u64,
2245 pub time_running: __u64,
2246 pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1,
2247 pub pmc_width: __u16,
2248 pub time_shift: __u16,
2249 pub time_mult: __u32,
2250 pub time_offset: __u64,
2251 pub time_zero: __u64,
2252 pub size: __u32,
2253 pub __reserved_1: __u32,
2254 pub time_cycles: __u64,
2255 pub time_mask: __u64,
2256 pub __reserved: [__u8; 928usize],
2257 pub data_head: __u64,
2258 pub data_tail: __u64,
2259 pub data_offset: __u64,
2260 pub data_size: __u64,
2261 pub aux_head: __u64,
2262 pub aux_tail: __u64,
2263 pub aux_offset: __u64,
2264 pub aux_size: __u64,
2265}
2266#[repr(C)]
2267#[derive(Copy, Clone)]
2268pub union perf_event_mmap_page__bindgen_ty_1 {
2269 pub capabilities: __u64,
2270 pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1,
2271}
2272#[repr(C)]
2273#[derive(Debug, Copy, Clone)]
2274pub struct perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 {
2275 pub _bitfield_align_1: [u64; 0],
2276 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
2277}
2278impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 {
2279 #[inline]
2280 pub fn cap_bit0(&self) -> __u64 {
2281 unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) }
2282 }
2283 #[inline]
2284 pub fn set_cap_bit0(&mut self, val: __u64) {
2285 unsafe {
2286 let val: u64 = ::core::mem::transmute(val);
2287 self._bitfield_1.set(0usize, 1u8, val as u64)
2288 }
2289 }
2290 #[inline]
2291 pub fn cap_bit0_is_deprecated(&self) -> __u64 {
2292 unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) }
2293 }
2294 #[inline]
2295 pub fn set_cap_bit0_is_deprecated(&mut self, val: __u64) {
2296 unsafe {
2297 let val: u64 = ::core::mem::transmute(val);
2298 self._bitfield_1.set(1usize, 1u8, val as u64)
2299 }
2300 }
2301 #[inline]
2302 pub fn cap_user_rdpmc(&self) -> __u64 {
2303 unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) }
2304 }
2305 #[inline]
2306 pub fn set_cap_user_rdpmc(&mut self, val: __u64) {
2307 unsafe {
2308 let val: u64 = ::core::mem::transmute(val);
2309 self._bitfield_1.set(2usize, 1u8, val as u64)
2310 }
2311 }
2312 #[inline]
2313 pub fn cap_user_time(&self) -> __u64 {
2314 unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) }
2315 }
2316 #[inline]
2317 pub fn set_cap_user_time(&mut self, val: __u64) {
2318 unsafe {
2319 let val: u64 = ::core::mem::transmute(val);
2320 self._bitfield_1.set(3usize, 1u8, val as u64)
2321 }
2322 }
2323 #[inline]
2324 pub fn cap_user_time_zero(&self) -> __u64 {
2325 unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) }
2326 }
2327 #[inline]
2328 pub fn set_cap_user_time_zero(&mut self, val: __u64) {
2329 unsafe {
2330 let val: u64 = ::core::mem::transmute(val);
2331 self._bitfield_1.set(4usize, 1u8, val as u64)
2332 }
2333 }
2334 #[inline]
2335 pub fn cap_user_time_short(&self) -> __u64 {
2336 unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) }
2337 }
2338 #[inline]
2339 pub fn set_cap_user_time_short(&mut self, val: __u64) {
2340 unsafe {
2341 let val: u64 = ::core::mem::transmute(val);
2342 self._bitfield_1.set(5usize, 1u8, val as u64)
2343 }
2344 }
2345 #[inline]
2346 pub fn cap_____res(&self) -> __u64 {
2347 unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) }
2348 }
2349 #[inline]
2350 pub fn set_cap_____res(&mut self, val: __u64) {
2351 unsafe {
2352 let val: u64 = ::core::mem::transmute(val);
2353 self._bitfield_1.set(6usize, 58u8, val as u64)
2354 }
2355 }
2356 #[inline]
2357 pub fn new_bitfield_1(
2358 cap_bit0: __u64,
2359 cap_bit0_is_deprecated: __u64,
2360 cap_user_rdpmc: __u64,
2361 cap_user_time: __u64,
2362 cap_user_time_zero: __u64,
2363 cap_user_time_short: __u64,
2364 cap_____res: __u64,
2365 ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
2366 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
2367 __bindgen_bitfield_unit.set(0usize, 1u8, {
2368 let cap_bit0: u64 = unsafe { ::core::mem::transmute(cap_bit0) };
2369 cap_bit0 as u64
2370 });
2371 __bindgen_bitfield_unit.set(1usize, 1u8, {
2372 let cap_bit0_is_deprecated: u64 =
2373 unsafe { ::core::mem::transmute(cap_bit0_is_deprecated) };
2374 cap_bit0_is_deprecated as u64
2375 });
2376 __bindgen_bitfield_unit.set(2usize, 1u8, {
2377 let cap_user_rdpmc: u64 = unsafe { ::core::mem::transmute(cap_user_rdpmc) };
2378 cap_user_rdpmc as u64
2379 });
2380 __bindgen_bitfield_unit.set(3usize, 1u8, {
2381 let cap_user_time: u64 = unsafe { ::core::mem::transmute(cap_user_time) };
2382 cap_user_time as u64
2383 });
2384 __bindgen_bitfield_unit.set(4usize, 1u8, {
2385 let cap_user_time_zero: u64 = unsafe { ::core::mem::transmute(cap_user_time_zero) };
2386 cap_user_time_zero as u64
2387 });
2388 __bindgen_bitfield_unit.set(5usize, 1u8, {
2389 let cap_user_time_short: u64 = unsafe { ::core::mem::transmute(cap_user_time_short) };
2390 cap_user_time_short as u64
2391 });
2392 __bindgen_bitfield_unit.set(6usize, 58u8, {
2393 let cap_____res: u64 = unsafe { ::core::mem::transmute(cap_____res) };
2394 cap_____res as u64
2395 });
2396 __bindgen_bitfield_unit
2397 }
2398}
2399#[repr(C)]
2400#[derive(Debug, Copy, Clone)]
2401pub struct perf_event_header {
2402 pub type_: __u32,
2403 pub misc: __u16,
2404 pub size: __u16,
2405}
2406#[repr(u32)]
2407#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2408pub enum perf_event_type {
2409 PERF_RECORD_MMAP = 1,
2410 PERF_RECORD_LOST = 2,
2411 PERF_RECORD_COMM = 3,
2412 PERF_RECORD_EXIT = 4,
2413 PERF_RECORD_THROTTLE = 5,
2414 PERF_RECORD_UNTHROTTLE = 6,
2415 PERF_RECORD_FORK = 7,
2416 PERF_RECORD_READ = 8,
2417 PERF_RECORD_SAMPLE = 9,
2418 PERF_RECORD_MMAP2 = 10,
2419 PERF_RECORD_AUX = 11,
2420 PERF_RECORD_ITRACE_START = 12,
2421 PERF_RECORD_LOST_SAMPLES = 13,
2422 PERF_RECORD_SWITCH = 14,
2423 PERF_RECORD_SWITCH_CPU_WIDE = 15,
2424 PERF_RECORD_NAMESPACES = 16,
2425 PERF_RECORD_KSYMBOL = 17,
2426 PERF_RECORD_BPF_EVENT = 18,
2427 PERF_RECORD_CGROUP = 19,
2428 PERF_RECORD_TEXT_POKE = 20,
2429 PERF_RECORD_AUX_OUTPUT_HW_ID = 21,
2430 PERF_RECORD_MAX = 22,
2431}
2432pub const TCA_BPF_UNSPEC: _bindgen_ty_152 = 0;
2433pub const TCA_BPF_ACT: _bindgen_ty_152 = 1;
2434pub const TCA_BPF_POLICE: _bindgen_ty_152 = 2;
2435pub const TCA_BPF_CLASSID: _bindgen_ty_152 = 3;
2436pub const TCA_BPF_OPS_LEN: _bindgen_ty_152 = 4;
2437pub const TCA_BPF_OPS: _bindgen_ty_152 = 5;
2438pub const TCA_BPF_FD: _bindgen_ty_152 = 6;
2439pub const TCA_BPF_NAME: _bindgen_ty_152 = 7;
2440pub const TCA_BPF_FLAGS: _bindgen_ty_152 = 8;
2441pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_152 = 9;
2442pub const TCA_BPF_TAG: _bindgen_ty_152 = 10;
2443pub const TCA_BPF_ID: _bindgen_ty_152 = 11;
2444pub const __TCA_BPF_MAX: _bindgen_ty_152 = 12;
2445pub type _bindgen_ty_152 = ::core::ffi::c_uint;
2446#[repr(C)]
2447#[derive(Debug, Copy, Clone)]
2448pub struct ifinfomsg {
2449 pub ifi_family: ::core::ffi::c_uchar,
2450 pub __ifi_pad: ::core::ffi::c_uchar,
2451 pub ifi_type: ::core::ffi::c_ushort,
2452 pub ifi_index: ::core::ffi::c_int,
2453 pub ifi_flags: ::core::ffi::c_uint,
2454 pub ifi_change: ::core::ffi::c_uint,
2455}
2456#[repr(C)]
2457#[derive(Debug, Copy, Clone)]
2458pub struct tcmsg {
2459 pub tcm_family: ::core::ffi::c_uchar,
2460 pub tcm__pad1: ::core::ffi::c_uchar,
2461 pub tcm__pad2: ::core::ffi::c_ushort,
2462 pub tcm_ifindex: ::core::ffi::c_int,
2463 pub tcm_handle: __u32,
2464 pub tcm_parent: __u32,
2465 pub tcm_info: __u32,
2466}
2467pub const TCA_UNSPEC: _bindgen_ty_170 = 0;
2468pub const TCA_KIND: _bindgen_ty_170 = 1;
2469pub const TCA_OPTIONS: _bindgen_ty_170 = 2;
2470pub const TCA_STATS: _bindgen_ty_170 = 3;
2471pub const TCA_XSTATS: _bindgen_ty_170 = 4;
2472pub const TCA_RATE: _bindgen_ty_170 = 5;
2473pub const TCA_FCNT: _bindgen_ty_170 = 6;
2474pub const TCA_STATS2: _bindgen_ty_170 = 7;
2475pub const TCA_STAB: _bindgen_ty_170 = 8;
2476pub const TCA_PAD: _bindgen_ty_170 = 9;
2477pub const TCA_DUMP_INVISIBLE: _bindgen_ty_170 = 10;
2478pub const TCA_CHAIN: _bindgen_ty_170 = 11;
2479pub const TCA_HW_OFFLOAD: _bindgen_ty_170 = 12;
2480pub const TCA_INGRESS_BLOCK: _bindgen_ty_170 = 13;
2481pub const TCA_EGRESS_BLOCK: _bindgen_ty_170 = 14;
2482pub const __TCA_MAX: _bindgen_ty_170 = 15;
2483pub type _bindgen_ty_170 = ::core::ffi::c_uint;
2484pub const AYA_PERF_EVENT_IOC_ENABLE: ::core::ffi::c_int = 9216;
2485pub const AYA_PERF_EVENT_IOC_DISABLE: ::core::ffi::c_int = 9217;
2486pub const AYA_PERF_EVENT_IOC_SET_BPF: ::core::ffi::c_int = 1074013192;