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