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>(::std::marker::PhantomData<T>, [T; 0]);
86impl<T> __IncompleteArrayField<T> {
87 #[inline]
88 pub const fn new() -> Self {
89 __IncompleteArrayField(::std::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 ::std::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 ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
106 }
107}
108impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
109 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
110 fmt.write_str("__IncompleteArrayField")
111 }
112}
113pub const XDP_FLAGS_UPDATE_IF_NOEXIST: u32 = 1;
114pub const XDP_FLAGS_SKB_MODE: u32 = 2;
115pub const XDP_FLAGS_DRV_MODE: u32 = 4;
116pub const XDP_FLAGS_HW_MODE: u32 = 8;
117pub const XDP_FLAGS_REPLACE: u32 = 16;
118pub const XDP_FLAGS_MODES: u32 = 14;
119pub const XDP_FLAGS_MASK: u32 = 31;
120pub const PERF_PMU_TYPE_SHIFT: u32 = 32;
121pub const PERF_HW_EVENT_MASK: u32 = 4294967295;
122pub const PERF_ATTR_SIZE_VER0: u32 = 64;
123pub const PERF_ATTR_SIZE_VER1: u32 = 72;
124pub const PERF_ATTR_SIZE_VER2: u32 = 80;
125pub const PERF_ATTR_SIZE_VER3: u32 = 96;
126pub const PERF_ATTR_SIZE_VER4: u32 = 104;
127pub const PERF_ATTR_SIZE_VER5: u32 = 112;
128pub const PERF_ATTR_SIZE_VER6: u32 = 120;
129pub const PERF_ATTR_SIZE_VER7: u32 = 128;
130pub const PERF_RECORD_MISC_CPUMODE_MASK: u32 = 7;
131pub const PERF_RECORD_MISC_CPUMODE_UNKNOWN: u32 = 0;
132pub const PERF_RECORD_MISC_KERNEL: u32 = 1;
133pub const PERF_RECORD_MISC_USER: u32 = 2;
134pub const PERF_RECORD_MISC_HYPERVISOR: u32 = 3;
135pub const PERF_RECORD_MISC_GUEST_KERNEL: u32 = 4;
136pub const PERF_RECORD_MISC_GUEST_USER: u32 = 5;
137pub const PERF_RECORD_MISC_PROC_MAP_PARSE_TIMEOUT: u32 = 4096;
138pub const PERF_RECORD_MISC_MMAP_DATA: u32 = 8192;
139pub const PERF_RECORD_MISC_COMM_EXEC: u32 = 8192;
140pub const PERF_RECORD_MISC_FORK_EXEC: u32 = 8192;
141pub const PERF_RECORD_MISC_SWITCH_OUT: u32 = 8192;
142pub const PERF_RECORD_MISC_EXACT_IP: u32 = 16384;
143pub const PERF_RECORD_MISC_SWITCH_OUT_PREEMPT: u32 = 16384;
144pub const PERF_RECORD_MISC_MMAP_BUILD_ID: u32 = 16384;
145pub const PERF_RECORD_MISC_EXT_RESERVED: u32 = 32768;
146pub const PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER: u32 = 1;
147pub const PERF_MAX_STACK_DEPTH: u32 = 127;
148pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8;
149pub const PERF_AUX_FLAG_TRUNCATED: u32 = 1;
150pub const PERF_AUX_FLAG_OVERWRITE: u32 = 2;
151pub const PERF_AUX_FLAG_PARTIAL: u32 = 4;
152pub const PERF_AUX_FLAG_COLLISION: u32 = 8;
153pub const PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK: u32 = 65280;
154pub const PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT: u32 = 0;
155pub const PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW: u32 = 256;
156pub const PERF_FLAG_FD_NO_GROUP: u32 = 1;
157pub const PERF_FLAG_FD_OUTPUT: u32 = 2;
158pub const PERF_FLAG_PID_CGROUP: u32 = 4;
159pub const PERF_FLAG_FD_CLOEXEC: u32 = 8;
160pub const PERF_MEM_OP_NA: u32 = 1;
161pub const PERF_MEM_OP_LOAD: u32 = 2;
162pub const PERF_MEM_OP_STORE: u32 = 4;
163pub const PERF_MEM_OP_PFETCH: u32 = 8;
164pub const PERF_MEM_OP_EXEC: u32 = 16;
165pub const PERF_MEM_OP_SHIFT: u32 = 0;
166pub const PERF_MEM_LVL_NA: u32 = 1;
167pub const PERF_MEM_LVL_HIT: u32 = 2;
168pub const PERF_MEM_LVL_MISS: u32 = 4;
169pub const PERF_MEM_LVL_L1: u32 = 8;
170pub const PERF_MEM_LVL_LFB: u32 = 16;
171pub const PERF_MEM_LVL_L2: u32 = 32;
172pub const PERF_MEM_LVL_L3: u32 = 64;
173pub const PERF_MEM_LVL_LOC_RAM: u32 = 128;
174pub const PERF_MEM_LVL_REM_RAM1: u32 = 256;
175pub const PERF_MEM_LVL_REM_RAM2: u32 = 512;
176pub const PERF_MEM_LVL_REM_CCE1: u32 = 1024;
177pub const PERF_MEM_LVL_REM_CCE2: u32 = 2048;
178pub const PERF_MEM_LVL_IO: u32 = 4096;
179pub const PERF_MEM_LVL_UNC: u32 = 8192;
180pub const PERF_MEM_LVL_SHIFT: u32 = 5;
181pub const PERF_MEM_REMOTE_REMOTE: u32 = 1;
182pub const PERF_MEM_REMOTE_SHIFT: u32 = 37;
183pub const PERF_MEM_LVLNUM_L1: u32 = 1;
184pub const PERF_MEM_LVLNUM_L2: u32 = 2;
185pub const PERF_MEM_LVLNUM_L3: u32 = 3;
186pub const PERF_MEM_LVLNUM_L4: u32 = 4;
187pub const PERF_MEM_LVLNUM_ANY_CACHE: u32 = 11;
188pub const PERF_MEM_LVLNUM_LFB: u32 = 12;
189pub const PERF_MEM_LVLNUM_RAM: u32 = 13;
190pub const PERF_MEM_LVLNUM_PMEM: u32 = 14;
191pub const PERF_MEM_LVLNUM_NA: u32 = 15;
192pub const PERF_MEM_LVLNUM_SHIFT: u32 = 33;
193pub const PERF_MEM_SNOOP_NA: u32 = 1;
194pub const PERF_MEM_SNOOP_NONE: u32 = 2;
195pub const PERF_MEM_SNOOP_HIT: u32 = 4;
196pub const PERF_MEM_SNOOP_MISS: u32 = 8;
197pub const PERF_MEM_SNOOP_HITM: u32 = 16;
198pub const PERF_MEM_SNOOP_SHIFT: u32 = 19;
199pub const PERF_MEM_SNOOPX_FWD: u32 = 1;
200pub const PERF_MEM_SNOOPX_SHIFT: u32 = 38;
201pub const PERF_MEM_LOCK_NA: u32 = 1;
202pub const PERF_MEM_LOCK_LOCKED: u32 = 2;
203pub const PERF_MEM_LOCK_SHIFT: u32 = 24;
204pub const PERF_MEM_TLB_NA: u32 = 1;
205pub const PERF_MEM_TLB_HIT: u32 = 2;
206pub const PERF_MEM_TLB_MISS: u32 = 4;
207pub const PERF_MEM_TLB_L1: u32 = 8;
208pub const PERF_MEM_TLB_L2: u32 = 16;
209pub const PERF_MEM_TLB_WK: u32 = 32;
210pub const PERF_MEM_TLB_OS: u32 = 64;
211pub const PERF_MEM_TLB_SHIFT: u32 = 26;
212pub const PERF_MEM_BLK_NA: u32 = 1;
213pub const PERF_MEM_BLK_DATA: u32 = 2;
214pub const PERF_MEM_BLK_ADDR: u32 = 4;
215pub const PERF_MEM_BLK_SHIFT: u32 = 40;
216pub const PERF_MEM_HOPS_0: u32 = 1;
217pub const PERF_MEM_HOPS_1: u32 = 2;
218pub const PERF_MEM_HOPS_2: u32 = 3;
219pub const PERF_MEM_HOPS_3: u32 = 4;
220pub const PERF_MEM_HOPS_SHIFT: u32 = 43;
221pub const BPF_LD: u32 = 0;
222pub const BPF_LDX: u32 = 1;
223pub const BPF_ST: u32 = 2;
224pub const BPF_STX: u32 = 3;
225pub const BPF_ALU: u32 = 4;
226pub const BPF_JMP: u32 = 5;
227pub const BPF_RET: u32 = 6;
228pub const BPF_MISC: u32 = 7;
229pub const BPF_W: u32 = 0;
230pub const BPF_H: u32 = 8;
231pub const BPF_B: u32 = 16;
232pub const BPF_IMM: u32 = 0;
233pub const BPF_ABS: u32 = 32;
234pub const BPF_IND: u32 = 64;
235pub const BPF_MEM: u32 = 96;
236pub const BPF_LEN: u32 = 128;
237pub const BPF_MSH: u32 = 160;
238pub const BPF_ADD: u32 = 0;
239pub const BPF_SUB: u32 = 16;
240pub const BPF_MUL: u32 = 32;
241pub const BPF_DIV: u32 = 48;
242pub const BPF_OR: u32 = 64;
243pub const BPF_AND: u32 = 80;
244pub const BPF_LSH: u32 = 96;
245pub const BPF_RSH: u32 = 112;
246pub const BPF_NEG: u32 = 128;
247pub const BPF_MOD: u32 = 144;
248pub const BPF_XOR: u32 = 160;
249pub const BPF_JA: u32 = 0;
250pub const BPF_JEQ: u32 = 16;
251pub const BPF_JGT: u32 = 32;
252pub const BPF_JGE: u32 = 48;
253pub const BPF_JSET: u32 = 64;
254pub const BPF_K: u32 = 0;
255pub const BPF_X: u32 = 8;
256pub const BPF_MAXINSNS: u32 = 4096;
257pub const BPF_JMP32: u32 = 6;
258pub const BPF_ALU64: u32 = 7;
259pub const BPF_DW: u32 = 24;
260pub const BPF_ATOMIC: u32 = 192;
261pub const BPF_XADD: u32 = 192;
262pub const BPF_MOV: u32 = 176;
263pub const BPF_ARSH: u32 = 192;
264pub const BPF_END: u32 = 208;
265pub const BPF_TO_LE: u32 = 0;
266pub const BPF_TO_BE: u32 = 8;
267pub const BPF_FROM_LE: u32 = 0;
268pub const BPF_FROM_BE: u32 = 8;
269pub const BPF_JNE: u32 = 80;
270pub const BPF_JLT: u32 = 160;
271pub const BPF_JLE: u32 = 176;
272pub const BPF_JSGT: u32 = 96;
273pub const BPF_JSGE: u32 = 112;
274pub const BPF_JSLT: u32 = 192;
275pub const BPF_JSLE: u32 = 208;
276pub const BPF_CALL: u32 = 128;
277pub const BPF_EXIT: u32 = 144;
278pub const BPF_FETCH: u32 = 1;
279pub const BPF_XCHG: u32 = 225;
280pub const BPF_CMPXCHG: u32 = 241;
281pub const BPF_F_ALLOW_OVERRIDE: u32 = 1;
282pub const BPF_F_ALLOW_MULTI: u32 = 2;
283pub const BPF_F_REPLACE: u32 = 4;
284pub const BPF_F_STRICT_ALIGNMENT: u32 = 1;
285pub const BPF_F_ANY_ALIGNMENT: u32 = 2;
286pub const BPF_F_TEST_RND_HI32: u32 = 4;
287pub const BPF_F_TEST_STATE_FREQ: u32 = 8;
288pub const BPF_F_SLEEPABLE: u32 = 16;
289pub const BPF_F_XDP_HAS_FRAGS: u32 = 32;
290pub const BPF_F_KPROBE_MULTI_RETURN: u32 = 1;
291pub const BPF_PSEUDO_MAP_FD: u32 = 1;
292pub const BPF_PSEUDO_MAP_IDX: u32 = 5;
293pub const BPF_PSEUDO_MAP_VALUE: u32 = 2;
294pub const BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6;
295pub const BPF_PSEUDO_BTF_ID: u32 = 3;
296pub const BPF_PSEUDO_FUNC: u32 = 4;
297pub const BPF_PSEUDO_CALL: u32 = 1;
298pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2;
299pub const BPF_F_QUERY_EFFECTIVE: u32 = 1;
300pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1;
301pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2;
302pub const BPF_BUILD_ID_SIZE: u32 = 20;
303pub const BPF_OBJ_NAME_LEN: u32 = 16;
304pub const XDP_PACKET_HEADROOM: u32 = 256;
305pub const BPF_TAG_SIZE: u32 = 8;
306pub const BPF_LOG_BUF_SIZE: u32 = 16777215;
307pub const BTF_MAGIC: u32 = 60319;
308pub const BTF_VERSION: u32 = 1;
309pub const BTF_MAX_TYPE: u32 = 1048575;
310pub const BTF_MAX_NAME_OFFSET: u32 = 16777215;
311pub const BTF_MAX_VLEN: u32 = 65535;
312pub const BTF_INT_SIGNED: u32 = 1;
313pub const BTF_INT_CHAR: u32 = 2;
314pub const BTF_INT_BOOL: u32 = 4;
315pub const BTF_ELF_SEC: &[u8; 5usize] = b".BTF\0";
316pub const BTF_EXT_ELF_SEC: &[u8; 9usize] = b".BTF.ext\0";
317pub type size_t = ::std::os::raw::c_ulong;
318pub type __pid_t = ::std::os::raw::c_int;
319pub type __u8 = ::std::os::raw::c_uchar;
320pub type __s16 = ::std::os::raw::c_short;
321pub type __u16 = ::std::os::raw::c_ushort;
322pub type __s32 = ::std::os::raw::c_int;
323pub type __u32 = ::std::os::raw::c_uint;
324pub type __s64 = ::std::os::raw::c_longlong;
325pub type __u64 = ::std::os::raw::c_ulonglong;
326pub type __be16 = __u16;
327pub type __be32 = __u32;
328pub const XDP_ATTACHED_NONE: _bindgen_ty_42 = 0;
329pub const XDP_ATTACHED_DRV: _bindgen_ty_42 = 1;
330pub const XDP_ATTACHED_SKB: _bindgen_ty_42 = 2;
331pub const XDP_ATTACHED_HW: _bindgen_ty_42 = 3;
332pub const XDP_ATTACHED_MULTI: _bindgen_ty_42 = 4;
333pub type _bindgen_ty_42 = ::std::os::raw::c_uint;
334pub const PERF_TYPE_HARDWARE: perf_type_id = 0;
335pub const PERF_TYPE_SOFTWARE: perf_type_id = 1;
336pub const PERF_TYPE_TRACEPOINT: perf_type_id = 2;
337pub const PERF_TYPE_HW_CACHE: perf_type_id = 3;
338pub const PERF_TYPE_RAW: perf_type_id = 4;
339pub const PERF_TYPE_BREAKPOINT: perf_type_id = 5;
340pub const PERF_TYPE_MAX: perf_type_id = 6;
341pub type perf_type_id = ::std::os::raw::c_uint;
342pub const PERF_COUNT_HW_CPU_CYCLES: perf_hw_id = 0;
343pub const PERF_COUNT_HW_INSTRUCTIONS: perf_hw_id = 1;
344pub const PERF_COUNT_HW_CACHE_REFERENCES: perf_hw_id = 2;
345pub const PERF_COUNT_HW_CACHE_MISSES: perf_hw_id = 3;
346pub const PERF_COUNT_HW_BRANCH_INSTRUCTIONS: perf_hw_id = 4;
347pub const PERF_COUNT_HW_BRANCH_MISSES: perf_hw_id = 5;
348pub const PERF_COUNT_HW_BUS_CYCLES: perf_hw_id = 6;
349pub const PERF_COUNT_HW_STALLED_CYCLES_FRONTEND: perf_hw_id = 7;
350pub const PERF_COUNT_HW_STALLED_CYCLES_BACKEND: perf_hw_id = 8;
351pub const PERF_COUNT_HW_REF_CPU_CYCLES: perf_hw_id = 9;
352pub const PERF_COUNT_HW_MAX: perf_hw_id = 10;
353pub type perf_hw_id = ::std::os::raw::c_uint;
354pub const PERF_COUNT_HW_CACHE_L1D: perf_hw_cache_id = 0;
355pub const PERF_COUNT_HW_CACHE_L1I: perf_hw_cache_id = 1;
356pub const PERF_COUNT_HW_CACHE_LL: perf_hw_cache_id = 2;
357pub const PERF_COUNT_HW_CACHE_DTLB: perf_hw_cache_id = 3;
358pub const PERF_COUNT_HW_CACHE_ITLB: perf_hw_cache_id = 4;
359pub const PERF_COUNT_HW_CACHE_BPU: perf_hw_cache_id = 5;
360pub const PERF_COUNT_HW_CACHE_NODE: perf_hw_cache_id = 6;
361pub const PERF_COUNT_HW_CACHE_MAX: perf_hw_cache_id = 7;
362pub type perf_hw_cache_id = ::std::os::raw::c_uint;
363pub const PERF_COUNT_HW_CACHE_OP_READ: perf_hw_cache_op_id = 0;
364pub const PERF_COUNT_HW_CACHE_OP_WRITE: perf_hw_cache_op_id = 1;
365pub const PERF_COUNT_HW_CACHE_OP_PREFETCH: perf_hw_cache_op_id = 2;
366pub const PERF_COUNT_HW_CACHE_OP_MAX: perf_hw_cache_op_id = 3;
367pub type perf_hw_cache_op_id = ::std::os::raw::c_uint;
368pub const PERF_COUNT_HW_CACHE_RESULT_ACCESS: perf_hw_cache_op_result_id = 0;
369pub const PERF_COUNT_HW_CACHE_RESULT_MISS: perf_hw_cache_op_result_id = 1;
370pub const PERF_COUNT_HW_CACHE_RESULT_MAX: perf_hw_cache_op_result_id = 2;
371pub type perf_hw_cache_op_result_id = ::std::os::raw::c_uint;
372pub const PERF_COUNT_SW_CPU_CLOCK: perf_sw_ids = 0;
373pub const PERF_COUNT_SW_TASK_CLOCK: perf_sw_ids = 1;
374pub const PERF_COUNT_SW_PAGE_FAULTS: perf_sw_ids = 2;
375pub const PERF_COUNT_SW_CONTEXT_SWITCHES: perf_sw_ids = 3;
376pub const PERF_COUNT_SW_CPU_MIGRATIONS: perf_sw_ids = 4;
377pub const PERF_COUNT_SW_PAGE_FAULTS_MIN: perf_sw_ids = 5;
378pub const PERF_COUNT_SW_PAGE_FAULTS_MAJ: perf_sw_ids = 6;
379pub const PERF_COUNT_SW_ALIGNMENT_FAULTS: perf_sw_ids = 7;
380pub const PERF_COUNT_SW_EMULATION_FAULTS: perf_sw_ids = 8;
381pub const PERF_COUNT_SW_DUMMY: perf_sw_ids = 9;
382pub const PERF_COUNT_SW_BPF_OUTPUT: perf_sw_ids = 10;
383pub const PERF_COUNT_SW_CGROUP_SWITCHES: perf_sw_ids = 11;
384pub const PERF_COUNT_SW_MAX: perf_sw_ids = 12;
385pub type perf_sw_ids = ::std::os::raw::c_uint;
386pub const PERF_SAMPLE_IP: perf_event_sample_format = 1;
387pub const PERF_SAMPLE_TID: perf_event_sample_format = 2;
388pub const PERF_SAMPLE_TIME: perf_event_sample_format = 4;
389pub const PERF_SAMPLE_ADDR: perf_event_sample_format = 8;
390pub const PERF_SAMPLE_READ: perf_event_sample_format = 16;
391pub const PERF_SAMPLE_CALLCHAIN: perf_event_sample_format = 32;
392pub const PERF_SAMPLE_ID: perf_event_sample_format = 64;
393pub const PERF_SAMPLE_CPU: perf_event_sample_format = 128;
394pub const PERF_SAMPLE_PERIOD: perf_event_sample_format = 256;
395pub const PERF_SAMPLE_STREAM_ID: perf_event_sample_format = 512;
396pub const PERF_SAMPLE_RAW: perf_event_sample_format = 1024;
397pub const PERF_SAMPLE_BRANCH_STACK: perf_event_sample_format = 2048;
398pub const PERF_SAMPLE_REGS_USER: perf_event_sample_format = 4096;
399pub const PERF_SAMPLE_STACK_USER: perf_event_sample_format = 8192;
400pub const PERF_SAMPLE_WEIGHT: perf_event_sample_format = 16384;
401pub const PERF_SAMPLE_DATA_SRC: perf_event_sample_format = 32768;
402pub const PERF_SAMPLE_IDENTIFIER: perf_event_sample_format = 65536;
403pub const PERF_SAMPLE_TRANSACTION: perf_event_sample_format = 131072;
404pub const PERF_SAMPLE_REGS_INTR: perf_event_sample_format = 262144;
405pub const PERF_SAMPLE_PHYS_ADDR: perf_event_sample_format = 524288;
406pub const PERF_SAMPLE_AUX: perf_event_sample_format = 1048576;
407pub const PERF_SAMPLE_CGROUP: perf_event_sample_format = 2097152;
408pub const PERF_SAMPLE_DATA_PAGE_SIZE: perf_event_sample_format = 4194304;
409pub const PERF_SAMPLE_CODE_PAGE_SIZE: perf_event_sample_format = 8388608;
410pub const PERF_SAMPLE_WEIGHT_STRUCT: perf_event_sample_format = 16777216;
411pub const PERF_SAMPLE_MAX: perf_event_sample_format = 33554432;
412pub const __PERF_SAMPLE_CALLCHAIN_EARLY: perf_event_sample_format = 9223372036854775808;
413pub type perf_event_sample_format = ::std::os::raw::c_ulong;
414pub const PERF_SAMPLE_BRANCH_USER_SHIFT: perf_branch_sample_type_shift = 0;
415pub const PERF_SAMPLE_BRANCH_KERNEL_SHIFT: perf_branch_sample_type_shift = 1;
416pub const PERF_SAMPLE_BRANCH_HV_SHIFT: perf_branch_sample_type_shift = 2;
417pub const PERF_SAMPLE_BRANCH_ANY_SHIFT: perf_branch_sample_type_shift = 3;
418pub const PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT: perf_branch_sample_type_shift = 4;
419pub const PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT: perf_branch_sample_type_shift = 5;
420pub const PERF_SAMPLE_BRANCH_IND_CALL_SHIFT: perf_branch_sample_type_shift = 6;
421pub const PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT: perf_branch_sample_type_shift = 7;
422pub const PERF_SAMPLE_BRANCH_IN_TX_SHIFT: perf_branch_sample_type_shift = 8;
423pub const PERF_SAMPLE_BRANCH_NO_TX_SHIFT: perf_branch_sample_type_shift = 9;
424pub const PERF_SAMPLE_BRANCH_COND_SHIFT: perf_branch_sample_type_shift = 10;
425pub const PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT: perf_branch_sample_type_shift = 11;
426pub const PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT: perf_branch_sample_type_shift = 12;
427pub const PERF_SAMPLE_BRANCH_CALL_SHIFT: perf_branch_sample_type_shift = 13;
428pub const PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT: perf_branch_sample_type_shift = 14;
429pub const PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT: perf_branch_sample_type_shift = 15;
430pub const PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT: perf_branch_sample_type_shift = 16;
431pub const PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT: perf_branch_sample_type_shift = 17;
432pub const PERF_SAMPLE_BRANCH_MAX_SHIFT: perf_branch_sample_type_shift = 18;
433pub type perf_branch_sample_type_shift = ::std::os::raw::c_uint;
434pub const PERF_SAMPLE_BRANCH_USER: perf_branch_sample_type = 1;
435pub const PERF_SAMPLE_BRANCH_KERNEL: perf_branch_sample_type = 2;
436pub const PERF_SAMPLE_BRANCH_HV: perf_branch_sample_type = 4;
437pub const PERF_SAMPLE_BRANCH_ANY: perf_branch_sample_type = 8;
438pub const PERF_SAMPLE_BRANCH_ANY_CALL: perf_branch_sample_type = 16;
439pub const PERF_SAMPLE_BRANCH_ANY_RETURN: perf_branch_sample_type = 32;
440pub const PERF_SAMPLE_BRANCH_IND_CALL: perf_branch_sample_type = 64;
441pub const PERF_SAMPLE_BRANCH_ABORT_TX: perf_branch_sample_type = 128;
442pub const PERF_SAMPLE_BRANCH_IN_TX: perf_branch_sample_type = 256;
443pub const PERF_SAMPLE_BRANCH_NO_TX: perf_branch_sample_type = 512;
444pub const PERF_SAMPLE_BRANCH_COND: perf_branch_sample_type = 1024;
445pub const PERF_SAMPLE_BRANCH_CALL_STACK: perf_branch_sample_type = 2048;
446pub const PERF_SAMPLE_BRANCH_IND_JUMP: perf_branch_sample_type = 4096;
447pub const PERF_SAMPLE_BRANCH_CALL: perf_branch_sample_type = 8192;
448pub const PERF_SAMPLE_BRANCH_NO_FLAGS: perf_branch_sample_type = 16384;
449pub const PERF_SAMPLE_BRANCH_NO_CYCLES: perf_branch_sample_type = 32768;
450pub const PERF_SAMPLE_BRANCH_TYPE_SAVE: perf_branch_sample_type = 65536;
451pub const PERF_SAMPLE_BRANCH_HW_INDEX: perf_branch_sample_type = 131072;
452pub const PERF_SAMPLE_BRANCH_MAX: perf_branch_sample_type = 262144;
453pub type perf_branch_sample_type = ::std::os::raw::c_uint;
454pub const PERF_BR_UNKNOWN: _bindgen_ty_48 = 0;
455pub const PERF_BR_COND: _bindgen_ty_48 = 1;
456pub const PERF_BR_UNCOND: _bindgen_ty_48 = 2;
457pub const PERF_BR_IND: _bindgen_ty_48 = 3;
458pub const PERF_BR_CALL: _bindgen_ty_48 = 4;
459pub const PERF_BR_IND_CALL: _bindgen_ty_48 = 5;
460pub const PERF_BR_RET: _bindgen_ty_48 = 6;
461pub const PERF_BR_SYSCALL: _bindgen_ty_48 = 7;
462pub const PERF_BR_SYSRET: _bindgen_ty_48 = 8;
463pub const PERF_BR_COND_CALL: _bindgen_ty_48 = 9;
464pub const PERF_BR_COND_RET: _bindgen_ty_48 = 10;
465pub const PERF_BR_ERET: _bindgen_ty_48 = 11;
466pub const PERF_BR_IRQ: _bindgen_ty_48 = 12;
467pub const PERF_BR_MAX: _bindgen_ty_48 = 13;
468pub type _bindgen_ty_48 = ::std::os::raw::c_uint;
469pub const PERF_SAMPLE_REGS_ABI_NONE: perf_sample_regs_abi = 0;
470pub const PERF_SAMPLE_REGS_ABI_32: perf_sample_regs_abi = 1;
471pub const PERF_SAMPLE_REGS_ABI_64: perf_sample_regs_abi = 2;
472pub type perf_sample_regs_abi = ::std::os::raw::c_uint;
473pub const PERF_TXN_ELISION: _bindgen_ty_49 = 1;
474pub const PERF_TXN_TRANSACTION: _bindgen_ty_49 = 2;
475pub const PERF_TXN_SYNC: _bindgen_ty_49 = 4;
476pub const PERF_TXN_ASYNC: _bindgen_ty_49 = 8;
477pub const PERF_TXN_RETRY: _bindgen_ty_49 = 16;
478pub const PERF_TXN_CONFLICT: _bindgen_ty_49 = 32;
479pub const PERF_TXN_CAPACITY_WRITE: _bindgen_ty_49 = 64;
480pub const PERF_TXN_CAPACITY_READ: _bindgen_ty_49 = 128;
481pub const PERF_TXN_MAX: _bindgen_ty_49 = 256;
482pub const PERF_TXN_ABORT_MASK: _bindgen_ty_49 = 18446744069414584320;
483pub const PERF_TXN_ABORT_SHIFT: _bindgen_ty_49 = 32;
484pub type _bindgen_ty_49 = ::std::os::raw::c_ulong;
485pub const PERF_FORMAT_TOTAL_TIME_ENABLED: perf_event_read_format = 1;
486pub const PERF_FORMAT_TOTAL_TIME_RUNNING: perf_event_read_format = 2;
487pub const PERF_FORMAT_ID: perf_event_read_format = 4;
488pub const PERF_FORMAT_GROUP: perf_event_read_format = 8;
489pub const PERF_FORMAT_LOST: perf_event_read_format = 16;
490pub const PERF_FORMAT_MAX: perf_event_read_format = 32;
491pub type perf_event_read_format = ::std::os::raw::c_uint;
492#[repr(C)]
493#[derive(Copy, Clone)]
494pub struct perf_event_attr {
495 pub type_: __u32,
496 pub size: __u32,
497 pub config: __u64,
498 pub __bindgen_anon_1: perf_event_attr__bindgen_ty_1,
499 pub sample_type: __u64,
500 pub read_format: __u64,
501 pub _bitfield_align_1: [u32; 0],
502 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
503 pub __bindgen_anon_2: perf_event_attr__bindgen_ty_2,
504 pub bp_type: __u32,
505 pub __bindgen_anon_3: perf_event_attr__bindgen_ty_3,
506 pub __bindgen_anon_4: perf_event_attr__bindgen_ty_4,
507 pub branch_sample_type: __u64,
508 pub sample_regs_user: __u64,
509 pub sample_stack_user: __u32,
510 pub clockid: __s32,
511 pub sample_regs_intr: __u64,
512 pub aux_watermark: __u32,
513 pub sample_max_stack: __u16,
514 pub __reserved_2: __u16,
515 pub aux_sample_size: __u32,
516 pub __reserved_3: __u32,
517 pub sig_data: __u64,
518}
519#[repr(C)]
520#[derive(Copy, Clone)]
521pub union perf_event_attr__bindgen_ty_1 {
522 pub sample_period: __u64,
523 pub sample_freq: __u64,
524}
525impl Default for perf_event_attr__bindgen_ty_1 {
526 fn default() -> Self {
527 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
528 unsafe {
529 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
530 s.assume_init()
531 }
532 }
533}
534#[repr(C)]
535#[derive(Copy, Clone)]
536pub union perf_event_attr__bindgen_ty_2 {
537 pub wakeup_events: __u32,
538 pub wakeup_watermark: __u32,
539}
540impl Default for perf_event_attr__bindgen_ty_2 {
541 fn default() -> Self {
542 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
543 unsafe {
544 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
545 s.assume_init()
546 }
547 }
548}
549#[repr(C)]
550#[derive(Copy, Clone)]
551pub union perf_event_attr__bindgen_ty_3 {
552 pub bp_addr: __u64,
553 pub kprobe_func: __u64,
554 pub uprobe_path: __u64,
555 pub config1: __u64,
556}
557impl Default for perf_event_attr__bindgen_ty_3 {
558 fn default() -> Self {
559 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
560 unsafe {
561 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
562 s.assume_init()
563 }
564 }
565}
566#[repr(C)]
567#[derive(Copy, Clone)]
568pub union perf_event_attr__bindgen_ty_4 {
569 pub bp_len: __u64,
570 pub kprobe_addr: __u64,
571 pub probe_offset: __u64,
572 pub config2: __u64,
573}
574impl Default for perf_event_attr__bindgen_ty_4 {
575 fn default() -> Self {
576 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
577 unsafe {
578 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
579 s.assume_init()
580 }
581 }
582}
583impl Default for perf_event_attr {
584 fn default() -> Self {
585 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
586 unsafe {
587 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
588 s.assume_init()
589 }
590 }
591}
592impl perf_event_attr {
593 #[inline]
594 pub fn disabled(&self) -> __u64 {
595 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) }
596 }
597 #[inline]
598 pub fn set_disabled(&mut self, val: __u64) {
599 unsafe {
600 let val: u64 = ::std::mem::transmute(val);
601 self._bitfield_1.set(0usize, 1u8, val as u64)
602 }
603 }
604 #[inline]
605 pub fn inherit(&self) -> __u64 {
606 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) }
607 }
608 #[inline]
609 pub fn set_inherit(&mut self, val: __u64) {
610 unsafe {
611 let val: u64 = ::std::mem::transmute(val);
612 self._bitfield_1.set(1usize, 1u8, val as u64)
613 }
614 }
615 #[inline]
616 pub fn pinned(&self) -> __u64 {
617 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) }
618 }
619 #[inline]
620 pub fn set_pinned(&mut self, val: __u64) {
621 unsafe {
622 let val: u64 = ::std::mem::transmute(val);
623 self._bitfield_1.set(2usize, 1u8, val as u64)
624 }
625 }
626 #[inline]
627 pub fn exclusive(&self) -> __u64 {
628 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) }
629 }
630 #[inline]
631 pub fn set_exclusive(&mut self, val: __u64) {
632 unsafe {
633 let val: u64 = ::std::mem::transmute(val);
634 self._bitfield_1.set(3usize, 1u8, val as u64)
635 }
636 }
637 #[inline]
638 pub fn exclude_user(&self) -> __u64 {
639 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) }
640 }
641 #[inline]
642 pub fn set_exclude_user(&mut self, val: __u64) {
643 unsafe {
644 let val: u64 = ::std::mem::transmute(val);
645 self._bitfield_1.set(4usize, 1u8, val as u64)
646 }
647 }
648 #[inline]
649 pub fn exclude_kernel(&self) -> __u64 {
650 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) }
651 }
652 #[inline]
653 pub fn set_exclude_kernel(&mut self, val: __u64) {
654 unsafe {
655 let val: u64 = ::std::mem::transmute(val);
656 self._bitfield_1.set(5usize, 1u8, val as u64)
657 }
658 }
659 #[inline]
660 pub fn exclude_hv(&self) -> __u64 {
661 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) }
662 }
663 #[inline]
664 pub fn set_exclude_hv(&mut self, val: __u64) {
665 unsafe {
666 let val: u64 = ::std::mem::transmute(val);
667 self._bitfield_1.set(6usize, 1u8, val as u64)
668 }
669 }
670 #[inline]
671 pub fn exclude_idle(&self) -> __u64 {
672 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) }
673 }
674 #[inline]
675 pub fn set_exclude_idle(&mut self, val: __u64) {
676 unsafe {
677 let val: u64 = ::std::mem::transmute(val);
678 self._bitfield_1.set(7usize, 1u8, val as u64)
679 }
680 }
681 #[inline]
682 pub fn mmap(&self) -> __u64 {
683 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) }
684 }
685 #[inline]
686 pub fn set_mmap(&mut self, val: __u64) {
687 unsafe {
688 let val: u64 = ::std::mem::transmute(val);
689 self._bitfield_1.set(8usize, 1u8, val as u64)
690 }
691 }
692 #[inline]
693 pub fn comm(&self) -> __u64 {
694 unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) }
695 }
696 #[inline]
697 pub fn set_comm(&mut self, val: __u64) {
698 unsafe {
699 let val: u64 = ::std::mem::transmute(val);
700 self._bitfield_1.set(9usize, 1u8, val as u64)
701 }
702 }
703 #[inline]
704 pub fn freq(&self) -> __u64 {
705 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) }
706 }
707 #[inline]
708 pub fn set_freq(&mut self, val: __u64) {
709 unsafe {
710 let val: u64 = ::std::mem::transmute(val);
711 self._bitfield_1.set(10usize, 1u8, val as u64)
712 }
713 }
714 #[inline]
715 pub fn inherit_stat(&self) -> __u64 {
716 unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) }
717 }
718 #[inline]
719 pub fn set_inherit_stat(&mut self, val: __u64) {
720 unsafe {
721 let val: u64 = ::std::mem::transmute(val);
722 self._bitfield_1.set(11usize, 1u8, val as u64)
723 }
724 }
725 #[inline]
726 pub fn enable_on_exec(&self) -> __u64 {
727 unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) }
728 }
729 #[inline]
730 pub fn set_enable_on_exec(&mut self, val: __u64) {
731 unsafe {
732 let val: u64 = ::std::mem::transmute(val);
733 self._bitfield_1.set(12usize, 1u8, val as u64)
734 }
735 }
736 #[inline]
737 pub fn task(&self) -> __u64 {
738 unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) }
739 }
740 #[inline]
741 pub fn set_task(&mut self, val: __u64) {
742 unsafe {
743 let val: u64 = ::std::mem::transmute(val);
744 self._bitfield_1.set(13usize, 1u8, val as u64)
745 }
746 }
747 #[inline]
748 pub fn watermark(&self) -> __u64 {
749 unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) }
750 }
751 #[inline]
752 pub fn set_watermark(&mut self, val: __u64) {
753 unsafe {
754 let val: u64 = ::std::mem::transmute(val);
755 self._bitfield_1.set(14usize, 1u8, val as u64)
756 }
757 }
758 #[inline]
759 pub fn precise_ip(&self) -> __u64 {
760 unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) }
761 }
762 #[inline]
763 pub fn set_precise_ip(&mut self, val: __u64) {
764 unsafe {
765 let val: u64 = ::std::mem::transmute(val);
766 self._bitfield_1.set(15usize, 2u8, val as u64)
767 }
768 }
769 #[inline]
770 pub fn mmap_data(&self) -> __u64 {
771 unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) }
772 }
773 #[inline]
774 pub fn set_mmap_data(&mut self, val: __u64) {
775 unsafe {
776 let val: u64 = ::std::mem::transmute(val);
777 self._bitfield_1.set(17usize, 1u8, val as u64)
778 }
779 }
780 #[inline]
781 pub fn sample_id_all(&self) -> __u64 {
782 unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) }
783 }
784 #[inline]
785 pub fn set_sample_id_all(&mut self, val: __u64) {
786 unsafe {
787 let val: u64 = ::std::mem::transmute(val);
788 self._bitfield_1.set(18usize, 1u8, val as u64)
789 }
790 }
791 #[inline]
792 pub fn exclude_host(&self) -> __u64 {
793 unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) }
794 }
795 #[inline]
796 pub fn set_exclude_host(&mut self, val: __u64) {
797 unsafe {
798 let val: u64 = ::std::mem::transmute(val);
799 self._bitfield_1.set(19usize, 1u8, val as u64)
800 }
801 }
802 #[inline]
803 pub fn exclude_guest(&self) -> __u64 {
804 unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) }
805 }
806 #[inline]
807 pub fn set_exclude_guest(&mut self, val: __u64) {
808 unsafe {
809 let val: u64 = ::std::mem::transmute(val);
810 self._bitfield_1.set(20usize, 1u8, val as u64)
811 }
812 }
813 #[inline]
814 pub fn exclude_callchain_kernel(&self) -> __u64 {
815 unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) }
816 }
817 #[inline]
818 pub fn set_exclude_callchain_kernel(&mut self, val: __u64) {
819 unsafe {
820 let val: u64 = ::std::mem::transmute(val);
821 self._bitfield_1.set(21usize, 1u8, val as u64)
822 }
823 }
824 #[inline]
825 pub fn exclude_callchain_user(&self) -> __u64 {
826 unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) }
827 }
828 #[inline]
829 pub fn set_exclude_callchain_user(&mut self, val: __u64) {
830 unsafe {
831 let val: u64 = ::std::mem::transmute(val);
832 self._bitfield_1.set(22usize, 1u8, val as u64)
833 }
834 }
835 #[inline]
836 pub fn mmap2(&self) -> __u64 {
837 unsafe { ::std::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) }
838 }
839 #[inline]
840 pub fn set_mmap2(&mut self, val: __u64) {
841 unsafe {
842 let val: u64 = ::std::mem::transmute(val);
843 self._bitfield_1.set(23usize, 1u8, val as u64)
844 }
845 }
846 #[inline]
847 pub fn comm_exec(&self) -> __u64 {
848 unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) }
849 }
850 #[inline]
851 pub fn set_comm_exec(&mut self, val: __u64) {
852 unsafe {
853 let val: u64 = ::std::mem::transmute(val);
854 self._bitfield_1.set(24usize, 1u8, val as u64)
855 }
856 }
857 #[inline]
858 pub fn use_clockid(&self) -> __u64 {
859 unsafe { ::std::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) }
860 }
861 #[inline]
862 pub fn set_use_clockid(&mut self, val: __u64) {
863 unsafe {
864 let val: u64 = ::std::mem::transmute(val);
865 self._bitfield_1.set(25usize, 1u8, val as u64)
866 }
867 }
868 #[inline]
869 pub fn context_switch(&self) -> __u64 {
870 unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) }
871 }
872 #[inline]
873 pub fn set_context_switch(&mut self, val: __u64) {
874 unsafe {
875 let val: u64 = ::std::mem::transmute(val);
876 self._bitfield_1.set(26usize, 1u8, val as u64)
877 }
878 }
879 #[inline]
880 pub fn write_backward(&self) -> __u64 {
881 unsafe { ::std::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) }
882 }
883 #[inline]
884 pub fn set_write_backward(&mut self, val: __u64) {
885 unsafe {
886 let val: u64 = ::std::mem::transmute(val);
887 self._bitfield_1.set(27usize, 1u8, val as u64)
888 }
889 }
890 #[inline]
891 pub fn namespaces(&self) -> __u64 {
892 unsafe { ::std::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) }
893 }
894 #[inline]
895 pub fn set_namespaces(&mut self, val: __u64) {
896 unsafe {
897 let val: u64 = ::std::mem::transmute(val);
898 self._bitfield_1.set(28usize, 1u8, val as u64)
899 }
900 }
901 #[inline]
902 pub fn ksymbol(&self) -> __u64 {
903 unsafe { ::std::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) }
904 }
905 #[inline]
906 pub fn set_ksymbol(&mut self, val: __u64) {
907 unsafe {
908 let val: u64 = ::std::mem::transmute(val);
909 self._bitfield_1.set(29usize, 1u8, val as u64)
910 }
911 }
912 #[inline]
913 pub fn bpf_event(&self) -> __u64 {
914 unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) }
915 }
916 #[inline]
917 pub fn set_bpf_event(&mut self, val: __u64) {
918 unsafe {
919 let val: u64 = ::std::mem::transmute(val);
920 self._bitfield_1.set(30usize, 1u8, val as u64)
921 }
922 }
923 #[inline]
924 pub fn aux_output(&self) -> __u64 {
925 unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) }
926 }
927 #[inline]
928 pub fn set_aux_output(&mut self, val: __u64) {
929 unsafe {
930 let val: u64 = ::std::mem::transmute(val);
931 self._bitfield_1.set(31usize, 1u8, val as u64)
932 }
933 }
934 #[inline]
935 pub fn cgroup(&self) -> __u64 {
936 unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) }
937 }
938 #[inline]
939 pub fn set_cgroup(&mut self, val: __u64) {
940 unsafe {
941 let val: u64 = ::std::mem::transmute(val);
942 self._bitfield_1.set(32usize, 1u8, val as u64)
943 }
944 }
945 #[inline]
946 pub fn text_poke(&self) -> __u64 {
947 unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) }
948 }
949 #[inline]
950 pub fn set_text_poke(&mut self, val: __u64) {
951 unsafe {
952 let val: u64 = ::std::mem::transmute(val);
953 self._bitfield_1.set(33usize, 1u8, val as u64)
954 }
955 }
956 #[inline]
957 pub fn build_id(&self) -> __u64 {
958 unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) }
959 }
960 #[inline]
961 pub fn set_build_id(&mut self, val: __u64) {
962 unsafe {
963 let val: u64 = ::std::mem::transmute(val);
964 self._bitfield_1.set(34usize, 1u8, val as u64)
965 }
966 }
967 #[inline]
968 pub fn inherit_thread(&self) -> __u64 {
969 unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) }
970 }
971 #[inline]
972 pub fn set_inherit_thread(&mut self, val: __u64) {
973 unsafe {
974 let val: u64 = ::std::mem::transmute(val);
975 self._bitfield_1.set(35usize, 1u8, val as u64)
976 }
977 }
978 #[inline]
979 pub fn remove_on_exec(&self) -> __u64 {
980 unsafe { ::std::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) }
981 }
982 #[inline]
983 pub fn set_remove_on_exec(&mut self, val: __u64) {
984 unsafe {
985 let val: u64 = ::std::mem::transmute(val);
986 self._bitfield_1.set(36usize, 1u8, val as u64)
987 }
988 }
989 #[inline]
990 pub fn sigtrap(&self) -> __u64 {
991 unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) }
992 }
993 #[inline]
994 pub fn set_sigtrap(&mut self, val: __u64) {
995 unsafe {
996 let val: u64 = ::std::mem::transmute(val);
997 self._bitfield_1.set(37usize, 1u8, val as u64)
998 }
999 }
1000 #[inline]
1001 pub fn __reserved_1(&self) -> __u64 {
1002 unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) }
1003 }
1004 #[inline]
1005 pub fn set___reserved_1(&mut self, val: __u64) {
1006 unsafe {
1007 let val: u64 = ::std::mem::transmute(val);
1008 self._bitfield_1.set(38usize, 26u8, val as u64)
1009 }
1010 }
1011 #[inline]
1012 pub fn new_bitfield_1(
1013 disabled: __u64,
1014 inherit: __u64,
1015 pinned: __u64,
1016 exclusive: __u64,
1017 exclude_user: __u64,
1018 exclude_kernel: __u64,
1019 exclude_hv: __u64,
1020 exclude_idle: __u64,
1021 mmap: __u64,
1022 comm: __u64,
1023 freq: __u64,
1024 inherit_stat: __u64,
1025 enable_on_exec: __u64,
1026 task: __u64,
1027 watermark: __u64,
1028 precise_ip: __u64,
1029 mmap_data: __u64,
1030 sample_id_all: __u64,
1031 exclude_host: __u64,
1032 exclude_guest: __u64,
1033 exclude_callchain_kernel: __u64,
1034 exclude_callchain_user: __u64,
1035 mmap2: __u64,
1036 comm_exec: __u64,
1037 use_clockid: __u64,
1038 context_switch: __u64,
1039 write_backward: __u64,
1040 namespaces: __u64,
1041 ksymbol: __u64,
1042 bpf_event: __u64,
1043 aux_output: __u64,
1044 cgroup: __u64,
1045 text_poke: __u64,
1046 build_id: __u64,
1047 inherit_thread: __u64,
1048 remove_on_exec: __u64,
1049 sigtrap: __u64,
1050 __reserved_1: __u64,
1051 ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
1052 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
1053 __bindgen_bitfield_unit.set(0usize, 1u8, {
1054 let disabled: u64 = unsafe { ::std::mem::transmute(disabled) };
1055 disabled as u64
1056 });
1057 __bindgen_bitfield_unit.set(1usize, 1u8, {
1058 let inherit: u64 = unsafe { ::std::mem::transmute(inherit) };
1059 inherit as u64
1060 });
1061 __bindgen_bitfield_unit.set(2usize, 1u8, {
1062 let pinned: u64 = unsafe { ::std::mem::transmute(pinned) };
1063 pinned as u64
1064 });
1065 __bindgen_bitfield_unit.set(3usize, 1u8, {
1066 let exclusive: u64 = unsafe { ::std::mem::transmute(exclusive) };
1067 exclusive as u64
1068 });
1069 __bindgen_bitfield_unit.set(4usize, 1u8, {
1070 let exclude_user: u64 = unsafe { ::std::mem::transmute(exclude_user) };
1071 exclude_user as u64
1072 });
1073 __bindgen_bitfield_unit.set(5usize, 1u8, {
1074 let exclude_kernel: u64 = unsafe { ::std::mem::transmute(exclude_kernel) };
1075 exclude_kernel as u64
1076 });
1077 __bindgen_bitfield_unit.set(6usize, 1u8, {
1078 let exclude_hv: u64 = unsafe { ::std::mem::transmute(exclude_hv) };
1079 exclude_hv as u64
1080 });
1081 __bindgen_bitfield_unit.set(7usize, 1u8, {
1082 let exclude_idle: u64 = unsafe { ::std::mem::transmute(exclude_idle) };
1083 exclude_idle as u64
1084 });
1085 __bindgen_bitfield_unit.set(8usize, 1u8, {
1086 let mmap: u64 = unsafe { ::std::mem::transmute(mmap) };
1087 mmap as u64
1088 });
1089 __bindgen_bitfield_unit.set(9usize, 1u8, {
1090 let comm: u64 = unsafe { ::std::mem::transmute(comm) };
1091 comm as u64
1092 });
1093 __bindgen_bitfield_unit.set(10usize, 1u8, {
1094 let freq: u64 = unsafe { ::std::mem::transmute(freq) };
1095 freq as u64
1096 });
1097 __bindgen_bitfield_unit.set(11usize, 1u8, {
1098 let inherit_stat: u64 = unsafe { ::std::mem::transmute(inherit_stat) };
1099 inherit_stat as u64
1100 });
1101 __bindgen_bitfield_unit.set(12usize, 1u8, {
1102 let enable_on_exec: u64 = unsafe { ::std::mem::transmute(enable_on_exec) };
1103 enable_on_exec as u64
1104 });
1105 __bindgen_bitfield_unit.set(13usize, 1u8, {
1106 let task: u64 = unsafe { ::std::mem::transmute(task) };
1107 task as u64
1108 });
1109 __bindgen_bitfield_unit.set(14usize, 1u8, {
1110 let watermark: u64 = unsafe { ::std::mem::transmute(watermark) };
1111 watermark as u64
1112 });
1113 __bindgen_bitfield_unit.set(15usize, 2u8, {
1114 let precise_ip: u64 = unsafe { ::std::mem::transmute(precise_ip) };
1115 precise_ip as u64
1116 });
1117 __bindgen_bitfield_unit.set(17usize, 1u8, {
1118 let mmap_data: u64 = unsafe { ::std::mem::transmute(mmap_data) };
1119 mmap_data as u64
1120 });
1121 __bindgen_bitfield_unit.set(18usize, 1u8, {
1122 let sample_id_all: u64 = unsafe { ::std::mem::transmute(sample_id_all) };
1123 sample_id_all as u64
1124 });
1125 __bindgen_bitfield_unit.set(19usize, 1u8, {
1126 let exclude_host: u64 = unsafe { ::std::mem::transmute(exclude_host) };
1127 exclude_host as u64
1128 });
1129 __bindgen_bitfield_unit.set(20usize, 1u8, {
1130 let exclude_guest: u64 = unsafe { ::std::mem::transmute(exclude_guest) };
1131 exclude_guest as u64
1132 });
1133 __bindgen_bitfield_unit.set(21usize, 1u8, {
1134 let exclude_callchain_kernel: u64 =
1135 unsafe { ::std::mem::transmute(exclude_callchain_kernel) };
1136 exclude_callchain_kernel as u64
1137 });
1138 __bindgen_bitfield_unit.set(22usize, 1u8, {
1139 let exclude_callchain_user: u64 =
1140 unsafe { ::std::mem::transmute(exclude_callchain_user) };
1141 exclude_callchain_user as u64
1142 });
1143 __bindgen_bitfield_unit.set(23usize, 1u8, {
1144 let mmap2: u64 = unsafe { ::std::mem::transmute(mmap2) };
1145 mmap2 as u64
1146 });
1147 __bindgen_bitfield_unit.set(24usize, 1u8, {
1148 let comm_exec: u64 = unsafe { ::std::mem::transmute(comm_exec) };
1149 comm_exec as u64
1150 });
1151 __bindgen_bitfield_unit.set(25usize, 1u8, {
1152 let use_clockid: u64 = unsafe { ::std::mem::transmute(use_clockid) };
1153 use_clockid as u64
1154 });
1155 __bindgen_bitfield_unit.set(26usize, 1u8, {
1156 let context_switch: u64 = unsafe { ::std::mem::transmute(context_switch) };
1157 context_switch as u64
1158 });
1159 __bindgen_bitfield_unit.set(27usize, 1u8, {
1160 let write_backward: u64 = unsafe { ::std::mem::transmute(write_backward) };
1161 write_backward as u64
1162 });
1163 __bindgen_bitfield_unit.set(28usize, 1u8, {
1164 let namespaces: u64 = unsafe { ::std::mem::transmute(namespaces) };
1165 namespaces as u64
1166 });
1167 __bindgen_bitfield_unit.set(29usize, 1u8, {
1168 let ksymbol: u64 = unsafe { ::std::mem::transmute(ksymbol) };
1169 ksymbol as u64
1170 });
1171 __bindgen_bitfield_unit.set(30usize, 1u8, {
1172 let bpf_event: u64 = unsafe { ::std::mem::transmute(bpf_event) };
1173 bpf_event as u64
1174 });
1175 __bindgen_bitfield_unit.set(31usize, 1u8, {
1176 let aux_output: u64 = unsafe { ::std::mem::transmute(aux_output) };
1177 aux_output as u64
1178 });
1179 __bindgen_bitfield_unit.set(32usize, 1u8, {
1180 let cgroup: u64 = unsafe { ::std::mem::transmute(cgroup) };
1181 cgroup as u64
1182 });
1183 __bindgen_bitfield_unit.set(33usize, 1u8, {
1184 let text_poke: u64 = unsafe { ::std::mem::transmute(text_poke) };
1185 text_poke as u64
1186 });
1187 __bindgen_bitfield_unit.set(34usize, 1u8, {
1188 let build_id: u64 = unsafe { ::std::mem::transmute(build_id) };
1189 build_id as u64
1190 });
1191 __bindgen_bitfield_unit.set(35usize, 1u8, {
1192 let inherit_thread: u64 = unsafe { ::std::mem::transmute(inherit_thread) };
1193 inherit_thread as u64
1194 });
1195 __bindgen_bitfield_unit.set(36usize, 1u8, {
1196 let remove_on_exec: u64 = unsafe { ::std::mem::transmute(remove_on_exec) };
1197 remove_on_exec as u64
1198 });
1199 __bindgen_bitfield_unit.set(37usize, 1u8, {
1200 let sigtrap: u64 = unsafe { ::std::mem::transmute(sigtrap) };
1201 sigtrap as u64
1202 });
1203 __bindgen_bitfield_unit.set(38usize, 26u8, {
1204 let __reserved_1: u64 = unsafe { ::std::mem::transmute(__reserved_1) };
1205 __reserved_1 as u64
1206 });
1207 __bindgen_bitfield_unit
1208 }
1209}
1210#[repr(C)]
1211#[derive(Debug, Default)]
1212pub struct perf_event_query_bpf {
1213 pub ids_len: __u32,
1214 pub prog_cnt: __u32,
1215 pub ids: __IncompleteArrayField<__u32>,
1216}
1217pub const PERF_IOC_FLAG_GROUP: perf_event_ioc_flags = 1;
1218pub type perf_event_ioc_flags = ::std::os::raw::c_uint;
1219#[repr(C)]
1220#[derive(Copy, Clone)]
1221pub struct perf_event_mmap_page {
1222 pub version: __u32,
1223 pub compat_version: __u32,
1224 pub lock: __u32,
1225 pub index: __u32,
1226 pub offset: __s64,
1227 pub time_enabled: __u64,
1228 pub time_running: __u64,
1229 pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1,
1230 pub pmc_width: __u16,
1231 pub time_shift: __u16,
1232 pub time_mult: __u32,
1233 pub time_offset: __u64,
1234 pub time_zero: __u64,
1235 pub size: __u32,
1236 pub __reserved_1: __u32,
1237 pub time_cycles: __u64,
1238 pub time_mask: __u64,
1239 pub __reserved: [__u8; 928usize],
1240 pub data_head: __u64,
1241 pub data_tail: __u64,
1242 pub data_offset: __u64,
1243 pub data_size: __u64,
1244 pub aux_head: __u64,
1245 pub aux_tail: __u64,
1246 pub aux_offset: __u64,
1247 pub aux_size: __u64,
1248}
1249#[repr(C)]
1250#[derive(Copy, Clone)]
1251pub union perf_event_mmap_page__bindgen_ty_1 {
1252 pub capabilities: __u64,
1253 pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1,
1254}
1255#[repr(C)]
1256#[repr(align(8))]
1257#[derive(Debug, Default, Copy, Clone)]
1258pub struct perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 {
1259 pub _bitfield_align_1: [u64; 0],
1260 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
1261}
1262impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 {
1263 #[inline]
1264 pub fn cap_bit0(&self) -> __u64 {
1265 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) }
1266 }
1267 #[inline]
1268 pub fn set_cap_bit0(&mut self, val: __u64) {
1269 unsafe {
1270 let val: u64 = ::std::mem::transmute(val);
1271 self._bitfield_1.set(0usize, 1u8, val as u64)
1272 }
1273 }
1274 #[inline]
1275 pub fn cap_bit0_is_deprecated(&self) -> __u64 {
1276 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) }
1277 }
1278 #[inline]
1279 pub fn set_cap_bit0_is_deprecated(&mut self, val: __u64) {
1280 unsafe {
1281 let val: u64 = ::std::mem::transmute(val);
1282 self._bitfield_1.set(1usize, 1u8, val as u64)
1283 }
1284 }
1285 #[inline]
1286 pub fn cap_user_rdpmc(&self) -> __u64 {
1287 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) }
1288 }
1289 #[inline]
1290 pub fn set_cap_user_rdpmc(&mut self, val: __u64) {
1291 unsafe {
1292 let val: u64 = ::std::mem::transmute(val);
1293 self._bitfield_1.set(2usize, 1u8, val as u64)
1294 }
1295 }
1296 #[inline]
1297 pub fn cap_user_time(&self) -> __u64 {
1298 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) }
1299 }
1300 #[inline]
1301 pub fn set_cap_user_time(&mut self, val: __u64) {
1302 unsafe {
1303 let val: u64 = ::std::mem::transmute(val);
1304 self._bitfield_1.set(3usize, 1u8, val as u64)
1305 }
1306 }
1307 #[inline]
1308 pub fn cap_user_time_zero(&self) -> __u64 {
1309 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) }
1310 }
1311 #[inline]
1312 pub fn set_cap_user_time_zero(&mut self, val: __u64) {
1313 unsafe {
1314 let val: u64 = ::std::mem::transmute(val);
1315 self._bitfield_1.set(4usize, 1u8, val as u64)
1316 }
1317 }
1318 #[inline]
1319 pub fn cap_user_time_short(&self) -> __u64 {
1320 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) }
1321 }
1322 #[inline]
1323 pub fn set_cap_user_time_short(&mut self, val: __u64) {
1324 unsafe {
1325 let val: u64 = ::std::mem::transmute(val);
1326 self._bitfield_1.set(5usize, 1u8, val as u64)
1327 }
1328 }
1329 #[inline]
1330 pub fn cap_____res(&self) -> __u64 {
1331 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) }
1332 }
1333 #[inline]
1334 pub fn set_cap_____res(&mut self, val: __u64) {
1335 unsafe {
1336 let val: u64 = ::std::mem::transmute(val);
1337 self._bitfield_1.set(6usize, 58u8, val as u64)
1338 }
1339 }
1340 #[inline]
1341 pub fn new_bitfield_1(
1342 cap_bit0: __u64,
1343 cap_bit0_is_deprecated: __u64,
1344 cap_user_rdpmc: __u64,
1345 cap_user_time: __u64,
1346 cap_user_time_zero: __u64,
1347 cap_user_time_short: __u64,
1348 cap_____res: __u64,
1349 ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
1350 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
1351 __bindgen_bitfield_unit.set(0usize, 1u8, {
1352 let cap_bit0: u64 = unsafe { ::std::mem::transmute(cap_bit0) };
1353 cap_bit0 as u64
1354 });
1355 __bindgen_bitfield_unit.set(1usize, 1u8, {
1356 let cap_bit0_is_deprecated: u64 =
1357 unsafe { ::std::mem::transmute(cap_bit0_is_deprecated) };
1358 cap_bit0_is_deprecated as u64
1359 });
1360 __bindgen_bitfield_unit.set(2usize, 1u8, {
1361 let cap_user_rdpmc: u64 = unsafe { ::std::mem::transmute(cap_user_rdpmc) };
1362 cap_user_rdpmc as u64
1363 });
1364 __bindgen_bitfield_unit.set(3usize, 1u8, {
1365 let cap_user_time: u64 = unsafe { ::std::mem::transmute(cap_user_time) };
1366 cap_user_time as u64
1367 });
1368 __bindgen_bitfield_unit.set(4usize, 1u8, {
1369 let cap_user_time_zero: u64 = unsafe { ::std::mem::transmute(cap_user_time_zero) };
1370 cap_user_time_zero as u64
1371 });
1372 __bindgen_bitfield_unit.set(5usize, 1u8, {
1373 let cap_user_time_short: u64 = unsafe { ::std::mem::transmute(cap_user_time_short) };
1374 cap_user_time_short as u64
1375 });
1376 __bindgen_bitfield_unit.set(6usize, 58u8, {
1377 let cap_____res: u64 = unsafe { ::std::mem::transmute(cap_____res) };
1378 cap_____res as u64
1379 });
1380 __bindgen_bitfield_unit
1381 }
1382}
1383impl Default for perf_event_mmap_page__bindgen_ty_1 {
1384 fn default() -> Self {
1385 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1386 unsafe {
1387 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1388 s.assume_init()
1389 }
1390 }
1391}
1392impl Default for perf_event_mmap_page {
1393 fn default() -> Self {
1394 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1395 unsafe {
1396 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1397 s.assume_init()
1398 }
1399 }
1400}
1401#[repr(C)]
1402#[derive(Debug, Default, Copy, Clone)]
1403pub struct perf_event_header {
1404 pub type_: __u32,
1405 pub misc: __u16,
1406 pub size: __u16,
1407}
1408#[repr(C)]
1409#[derive(Debug, Default, Copy, Clone)]
1410pub struct perf_ns_link_info {
1411 pub dev: __u64,
1412 pub ino: __u64,
1413}
1414pub const PERF_RECORD_MMAP: perf_event_type = 1;
1415pub const PERF_RECORD_LOST: perf_event_type = 2;
1416pub const PERF_RECORD_COMM: perf_event_type = 3;
1417pub const PERF_RECORD_EXIT: perf_event_type = 4;
1418pub const PERF_RECORD_THROTTLE: perf_event_type = 5;
1419pub const PERF_RECORD_UNTHROTTLE: perf_event_type = 6;
1420pub const PERF_RECORD_FORK: perf_event_type = 7;
1421pub const PERF_RECORD_READ: perf_event_type = 8;
1422pub const PERF_RECORD_SAMPLE: perf_event_type = 9;
1423pub const PERF_RECORD_MMAP2: perf_event_type = 10;
1424pub const PERF_RECORD_AUX: perf_event_type = 11;
1425pub const PERF_RECORD_ITRACE_START: perf_event_type = 12;
1426pub const PERF_RECORD_LOST_SAMPLES: perf_event_type = 13;
1427pub const PERF_RECORD_SWITCH: perf_event_type = 14;
1428pub const PERF_RECORD_SWITCH_CPU_WIDE: perf_event_type = 15;
1429pub const PERF_RECORD_NAMESPACES: perf_event_type = 16;
1430pub const PERF_RECORD_KSYMBOL: perf_event_type = 17;
1431pub const PERF_RECORD_BPF_EVENT: perf_event_type = 18;
1432pub const PERF_RECORD_CGROUP: perf_event_type = 19;
1433pub const PERF_RECORD_TEXT_POKE: perf_event_type = 20;
1434pub const PERF_RECORD_AUX_OUTPUT_HW_ID: perf_event_type = 21;
1435pub const PERF_RECORD_MAX: perf_event_type = 22;
1436pub type perf_event_type = ::std::os::raw::c_uint;
1437pub const PERF_RECORD_KSYMBOL_TYPE_UNKNOWN: perf_record_ksymbol_type = 0;
1438pub const PERF_RECORD_KSYMBOL_TYPE_BPF: perf_record_ksymbol_type = 1;
1439pub const PERF_RECORD_KSYMBOL_TYPE_OOL: perf_record_ksymbol_type = 2;
1440pub const PERF_RECORD_KSYMBOL_TYPE_MAX: perf_record_ksymbol_type = 3;
1441pub type perf_record_ksymbol_type = ::std::os::raw::c_uint;
1442pub const PERF_BPF_EVENT_UNKNOWN: perf_bpf_event_type = 0;
1443pub const PERF_BPF_EVENT_PROG_LOAD: perf_bpf_event_type = 1;
1444pub const PERF_BPF_EVENT_PROG_UNLOAD: perf_bpf_event_type = 2;
1445pub const PERF_BPF_EVENT_MAX: perf_bpf_event_type = 3;
1446pub type perf_bpf_event_type = ::std::os::raw::c_uint;
1447pub const PERF_CONTEXT_HV: perf_callchain_context = 18446744073709551584;
1448pub const PERF_CONTEXT_KERNEL: perf_callchain_context = 18446744073709551488;
1449pub const PERF_CONTEXT_USER: perf_callchain_context = 18446744073709551104;
1450pub const PERF_CONTEXT_GUEST: perf_callchain_context = 18446744073709549568;
1451pub const PERF_CONTEXT_GUEST_KERNEL: perf_callchain_context = 18446744073709549440;
1452pub const PERF_CONTEXT_GUEST_USER: perf_callchain_context = 18446744073709549056;
1453pub const PERF_CONTEXT_MAX: perf_callchain_context = 18446744073709547521;
1454pub type perf_callchain_context = ::std::os::raw::c_ulong;
1455#[repr(C)]
1456#[derive(Copy, Clone)]
1457pub union perf_mem_data_src {
1458 pub val: __u64,
1459 pub __bindgen_anon_1: perf_mem_data_src__bindgen_ty_1,
1460}
1461#[repr(C)]
1462#[repr(align(8))]
1463#[derive(Debug, Default, Copy, Clone)]
1464pub struct perf_mem_data_src__bindgen_ty_1 {
1465 pub _bitfield_align_1: [u32; 0],
1466 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
1467}
1468impl perf_mem_data_src__bindgen_ty_1 {
1469 #[inline]
1470 pub fn mem_op(&self) -> __u64 {
1471 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u64) }
1472 }
1473 #[inline]
1474 pub fn set_mem_op(&mut self, val: __u64) {
1475 unsafe {
1476 let val: u64 = ::std::mem::transmute(val);
1477 self._bitfield_1.set(0usize, 5u8, val as u64)
1478 }
1479 }
1480 #[inline]
1481 pub fn mem_lvl(&self) -> __u64 {
1482 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 14u8) as u64) }
1483 }
1484 #[inline]
1485 pub fn set_mem_lvl(&mut self, val: __u64) {
1486 unsafe {
1487 let val: u64 = ::std::mem::transmute(val);
1488 self._bitfield_1.set(5usize, 14u8, val as u64)
1489 }
1490 }
1491 #[inline]
1492 pub fn mem_snoop(&self) -> __u64 {
1493 unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 5u8) as u64) }
1494 }
1495 #[inline]
1496 pub fn set_mem_snoop(&mut self, val: __u64) {
1497 unsafe {
1498 let val: u64 = ::std::mem::transmute(val);
1499 self._bitfield_1.set(19usize, 5u8, val as u64)
1500 }
1501 }
1502 #[inline]
1503 pub fn mem_lock(&self) -> __u64 {
1504 unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 2u8) as u64) }
1505 }
1506 #[inline]
1507 pub fn set_mem_lock(&mut self, val: __u64) {
1508 unsafe {
1509 let val: u64 = ::std::mem::transmute(val);
1510 self._bitfield_1.set(24usize, 2u8, val as u64)
1511 }
1512 }
1513 #[inline]
1514 pub fn mem_dtlb(&self) -> __u64 {
1515 unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 7u8) as u64) }
1516 }
1517 #[inline]
1518 pub fn set_mem_dtlb(&mut self, val: __u64) {
1519 unsafe {
1520 let val: u64 = ::std::mem::transmute(val);
1521 self._bitfield_1.set(26usize, 7u8, val as u64)
1522 }
1523 }
1524 #[inline]
1525 pub fn mem_lvl_num(&self) -> __u64 {
1526 unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 4u8) as u64) }
1527 }
1528 #[inline]
1529 pub fn set_mem_lvl_num(&mut self, val: __u64) {
1530 unsafe {
1531 let val: u64 = ::std::mem::transmute(val);
1532 self._bitfield_1.set(33usize, 4u8, val as u64)
1533 }
1534 }
1535 #[inline]
1536 pub fn mem_remote(&self) -> __u64 {
1537 unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) }
1538 }
1539 #[inline]
1540 pub fn set_mem_remote(&mut self, val: __u64) {
1541 unsafe {
1542 let val: u64 = ::std::mem::transmute(val);
1543 self._bitfield_1.set(37usize, 1u8, val as u64)
1544 }
1545 }
1546 #[inline]
1547 pub fn mem_snoopx(&self) -> __u64 {
1548 unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 2u8) as u64) }
1549 }
1550 #[inline]
1551 pub fn set_mem_snoopx(&mut self, val: __u64) {
1552 unsafe {
1553 let val: u64 = ::std::mem::transmute(val);
1554 self._bitfield_1.set(38usize, 2u8, val as u64)
1555 }
1556 }
1557 #[inline]
1558 pub fn mem_blk(&self) -> __u64 {
1559 unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 3u8) as u64) }
1560 }
1561 #[inline]
1562 pub fn set_mem_blk(&mut self, val: __u64) {
1563 unsafe {
1564 let val: u64 = ::std::mem::transmute(val);
1565 self._bitfield_1.set(40usize, 3u8, val as u64)
1566 }
1567 }
1568 #[inline]
1569 pub fn mem_hops(&self) -> __u64 {
1570 unsafe { ::std::mem::transmute(self._bitfield_1.get(43usize, 3u8) as u64) }
1571 }
1572 #[inline]
1573 pub fn set_mem_hops(&mut self, val: __u64) {
1574 unsafe {
1575 let val: u64 = ::std::mem::transmute(val);
1576 self._bitfield_1.set(43usize, 3u8, val as u64)
1577 }
1578 }
1579 #[inline]
1580 pub fn mem_rsvd(&self) -> __u64 {
1581 unsafe { ::std::mem::transmute(self._bitfield_1.get(46usize, 18u8) as u64) }
1582 }
1583 #[inline]
1584 pub fn set_mem_rsvd(&mut self, val: __u64) {
1585 unsafe {
1586 let val: u64 = ::std::mem::transmute(val);
1587 self._bitfield_1.set(46usize, 18u8, val as u64)
1588 }
1589 }
1590 #[inline]
1591 pub fn new_bitfield_1(
1592 mem_op: __u64,
1593 mem_lvl: __u64,
1594 mem_snoop: __u64,
1595 mem_lock: __u64,
1596 mem_dtlb: __u64,
1597 mem_lvl_num: __u64,
1598 mem_remote: __u64,
1599 mem_snoopx: __u64,
1600 mem_blk: __u64,
1601 mem_hops: __u64,
1602 mem_rsvd: __u64,
1603 ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
1604 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
1605 __bindgen_bitfield_unit.set(0usize, 5u8, {
1606 let mem_op: u64 = unsafe { ::std::mem::transmute(mem_op) };
1607 mem_op as u64
1608 });
1609 __bindgen_bitfield_unit.set(5usize, 14u8, {
1610 let mem_lvl: u64 = unsafe { ::std::mem::transmute(mem_lvl) };
1611 mem_lvl as u64
1612 });
1613 __bindgen_bitfield_unit.set(19usize, 5u8, {
1614 let mem_snoop: u64 = unsafe { ::std::mem::transmute(mem_snoop) };
1615 mem_snoop as u64
1616 });
1617 __bindgen_bitfield_unit.set(24usize, 2u8, {
1618 let mem_lock: u64 = unsafe { ::std::mem::transmute(mem_lock) };
1619 mem_lock as u64
1620 });
1621 __bindgen_bitfield_unit.set(26usize, 7u8, {
1622 let mem_dtlb: u64 = unsafe { ::std::mem::transmute(mem_dtlb) };
1623 mem_dtlb as u64
1624 });
1625 __bindgen_bitfield_unit.set(33usize, 4u8, {
1626 let mem_lvl_num: u64 = unsafe { ::std::mem::transmute(mem_lvl_num) };
1627 mem_lvl_num as u64
1628 });
1629 __bindgen_bitfield_unit.set(37usize, 1u8, {
1630 let mem_remote: u64 = unsafe { ::std::mem::transmute(mem_remote) };
1631 mem_remote as u64
1632 });
1633 __bindgen_bitfield_unit.set(38usize, 2u8, {
1634 let mem_snoopx: u64 = unsafe { ::std::mem::transmute(mem_snoopx) };
1635 mem_snoopx as u64
1636 });
1637 __bindgen_bitfield_unit.set(40usize, 3u8, {
1638 let mem_blk: u64 = unsafe { ::std::mem::transmute(mem_blk) };
1639 mem_blk as u64
1640 });
1641 __bindgen_bitfield_unit.set(43usize, 3u8, {
1642 let mem_hops: u64 = unsafe { ::std::mem::transmute(mem_hops) };
1643 mem_hops as u64
1644 });
1645 __bindgen_bitfield_unit.set(46usize, 18u8, {
1646 let mem_rsvd: u64 = unsafe { ::std::mem::transmute(mem_rsvd) };
1647 mem_rsvd as u64
1648 });
1649 __bindgen_bitfield_unit
1650 }
1651}
1652impl Default for perf_mem_data_src {
1653 fn default() -> Self {
1654 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1655 unsafe {
1656 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1657 s.assume_init()
1658 }
1659 }
1660}
1661#[repr(C)]
1662#[derive(Debug, Default, Copy, Clone)]
1663pub struct perf_branch_entry {
1664 pub from: __u64,
1665 pub to: __u64,
1666 pub _bitfield_align_1: [u64; 0],
1667 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
1668}
1669impl perf_branch_entry {
1670 #[inline]
1671 pub fn mispred(&self) -> __u64 {
1672 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) }
1673 }
1674 #[inline]
1675 pub fn set_mispred(&mut self, val: __u64) {
1676 unsafe {
1677 let val: u64 = ::std::mem::transmute(val);
1678 self._bitfield_1.set(0usize, 1u8, val as u64)
1679 }
1680 }
1681 #[inline]
1682 pub fn predicted(&self) -> __u64 {
1683 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) }
1684 }
1685 #[inline]
1686 pub fn set_predicted(&mut self, val: __u64) {
1687 unsafe {
1688 let val: u64 = ::std::mem::transmute(val);
1689 self._bitfield_1.set(1usize, 1u8, val as u64)
1690 }
1691 }
1692 #[inline]
1693 pub fn in_tx(&self) -> __u64 {
1694 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) }
1695 }
1696 #[inline]
1697 pub fn set_in_tx(&mut self, val: __u64) {
1698 unsafe {
1699 let val: u64 = ::std::mem::transmute(val);
1700 self._bitfield_1.set(2usize, 1u8, val as u64)
1701 }
1702 }
1703 #[inline]
1704 pub fn abort(&self) -> __u64 {
1705 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) }
1706 }
1707 #[inline]
1708 pub fn set_abort(&mut self, val: __u64) {
1709 unsafe {
1710 let val: u64 = ::std::mem::transmute(val);
1711 self._bitfield_1.set(3usize, 1u8, val as u64)
1712 }
1713 }
1714 #[inline]
1715 pub fn cycles(&self) -> __u64 {
1716 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 16u8) as u64) }
1717 }
1718 #[inline]
1719 pub fn set_cycles(&mut self, val: __u64) {
1720 unsafe {
1721 let val: u64 = ::std::mem::transmute(val);
1722 self._bitfield_1.set(4usize, 16u8, val as u64)
1723 }
1724 }
1725 #[inline]
1726 pub fn type_(&self) -> __u64 {
1727 unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 4u8) as u64) }
1728 }
1729 #[inline]
1730 pub fn set_type(&mut self, val: __u64) {
1731 unsafe {
1732 let val: u64 = ::std::mem::transmute(val);
1733 self._bitfield_1.set(20usize, 4u8, val as u64)
1734 }
1735 }
1736 #[inline]
1737 pub fn reserved(&self) -> __u64 {
1738 unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 40u8) as u64) }
1739 }
1740 #[inline]
1741 pub fn set_reserved(&mut self, val: __u64) {
1742 unsafe {
1743 let val: u64 = ::std::mem::transmute(val);
1744 self._bitfield_1.set(24usize, 40u8, val as u64)
1745 }
1746 }
1747 #[inline]
1748 pub fn new_bitfield_1(
1749 mispred: __u64,
1750 predicted: __u64,
1751 in_tx: __u64,
1752 abort: __u64,
1753 cycles: __u64,
1754 type_: __u64,
1755 reserved: __u64,
1756 ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
1757 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
1758 __bindgen_bitfield_unit.set(0usize, 1u8, {
1759 let mispred: u64 = unsafe { ::std::mem::transmute(mispred) };
1760 mispred as u64
1761 });
1762 __bindgen_bitfield_unit.set(1usize, 1u8, {
1763 let predicted: u64 = unsafe { ::std::mem::transmute(predicted) };
1764 predicted as u64
1765 });
1766 __bindgen_bitfield_unit.set(2usize, 1u8, {
1767 let in_tx: u64 = unsafe { ::std::mem::transmute(in_tx) };
1768 in_tx as u64
1769 });
1770 __bindgen_bitfield_unit.set(3usize, 1u8, {
1771 let abort: u64 = unsafe { ::std::mem::transmute(abort) };
1772 abort as u64
1773 });
1774 __bindgen_bitfield_unit.set(4usize, 16u8, {
1775 let cycles: u64 = unsafe { ::std::mem::transmute(cycles) };
1776 cycles as u64
1777 });
1778 __bindgen_bitfield_unit.set(20usize, 4u8, {
1779 let type_: u64 = unsafe { ::std::mem::transmute(type_) };
1780 type_ as u64
1781 });
1782 __bindgen_bitfield_unit.set(24usize, 40u8, {
1783 let reserved: u64 = unsafe { ::std::mem::transmute(reserved) };
1784 reserved as u64
1785 });
1786 __bindgen_bitfield_unit
1787 }
1788}
1789#[repr(C)]
1790#[derive(Copy, Clone)]
1791pub union perf_sample_weight {
1792 pub full: __u64,
1793 pub __bindgen_anon_1: perf_sample_weight__bindgen_ty_1,
1794}
1795#[repr(C)]
1796#[derive(Debug, Default, Copy, Clone)]
1797pub struct perf_sample_weight__bindgen_ty_1 {
1798 pub var1_dw: __u32,
1799 pub var2_w: __u16,
1800 pub var3_w: __u16,
1801}
1802impl Default for perf_sample_weight {
1803 fn default() -> Self {
1804 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1805 unsafe {
1806 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1807 s.assume_init()
1808 }
1809 }
1810}
1811pub const BPF_REG_0: _bindgen_ty_51 = 0;
1812pub const BPF_REG_1: _bindgen_ty_51 = 1;
1813pub const BPF_REG_2: _bindgen_ty_51 = 2;
1814pub const BPF_REG_3: _bindgen_ty_51 = 3;
1815pub const BPF_REG_4: _bindgen_ty_51 = 4;
1816pub const BPF_REG_5: _bindgen_ty_51 = 5;
1817pub const BPF_REG_6: _bindgen_ty_51 = 6;
1818pub const BPF_REG_7: _bindgen_ty_51 = 7;
1819pub const BPF_REG_8: _bindgen_ty_51 = 8;
1820pub const BPF_REG_9: _bindgen_ty_51 = 9;
1821pub const BPF_REG_10: _bindgen_ty_51 = 10;
1822pub const __MAX_BPF_REG: _bindgen_ty_51 = 11;
1823pub type _bindgen_ty_51 = ::std::os::raw::c_uint;
1824#[repr(C)]
1825#[derive(Debug, Default, Copy, Clone)]
1826pub struct bpf_insn {
1827 pub code: __u8,
1828 pub _bitfield_align_1: [u8; 0],
1829 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
1830 pub off: __s16,
1831 pub imm: __s32,
1832}
1833impl bpf_insn {
1834 #[inline]
1835 pub fn dst_reg(&self) -> __u8 {
1836 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) }
1837 }
1838 #[inline]
1839 pub fn set_dst_reg(&mut self, val: __u8) {
1840 unsafe {
1841 let val: u8 = ::std::mem::transmute(val);
1842 self._bitfield_1.set(0usize, 4u8, val as u64)
1843 }
1844 }
1845 #[inline]
1846 pub fn src_reg(&self) -> __u8 {
1847 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) }
1848 }
1849 #[inline]
1850 pub fn set_src_reg(&mut self, val: __u8) {
1851 unsafe {
1852 let val: u8 = ::std::mem::transmute(val);
1853 self._bitfield_1.set(4usize, 4u8, val as u64)
1854 }
1855 }
1856 #[inline]
1857 pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> {
1858 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
1859 __bindgen_bitfield_unit.set(0usize, 4u8, {
1860 let dst_reg: u8 = unsafe { ::std::mem::transmute(dst_reg) };
1861 dst_reg as u64
1862 });
1863 __bindgen_bitfield_unit.set(4usize, 4u8, {
1864 let src_reg: u8 = unsafe { ::std::mem::transmute(src_reg) };
1865 src_reg as u64
1866 });
1867 __bindgen_bitfield_unit
1868 }
1869}
1870#[repr(C)]
1871#[derive(Debug, Default)]
1872pub struct bpf_lpm_trie_key {
1873 pub prefixlen: __u32,
1874 pub data: __IncompleteArrayField<__u8>,
1875}
1876#[repr(C)]
1877#[derive(Debug, Default, Copy, Clone)]
1878pub struct bpf_cgroup_storage_key {
1879 pub cgroup_inode_id: __u64,
1880 pub attach_type: __u32,
1881 pub __bindgen_padding_0: [u8; 4usize],
1882}
1883#[repr(C)]
1884#[derive(Copy, Clone)]
1885pub union bpf_iter_link_info {
1886 pub map: bpf_iter_link_info__bindgen_ty_1,
1887}
1888#[repr(C)]
1889#[derive(Debug, Default, Copy, Clone)]
1890pub struct bpf_iter_link_info__bindgen_ty_1 {
1891 pub map_fd: __u32,
1892}
1893impl Default for bpf_iter_link_info {
1894 fn default() -> Self {
1895 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1896 unsafe {
1897 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1898 s.assume_init()
1899 }
1900 }
1901}
1902pub const BPF_MAP_CREATE: bpf_cmd = 0;
1903pub const BPF_MAP_LOOKUP_ELEM: bpf_cmd = 1;
1904pub const BPF_MAP_UPDATE_ELEM: bpf_cmd = 2;
1905pub const BPF_MAP_DELETE_ELEM: bpf_cmd = 3;
1906pub const BPF_MAP_GET_NEXT_KEY: bpf_cmd = 4;
1907pub const BPF_PROG_LOAD: bpf_cmd = 5;
1908pub const BPF_OBJ_PIN: bpf_cmd = 6;
1909pub const BPF_OBJ_GET: bpf_cmd = 7;
1910pub const BPF_PROG_ATTACH: bpf_cmd = 8;
1911pub const BPF_PROG_DETACH: bpf_cmd = 9;
1912pub const BPF_PROG_TEST_RUN: bpf_cmd = 10;
1913pub const BPF_PROG_RUN: bpf_cmd = 10;
1914pub const BPF_PROG_GET_NEXT_ID: bpf_cmd = 11;
1915pub const BPF_MAP_GET_NEXT_ID: bpf_cmd = 12;
1916pub const BPF_PROG_GET_FD_BY_ID: bpf_cmd = 13;
1917pub const BPF_MAP_GET_FD_BY_ID: bpf_cmd = 14;
1918pub const BPF_OBJ_GET_INFO_BY_FD: bpf_cmd = 15;
1919pub const BPF_PROG_QUERY: bpf_cmd = 16;
1920pub const BPF_RAW_TRACEPOINT_OPEN: bpf_cmd = 17;
1921pub const BPF_BTF_LOAD: bpf_cmd = 18;
1922pub const BPF_BTF_GET_FD_BY_ID: bpf_cmd = 19;
1923pub const BPF_TASK_FD_QUERY: bpf_cmd = 20;
1924pub const BPF_MAP_LOOKUP_AND_DELETE_ELEM: bpf_cmd = 21;
1925pub const BPF_MAP_FREEZE: bpf_cmd = 22;
1926pub const BPF_BTF_GET_NEXT_ID: bpf_cmd = 23;
1927pub const BPF_MAP_LOOKUP_BATCH: bpf_cmd = 24;
1928pub const BPF_MAP_LOOKUP_AND_DELETE_BATCH: bpf_cmd = 25;
1929pub const BPF_MAP_UPDATE_BATCH: bpf_cmd = 26;
1930pub const BPF_MAP_DELETE_BATCH: bpf_cmd = 27;
1931pub const BPF_LINK_CREATE: bpf_cmd = 28;
1932pub const BPF_LINK_UPDATE: bpf_cmd = 29;
1933pub const BPF_LINK_GET_FD_BY_ID: bpf_cmd = 30;
1934pub const BPF_LINK_GET_NEXT_ID: bpf_cmd = 31;
1935pub const BPF_ENABLE_STATS: bpf_cmd = 32;
1936pub const BPF_ITER_CREATE: bpf_cmd = 33;
1937pub const BPF_LINK_DETACH: bpf_cmd = 34;
1938pub const BPF_PROG_BIND_MAP: bpf_cmd = 35;
1939pub type bpf_cmd = ::std::os::raw::c_uint;
1940pub const BPF_MAP_TYPE_UNSPEC: bpf_map_type = 0;
1941pub const BPF_MAP_TYPE_HASH: bpf_map_type = 1;
1942pub const BPF_MAP_TYPE_ARRAY: bpf_map_type = 2;
1943pub const BPF_MAP_TYPE_PROG_ARRAY: bpf_map_type = 3;
1944pub const BPF_MAP_TYPE_PERF_EVENT_ARRAY: bpf_map_type = 4;
1945pub const BPF_MAP_TYPE_PERCPU_HASH: bpf_map_type = 5;
1946pub const BPF_MAP_TYPE_PERCPU_ARRAY: bpf_map_type = 6;
1947pub const BPF_MAP_TYPE_STACK_TRACE: bpf_map_type = 7;
1948pub const BPF_MAP_TYPE_CGROUP_ARRAY: bpf_map_type = 8;
1949pub const BPF_MAP_TYPE_LRU_HASH: bpf_map_type = 9;
1950pub const BPF_MAP_TYPE_LRU_PERCPU_HASH: bpf_map_type = 10;
1951pub const BPF_MAP_TYPE_LPM_TRIE: bpf_map_type = 11;
1952pub const BPF_MAP_TYPE_ARRAY_OF_MAPS: bpf_map_type = 12;
1953pub const BPF_MAP_TYPE_HASH_OF_MAPS: bpf_map_type = 13;
1954pub const BPF_MAP_TYPE_DEVMAP: bpf_map_type = 14;
1955pub const BPF_MAP_TYPE_SOCKMAP: bpf_map_type = 15;
1956pub const BPF_MAP_TYPE_CPUMAP: bpf_map_type = 16;
1957pub const BPF_MAP_TYPE_XSKMAP: bpf_map_type = 17;
1958pub const BPF_MAP_TYPE_SOCKHASH: bpf_map_type = 18;
1959pub const BPF_MAP_TYPE_CGROUP_STORAGE: bpf_map_type = 19;
1960pub const BPF_MAP_TYPE_REUSEPORT_SOCKARRAY: bpf_map_type = 20;
1961pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE: bpf_map_type = 21;
1962pub const BPF_MAP_TYPE_QUEUE: bpf_map_type = 22;
1963pub const BPF_MAP_TYPE_STACK: bpf_map_type = 23;
1964pub const BPF_MAP_TYPE_SK_STORAGE: bpf_map_type = 24;
1965pub const BPF_MAP_TYPE_DEVMAP_HASH: bpf_map_type = 25;
1966pub const BPF_MAP_TYPE_STRUCT_OPS: bpf_map_type = 26;
1967pub const BPF_MAP_TYPE_RINGBUF: bpf_map_type = 27;
1968pub const BPF_MAP_TYPE_INODE_STORAGE: bpf_map_type = 28;
1969pub const BPF_MAP_TYPE_TASK_STORAGE: bpf_map_type = 29;
1970pub const BPF_MAP_TYPE_BLOOM_FILTER: bpf_map_type = 30;
1971pub type bpf_map_type = ::std::os::raw::c_uint;
1972pub const BPF_PROG_TYPE_UNSPEC: bpf_prog_type = 0;
1973pub const BPF_PROG_TYPE_SOCKET_FILTER: bpf_prog_type = 1;
1974pub const BPF_PROG_TYPE_KPROBE: bpf_prog_type = 2;
1975pub const BPF_PROG_TYPE_SCHED_CLS: bpf_prog_type = 3;
1976pub const BPF_PROG_TYPE_SCHED_ACT: bpf_prog_type = 4;
1977pub const BPF_PROG_TYPE_TRACEPOINT: bpf_prog_type = 5;
1978pub const BPF_PROG_TYPE_XDP: bpf_prog_type = 6;
1979pub const BPF_PROG_TYPE_PERF_EVENT: bpf_prog_type = 7;
1980pub const BPF_PROG_TYPE_CGROUP_SKB: bpf_prog_type = 8;
1981pub const BPF_PROG_TYPE_CGROUP_SOCK: bpf_prog_type = 9;
1982pub const BPF_PROG_TYPE_LWT_IN: bpf_prog_type = 10;
1983pub const BPF_PROG_TYPE_LWT_OUT: bpf_prog_type = 11;
1984pub const BPF_PROG_TYPE_LWT_XMIT: bpf_prog_type = 12;
1985pub const BPF_PROG_TYPE_SOCK_OPS: bpf_prog_type = 13;
1986pub const BPF_PROG_TYPE_SK_SKB: bpf_prog_type = 14;
1987pub const BPF_PROG_TYPE_CGROUP_DEVICE: bpf_prog_type = 15;
1988pub const BPF_PROG_TYPE_SK_MSG: bpf_prog_type = 16;
1989pub const BPF_PROG_TYPE_RAW_TRACEPOINT: bpf_prog_type = 17;
1990pub const BPF_PROG_TYPE_CGROUP_SOCK_ADDR: bpf_prog_type = 18;
1991pub const BPF_PROG_TYPE_LWT_SEG6LOCAL: bpf_prog_type = 19;
1992pub const BPF_PROG_TYPE_LIRC_MODE2: bpf_prog_type = 20;
1993pub const BPF_PROG_TYPE_SK_REUSEPORT: bpf_prog_type = 21;
1994pub const BPF_PROG_TYPE_FLOW_DISSECTOR: bpf_prog_type = 22;
1995pub const BPF_PROG_TYPE_CGROUP_SYSCTL: bpf_prog_type = 23;
1996pub const BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE: bpf_prog_type = 24;
1997pub const BPF_PROG_TYPE_CGROUP_SOCKOPT: bpf_prog_type = 25;
1998pub const BPF_PROG_TYPE_TRACING: bpf_prog_type = 26;
1999pub const BPF_PROG_TYPE_STRUCT_OPS: bpf_prog_type = 27;
2000pub const BPF_PROG_TYPE_EXT: bpf_prog_type = 28;
2001pub const BPF_PROG_TYPE_LSM: bpf_prog_type = 29;
2002pub const BPF_PROG_TYPE_SK_LOOKUP: bpf_prog_type = 30;
2003pub const BPF_PROG_TYPE_SYSCALL: bpf_prog_type = 31;
2004pub type bpf_prog_type = ::std::os::raw::c_uint;
2005pub const BPF_CGROUP_INET_INGRESS: bpf_attach_type = 0;
2006pub const BPF_CGROUP_INET_EGRESS: bpf_attach_type = 1;
2007pub const BPF_CGROUP_INET_SOCK_CREATE: bpf_attach_type = 2;
2008pub const BPF_CGROUP_SOCK_OPS: bpf_attach_type = 3;
2009pub const BPF_SK_SKB_STREAM_PARSER: bpf_attach_type = 4;
2010pub const BPF_SK_SKB_STREAM_VERDICT: bpf_attach_type = 5;
2011pub const BPF_CGROUP_DEVICE: bpf_attach_type = 6;
2012pub const BPF_SK_MSG_VERDICT: bpf_attach_type = 7;
2013pub const BPF_CGROUP_INET4_BIND: bpf_attach_type = 8;
2014pub const BPF_CGROUP_INET6_BIND: bpf_attach_type = 9;
2015pub const BPF_CGROUP_INET4_CONNECT: bpf_attach_type = 10;
2016pub const BPF_CGROUP_INET6_CONNECT: bpf_attach_type = 11;
2017pub const BPF_CGROUP_INET4_POST_BIND: bpf_attach_type = 12;
2018pub const BPF_CGROUP_INET6_POST_BIND: bpf_attach_type = 13;
2019pub const BPF_CGROUP_UDP4_SENDMSG: bpf_attach_type = 14;
2020pub const BPF_CGROUP_UDP6_SENDMSG: bpf_attach_type = 15;
2021pub const BPF_LIRC_MODE2: bpf_attach_type = 16;
2022pub const BPF_FLOW_DISSECTOR: bpf_attach_type = 17;
2023pub const BPF_CGROUP_SYSCTL: bpf_attach_type = 18;
2024pub const BPF_CGROUP_UDP4_RECVMSG: bpf_attach_type = 19;
2025pub const BPF_CGROUP_UDP6_RECVMSG: bpf_attach_type = 20;
2026pub const BPF_CGROUP_GETSOCKOPT: bpf_attach_type = 21;
2027pub const BPF_CGROUP_SETSOCKOPT: bpf_attach_type = 22;
2028pub const BPF_TRACE_RAW_TP: bpf_attach_type = 23;
2029pub const BPF_TRACE_FENTRY: bpf_attach_type = 24;
2030pub const BPF_TRACE_FEXIT: bpf_attach_type = 25;
2031pub const BPF_MODIFY_RETURN: bpf_attach_type = 26;
2032pub const BPF_LSM_MAC: bpf_attach_type = 27;
2033pub const BPF_TRACE_ITER: bpf_attach_type = 28;
2034pub const BPF_CGROUP_INET4_GETPEERNAME: bpf_attach_type = 29;
2035pub const BPF_CGROUP_INET6_GETPEERNAME: bpf_attach_type = 30;
2036pub const BPF_CGROUP_INET4_GETSOCKNAME: bpf_attach_type = 31;
2037pub const BPF_CGROUP_INET6_GETSOCKNAME: bpf_attach_type = 32;
2038pub const BPF_XDP_DEVMAP: bpf_attach_type = 33;
2039pub const BPF_CGROUP_INET_SOCK_RELEASE: bpf_attach_type = 34;
2040pub const BPF_XDP_CPUMAP: bpf_attach_type = 35;
2041pub const BPF_SK_LOOKUP: bpf_attach_type = 36;
2042pub const BPF_XDP: bpf_attach_type = 37;
2043pub const BPF_SK_SKB_VERDICT: bpf_attach_type = 38;
2044pub const BPF_SK_REUSEPORT_SELECT: bpf_attach_type = 39;
2045pub const BPF_SK_REUSEPORT_SELECT_OR_MIGRATE: bpf_attach_type = 40;
2046pub const BPF_PERF_EVENT: bpf_attach_type = 41;
2047pub const BPF_TRACE_KPROBE_MULTI: bpf_attach_type = 42;
2048pub const BPF_LSM_CGROUP: bpf_attach_type = 43;
2049pub const __MAX_BPF_ATTACH_TYPE: bpf_attach_type = 44;
2050pub type bpf_attach_type = ::std::os::raw::c_uint;
2051pub const BPF_LINK_TYPE_UNSPEC: bpf_link_type = 0;
2052pub const BPF_LINK_TYPE_RAW_TRACEPOINT: bpf_link_type = 1;
2053pub const BPF_LINK_TYPE_TRACING: bpf_link_type = 2;
2054pub const BPF_LINK_TYPE_CGROUP: bpf_link_type = 3;
2055pub const BPF_LINK_TYPE_ITER: bpf_link_type = 4;
2056pub const BPF_LINK_TYPE_NETNS: bpf_link_type = 5;
2057pub const BPF_LINK_TYPE_XDP: bpf_link_type = 6;
2058pub const BPF_LINK_TYPE_PERF_EVENT: bpf_link_type = 7;
2059pub const BPF_LINK_TYPE_KPROBE_MULTI: bpf_link_type = 8;
2060pub const BPF_LINK_TYPE_STRUCT_OPS: bpf_link_type = 9;
2061pub const MAX_BPF_LINK_TYPE: bpf_link_type = 10;
2062pub type bpf_link_type = ::std::os::raw::c_uint;
2063pub const BPF_ANY: _bindgen_ty_52 = 0;
2064pub const BPF_NOEXIST: _bindgen_ty_52 = 1;
2065pub const BPF_EXIST: _bindgen_ty_52 = 2;
2066pub const BPF_F_LOCK: _bindgen_ty_52 = 4;
2067pub type _bindgen_ty_52 = ::std::os::raw::c_uint;
2068pub const BPF_F_NO_PREALLOC: _bindgen_ty_53 = 1;
2069pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_53 = 2;
2070pub const BPF_F_NUMA_NODE: _bindgen_ty_53 = 4;
2071pub const BPF_F_RDONLY: _bindgen_ty_53 = 8;
2072pub const BPF_F_WRONLY: _bindgen_ty_53 = 16;
2073pub const BPF_F_STACK_BUILD_ID: _bindgen_ty_53 = 32;
2074pub const BPF_F_ZERO_SEED: _bindgen_ty_53 = 64;
2075pub const BPF_F_RDONLY_PROG: _bindgen_ty_53 = 128;
2076pub const BPF_F_WRONLY_PROG: _bindgen_ty_53 = 256;
2077pub const BPF_F_CLONE: _bindgen_ty_53 = 512;
2078pub const BPF_F_MMAPABLE: _bindgen_ty_53 = 1024;
2079pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_53 = 2048;
2080pub const BPF_F_INNER_MAP: _bindgen_ty_53 = 4096;
2081pub type _bindgen_ty_53 = ::std::os::raw::c_uint;
2082pub const BPF_STATS_RUN_TIME: bpf_stats_type = 0;
2083pub type bpf_stats_type = ::std::os::raw::c_uint;
2084pub const BPF_STACK_BUILD_ID_EMPTY: bpf_stack_build_id_status = 0;
2085pub const BPF_STACK_BUILD_ID_VALID: bpf_stack_build_id_status = 1;
2086pub const BPF_STACK_BUILD_ID_IP: bpf_stack_build_id_status = 2;
2087pub type bpf_stack_build_id_status = ::std::os::raw::c_uint;
2088#[repr(C)]
2089#[derive(Copy, Clone)]
2090pub struct bpf_stack_build_id {
2091 pub status: __s32,
2092 pub build_id: [::std::os::raw::c_uchar; 20usize],
2093 pub __bindgen_anon_1: bpf_stack_build_id__bindgen_ty_1,
2094}
2095#[repr(C)]
2096#[derive(Copy, Clone)]
2097pub union bpf_stack_build_id__bindgen_ty_1 {
2098 pub offset: __u64,
2099 pub ip: __u64,
2100}
2101impl Default for bpf_stack_build_id__bindgen_ty_1 {
2102 fn default() -> Self {
2103 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2104 unsafe {
2105 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2106 s.assume_init()
2107 }
2108 }
2109}
2110impl Default for bpf_stack_build_id {
2111 fn default() -> Self {
2112 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2113 unsafe {
2114 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2115 s.assume_init()
2116 }
2117 }
2118}
2119#[repr(C)]
2120#[derive(Copy, Clone)]
2121pub union bpf_attr {
2122 pub __bindgen_anon_1: bpf_attr__bindgen_ty_1,
2123 pub __bindgen_anon_2: bpf_attr__bindgen_ty_2,
2124 pub batch: bpf_attr__bindgen_ty_3,
2125 pub __bindgen_anon_3: bpf_attr__bindgen_ty_4,
2126 pub __bindgen_anon_4: bpf_attr__bindgen_ty_5,
2127 pub __bindgen_anon_5: bpf_attr__bindgen_ty_6,
2128 pub test: bpf_attr__bindgen_ty_7,
2129 pub __bindgen_anon_6: bpf_attr__bindgen_ty_8,
2130 pub info: bpf_attr__bindgen_ty_9,
2131 pub query: bpf_attr__bindgen_ty_10,
2132 pub raw_tracepoint: bpf_attr__bindgen_ty_11,
2133 pub __bindgen_anon_7: bpf_attr__bindgen_ty_12,
2134 pub task_fd_query: bpf_attr__bindgen_ty_13,
2135 pub link_create: bpf_attr__bindgen_ty_14,
2136 pub link_update: bpf_attr__bindgen_ty_15,
2137 pub link_detach: bpf_attr__bindgen_ty_16,
2138 pub enable_stats: bpf_attr__bindgen_ty_17,
2139 pub iter_create: bpf_attr__bindgen_ty_18,
2140 pub prog_bind_map: bpf_attr__bindgen_ty_19,
2141}
2142#[repr(C)]
2143#[derive(Debug, Default, Copy, Clone)]
2144pub struct bpf_attr__bindgen_ty_1 {
2145 pub map_type: __u32,
2146 pub key_size: __u32,
2147 pub value_size: __u32,
2148 pub max_entries: __u32,
2149 pub map_flags: __u32,
2150 pub inner_map_fd: __u32,
2151 pub numa_node: __u32,
2152 pub map_name: [::std::os::raw::c_char; 16usize],
2153 pub map_ifindex: __u32,
2154 pub btf_fd: __u32,
2155 pub btf_key_type_id: __u32,
2156 pub btf_value_type_id: __u32,
2157 pub btf_vmlinux_value_type_id: __u32,
2158 pub map_extra: __u64,
2159}
2160#[repr(C)]
2161#[derive(Copy, Clone)]
2162pub struct bpf_attr__bindgen_ty_2 {
2163 pub map_fd: __u32,
2164 pub __bindgen_padding_0: [u8; 4usize],
2165 pub key: __u64,
2166 pub __bindgen_anon_1: bpf_attr__bindgen_ty_2__bindgen_ty_1,
2167 pub flags: __u64,
2168}
2169#[repr(C)]
2170#[derive(Copy, Clone)]
2171pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 {
2172 pub value: __u64,
2173 pub next_key: __u64,
2174}
2175impl Default for bpf_attr__bindgen_ty_2__bindgen_ty_1 {
2176 fn default() -> Self {
2177 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2178 unsafe {
2179 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2180 s.assume_init()
2181 }
2182 }
2183}
2184impl Default for bpf_attr__bindgen_ty_2 {
2185 fn default() -> Self {
2186 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2187 unsafe {
2188 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2189 s.assume_init()
2190 }
2191 }
2192}
2193#[repr(C)]
2194#[derive(Debug, Default, Copy, Clone)]
2195pub struct bpf_attr__bindgen_ty_3 {
2196 pub in_batch: __u64,
2197 pub out_batch: __u64,
2198 pub keys: __u64,
2199 pub values: __u64,
2200 pub count: __u32,
2201 pub map_fd: __u32,
2202 pub elem_flags: __u64,
2203 pub flags: __u64,
2204}
2205#[repr(C)]
2206#[derive(Copy, Clone)]
2207pub struct bpf_attr__bindgen_ty_4 {
2208 pub prog_type: __u32,
2209 pub insn_cnt: __u32,
2210 pub insns: __u64,
2211 pub license: __u64,
2212 pub log_level: __u32,
2213 pub log_size: __u32,
2214 pub log_buf: __u64,
2215 pub kern_version: __u32,
2216 pub prog_flags: __u32,
2217 pub prog_name: [::std::os::raw::c_char; 16usize],
2218 pub prog_ifindex: __u32,
2219 pub expected_attach_type: __u32,
2220 pub prog_btf_fd: __u32,
2221 pub func_info_rec_size: __u32,
2222 pub func_info: __u64,
2223 pub func_info_cnt: __u32,
2224 pub line_info_rec_size: __u32,
2225 pub line_info: __u64,
2226 pub line_info_cnt: __u32,
2227 pub attach_btf_id: __u32,
2228 pub __bindgen_anon_1: bpf_attr__bindgen_ty_4__bindgen_ty_1,
2229 pub core_relo_cnt: __u32,
2230 pub fd_array: __u64,
2231 pub core_relos: __u64,
2232 pub core_relo_rec_size: __u32,
2233 pub __bindgen_padding_0: [u8; 4usize],
2234}
2235#[repr(C)]
2236#[derive(Copy, Clone)]
2237pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 {
2238 pub attach_prog_fd: __u32,
2239 pub attach_btf_obj_fd: __u32,
2240}
2241impl Default for bpf_attr__bindgen_ty_4__bindgen_ty_1 {
2242 fn default() -> Self {
2243 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2244 unsafe {
2245 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2246 s.assume_init()
2247 }
2248 }
2249}
2250impl Default for bpf_attr__bindgen_ty_4 {
2251 fn default() -> Self {
2252 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2253 unsafe {
2254 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2255 s.assume_init()
2256 }
2257 }
2258}
2259#[repr(C)]
2260#[derive(Debug, Default, Copy, Clone)]
2261pub struct bpf_attr__bindgen_ty_5 {
2262 pub pathname: __u64,
2263 pub bpf_fd: __u32,
2264 pub file_flags: __u32,
2265}
2266#[repr(C)]
2267#[derive(Debug, Default, Copy, Clone)]
2268pub struct bpf_attr__bindgen_ty_6 {
2269 pub target_fd: __u32,
2270 pub attach_bpf_fd: __u32,
2271 pub attach_type: __u32,
2272 pub attach_flags: __u32,
2273 pub replace_bpf_fd: __u32,
2274}
2275#[repr(C)]
2276#[derive(Debug, Default, Copy, Clone)]
2277pub struct bpf_attr__bindgen_ty_7 {
2278 pub prog_fd: __u32,
2279 pub retval: __u32,
2280 pub data_size_in: __u32,
2281 pub data_size_out: __u32,
2282 pub data_in: __u64,
2283 pub data_out: __u64,
2284 pub repeat: __u32,
2285 pub duration: __u32,
2286 pub ctx_size_in: __u32,
2287 pub ctx_size_out: __u32,
2288 pub ctx_in: __u64,
2289 pub ctx_out: __u64,
2290 pub flags: __u32,
2291 pub cpu: __u32,
2292 pub batch_size: __u32,
2293 pub __bindgen_padding_0: [u8; 4usize],
2294}
2295#[repr(C)]
2296#[derive(Copy, Clone)]
2297pub struct bpf_attr__bindgen_ty_8 {
2298 pub __bindgen_anon_1: bpf_attr__bindgen_ty_8__bindgen_ty_1,
2299 pub next_id: __u32,
2300 pub open_flags: __u32,
2301}
2302#[repr(C)]
2303#[derive(Copy, Clone)]
2304pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 {
2305 pub start_id: __u32,
2306 pub prog_id: __u32,
2307 pub map_id: __u32,
2308 pub btf_id: __u32,
2309 pub link_id: __u32,
2310}
2311impl Default for bpf_attr__bindgen_ty_8__bindgen_ty_1 {
2312 fn default() -> Self {
2313 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2314 unsafe {
2315 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2316 s.assume_init()
2317 }
2318 }
2319}
2320impl Default for bpf_attr__bindgen_ty_8 {
2321 fn default() -> Self {
2322 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2323 unsafe {
2324 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2325 s.assume_init()
2326 }
2327 }
2328}
2329#[repr(C)]
2330#[derive(Debug, Default, Copy, Clone)]
2331pub struct bpf_attr__bindgen_ty_9 {
2332 pub bpf_fd: __u32,
2333 pub info_len: __u32,
2334 pub info: __u64,
2335}
2336#[repr(C)]
2337#[derive(Debug, Default, Copy, Clone)]
2338pub struct bpf_attr__bindgen_ty_10 {
2339 pub target_fd: __u32,
2340 pub attach_type: __u32,
2341 pub query_flags: __u32,
2342 pub attach_flags: __u32,
2343 pub prog_ids: __u64,
2344 pub prog_cnt: __u32,
2345 pub __bindgen_padding_0: [u8; 4usize],
2346 pub prog_attach_flags: __u64,
2347}
2348#[repr(C)]
2349#[derive(Debug, Default, Copy, Clone)]
2350pub struct bpf_attr__bindgen_ty_11 {
2351 pub name: __u64,
2352 pub prog_fd: __u32,
2353 pub __bindgen_padding_0: [u8; 4usize],
2354}
2355#[repr(C)]
2356#[derive(Debug, Default, Copy, Clone)]
2357pub struct bpf_attr__bindgen_ty_12 {
2358 pub btf: __u64,
2359 pub btf_log_buf: __u64,
2360 pub btf_size: __u32,
2361 pub btf_log_size: __u32,
2362 pub btf_log_level: __u32,
2363 pub __bindgen_padding_0: [u8; 4usize],
2364}
2365#[repr(C)]
2366#[derive(Debug, Default, Copy, Clone)]
2367pub struct bpf_attr__bindgen_ty_13 {
2368 pub pid: __u32,
2369 pub fd: __u32,
2370 pub flags: __u32,
2371 pub buf_len: __u32,
2372 pub buf: __u64,
2373 pub prog_id: __u32,
2374 pub fd_type: __u32,
2375 pub probe_offset: __u64,
2376 pub probe_addr: __u64,
2377}
2378#[repr(C)]
2379#[derive(Copy, Clone)]
2380pub struct bpf_attr__bindgen_ty_14 {
2381 pub prog_fd: __u32,
2382 pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1,
2383 pub attach_type: __u32,
2384 pub flags: __u32,
2385 pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2,
2386}
2387#[repr(C)]
2388#[derive(Copy, Clone)]
2389pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 {
2390 pub target_fd: __u32,
2391 pub target_ifindex: __u32,
2392}
2393impl Default for bpf_attr__bindgen_ty_14__bindgen_ty_1 {
2394 fn default() -> Self {
2395 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2396 unsafe {
2397 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2398 s.assume_init()
2399 }
2400 }
2401}
2402#[repr(C)]
2403#[derive(Copy, Clone)]
2404pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 {
2405 pub target_btf_id: __u32,
2406 pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1,
2407 pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2,
2408 pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3,
2409 pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4,
2410}
2411#[repr(C)]
2412#[derive(Debug, Default, Copy, Clone)]
2413pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1 {
2414 pub iter_info: __u64,
2415 pub iter_info_len: __u32,
2416 pub __bindgen_padding_0: [u8; 4usize],
2417}
2418#[repr(C)]
2419#[derive(Debug, Default, Copy, Clone)]
2420pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2 {
2421 pub bpf_cookie: __u64,
2422}
2423#[repr(C)]
2424#[derive(Debug, Default, Copy, Clone)]
2425pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3 {
2426 pub flags: __u32,
2427 pub cnt: __u32,
2428 pub syms: __u64,
2429 pub addrs: __u64,
2430 pub cookies: __u64,
2431}
2432#[repr(C)]
2433#[derive(Debug, Default, Copy, Clone)]
2434pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4 {
2435 pub target_btf_id: __u32,
2436 pub __bindgen_padding_0: [u8; 4usize],
2437 pub cookie: __u64,
2438}
2439impl Default for bpf_attr__bindgen_ty_14__bindgen_ty_2 {
2440 fn default() -> Self {
2441 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2442 unsafe {
2443 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2444 s.assume_init()
2445 }
2446 }
2447}
2448impl Default for bpf_attr__bindgen_ty_14 {
2449 fn default() -> Self {
2450 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2451 unsafe {
2452 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2453 s.assume_init()
2454 }
2455 }
2456}
2457#[repr(C)]
2458#[derive(Debug, Default, Copy, Clone)]
2459pub struct bpf_attr__bindgen_ty_15 {
2460 pub link_fd: __u32,
2461 pub new_prog_fd: __u32,
2462 pub flags: __u32,
2463 pub old_prog_fd: __u32,
2464}
2465#[repr(C)]
2466#[derive(Debug, Default, Copy, Clone)]
2467pub struct bpf_attr__bindgen_ty_16 {
2468 pub link_fd: __u32,
2469}
2470#[repr(C)]
2471#[derive(Debug, Default, Copy, Clone)]
2472pub struct bpf_attr__bindgen_ty_17 {
2473 pub type_: __u32,
2474}
2475#[repr(C)]
2476#[derive(Debug, Default, Copy, Clone)]
2477pub struct bpf_attr__bindgen_ty_18 {
2478 pub link_fd: __u32,
2479 pub flags: __u32,
2480}
2481#[repr(C)]
2482#[derive(Debug, Default, Copy, Clone)]
2483pub struct bpf_attr__bindgen_ty_19 {
2484 pub prog_fd: __u32,
2485 pub map_fd: __u32,
2486 pub flags: __u32,
2487}
2488impl Default for bpf_attr {
2489 fn default() -> Self {
2490 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2491 unsafe {
2492 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2493 s.assume_init()
2494 }
2495 }
2496}
2497pub const BPF_FUNC_unspec: bpf_func_id = 0;
2498pub const BPF_FUNC_map_lookup_elem: bpf_func_id = 1;
2499pub const BPF_FUNC_map_update_elem: bpf_func_id = 2;
2500pub const BPF_FUNC_map_delete_elem: bpf_func_id = 3;
2501pub const BPF_FUNC_probe_read: bpf_func_id = 4;
2502pub const BPF_FUNC_ktime_get_ns: bpf_func_id = 5;
2503pub const BPF_FUNC_trace_printk: bpf_func_id = 6;
2504pub const BPF_FUNC_get_prandom_u32: bpf_func_id = 7;
2505pub const BPF_FUNC_get_smp_processor_id: bpf_func_id = 8;
2506pub const BPF_FUNC_skb_store_bytes: bpf_func_id = 9;
2507pub const BPF_FUNC_l3_csum_replace: bpf_func_id = 10;
2508pub const BPF_FUNC_l4_csum_replace: bpf_func_id = 11;
2509pub const BPF_FUNC_tail_call: bpf_func_id = 12;
2510pub const BPF_FUNC_clone_redirect: bpf_func_id = 13;
2511pub const BPF_FUNC_get_current_pid_tgid: bpf_func_id = 14;
2512pub const BPF_FUNC_get_current_uid_gid: bpf_func_id = 15;
2513pub const BPF_FUNC_get_current_comm: bpf_func_id = 16;
2514pub const BPF_FUNC_get_cgroup_classid: bpf_func_id = 17;
2515pub const BPF_FUNC_skb_vlan_push: bpf_func_id = 18;
2516pub const BPF_FUNC_skb_vlan_pop: bpf_func_id = 19;
2517pub const BPF_FUNC_skb_get_tunnel_key: bpf_func_id = 20;
2518pub const BPF_FUNC_skb_set_tunnel_key: bpf_func_id = 21;
2519pub const BPF_FUNC_perf_event_read: bpf_func_id = 22;
2520pub const BPF_FUNC_redirect: bpf_func_id = 23;
2521pub const BPF_FUNC_get_route_realm: bpf_func_id = 24;
2522pub const BPF_FUNC_perf_event_output: bpf_func_id = 25;
2523pub const BPF_FUNC_skb_load_bytes: bpf_func_id = 26;
2524pub const BPF_FUNC_get_stackid: bpf_func_id = 27;
2525pub const BPF_FUNC_csum_diff: bpf_func_id = 28;
2526pub const BPF_FUNC_skb_get_tunnel_opt: bpf_func_id = 29;
2527pub const BPF_FUNC_skb_set_tunnel_opt: bpf_func_id = 30;
2528pub const BPF_FUNC_skb_change_proto: bpf_func_id = 31;
2529pub const BPF_FUNC_skb_change_type: bpf_func_id = 32;
2530pub const BPF_FUNC_skb_under_cgroup: bpf_func_id = 33;
2531pub const BPF_FUNC_get_hash_recalc: bpf_func_id = 34;
2532pub const BPF_FUNC_get_current_task: bpf_func_id = 35;
2533pub const BPF_FUNC_probe_write_user: bpf_func_id = 36;
2534pub const BPF_FUNC_current_task_under_cgroup: bpf_func_id = 37;
2535pub const BPF_FUNC_skb_change_tail: bpf_func_id = 38;
2536pub const BPF_FUNC_skb_pull_data: bpf_func_id = 39;
2537pub const BPF_FUNC_csum_update: bpf_func_id = 40;
2538pub const BPF_FUNC_set_hash_invalid: bpf_func_id = 41;
2539pub const BPF_FUNC_get_numa_node_id: bpf_func_id = 42;
2540pub const BPF_FUNC_skb_change_head: bpf_func_id = 43;
2541pub const BPF_FUNC_xdp_adjust_head: bpf_func_id = 44;
2542pub const BPF_FUNC_probe_read_str: bpf_func_id = 45;
2543pub const BPF_FUNC_get_socket_cookie: bpf_func_id = 46;
2544pub const BPF_FUNC_get_socket_uid: bpf_func_id = 47;
2545pub const BPF_FUNC_set_hash: bpf_func_id = 48;
2546pub const BPF_FUNC_setsockopt: bpf_func_id = 49;
2547pub const BPF_FUNC_skb_adjust_room: bpf_func_id = 50;
2548pub const BPF_FUNC_redirect_map: bpf_func_id = 51;
2549pub const BPF_FUNC_sk_redirect_map: bpf_func_id = 52;
2550pub const BPF_FUNC_sock_map_update: bpf_func_id = 53;
2551pub const BPF_FUNC_xdp_adjust_meta: bpf_func_id = 54;
2552pub const BPF_FUNC_perf_event_read_value: bpf_func_id = 55;
2553pub const BPF_FUNC_perf_prog_read_value: bpf_func_id = 56;
2554pub const BPF_FUNC_getsockopt: bpf_func_id = 57;
2555pub const BPF_FUNC_override_return: bpf_func_id = 58;
2556pub const BPF_FUNC_sock_ops_cb_flags_set: bpf_func_id = 59;
2557pub const BPF_FUNC_msg_redirect_map: bpf_func_id = 60;
2558pub const BPF_FUNC_msg_apply_bytes: bpf_func_id = 61;
2559pub const BPF_FUNC_msg_cork_bytes: bpf_func_id = 62;
2560pub const BPF_FUNC_msg_pull_data: bpf_func_id = 63;
2561pub const BPF_FUNC_bind: bpf_func_id = 64;
2562pub const BPF_FUNC_xdp_adjust_tail: bpf_func_id = 65;
2563pub const BPF_FUNC_skb_get_xfrm_state: bpf_func_id = 66;
2564pub const BPF_FUNC_get_stack: bpf_func_id = 67;
2565pub const BPF_FUNC_skb_load_bytes_relative: bpf_func_id = 68;
2566pub const BPF_FUNC_fib_lookup: bpf_func_id = 69;
2567pub const BPF_FUNC_sock_hash_update: bpf_func_id = 70;
2568pub const BPF_FUNC_msg_redirect_hash: bpf_func_id = 71;
2569pub const BPF_FUNC_sk_redirect_hash: bpf_func_id = 72;
2570pub const BPF_FUNC_lwt_push_encap: bpf_func_id = 73;
2571pub const BPF_FUNC_lwt_seg6_store_bytes: bpf_func_id = 74;
2572pub const BPF_FUNC_lwt_seg6_adjust_srh: bpf_func_id = 75;
2573pub const BPF_FUNC_lwt_seg6_action: bpf_func_id = 76;
2574pub const BPF_FUNC_rc_repeat: bpf_func_id = 77;
2575pub const BPF_FUNC_rc_keydown: bpf_func_id = 78;
2576pub const BPF_FUNC_skb_cgroup_id: bpf_func_id = 79;
2577pub const BPF_FUNC_get_current_cgroup_id: bpf_func_id = 80;
2578pub const BPF_FUNC_get_local_storage: bpf_func_id = 81;
2579pub const BPF_FUNC_sk_select_reuseport: bpf_func_id = 82;
2580pub const BPF_FUNC_skb_ancestor_cgroup_id: bpf_func_id = 83;
2581pub const BPF_FUNC_sk_lookup_tcp: bpf_func_id = 84;
2582pub const BPF_FUNC_sk_lookup_udp: bpf_func_id = 85;
2583pub const BPF_FUNC_sk_release: bpf_func_id = 86;
2584pub const BPF_FUNC_map_push_elem: bpf_func_id = 87;
2585pub const BPF_FUNC_map_pop_elem: bpf_func_id = 88;
2586pub const BPF_FUNC_map_peek_elem: bpf_func_id = 89;
2587pub const BPF_FUNC_msg_push_data: bpf_func_id = 90;
2588pub const BPF_FUNC_msg_pop_data: bpf_func_id = 91;
2589pub const BPF_FUNC_rc_pointer_rel: bpf_func_id = 92;
2590pub const BPF_FUNC_spin_lock: bpf_func_id = 93;
2591pub const BPF_FUNC_spin_unlock: bpf_func_id = 94;
2592pub const BPF_FUNC_sk_fullsock: bpf_func_id = 95;
2593pub const BPF_FUNC_tcp_sock: bpf_func_id = 96;
2594pub const BPF_FUNC_skb_ecn_set_ce: bpf_func_id = 97;
2595pub const BPF_FUNC_get_listener_sock: bpf_func_id = 98;
2596pub const BPF_FUNC_skc_lookup_tcp: bpf_func_id = 99;
2597pub const BPF_FUNC_tcp_check_syncookie: bpf_func_id = 100;
2598pub const BPF_FUNC_sysctl_get_name: bpf_func_id = 101;
2599pub const BPF_FUNC_sysctl_get_current_value: bpf_func_id = 102;
2600pub const BPF_FUNC_sysctl_get_new_value: bpf_func_id = 103;
2601pub const BPF_FUNC_sysctl_set_new_value: bpf_func_id = 104;
2602pub const BPF_FUNC_strtol: bpf_func_id = 105;
2603pub const BPF_FUNC_strtoul: bpf_func_id = 106;
2604pub const BPF_FUNC_sk_storage_get: bpf_func_id = 107;
2605pub const BPF_FUNC_sk_storage_delete: bpf_func_id = 108;
2606pub const BPF_FUNC_send_signal: bpf_func_id = 109;
2607pub const BPF_FUNC_tcp_gen_syncookie: bpf_func_id = 110;
2608pub const BPF_FUNC_skb_output: bpf_func_id = 111;
2609pub const BPF_FUNC_probe_read_user: bpf_func_id = 112;
2610pub const BPF_FUNC_probe_read_kernel: bpf_func_id = 113;
2611pub const BPF_FUNC_probe_read_user_str: bpf_func_id = 114;
2612pub const BPF_FUNC_probe_read_kernel_str: bpf_func_id = 115;
2613pub const BPF_FUNC_tcp_send_ack: bpf_func_id = 116;
2614pub const BPF_FUNC_send_signal_thread: bpf_func_id = 117;
2615pub const BPF_FUNC_jiffies64: bpf_func_id = 118;
2616pub const BPF_FUNC_read_branch_records: bpf_func_id = 119;
2617pub const BPF_FUNC_get_ns_current_pid_tgid: bpf_func_id = 120;
2618pub const BPF_FUNC_xdp_output: bpf_func_id = 121;
2619pub const BPF_FUNC_get_netns_cookie: bpf_func_id = 122;
2620pub const BPF_FUNC_get_current_ancestor_cgroup_id: bpf_func_id = 123;
2621pub const BPF_FUNC_sk_assign: bpf_func_id = 124;
2622pub const BPF_FUNC_ktime_get_boot_ns: bpf_func_id = 125;
2623pub const BPF_FUNC_seq_printf: bpf_func_id = 126;
2624pub const BPF_FUNC_seq_write: bpf_func_id = 127;
2625pub const BPF_FUNC_sk_cgroup_id: bpf_func_id = 128;
2626pub const BPF_FUNC_sk_ancestor_cgroup_id: bpf_func_id = 129;
2627pub const BPF_FUNC_ringbuf_output: bpf_func_id = 130;
2628pub const BPF_FUNC_ringbuf_reserve: bpf_func_id = 131;
2629pub const BPF_FUNC_ringbuf_submit: bpf_func_id = 132;
2630pub const BPF_FUNC_ringbuf_discard: bpf_func_id = 133;
2631pub const BPF_FUNC_ringbuf_query: bpf_func_id = 134;
2632pub const BPF_FUNC_csum_level: bpf_func_id = 135;
2633pub const BPF_FUNC_skc_to_tcp6_sock: bpf_func_id = 136;
2634pub const BPF_FUNC_skc_to_tcp_sock: bpf_func_id = 137;
2635pub const BPF_FUNC_skc_to_tcp_timewait_sock: bpf_func_id = 138;
2636pub const BPF_FUNC_skc_to_tcp_request_sock: bpf_func_id = 139;
2637pub const BPF_FUNC_skc_to_udp6_sock: bpf_func_id = 140;
2638pub const BPF_FUNC_get_task_stack: bpf_func_id = 141;
2639pub const BPF_FUNC_load_hdr_opt: bpf_func_id = 142;
2640pub const BPF_FUNC_store_hdr_opt: bpf_func_id = 143;
2641pub const BPF_FUNC_reserve_hdr_opt: bpf_func_id = 144;
2642pub const BPF_FUNC_inode_storage_get: bpf_func_id = 145;
2643pub const BPF_FUNC_inode_storage_delete: bpf_func_id = 146;
2644pub const BPF_FUNC_d_path: bpf_func_id = 147;
2645pub const BPF_FUNC_copy_from_user: bpf_func_id = 148;
2646pub const BPF_FUNC_snprintf_btf: bpf_func_id = 149;
2647pub const BPF_FUNC_seq_printf_btf: bpf_func_id = 150;
2648pub const BPF_FUNC_skb_cgroup_classid: bpf_func_id = 151;
2649pub const BPF_FUNC_redirect_neigh: bpf_func_id = 152;
2650pub const BPF_FUNC_per_cpu_ptr: bpf_func_id = 153;
2651pub const BPF_FUNC_this_cpu_ptr: bpf_func_id = 154;
2652pub const BPF_FUNC_redirect_peer: bpf_func_id = 155;
2653pub const BPF_FUNC_task_storage_get: bpf_func_id = 156;
2654pub const BPF_FUNC_task_storage_delete: bpf_func_id = 157;
2655pub const BPF_FUNC_get_current_task_btf: bpf_func_id = 158;
2656pub const BPF_FUNC_bprm_opts_set: bpf_func_id = 159;
2657pub const BPF_FUNC_ktime_get_coarse_ns: bpf_func_id = 160;
2658pub const BPF_FUNC_ima_inode_hash: bpf_func_id = 161;
2659pub const BPF_FUNC_sock_from_file: bpf_func_id = 162;
2660pub const BPF_FUNC_check_mtu: bpf_func_id = 163;
2661pub const BPF_FUNC_for_each_map_elem: bpf_func_id = 164;
2662pub const BPF_FUNC_snprintf: bpf_func_id = 165;
2663pub const BPF_FUNC_sys_bpf: bpf_func_id = 166;
2664pub const BPF_FUNC_btf_find_by_name_kind: bpf_func_id = 167;
2665pub const BPF_FUNC_sys_close: bpf_func_id = 168;
2666pub const BPF_FUNC_timer_init: bpf_func_id = 169;
2667pub const BPF_FUNC_timer_set_callback: bpf_func_id = 170;
2668pub const BPF_FUNC_timer_start: bpf_func_id = 171;
2669pub const BPF_FUNC_timer_cancel: bpf_func_id = 172;
2670pub const BPF_FUNC_get_func_ip: bpf_func_id = 173;
2671pub const BPF_FUNC_get_attach_cookie: bpf_func_id = 174;
2672pub const BPF_FUNC_task_pt_regs: bpf_func_id = 175;
2673pub const BPF_FUNC_get_branch_snapshot: bpf_func_id = 176;
2674pub const BPF_FUNC_trace_vprintk: bpf_func_id = 177;
2675pub const BPF_FUNC_skc_to_unix_sock: bpf_func_id = 178;
2676pub const BPF_FUNC_kallsyms_lookup_name: bpf_func_id = 179;
2677pub const BPF_FUNC_find_vma: bpf_func_id = 180;
2678pub const BPF_FUNC_loop: bpf_func_id = 181;
2679pub const BPF_FUNC_strncmp: bpf_func_id = 182;
2680pub const BPF_FUNC_get_func_arg: bpf_func_id = 183;
2681pub const BPF_FUNC_get_func_ret: bpf_func_id = 184;
2682pub const BPF_FUNC_get_func_arg_cnt: bpf_func_id = 185;
2683pub const BPF_FUNC_get_retval: bpf_func_id = 186;
2684pub const BPF_FUNC_set_retval: bpf_func_id = 187;
2685pub const BPF_FUNC_xdp_get_buff_len: bpf_func_id = 188;
2686pub const BPF_FUNC_xdp_load_bytes: bpf_func_id = 189;
2687pub const BPF_FUNC_xdp_store_bytes: bpf_func_id = 190;
2688pub const BPF_FUNC_copy_from_user_task: bpf_func_id = 191;
2689pub const BPF_FUNC_skb_set_tstamp: bpf_func_id = 192;
2690pub const BPF_FUNC_ima_file_hash: bpf_func_id = 193;
2691pub const BPF_FUNC_kptr_xchg: bpf_func_id = 194;
2692pub const BPF_FUNC_map_lookup_percpu_elem: bpf_func_id = 195;
2693pub const BPF_FUNC_skc_to_mptcp_sock: bpf_func_id = 196;
2694pub const BPF_FUNC_dynptr_from_mem: bpf_func_id = 197;
2695pub const BPF_FUNC_ringbuf_reserve_dynptr: bpf_func_id = 198;
2696pub const BPF_FUNC_ringbuf_submit_dynptr: bpf_func_id = 199;
2697pub const BPF_FUNC_ringbuf_discard_dynptr: bpf_func_id = 200;
2698pub const BPF_FUNC_dynptr_read: bpf_func_id = 201;
2699pub const BPF_FUNC_dynptr_write: bpf_func_id = 202;
2700pub const BPF_FUNC_dynptr_data: bpf_func_id = 203;
2701pub const BPF_FUNC_tcp_raw_gen_syncookie_ipv4: bpf_func_id = 204;
2702pub const BPF_FUNC_tcp_raw_gen_syncookie_ipv6: bpf_func_id = 205;
2703pub const BPF_FUNC_tcp_raw_check_syncookie_ipv4: bpf_func_id = 206;
2704pub const BPF_FUNC_tcp_raw_check_syncookie_ipv6: bpf_func_id = 207;
2705pub const BPF_FUNC_ktime_get_tai_ns: bpf_func_id = 208;
2706pub const __BPF_FUNC_MAX_ID: bpf_func_id = 209;
2707pub type bpf_func_id = ::std::os::raw::c_uint;
2708pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_54 = 1;
2709pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_54 = 2;
2710pub type _bindgen_ty_54 = ::std::os::raw::c_uint;
2711pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_55 = 15;
2712pub type _bindgen_ty_55 = ::std::os::raw::c_uint;
2713pub const BPF_F_PSEUDO_HDR: _bindgen_ty_56 = 16;
2714pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_56 = 32;
2715pub const BPF_F_MARK_ENFORCE: _bindgen_ty_56 = 64;
2716pub type _bindgen_ty_56 = ::std::os::raw::c_uint;
2717pub const BPF_F_INGRESS: _bindgen_ty_57 = 1;
2718pub type _bindgen_ty_57 = ::std::os::raw::c_uint;
2719pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_58 = 1;
2720pub type _bindgen_ty_58 = ::std::os::raw::c_uint;
2721pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_59 = 255;
2722pub const BPF_F_USER_STACK: _bindgen_ty_59 = 256;
2723pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_59 = 512;
2724pub const BPF_F_REUSE_STACKID: _bindgen_ty_59 = 1024;
2725pub const BPF_F_USER_BUILD_ID: _bindgen_ty_59 = 2048;
2726pub type _bindgen_ty_59 = ::std::os::raw::c_uint;
2727pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_60 = 2;
2728pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_60 = 4;
2729pub const BPF_F_SEQ_NUMBER: _bindgen_ty_60 = 8;
2730pub type _bindgen_ty_60 = ::std::os::raw::c_uint;
2731pub const BPF_F_INDEX_MASK: _bindgen_ty_61 = 4294967295;
2732pub const BPF_F_CURRENT_CPU: _bindgen_ty_61 = 4294967295;
2733pub const BPF_F_CTXLEN_MASK: _bindgen_ty_61 = 4503595332403200;
2734pub type _bindgen_ty_61 = ::std::os::raw::c_ulong;
2735pub const BPF_F_CURRENT_NETNS: _bindgen_ty_62 = -1;
2736pub type _bindgen_ty_62 = ::std::os::raw::c_int;
2737pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_63 = 0;
2738pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_63 = 1;
2739pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_63 = 2;
2740pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_63 = 3;
2741pub type _bindgen_ty_63 = ::std::os::raw::c_uint;
2742pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_64 = 1;
2743pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_64 = 2;
2744pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_64 = 4;
2745pub const BPF_F_ADJ_ROOM_ENCAP_L4_GRE: _bindgen_ty_64 = 8;
2746pub const BPF_F_ADJ_ROOM_ENCAP_L4_UDP: _bindgen_ty_64 = 16;
2747pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_64 = 32;
2748pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_64 = 64;
2749pub type _bindgen_ty_64 = ::std::os::raw::c_uint;
2750pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_65 = 255;
2751pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_65 = 56;
2752pub type _bindgen_ty_65 = ::std::os::raw::c_uint;
2753pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_66 = 1;
2754pub type _bindgen_ty_66 = ::std::os::raw::c_uint;
2755pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_67 = 1;
2756pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_67 = 1;
2757pub type _bindgen_ty_67 = ::std::os::raw::c_uint;
2758pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_68 = 1;
2759pub type _bindgen_ty_68 = ::std::os::raw::c_uint;
2760pub const BPF_RB_NO_WAKEUP: _bindgen_ty_69 = 1;
2761pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_69 = 2;
2762pub type _bindgen_ty_69 = ::std::os::raw::c_uint;
2763pub const BPF_RB_AVAIL_DATA: _bindgen_ty_70 = 0;
2764pub const BPF_RB_RING_SIZE: _bindgen_ty_70 = 1;
2765pub const BPF_RB_CONS_POS: _bindgen_ty_70 = 2;
2766pub const BPF_RB_PROD_POS: _bindgen_ty_70 = 3;
2767pub type _bindgen_ty_70 = ::std::os::raw::c_uint;
2768pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_71 = 2147483648;
2769pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_71 = 1073741824;
2770pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_71 = 8;
2771pub type _bindgen_ty_71 = ::std::os::raw::c_uint;
2772pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_72 = 1;
2773pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_72 = 2;
2774pub type _bindgen_ty_72 = ::std::os::raw::c_uint;
2775pub const BPF_ADJ_ROOM_NET: bpf_adj_room_mode = 0;
2776pub const BPF_ADJ_ROOM_MAC: bpf_adj_room_mode = 1;
2777pub type bpf_adj_room_mode = ::std::os::raw::c_uint;
2778pub const BPF_HDR_START_MAC: bpf_hdr_start_off = 0;
2779pub const BPF_HDR_START_NET: bpf_hdr_start_off = 1;
2780pub type bpf_hdr_start_off = ::std::os::raw::c_uint;
2781pub const BPF_LWT_ENCAP_SEG6: bpf_lwt_encap_mode = 0;
2782pub const BPF_LWT_ENCAP_SEG6_INLINE: bpf_lwt_encap_mode = 1;
2783pub const BPF_LWT_ENCAP_IP: bpf_lwt_encap_mode = 2;
2784pub type bpf_lwt_encap_mode = ::std::os::raw::c_uint;
2785pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_73 = 1;
2786pub type _bindgen_ty_73 = ::std::os::raw::c_uint;
2787pub const BPF_F_BROADCAST: _bindgen_ty_74 = 8;
2788pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_74 = 16;
2789pub type _bindgen_ty_74 = ::std::os::raw::c_uint;
2790pub const BPF_SKB_TSTAMP_UNSPEC: _bindgen_ty_75 = 0;
2791pub const BPF_SKB_TSTAMP_DELIVERY_MONO: _bindgen_ty_75 = 1;
2792pub type _bindgen_ty_75 = ::std::os::raw::c_uint;
2793#[repr(C)]
2794#[derive(Copy, Clone)]
2795pub struct bpf_tunnel_key {
2796 pub tunnel_id: __u32,
2797 pub __bindgen_anon_1: bpf_tunnel_key__bindgen_ty_1,
2798 pub tunnel_tos: __u8,
2799 pub tunnel_ttl: __u8,
2800 pub tunnel_ext: __u16,
2801 pub tunnel_label: __u32,
2802 pub __bindgen_anon_2: bpf_tunnel_key__bindgen_ty_2,
2803}
2804#[repr(C)]
2805#[derive(Copy, Clone)]
2806pub union bpf_tunnel_key__bindgen_ty_1 {
2807 pub remote_ipv4: __u32,
2808 pub remote_ipv6: [__u32; 4usize],
2809}
2810impl Default for bpf_tunnel_key__bindgen_ty_1 {
2811 fn default() -> Self {
2812 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2813 unsafe {
2814 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2815 s.assume_init()
2816 }
2817 }
2818}
2819#[repr(C)]
2820#[derive(Copy, Clone)]
2821pub union bpf_tunnel_key__bindgen_ty_2 {
2822 pub local_ipv4: __u32,
2823 pub local_ipv6: [__u32; 4usize],
2824}
2825impl Default for bpf_tunnel_key__bindgen_ty_2 {
2826 fn default() -> Self {
2827 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2828 unsafe {
2829 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2830 s.assume_init()
2831 }
2832 }
2833}
2834impl Default for bpf_tunnel_key {
2835 fn default() -> Self {
2836 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2837 unsafe {
2838 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2839 s.assume_init()
2840 }
2841 }
2842}
2843#[repr(C)]
2844#[derive(Copy, Clone)]
2845pub struct bpf_xfrm_state {
2846 pub reqid: __u32,
2847 pub spi: __u32,
2848 pub family: __u16,
2849 pub ext: __u16,
2850 pub __bindgen_anon_1: bpf_xfrm_state__bindgen_ty_1,
2851}
2852#[repr(C)]
2853#[derive(Copy, Clone)]
2854pub union bpf_xfrm_state__bindgen_ty_1 {
2855 pub remote_ipv4: __u32,
2856 pub remote_ipv6: [__u32; 4usize],
2857}
2858impl Default for bpf_xfrm_state__bindgen_ty_1 {
2859 fn default() -> Self {
2860 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2861 unsafe {
2862 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2863 s.assume_init()
2864 }
2865 }
2866}
2867impl Default for bpf_xfrm_state {
2868 fn default() -> Self {
2869 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2870 unsafe {
2871 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2872 s.assume_init()
2873 }
2874 }
2875}
2876pub const BPF_OK: bpf_ret_code = 0;
2877pub const BPF_DROP: bpf_ret_code = 2;
2878pub const BPF_REDIRECT: bpf_ret_code = 7;
2879pub const BPF_LWT_REROUTE: bpf_ret_code = 128;
2880pub type bpf_ret_code = ::std::os::raw::c_uint;
2881#[repr(C)]
2882#[derive(Debug, Default, Copy, Clone)]
2883pub struct bpf_sock {
2884 pub bound_dev_if: __u32,
2885 pub family: __u32,
2886 pub type_: __u32,
2887 pub protocol: __u32,
2888 pub mark: __u32,
2889 pub priority: __u32,
2890 pub src_ip4: __u32,
2891 pub src_ip6: [__u32; 4usize],
2892 pub src_port: __u32,
2893 pub dst_port: __be16,
2894 pub _bitfield_align_1: [u8; 0],
2895 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
2896 pub dst_ip4: __u32,
2897 pub dst_ip6: [__u32; 4usize],
2898 pub state: __u32,
2899 pub rx_queue_mapping: __s32,
2900}
2901impl bpf_sock {
2902 #[inline]
2903 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> {
2904 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
2905 __bindgen_bitfield_unit
2906 }
2907}
2908#[repr(C)]
2909#[derive(Debug, Default, Copy, Clone)]
2910pub struct bpf_tcp_sock {
2911 pub snd_cwnd: __u32,
2912 pub srtt_us: __u32,
2913 pub rtt_min: __u32,
2914 pub snd_ssthresh: __u32,
2915 pub rcv_nxt: __u32,
2916 pub snd_nxt: __u32,
2917 pub snd_una: __u32,
2918 pub mss_cache: __u32,
2919 pub ecn_flags: __u32,
2920 pub rate_delivered: __u32,
2921 pub rate_interval_us: __u32,
2922 pub packets_out: __u32,
2923 pub retrans_out: __u32,
2924 pub total_retrans: __u32,
2925 pub segs_in: __u32,
2926 pub data_segs_in: __u32,
2927 pub segs_out: __u32,
2928 pub data_segs_out: __u32,
2929 pub lost_out: __u32,
2930 pub sacked_out: __u32,
2931 pub bytes_received: __u64,
2932 pub bytes_acked: __u64,
2933 pub dsack_dups: __u32,
2934 pub delivered: __u32,
2935 pub delivered_ce: __u32,
2936 pub icsk_retransmits: __u32,
2937}
2938#[repr(C)]
2939#[derive(Copy, Clone)]
2940pub struct bpf_sock_tuple {
2941 pub __bindgen_anon_1: bpf_sock_tuple__bindgen_ty_1,
2942}
2943#[repr(C)]
2944#[derive(Copy, Clone)]
2945pub union bpf_sock_tuple__bindgen_ty_1 {
2946 pub ipv4: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1,
2947 pub ipv6: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2,
2948}
2949#[repr(C)]
2950#[derive(Debug, Default, Copy, Clone)]
2951pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 {
2952 pub saddr: __be32,
2953 pub daddr: __be32,
2954 pub sport: __be16,
2955 pub dport: __be16,
2956}
2957#[repr(C)]
2958#[derive(Debug, Default, Copy, Clone)]
2959pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 {
2960 pub saddr: [__be32; 4usize],
2961 pub daddr: [__be32; 4usize],
2962 pub sport: __be16,
2963 pub dport: __be16,
2964}
2965impl Default for bpf_sock_tuple__bindgen_ty_1 {
2966 fn default() -> Self {
2967 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2968 unsafe {
2969 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2970 s.assume_init()
2971 }
2972 }
2973}
2974impl Default for bpf_sock_tuple {
2975 fn default() -> Self {
2976 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2977 unsafe {
2978 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2979 s.assume_init()
2980 }
2981 }
2982}
2983#[repr(C)]
2984#[derive(Debug, Default, Copy, Clone)]
2985pub struct bpf_xdp_sock {
2986 pub queue_id: __u32,
2987}
2988pub const XDP_ABORTED: xdp_action = 0;
2989pub const XDP_DROP: xdp_action = 1;
2990pub const XDP_PASS: xdp_action = 2;
2991pub const XDP_TX: xdp_action = 3;
2992pub const XDP_REDIRECT: xdp_action = 4;
2993pub type xdp_action = ::std::os::raw::c_uint;
2994#[repr(C)]
2995#[derive(Debug, Default, Copy, Clone)]
2996pub struct xdp_md {
2997 pub data: __u32,
2998 pub data_end: __u32,
2999 pub data_meta: __u32,
3000 pub ingress_ifindex: __u32,
3001 pub rx_queue_index: __u32,
3002 pub egress_ifindex: __u32,
3003}
3004#[repr(C)]
3005#[derive(Copy, Clone)]
3006pub struct bpf_devmap_val {
3007 pub ifindex: __u32,
3008 pub bpf_prog: bpf_devmap_val__bindgen_ty_1,
3009}
3010#[repr(C)]
3011#[derive(Copy, Clone)]
3012pub union bpf_devmap_val__bindgen_ty_1 {
3013 pub fd: ::std::os::raw::c_int,
3014 pub id: __u32,
3015}
3016impl Default for bpf_devmap_val__bindgen_ty_1 {
3017 fn default() -> Self {
3018 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3019 unsafe {
3020 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3021 s.assume_init()
3022 }
3023 }
3024}
3025impl Default for bpf_devmap_val {
3026 fn default() -> Self {
3027 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3028 unsafe {
3029 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3030 s.assume_init()
3031 }
3032 }
3033}
3034#[repr(C)]
3035#[derive(Copy, Clone)]
3036pub struct bpf_cpumap_val {
3037 pub qsize: __u32,
3038 pub bpf_prog: bpf_cpumap_val__bindgen_ty_1,
3039}
3040#[repr(C)]
3041#[derive(Copy, Clone)]
3042pub union bpf_cpumap_val__bindgen_ty_1 {
3043 pub fd: ::std::os::raw::c_int,
3044 pub id: __u32,
3045}
3046impl Default for bpf_cpumap_val__bindgen_ty_1 {
3047 fn default() -> Self {
3048 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3049 unsafe {
3050 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3051 s.assume_init()
3052 }
3053 }
3054}
3055impl Default for bpf_cpumap_val {
3056 fn default() -> Self {
3057 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3058 unsafe {
3059 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3060 s.assume_init()
3061 }
3062 }
3063}
3064#[repr(C)]
3065#[derive(Debug, Default, Copy, Clone)]
3066pub struct bpf_prog_info {
3067 pub type_: __u32,
3068 pub id: __u32,
3069 pub tag: [__u8; 8usize],
3070 pub jited_prog_len: __u32,
3071 pub xlated_prog_len: __u32,
3072 pub jited_prog_insns: __u64,
3073 pub xlated_prog_insns: __u64,
3074 pub load_time: __u64,
3075 pub created_by_uid: __u32,
3076 pub nr_map_ids: __u32,
3077 pub map_ids: __u64,
3078 pub name: [::std::os::raw::c_char; 16usize],
3079 pub ifindex: __u32,
3080 pub _bitfield_align_1: [u8; 0],
3081 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
3082 pub netns_dev: __u64,
3083 pub netns_ino: __u64,
3084 pub nr_jited_ksyms: __u32,
3085 pub nr_jited_func_lens: __u32,
3086 pub jited_ksyms: __u64,
3087 pub jited_func_lens: __u64,
3088 pub btf_id: __u32,
3089 pub func_info_rec_size: __u32,
3090 pub func_info: __u64,
3091 pub nr_func_info: __u32,
3092 pub nr_line_info: __u32,
3093 pub line_info: __u64,
3094 pub jited_line_info: __u64,
3095 pub nr_jited_line_info: __u32,
3096 pub line_info_rec_size: __u32,
3097 pub jited_line_info_rec_size: __u32,
3098 pub nr_prog_tags: __u32,
3099 pub prog_tags: __u64,
3100 pub run_time_ns: __u64,
3101 pub run_cnt: __u64,
3102 pub recursion_misses: __u64,
3103 pub verified_insns: __u32,
3104 pub attach_btf_obj_id: __u32,
3105 pub attach_btf_id: __u32,
3106 pub __bindgen_padding_0: [u8; 4usize],
3107}
3108impl bpf_prog_info {
3109 #[inline]
3110 pub fn gpl_compatible(&self) -> __u32 {
3111 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
3112 }
3113 #[inline]
3114 pub fn set_gpl_compatible(&mut self, val: __u32) {
3115 unsafe {
3116 let val: u32 = ::std::mem::transmute(val);
3117 self._bitfield_1.set(0usize, 1u8, val as u64)
3118 }
3119 }
3120 #[inline]
3121 pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> {
3122 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
3123 __bindgen_bitfield_unit.set(0usize, 1u8, {
3124 let gpl_compatible: u32 = unsafe { ::std::mem::transmute(gpl_compatible) };
3125 gpl_compatible as u64
3126 });
3127 __bindgen_bitfield_unit
3128 }
3129}
3130#[repr(C)]
3131#[derive(Debug, Default, Copy, Clone)]
3132pub struct bpf_map_info {
3133 pub type_: __u32,
3134 pub id: __u32,
3135 pub key_size: __u32,
3136 pub value_size: __u32,
3137 pub max_entries: __u32,
3138 pub map_flags: __u32,
3139 pub name: [::std::os::raw::c_char; 16usize],
3140 pub ifindex: __u32,
3141 pub btf_vmlinux_value_type_id: __u32,
3142 pub netns_dev: __u64,
3143 pub netns_ino: __u64,
3144 pub btf_id: __u32,
3145 pub btf_key_type_id: __u32,
3146 pub btf_value_type_id: __u32,
3147 pub _bitfield_align_1: [u8; 0],
3148 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
3149 pub map_extra: __u64,
3150}
3151impl bpf_map_info {
3152 #[inline]
3153 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> {
3154 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
3155 __bindgen_bitfield_unit
3156 }
3157}
3158#[repr(C)]
3159#[derive(Debug, Default, Copy, Clone)]
3160pub struct bpf_btf_info {
3161 pub btf: __u64,
3162 pub btf_size: __u32,
3163 pub id: __u32,
3164 pub name: __u64,
3165 pub name_len: __u32,
3166 pub kernel_btf: __u32,
3167}
3168#[repr(C)]
3169#[derive(Copy, Clone)]
3170pub struct bpf_link_info {
3171 pub type_: __u32,
3172 pub id: __u32,
3173 pub prog_id: __u32,
3174 pub __bindgen_padding_0: [u8; 4usize],
3175 pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1,
3176}
3177#[repr(C)]
3178#[derive(Copy, Clone)]
3179pub union bpf_link_info__bindgen_ty_1 {
3180 pub raw_tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_1,
3181 pub tracing: bpf_link_info__bindgen_ty_1__bindgen_ty_2,
3182 pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_3,
3183 pub iter: bpf_link_info__bindgen_ty_1__bindgen_ty_4,
3184 pub netns: bpf_link_info__bindgen_ty_1__bindgen_ty_5,
3185 pub xdp: bpf_link_info__bindgen_ty_1__bindgen_ty_6,
3186}
3187#[repr(C)]
3188#[derive(Debug, Default, Copy, Clone)]
3189pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_1 {
3190 pub tp_name: __u64,
3191 pub tp_name_len: __u32,
3192 pub __bindgen_padding_0: [u8; 4usize],
3193}
3194#[repr(C)]
3195#[derive(Debug, Default, Copy, Clone)]
3196pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_2 {
3197 pub attach_type: __u32,
3198 pub target_obj_id: __u32,
3199 pub target_btf_id: __u32,
3200}
3201#[repr(C)]
3202#[derive(Debug, Default, Copy, Clone)]
3203pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_3 {
3204 pub cgroup_id: __u64,
3205 pub attach_type: __u32,
3206 pub __bindgen_padding_0: [u8; 4usize],
3207}
3208#[repr(C)]
3209#[derive(Copy, Clone)]
3210pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4 {
3211 pub target_name: __u64,
3212 pub target_name_len: __u32,
3213 pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1,
3214}
3215#[repr(C)]
3216#[derive(Copy, Clone)]
3217pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 {
3218 pub map: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1,
3219}
3220#[repr(C)]
3221#[derive(Debug, Default, Copy, Clone)]
3222pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 {
3223 pub map_id: __u32,
3224}
3225impl Default for bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 {
3226 fn default() -> Self {
3227 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3228 unsafe {
3229 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3230 s.assume_init()
3231 }
3232 }
3233}
3234impl Default for bpf_link_info__bindgen_ty_1__bindgen_ty_4 {
3235 fn default() -> Self {
3236 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3237 unsafe {
3238 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3239 s.assume_init()
3240 }
3241 }
3242}
3243#[repr(C)]
3244#[derive(Debug, Default, Copy, Clone)]
3245pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 {
3246 pub netns_ino: __u32,
3247 pub attach_type: __u32,
3248}
3249#[repr(C)]
3250#[derive(Debug, Default, Copy, Clone)]
3251pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 {
3252 pub ifindex: __u32,
3253}
3254impl Default for bpf_link_info__bindgen_ty_1 {
3255 fn default() -> Self {
3256 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3257 unsafe {
3258 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3259 s.assume_init()
3260 }
3261 }
3262}
3263impl Default for bpf_link_info {
3264 fn default() -> Self {
3265 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3266 unsafe {
3267 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3268 s.assume_init()
3269 }
3270 }
3271}
3272#[repr(C)]
3273#[derive(Copy, Clone)]
3274pub struct bpf_sock_addr {
3275 pub user_family: __u32,
3276 pub user_ip4: __u32,
3277 pub user_ip6: [__u32; 4usize],
3278 pub user_port: __u32,
3279 pub family: __u32,
3280 pub type_: __u32,
3281 pub protocol: __u32,
3282 pub msg_src_ip4: __u32,
3283 pub msg_src_ip6: [__u32; 4usize],
3284 pub __bindgen_padding_0: [u8; 4usize],
3285 pub __bindgen_anon_1: bpf_sock_addr__bindgen_ty_1,
3286}
3287#[repr(C)]
3288#[derive(Copy, Clone)]
3289pub union bpf_sock_addr__bindgen_ty_1 {
3290 pub sk: *mut bpf_sock,
3291 pub _bitfield_align_1: [u8; 0],
3292 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
3293}
3294impl Default for bpf_sock_addr__bindgen_ty_1 {
3295 fn default() -> Self {
3296 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3297 unsafe {
3298 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3299 s.assume_init()
3300 }
3301 }
3302}
3303impl bpf_sock_addr__bindgen_ty_1 {
3304 #[inline]
3305 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
3306 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
3307 __bindgen_bitfield_unit
3308 }
3309}
3310impl Default for bpf_sock_addr {
3311 fn default() -> Self {
3312 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3313 unsafe {
3314 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3315 s.assume_init()
3316 }
3317 }
3318}
3319#[repr(C)]
3320#[derive(Copy, Clone)]
3321pub struct bpf_sock_ops {
3322 pub op: __u32,
3323 pub __bindgen_anon_1: bpf_sock_ops__bindgen_ty_1,
3324 pub family: __u32,
3325 pub remote_ip4: __u32,
3326 pub local_ip4: __u32,
3327 pub remote_ip6: [__u32; 4usize],
3328 pub local_ip6: [__u32; 4usize],
3329 pub remote_port: __u32,
3330 pub local_port: __u32,
3331 pub is_fullsock: __u32,
3332 pub snd_cwnd: __u32,
3333 pub srtt_us: __u32,
3334 pub bpf_sock_ops_cb_flags: __u32,
3335 pub state: __u32,
3336 pub rtt_min: __u32,
3337 pub snd_ssthresh: __u32,
3338 pub rcv_nxt: __u32,
3339 pub snd_nxt: __u32,
3340 pub snd_una: __u32,
3341 pub mss_cache: __u32,
3342 pub ecn_flags: __u32,
3343 pub rate_delivered: __u32,
3344 pub rate_interval_us: __u32,
3345 pub packets_out: __u32,
3346 pub retrans_out: __u32,
3347 pub total_retrans: __u32,
3348 pub segs_in: __u32,
3349 pub data_segs_in: __u32,
3350 pub segs_out: __u32,
3351 pub data_segs_out: __u32,
3352 pub lost_out: __u32,
3353 pub sacked_out: __u32,
3354 pub sk_txhash: __u32,
3355 pub bytes_received: __u64,
3356 pub bytes_acked: __u64,
3357 pub __bindgen_anon_2: bpf_sock_ops__bindgen_ty_2,
3358 pub __bindgen_anon_3: bpf_sock_ops__bindgen_ty_3,
3359 pub __bindgen_anon_4: bpf_sock_ops__bindgen_ty_4,
3360 pub skb_len: __u32,
3361 pub skb_tcp_flags: __u32,
3362}
3363#[repr(C)]
3364#[derive(Copy, Clone)]
3365pub union bpf_sock_ops__bindgen_ty_1 {
3366 pub args: [__u32; 4usize],
3367 pub reply: __u32,
3368 pub replylong: [__u32; 4usize],
3369}
3370impl Default for bpf_sock_ops__bindgen_ty_1 {
3371 fn default() -> Self {
3372 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3373 unsafe {
3374 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3375 s.assume_init()
3376 }
3377 }
3378}
3379#[repr(C)]
3380#[derive(Copy, Clone)]
3381pub union bpf_sock_ops__bindgen_ty_2 {
3382 pub sk: *mut bpf_sock,
3383 pub _bitfield_align_1: [u8; 0],
3384 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
3385}
3386impl Default for bpf_sock_ops__bindgen_ty_2 {
3387 fn default() -> Self {
3388 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3389 unsafe {
3390 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3391 s.assume_init()
3392 }
3393 }
3394}
3395impl bpf_sock_ops__bindgen_ty_2 {
3396 #[inline]
3397 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
3398 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
3399 __bindgen_bitfield_unit
3400 }
3401}
3402#[repr(C)]
3403#[derive(Copy, Clone)]
3404pub union bpf_sock_ops__bindgen_ty_3 {
3405 pub skb_data: *mut ::std::os::raw::c_void,
3406 pub _bitfield_align_1: [u8; 0],
3407 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
3408}
3409impl Default for bpf_sock_ops__bindgen_ty_3 {
3410 fn default() -> Self {
3411 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3412 unsafe {
3413 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3414 s.assume_init()
3415 }
3416 }
3417}
3418impl bpf_sock_ops__bindgen_ty_3 {
3419 #[inline]
3420 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
3421 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
3422 __bindgen_bitfield_unit
3423 }
3424}
3425#[repr(C)]
3426#[derive(Copy, Clone)]
3427pub union bpf_sock_ops__bindgen_ty_4 {
3428 pub skb_data_end: *mut ::std::os::raw::c_void,
3429 pub _bitfield_align_1: [u8; 0],
3430 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
3431}
3432impl Default for bpf_sock_ops__bindgen_ty_4 {
3433 fn default() -> Self {
3434 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3435 unsafe {
3436 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3437 s.assume_init()
3438 }
3439 }
3440}
3441impl bpf_sock_ops__bindgen_ty_4 {
3442 #[inline]
3443 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
3444 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
3445 __bindgen_bitfield_unit
3446 }
3447}
3448impl Default for bpf_sock_ops {
3449 fn default() -> Self {
3450 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3451 unsafe {
3452 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3453 s.assume_init()
3454 }
3455 }
3456}
3457pub const BPF_SOCK_OPS_RTO_CB_FLAG: _bindgen_ty_76 = 1;
3458pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: _bindgen_ty_76 = 2;
3459pub const BPF_SOCK_OPS_STATE_CB_FLAG: _bindgen_ty_76 = 4;
3460pub const BPF_SOCK_OPS_RTT_CB_FLAG: _bindgen_ty_76 = 8;
3461pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_76 = 16;
3462pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_76 = 32;
3463pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_76 = 64;
3464pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_76 = 127;
3465pub type _bindgen_ty_76 = ::std::os::raw::c_uint;
3466pub const BPF_SOCK_OPS_VOID: _bindgen_ty_77 = 0;
3467pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_77 = 1;
3468pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_77 = 2;
3469pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_77 = 3;
3470pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_77 = 4;
3471pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_77 = 5;
3472pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_77 = 6;
3473pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_77 = 7;
3474pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_77 = 8;
3475pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_77 = 9;
3476pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_77 = 10;
3477pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_77 = 11;
3478pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_77 = 12;
3479pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_77 = 13;
3480pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_77 = 14;
3481pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_77 = 15;
3482pub type _bindgen_ty_77 = ::std::os::raw::c_uint;
3483pub const BPF_TCP_ESTABLISHED: _bindgen_ty_78 = 1;
3484pub const BPF_TCP_SYN_SENT: _bindgen_ty_78 = 2;
3485pub const BPF_TCP_SYN_RECV: _bindgen_ty_78 = 3;
3486pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_78 = 4;
3487pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_78 = 5;
3488pub const BPF_TCP_TIME_WAIT: _bindgen_ty_78 = 6;
3489pub const BPF_TCP_CLOSE: _bindgen_ty_78 = 7;
3490pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_78 = 8;
3491pub const BPF_TCP_LAST_ACK: _bindgen_ty_78 = 9;
3492pub const BPF_TCP_LISTEN: _bindgen_ty_78 = 10;
3493pub const BPF_TCP_CLOSING: _bindgen_ty_78 = 11;
3494pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_78 = 12;
3495pub const BPF_TCP_MAX_STATES: _bindgen_ty_78 = 13;
3496pub type _bindgen_ty_78 = ::std::os::raw::c_uint;
3497pub const BPF_LOAD_HDR_OPT_TCP_SYN: _bindgen_ty_80 = 1;
3498pub type _bindgen_ty_80 = ::std::os::raw::c_uint;
3499pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: _bindgen_ty_81 = 1;
3500pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: _bindgen_ty_81 = 2;
3501pub type _bindgen_ty_81 = ::std::os::raw::c_uint;
3502#[repr(C)]
3503#[derive(Debug, Default, Copy, Clone)]
3504pub struct bpf_perf_event_value {
3505 pub counter: __u64,
3506 pub enabled: __u64,
3507 pub running: __u64,
3508}
3509pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_82 = 1;
3510pub const BPF_DEVCG_ACC_READ: _bindgen_ty_82 = 2;
3511pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_82 = 4;
3512pub type _bindgen_ty_82 = ::std::os::raw::c_uint;
3513pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_83 = 1;
3514pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_83 = 2;
3515pub type _bindgen_ty_83 = ::std::os::raw::c_uint;
3516#[repr(C)]
3517#[derive(Debug, Default, Copy, Clone)]
3518pub struct bpf_cgroup_dev_ctx {
3519 pub access_type: __u32,
3520 pub major: __u32,
3521 pub minor: __u32,
3522}
3523#[repr(C)]
3524#[derive(Debug, Default)]
3525pub struct bpf_raw_tracepoint_args {
3526 pub args: __IncompleteArrayField<__u64>,
3527}
3528pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_84 = 1;
3529pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_84 = 2;
3530pub type _bindgen_ty_84 = ::std::os::raw::c_uint;
3531pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_85 = 0;
3532pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_85 = 1;
3533pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_85 = 2;
3534pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_85 = 3;
3535pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_85 = 4;
3536pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_85 = 5;
3537pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_85 = 6;
3538pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_85 = 7;
3539pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_85 = 8;
3540pub type _bindgen_ty_85 = ::std::os::raw::c_uint;
3541#[repr(C)]
3542#[derive(Copy, Clone)]
3543pub struct bpf_fib_lookup {
3544 pub family: __u8,
3545 pub l4_protocol: __u8,
3546 pub sport: __be16,
3547 pub dport: __be16,
3548 pub __bindgen_anon_1: bpf_fib_lookup__bindgen_ty_1,
3549 pub ifindex: __u32,
3550 pub __bindgen_anon_2: bpf_fib_lookup__bindgen_ty_2,
3551 pub __bindgen_anon_3: bpf_fib_lookup__bindgen_ty_3,
3552 pub __bindgen_anon_4: bpf_fib_lookup__bindgen_ty_4,
3553 pub h_vlan_proto: __be16,
3554 pub h_vlan_TCI: __be16,
3555 pub smac: [__u8; 6usize],
3556 pub dmac: [__u8; 6usize],
3557}
3558#[repr(C)]
3559#[derive(Copy, Clone)]
3560pub union bpf_fib_lookup__bindgen_ty_1 {
3561 pub tot_len: __u16,
3562 pub mtu_result: __u16,
3563}
3564impl Default for bpf_fib_lookup__bindgen_ty_1 {
3565 fn default() -> Self {
3566 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3567 unsafe {
3568 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3569 s.assume_init()
3570 }
3571 }
3572}
3573#[repr(C)]
3574#[derive(Copy, Clone)]
3575pub union bpf_fib_lookup__bindgen_ty_2 {
3576 pub tos: __u8,
3577 pub flowinfo: __be32,
3578 pub rt_metric: __u32,
3579}
3580impl Default for bpf_fib_lookup__bindgen_ty_2 {
3581 fn default() -> Self {
3582 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3583 unsafe {
3584 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3585 s.assume_init()
3586 }
3587 }
3588}
3589#[repr(C)]
3590#[derive(Copy, Clone)]
3591pub union bpf_fib_lookup__bindgen_ty_3 {
3592 pub ipv4_src: __be32,
3593 pub ipv6_src: [__u32; 4usize],
3594}
3595impl Default for bpf_fib_lookup__bindgen_ty_3 {
3596 fn default() -> Self {
3597 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3598 unsafe {
3599 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3600 s.assume_init()
3601 }
3602 }
3603}
3604#[repr(C)]
3605#[derive(Copy, Clone)]
3606pub union bpf_fib_lookup__bindgen_ty_4 {
3607 pub ipv4_dst: __be32,
3608 pub ipv6_dst: [__u32; 4usize],
3609}
3610impl Default for bpf_fib_lookup__bindgen_ty_4 {
3611 fn default() -> Self {
3612 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3613 unsafe {
3614 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3615 s.assume_init()
3616 }
3617 }
3618}
3619impl Default for bpf_fib_lookup {
3620 fn default() -> Self {
3621 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3622 unsafe {
3623 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3624 s.assume_init()
3625 }
3626 }
3627}
3628#[repr(C)]
3629#[derive(Copy, Clone)]
3630pub struct bpf_redir_neigh {
3631 pub nh_family: __u32,
3632 pub __bindgen_anon_1: bpf_redir_neigh__bindgen_ty_1,
3633}
3634#[repr(C)]
3635#[derive(Copy, Clone)]
3636pub union bpf_redir_neigh__bindgen_ty_1 {
3637 pub ipv4_nh: __be32,
3638 pub ipv6_nh: [__u32; 4usize],
3639}
3640impl Default for bpf_redir_neigh__bindgen_ty_1 {
3641 fn default() -> Self {
3642 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3643 unsafe {
3644 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3645 s.assume_init()
3646 }
3647 }
3648}
3649impl Default for bpf_redir_neigh {
3650 fn default() -> Self {
3651 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3652 unsafe {
3653 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3654 s.assume_init()
3655 }
3656 }
3657}
3658pub const BPF_MTU_CHK_SEGS: bpf_check_mtu_flags = 1;
3659pub type bpf_check_mtu_flags = ::std::os::raw::c_uint;
3660pub const BPF_MTU_CHK_RET_SUCCESS: bpf_check_mtu_ret = 0;
3661pub const BPF_MTU_CHK_RET_FRAG_NEEDED: bpf_check_mtu_ret = 1;
3662pub const BPF_MTU_CHK_RET_SEGS_TOOBIG: bpf_check_mtu_ret = 2;
3663pub type bpf_check_mtu_ret = ::std::os::raw::c_uint;
3664pub const BPF_FD_TYPE_RAW_TRACEPOINT: bpf_task_fd_type = 0;
3665pub const BPF_FD_TYPE_TRACEPOINT: bpf_task_fd_type = 1;
3666pub const BPF_FD_TYPE_KPROBE: bpf_task_fd_type = 2;
3667pub const BPF_FD_TYPE_KRETPROBE: bpf_task_fd_type = 3;
3668pub const BPF_FD_TYPE_UPROBE: bpf_task_fd_type = 4;
3669pub const BPF_FD_TYPE_URETPROBE: bpf_task_fd_type = 5;
3670pub type bpf_task_fd_type = ::std::os::raw::c_uint;
3671pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_86 = 1;
3672pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_86 = 2;
3673pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_86 = 4;
3674pub type _bindgen_ty_86 = ::std::os::raw::c_uint;
3675#[repr(C)]
3676#[derive(Copy, Clone)]
3677pub struct bpf_flow_keys {
3678 pub nhoff: __u16,
3679 pub thoff: __u16,
3680 pub addr_proto: __u16,
3681 pub is_frag: __u8,
3682 pub is_first_frag: __u8,
3683 pub is_encap: __u8,
3684 pub ip_proto: __u8,
3685 pub n_proto: __be16,
3686 pub sport: __be16,
3687 pub dport: __be16,
3688 pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1,
3689 pub flags: __u32,
3690 pub flow_label: __be32,
3691}
3692#[repr(C)]
3693#[derive(Copy, Clone)]
3694pub union bpf_flow_keys__bindgen_ty_1 {
3695 pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1__bindgen_ty_1,
3696 pub __bindgen_anon_2: bpf_flow_keys__bindgen_ty_1__bindgen_ty_2,
3697}
3698#[repr(C)]
3699#[derive(Debug, Default, Copy, Clone)]
3700pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 {
3701 pub ipv4_src: __be32,
3702 pub ipv4_dst: __be32,
3703}
3704#[repr(C)]
3705#[derive(Debug, Default, Copy, Clone)]
3706pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 {
3707 pub ipv6_src: [__u32; 4usize],
3708 pub ipv6_dst: [__u32; 4usize],
3709}
3710impl Default for bpf_flow_keys__bindgen_ty_1 {
3711 fn default() -> Self {
3712 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3713 unsafe {
3714 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3715 s.assume_init()
3716 }
3717 }
3718}
3719impl Default for bpf_flow_keys {
3720 fn default() -> Self {
3721 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3722 unsafe {
3723 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3724 s.assume_init()
3725 }
3726 }
3727}
3728#[repr(C)]
3729#[derive(Debug, Default, Copy, Clone)]
3730pub struct bpf_func_info {
3731 pub insn_off: __u32,
3732 pub type_id: __u32,
3733}
3734#[repr(C)]
3735#[derive(Debug, Default, Copy, Clone)]
3736pub struct bpf_line_info {
3737 pub insn_off: __u32,
3738 pub file_name_off: __u32,
3739 pub line_off: __u32,
3740 pub line_col: __u32,
3741}
3742#[repr(C)]
3743#[derive(Debug, Default, Copy, Clone)]
3744pub struct bpf_spin_lock {
3745 pub val: __u32,
3746}
3747#[repr(C)]
3748#[repr(align(8))]
3749#[derive(Debug, Default, Copy, Clone)]
3750pub struct bpf_timer {
3751 pub _bitfield_align_1: [u8; 0],
3752 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>,
3753}
3754impl bpf_timer {
3755 #[inline]
3756 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 16usize]> {
3757 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 16usize]> = Default::default();
3758 __bindgen_bitfield_unit
3759 }
3760}
3761#[repr(C)]
3762#[repr(align(8))]
3763#[derive(Debug, Default, Copy, Clone)]
3764pub struct bpf_dynptr {
3765 pub _bitfield_align_1: [u8; 0],
3766 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>,
3767}
3768impl bpf_dynptr {
3769 #[inline]
3770 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 16usize]> {
3771 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 16usize]> = Default::default();
3772 __bindgen_bitfield_unit
3773 }
3774}
3775#[repr(C)]
3776#[derive(Debug, Default, Copy, Clone)]
3777pub struct bpf_sysctl {
3778 pub write: __u32,
3779 pub file_pos: __u32,
3780}
3781#[repr(C)]
3782#[derive(Copy, Clone)]
3783pub struct bpf_sockopt {
3784 pub __bindgen_anon_1: bpf_sockopt__bindgen_ty_1,
3785 pub __bindgen_anon_2: bpf_sockopt__bindgen_ty_2,
3786 pub __bindgen_anon_3: bpf_sockopt__bindgen_ty_3,
3787 pub level: __s32,
3788 pub optname: __s32,
3789 pub optlen: __s32,
3790 pub retval: __s32,
3791}
3792#[repr(C)]
3793#[derive(Copy, Clone)]
3794pub union bpf_sockopt__bindgen_ty_1 {
3795 pub sk: *mut bpf_sock,
3796 pub _bitfield_align_1: [u8; 0],
3797 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
3798}
3799impl Default for bpf_sockopt__bindgen_ty_1 {
3800 fn default() -> Self {
3801 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3802 unsafe {
3803 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3804 s.assume_init()
3805 }
3806 }
3807}
3808impl bpf_sockopt__bindgen_ty_1 {
3809 #[inline]
3810 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
3811 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
3812 __bindgen_bitfield_unit
3813 }
3814}
3815#[repr(C)]
3816#[derive(Copy, Clone)]
3817pub union bpf_sockopt__bindgen_ty_2 {
3818 pub optval: *mut ::std::os::raw::c_void,
3819 pub _bitfield_align_1: [u8; 0],
3820 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
3821}
3822impl Default for bpf_sockopt__bindgen_ty_2 {
3823 fn default() -> Self {
3824 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3825 unsafe {
3826 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3827 s.assume_init()
3828 }
3829 }
3830}
3831impl bpf_sockopt__bindgen_ty_2 {
3832 #[inline]
3833 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
3834 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
3835 __bindgen_bitfield_unit
3836 }
3837}
3838#[repr(C)]
3839#[derive(Copy, Clone)]
3840pub union bpf_sockopt__bindgen_ty_3 {
3841 pub optval_end: *mut ::std::os::raw::c_void,
3842 pub _bitfield_align_1: [u8; 0],
3843 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
3844}
3845impl Default for bpf_sockopt__bindgen_ty_3 {
3846 fn default() -> Self {
3847 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3848 unsafe {
3849 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3850 s.assume_init()
3851 }
3852 }
3853}
3854impl bpf_sockopt__bindgen_ty_3 {
3855 #[inline]
3856 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
3857 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
3858 __bindgen_bitfield_unit
3859 }
3860}
3861impl Default for bpf_sockopt {
3862 fn default() -> Self {
3863 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3864 unsafe {
3865 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3866 s.assume_init()
3867 }
3868 }
3869}
3870#[repr(C)]
3871#[derive(Debug, Default, Copy, Clone)]
3872pub struct bpf_pidns_info {
3873 pub pid: __u32,
3874 pub tgid: __u32,
3875}
3876#[repr(C)]
3877#[derive(Copy, Clone)]
3878pub struct bpf_sk_lookup {
3879 pub __bindgen_anon_1: bpf_sk_lookup__bindgen_ty_1,
3880 pub family: __u32,
3881 pub protocol: __u32,
3882 pub remote_ip4: __u32,
3883 pub remote_ip6: [__u32; 4usize],
3884 pub remote_port: __be16,
3885 pub _bitfield_align_1: [u8; 0],
3886 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
3887 pub local_ip4: __u32,
3888 pub local_ip6: [__u32; 4usize],
3889 pub local_port: __u32,
3890 pub ingress_ifindex: __u32,
3891 pub __bindgen_padding_0: [u8; 4usize],
3892}
3893#[repr(C)]
3894#[derive(Copy, Clone)]
3895pub union bpf_sk_lookup__bindgen_ty_1 {
3896 pub __bindgen_anon_1: bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1,
3897 pub cookie: __u64,
3898}
3899#[repr(C)]
3900#[derive(Copy, Clone)]
3901pub union bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 {
3902 pub sk: *mut bpf_sock,
3903 pub _bitfield_align_1: [u8; 0],
3904 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
3905}
3906impl Default for bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 {
3907 fn default() -> Self {
3908 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3909 unsafe {
3910 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3911 s.assume_init()
3912 }
3913 }
3914}
3915impl bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 {
3916 #[inline]
3917 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
3918 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
3919 __bindgen_bitfield_unit
3920 }
3921}
3922impl Default for bpf_sk_lookup__bindgen_ty_1 {
3923 fn default() -> Self {
3924 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3925 unsafe {
3926 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3927 s.assume_init()
3928 }
3929 }
3930}
3931impl Default for bpf_sk_lookup {
3932 fn default() -> Self {
3933 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3934 unsafe {
3935 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3936 s.assume_init()
3937 }
3938 }
3939}
3940impl bpf_sk_lookup {
3941 #[inline]
3942 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> {
3943 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
3944 __bindgen_bitfield_unit
3945 }
3946}
3947#[repr(C)]
3948#[derive(Debug, Copy, Clone)]
3949pub struct btf_ptr {
3950 pub ptr: *mut ::std::os::raw::c_void,
3951 pub type_id: __u32,
3952 pub flags: __u32,
3953}
3954impl Default for btf_ptr {
3955 fn default() -> Self {
3956 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3957 unsafe {
3958 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3959 s.assume_init()
3960 }
3961 }
3962}
3963pub const BTF_F_COMPACT: _bindgen_ty_87 = 1;
3964pub const BTF_F_NONAME: _bindgen_ty_87 = 2;
3965pub const BTF_F_PTR_RAW: _bindgen_ty_87 = 4;
3966pub const BTF_F_ZERO: _bindgen_ty_87 = 8;
3967pub type _bindgen_ty_87 = ::std::os::raw::c_uint;
3968pub const BPF_CORE_FIELD_BYTE_OFFSET: bpf_core_relo_kind = 0;
3969pub const BPF_CORE_FIELD_BYTE_SIZE: bpf_core_relo_kind = 1;
3970pub const BPF_CORE_FIELD_EXISTS: bpf_core_relo_kind = 2;
3971pub const BPF_CORE_FIELD_SIGNED: bpf_core_relo_kind = 3;
3972pub const BPF_CORE_FIELD_LSHIFT_U64: bpf_core_relo_kind = 4;
3973pub const BPF_CORE_FIELD_RSHIFT_U64: bpf_core_relo_kind = 5;
3974pub const BPF_CORE_TYPE_ID_LOCAL: bpf_core_relo_kind = 6;
3975pub const BPF_CORE_TYPE_ID_TARGET: bpf_core_relo_kind = 7;
3976pub const BPF_CORE_TYPE_EXISTS: bpf_core_relo_kind = 8;
3977pub const BPF_CORE_TYPE_SIZE: bpf_core_relo_kind = 9;
3978pub const BPF_CORE_ENUMVAL_EXISTS: bpf_core_relo_kind = 10;
3979pub const BPF_CORE_ENUMVAL_VALUE: bpf_core_relo_kind = 11;
3980pub const BPF_CORE_TYPE_MATCHES: bpf_core_relo_kind = 12;
3981pub type bpf_core_relo_kind = ::std::os::raw::c_uint;
3982#[repr(C)]
3983#[derive(Debug, Copy, Clone)]
3984pub struct bpf_core_relo {
3985 pub insn_off: __u32,
3986 pub type_id: __u32,
3987 pub access_str_off: __u32,
3988 pub kind: bpf_core_relo_kind,
3989}
3990impl Default for bpf_core_relo {
3991 fn default() -> Self {
3992 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3993 unsafe {
3994 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3995 s.assume_init()
3996 }
3997 }
3998}
3999pub const LIBBPF_STRICT_ALL: libbpf_strict_mode = 4294967295;
4000pub const LIBBPF_STRICT_NONE: libbpf_strict_mode = 0;
4001pub const LIBBPF_STRICT_CLEAN_PTRS: libbpf_strict_mode = 1;
4002pub const LIBBPF_STRICT_DIRECT_ERRS: libbpf_strict_mode = 2;
4003pub const LIBBPF_STRICT_SEC_NAME: libbpf_strict_mode = 4;
4004pub const LIBBPF_STRICT_NO_OBJECT_LIST: libbpf_strict_mode = 8;
4005pub const LIBBPF_STRICT_AUTO_RLIMIT_MEMLOCK: libbpf_strict_mode = 16;
4006pub const LIBBPF_STRICT_MAP_DEFINITIONS: libbpf_strict_mode = 32;
4007pub const __LIBBPF_STRICT_LAST: libbpf_strict_mode = 33;
4008pub type libbpf_strict_mode = ::std::os::raw::c_uint;
4009extern "C" {
4010 pub fn libbpf_set_strict_mode(mode: libbpf_strict_mode) -> ::std::os::raw::c_int;
4011}
4012extern "C" {
4013 pub fn libbpf_get_error(ptr: *const ::std::os::raw::c_void) -> ::std::os::raw::c_long;
4014}
4015#[repr(C)]
4016#[derive(Debug, Copy, Clone)]
4017pub struct bpf_program {
4018 _unused: [u8; 0],
4019}
4020#[repr(C)]
4021#[derive(Debug, Copy, Clone)]
4022pub struct bpf_map {
4023 _unused: [u8; 0],
4024}
4025#[repr(C)]
4026#[derive(Debug, Copy, Clone)]
4027pub struct btf {
4028 _unused: [u8; 0],
4029}
4030#[repr(C)]
4031#[derive(Debug, Copy, Clone)]
4032pub struct btf_ext {
4033 _unused: [u8; 0],
4034}
4035extern "C" {
4036 pub fn libbpf_find_kernel_btf() -> *mut btf;
4037}
4038extern "C" {
4039 pub fn bpf_program__get_type(prog: *const bpf_program) -> bpf_prog_type;
4040}
4041extern "C" {
4042 pub fn bpf_program__get_expected_attach_type(prog: *const bpf_program) -> bpf_attach_type;
4043}
4044extern "C" {
4045 pub fn bpf_map__get_pin_path(map: *const bpf_map) -> *const ::std::os::raw::c_char;
4046}
4047extern "C" {
4048 pub fn btf__get_raw_data(btf: *const btf, size: *mut __u32) -> *const ::std::os::raw::c_void;
4049}
4050extern "C" {
4051 pub fn btf_ext__get_raw_data(
4052 btf_ext: *const btf_ext,
4053 size: *mut __u32,
4054 ) -> *const ::std::os::raw::c_void;
4055}
4056extern "C" {
4057 pub fn libbpf_set_memlock_rlim(memlock_bytes: size_t) -> ::std::os::raw::c_int;
4058}
4059#[repr(C)]
4060#[derive(Debug, Default, Copy, Clone)]
4061pub struct bpf_map_create_opts {
4062 pub sz: size_t,
4063 pub btf_fd: __u32,
4064 pub btf_key_type_id: __u32,
4065 pub btf_value_type_id: __u32,
4066 pub btf_vmlinux_value_type_id: __u32,
4067 pub inner_map_fd: __u32,
4068 pub map_flags: __u32,
4069 pub map_extra: __u64,
4070 pub numa_node: __u32,
4071 pub map_ifindex: __u32,
4072}
4073extern "C" {
4074 pub fn bpf_map_create(
4075 map_type: bpf_map_type,
4076 map_name: *const ::std::os::raw::c_char,
4077 key_size: __u32,
4078 value_size: __u32,
4079 max_entries: __u32,
4080 opts: *const bpf_map_create_opts,
4081 ) -> ::std::os::raw::c_int;
4082}
4083#[repr(C)]
4084#[derive(Debug, Copy, Clone)]
4085pub struct bpf_prog_load_opts {
4086 pub sz: size_t,
4087 pub attempts: ::std::os::raw::c_int,
4088 pub expected_attach_type: bpf_attach_type,
4089 pub prog_btf_fd: __u32,
4090 pub prog_flags: __u32,
4091 pub prog_ifindex: __u32,
4092 pub kern_version: __u32,
4093 pub attach_btf_id: __u32,
4094 pub attach_prog_fd: __u32,
4095 pub attach_btf_obj_fd: __u32,
4096 pub __bindgen_padding_0: [u8; 4usize],
4097 pub fd_array: *const ::std::os::raw::c_int,
4098 pub func_info: *const ::std::os::raw::c_void,
4099 pub func_info_cnt: __u32,
4100 pub func_info_rec_size: __u32,
4101 pub line_info: *const ::std::os::raw::c_void,
4102 pub line_info_cnt: __u32,
4103 pub line_info_rec_size: __u32,
4104 pub log_level: __u32,
4105 pub log_size: __u32,
4106 pub log_buf: *mut ::std::os::raw::c_char,
4107}
4108impl Default for bpf_prog_load_opts {
4109 fn default() -> Self {
4110 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
4111 unsafe {
4112 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4113 s.assume_init()
4114 }
4115 }
4116}
4117extern "C" {
4118 pub fn bpf_prog_load(
4119 prog_type: bpf_prog_type,
4120 prog_name: *const ::std::os::raw::c_char,
4121 license: *const ::std::os::raw::c_char,
4122 insns: *const bpf_insn,
4123 insn_cnt: size_t,
4124 opts: *const bpf_prog_load_opts,
4125 ) -> ::std::os::raw::c_int;
4126}
4127#[repr(C)]
4128#[derive(Debug, Copy, Clone)]
4129pub struct bpf_btf_load_opts {
4130 pub sz: size_t,
4131 pub log_buf: *mut ::std::os::raw::c_char,
4132 pub log_level: __u32,
4133 pub log_size: __u32,
4134}
4135impl Default for bpf_btf_load_opts {
4136 fn default() -> Self {
4137 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
4138 unsafe {
4139 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4140 s.assume_init()
4141 }
4142 }
4143}
4144extern "C" {
4145 pub fn bpf_btf_load(
4146 btf_data: *const ::std::os::raw::c_void,
4147 btf_size: size_t,
4148 opts: *const bpf_btf_load_opts,
4149 ) -> ::std::os::raw::c_int;
4150}
4151extern "C" {
4152 pub fn bpf_map_update_elem(
4153 fd: ::std::os::raw::c_int,
4154 key: *const ::std::os::raw::c_void,
4155 value: *const ::std::os::raw::c_void,
4156 flags: __u64,
4157 ) -> ::std::os::raw::c_int;
4158}
4159extern "C" {
4160 pub fn bpf_map_lookup_elem(
4161 fd: ::std::os::raw::c_int,
4162 key: *const ::std::os::raw::c_void,
4163 value: *mut ::std::os::raw::c_void,
4164 ) -> ::std::os::raw::c_int;
4165}
4166extern "C" {
4167 pub fn bpf_map_lookup_elem_flags(
4168 fd: ::std::os::raw::c_int,
4169 key: *const ::std::os::raw::c_void,
4170 value: *mut ::std::os::raw::c_void,
4171 flags: __u64,
4172 ) -> ::std::os::raw::c_int;
4173}
4174extern "C" {
4175 pub fn bpf_map_lookup_and_delete_elem(
4176 fd: ::std::os::raw::c_int,
4177 key: *const ::std::os::raw::c_void,
4178 value: *mut ::std::os::raw::c_void,
4179 ) -> ::std::os::raw::c_int;
4180}
4181extern "C" {
4182 pub fn bpf_map_lookup_and_delete_elem_flags(
4183 fd: ::std::os::raw::c_int,
4184 key: *const ::std::os::raw::c_void,
4185 value: *mut ::std::os::raw::c_void,
4186 flags: __u64,
4187 ) -> ::std::os::raw::c_int;
4188}
4189extern "C" {
4190 pub fn bpf_map_delete_elem(
4191 fd: ::std::os::raw::c_int,
4192 key: *const ::std::os::raw::c_void,
4193 ) -> ::std::os::raw::c_int;
4194}
4195extern "C" {
4196 pub fn bpf_map_delete_elem_flags(
4197 fd: ::std::os::raw::c_int,
4198 key: *const ::std::os::raw::c_void,
4199 flags: __u64,
4200 ) -> ::std::os::raw::c_int;
4201}
4202extern "C" {
4203 pub fn bpf_map_get_next_key(
4204 fd: ::std::os::raw::c_int,
4205 key: *const ::std::os::raw::c_void,
4206 next_key: *mut ::std::os::raw::c_void,
4207 ) -> ::std::os::raw::c_int;
4208}
4209extern "C" {
4210 pub fn bpf_map_freeze(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
4211}
4212#[repr(C)]
4213#[derive(Debug, Default, Copy, Clone)]
4214pub struct bpf_map_batch_opts {
4215 pub sz: size_t,
4216 pub elem_flags: __u64,
4217 pub flags: __u64,
4218}
4219extern "C" {
4220 pub fn bpf_map_delete_batch(
4221 fd: ::std::os::raw::c_int,
4222 keys: *const ::std::os::raw::c_void,
4223 count: *mut __u32,
4224 opts: *const bpf_map_batch_opts,
4225 ) -> ::std::os::raw::c_int;
4226}
4227extern "C" {
4228 pub fn bpf_map_lookup_batch(
4229 fd: ::std::os::raw::c_int,
4230 in_batch: *mut ::std::os::raw::c_void,
4231 out_batch: *mut ::std::os::raw::c_void,
4232 keys: *mut ::std::os::raw::c_void,
4233 values: *mut ::std::os::raw::c_void,
4234 count: *mut __u32,
4235 opts: *const bpf_map_batch_opts,
4236 ) -> ::std::os::raw::c_int;
4237}
4238extern "C" {
4239 pub fn bpf_map_lookup_and_delete_batch(
4240 fd: ::std::os::raw::c_int,
4241 in_batch: *mut ::std::os::raw::c_void,
4242 out_batch: *mut ::std::os::raw::c_void,
4243 keys: *mut ::std::os::raw::c_void,
4244 values: *mut ::std::os::raw::c_void,
4245 count: *mut __u32,
4246 opts: *const bpf_map_batch_opts,
4247 ) -> ::std::os::raw::c_int;
4248}
4249extern "C" {
4250 pub fn bpf_map_update_batch(
4251 fd: ::std::os::raw::c_int,
4252 keys: *const ::std::os::raw::c_void,
4253 values: *const ::std::os::raw::c_void,
4254 count: *mut __u32,
4255 opts: *const bpf_map_batch_opts,
4256 ) -> ::std::os::raw::c_int;
4257}
4258#[repr(C)]
4259#[derive(Debug, Default, Copy, Clone)]
4260pub struct bpf_obj_get_opts {
4261 pub sz: size_t,
4262 pub file_flags: __u32,
4263 pub __bindgen_padding_0: [u8; 4usize],
4264}
4265extern "C" {
4266 pub fn bpf_obj_pin(
4267 fd: ::std::os::raw::c_int,
4268 pathname: *const ::std::os::raw::c_char,
4269 ) -> ::std::os::raw::c_int;
4270}
4271extern "C" {
4272 pub fn bpf_obj_get(pathname: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
4273}
4274extern "C" {
4275 pub fn bpf_obj_get_opts(
4276 pathname: *const ::std::os::raw::c_char,
4277 opts: *const bpf_obj_get_opts,
4278 ) -> ::std::os::raw::c_int;
4279}
4280#[repr(C)]
4281#[derive(Debug, Default, Copy, Clone)]
4282pub struct bpf_prog_attach_opts {
4283 pub sz: size_t,
4284 pub flags: ::std::os::raw::c_uint,
4285 pub replace_prog_fd: ::std::os::raw::c_int,
4286}
4287extern "C" {
4288 pub fn bpf_prog_attach(
4289 prog_fd: ::std::os::raw::c_int,
4290 attachable_fd: ::std::os::raw::c_int,
4291 type_: bpf_attach_type,
4292 flags: ::std::os::raw::c_uint,
4293 ) -> ::std::os::raw::c_int;
4294}
4295extern "C" {
4296 pub fn bpf_prog_attach_opts(
4297 prog_fd: ::std::os::raw::c_int,
4298 attachable_fd: ::std::os::raw::c_int,
4299 type_: bpf_attach_type,
4300 opts: *const bpf_prog_attach_opts,
4301 ) -> ::std::os::raw::c_int;
4302}
4303extern "C" {
4304 pub fn bpf_prog_detach(
4305 attachable_fd: ::std::os::raw::c_int,
4306 type_: bpf_attach_type,
4307 ) -> ::std::os::raw::c_int;
4308}
4309extern "C" {
4310 pub fn bpf_prog_detach2(
4311 prog_fd: ::std::os::raw::c_int,
4312 attachable_fd: ::std::os::raw::c_int,
4313 type_: bpf_attach_type,
4314 ) -> ::std::os::raw::c_int;
4315}
4316#[repr(C)]
4317#[derive(Copy, Clone)]
4318pub struct bpf_link_create_opts {
4319 pub sz: size_t,
4320 pub flags: __u32,
4321 pub __bindgen_padding_0: [u8; 4usize],
4322 pub iter_info: *mut bpf_iter_link_info,
4323 pub iter_info_len: __u32,
4324 pub target_btf_id: __u32,
4325 pub __bindgen_anon_1: bpf_link_create_opts__bindgen_ty_1,
4326}
4327#[repr(C)]
4328#[derive(Copy, Clone)]
4329pub union bpf_link_create_opts__bindgen_ty_1 {
4330 pub perf_event: bpf_link_create_opts__bindgen_ty_1__bindgen_ty_1,
4331 pub kprobe_multi: bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2,
4332 pub tracing: bpf_link_create_opts__bindgen_ty_1__bindgen_ty_3,
4333}
4334#[repr(C)]
4335#[derive(Debug, Default, Copy, Clone)]
4336pub struct bpf_link_create_opts__bindgen_ty_1__bindgen_ty_1 {
4337 pub bpf_cookie: __u64,
4338}
4339#[repr(C)]
4340#[derive(Debug, Copy, Clone)]
4341pub struct bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2 {
4342 pub flags: __u32,
4343 pub cnt: __u32,
4344 pub syms: *mut *const ::std::os::raw::c_char,
4345 pub addrs: *const ::std::os::raw::c_ulong,
4346 pub cookies: *const __u64,
4347}
4348impl Default for bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2 {
4349 fn default() -> Self {
4350 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
4351 unsafe {
4352 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4353 s.assume_init()
4354 }
4355 }
4356}
4357#[repr(C)]
4358#[derive(Debug, Default, Copy, Clone)]
4359pub struct bpf_link_create_opts__bindgen_ty_1__bindgen_ty_3 {
4360 pub cookie: __u64,
4361}
4362impl Default for bpf_link_create_opts__bindgen_ty_1 {
4363 fn default() -> Self {
4364 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
4365 unsafe {
4366 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4367 s.assume_init()
4368 }
4369 }
4370}
4371impl Default for bpf_link_create_opts {
4372 fn default() -> Self {
4373 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
4374 unsafe {
4375 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4376 s.assume_init()
4377 }
4378 }
4379}
4380extern "C" {
4381 pub fn bpf_link_create(
4382 prog_fd: ::std::os::raw::c_int,
4383 target_fd: ::std::os::raw::c_int,
4384 attach_type: bpf_attach_type,
4385 opts: *const bpf_link_create_opts,
4386 ) -> ::std::os::raw::c_int;
4387}
4388extern "C" {
4389 pub fn bpf_link_detach(link_fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
4390}
4391#[repr(C)]
4392#[derive(Debug, Default, Copy, Clone)]
4393pub struct bpf_link_update_opts {
4394 pub sz: size_t,
4395 pub flags: __u32,
4396 pub old_prog_fd: __u32,
4397}
4398extern "C" {
4399 pub fn bpf_link_update(
4400 link_fd: ::std::os::raw::c_int,
4401 new_prog_fd: ::std::os::raw::c_int,
4402 opts: *const bpf_link_update_opts,
4403 ) -> ::std::os::raw::c_int;
4404}
4405extern "C" {
4406 pub fn bpf_iter_create(link_fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
4407}
4408#[repr(C)]
4409#[derive(Debug, Copy, Clone)]
4410pub struct bpf_prog_test_run_attr {
4411 pub prog_fd: ::std::os::raw::c_int,
4412 pub repeat: ::std::os::raw::c_int,
4413 pub data_in: *const ::std::os::raw::c_void,
4414 pub data_size_in: __u32,
4415 pub __bindgen_padding_0: [u8; 4usize],
4416 pub data_out: *mut ::std::os::raw::c_void,
4417 pub data_size_out: __u32,
4418 pub retval: __u32,
4419 pub duration: __u32,
4420 pub __bindgen_padding_1: [u8; 4usize],
4421 pub ctx_in: *const ::std::os::raw::c_void,
4422 pub ctx_size_in: __u32,
4423 pub __bindgen_padding_2: [u8; 4usize],
4424 pub ctx_out: *mut ::std::os::raw::c_void,
4425 pub ctx_size_out: __u32,
4426 pub __bindgen_padding_3: [u8; 4usize],
4427}
4428impl Default for bpf_prog_test_run_attr {
4429 fn default() -> Self {
4430 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
4431 unsafe {
4432 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4433 s.assume_init()
4434 }
4435 }
4436}
4437extern "C" {
4438 pub fn bpf_prog_get_next_id(start_id: __u32, next_id: *mut __u32) -> ::std::os::raw::c_int;
4439}
4440extern "C" {
4441 pub fn bpf_map_get_next_id(start_id: __u32, next_id: *mut __u32) -> ::std::os::raw::c_int;
4442}
4443extern "C" {
4444 pub fn bpf_btf_get_next_id(start_id: __u32, next_id: *mut __u32) -> ::std::os::raw::c_int;
4445}
4446extern "C" {
4447 pub fn bpf_link_get_next_id(start_id: __u32, next_id: *mut __u32) -> ::std::os::raw::c_int;
4448}
4449extern "C" {
4450 pub fn bpf_prog_get_fd_by_id(id: __u32) -> ::std::os::raw::c_int;
4451}
4452extern "C" {
4453 pub fn bpf_map_get_fd_by_id(id: __u32) -> ::std::os::raw::c_int;
4454}
4455extern "C" {
4456 pub fn bpf_btf_get_fd_by_id(id: __u32) -> ::std::os::raw::c_int;
4457}
4458extern "C" {
4459 pub fn bpf_link_get_fd_by_id(id: __u32) -> ::std::os::raw::c_int;
4460}
4461extern "C" {
4462 pub fn bpf_obj_get_info_by_fd(
4463 bpf_fd: ::std::os::raw::c_int,
4464 info: *mut ::std::os::raw::c_void,
4465 info_len: *mut __u32,
4466 ) -> ::std::os::raw::c_int;
4467}
4468#[repr(C)]
4469#[derive(Debug, Copy, Clone)]
4470pub struct bpf_prog_query_opts {
4471 pub sz: size_t,
4472 pub query_flags: __u32,
4473 pub attach_flags: __u32,
4474 pub prog_ids: *mut __u32,
4475 pub prog_cnt: __u32,
4476 pub __bindgen_padding_0: [u8; 4usize],
4477 pub prog_attach_flags: *mut __u32,
4478}
4479impl Default for bpf_prog_query_opts {
4480 fn default() -> Self {
4481 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
4482 unsafe {
4483 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4484 s.assume_init()
4485 }
4486 }
4487}
4488extern "C" {
4489 pub fn bpf_prog_query_opts(
4490 target_fd: ::std::os::raw::c_int,
4491 type_: bpf_attach_type,
4492 opts: *mut bpf_prog_query_opts,
4493 ) -> ::std::os::raw::c_int;
4494}
4495extern "C" {
4496 pub fn bpf_prog_query(
4497 target_fd: ::std::os::raw::c_int,
4498 type_: bpf_attach_type,
4499 query_flags: __u32,
4500 attach_flags: *mut __u32,
4501 prog_ids: *mut __u32,
4502 prog_cnt: *mut __u32,
4503 ) -> ::std::os::raw::c_int;
4504}
4505extern "C" {
4506 pub fn bpf_raw_tracepoint_open(
4507 name: *const ::std::os::raw::c_char,
4508 prog_fd: ::std::os::raw::c_int,
4509 ) -> ::std::os::raw::c_int;
4510}
4511extern "C" {
4512 pub fn bpf_task_fd_query(
4513 pid: ::std::os::raw::c_int,
4514 fd: ::std::os::raw::c_int,
4515 flags: __u32,
4516 buf: *mut ::std::os::raw::c_char,
4517 buf_len: *mut __u32,
4518 prog_id: *mut __u32,
4519 fd_type: *mut __u32,
4520 probe_offset: *mut __u64,
4521 probe_addr: *mut __u64,
4522 ) -> ::std::os::raw::c_int;
4523}
4524extern "C" {
4525 pub fn bpf_enable_stats(type_: bpf_stats_type) -> ::std::os::raw::c_int;
4526}
4527#[repr(C)]
4528#[derive(Debug, Default, Copy, Clone)]
4529pub struct bpf_prog_bind_opts {
4530 pub sz: size_t,
4531 pub flags: __u32,
4532 pub __bindgen_padding_0: [u8; 4usize],
4533}
4534extern "C" {
4535 pub fn bpf_prog_bind_map(
4536 prog_fd: ::std::os::raw::c_int,
4537 map_fd: ::std::os::raw::c_int,
4538 opts: *const bpf_prog_bind_opts,
4539 ) -> ::std::os::raw::c_int;
4540}
4541#[repr(C)]
4542#[derive(Debug, Copy, Clone)]
4543pub struct bpf_test_run_opts {
4544 pub sz: size_t,
4545 pub data_in: *const ::std::os::raw::c_void,
4546 pub data_out: *mut ::std::os::raw::c_void,
4547 pub data_size_in: __u32,
4548 pub data_size_out: __u32,
4549 pub ctx_in: *const ::std::os::raw::c_void,
4550 pub ctx_out: *mut ::std::os::raw::c_void,
4551 pub ctx_size_in: __u32,
4552 pub ctx_size_out: __u32,
4553 pub retval: __u32,
4554 pub repeat: ::std::os::raw::c_int,
4555 pub duration: __u32,
4556 pub flags: __u32,
4557 pub cpu: __u32,
4558 pub batch_size: __u32,
4559}
4560impl Default for bpf_test_run_opts {
4561 fn default() -> Self {
4562 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
4563 unsafe {
4564 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4565 s.assume_init()
4566 }
4567 }
4568}
4569extern "C" {
4570 pub fn bpf_prog_test_run_opts(
4571 prog_fd: ::std::os::raw::c_int,
4572 opts: *mut bpf_test_run_opts,
4573 ) -> ::std::os::raw::c_int;
4574}
4575pub type va_list = __builtin_va_list;
4576pub type __gnuc_va_list = __builtin_va_list;
4577#[repr(C)]
4578#[derive(Debug, Default, Copy, Clone)]
4579pub struct btf_header {
4580 pub magic: __u16,
4581 pub version: __u8,
4582 pub flags: __u8,
4583 pub hdr_len: __u32,
4584 pub type_off: __u32,
4585 pub type_len: __u32,
4586 pub str_off: __u32,
4587 pub str_len: __u32,
4588}
4589#[repr(C)]
4590#[derive(Copy, Clone)]
4591pub struct btf_type {
4592 pub name_off: __u32,
4593 pub info: __u32,
4594 pub __bindgen_anon_1: btf_type__bindgen_ty_1,
4595}
4596#[repr(C)]
4597#[derive(Copy, Clone)]
4598pub union btf_type__bindgen_ty_1 {
4599 pub size: __u32,
4600 pub type_: __u32,
4601}
4602impl Default for btf_type__bindgen_ty_1 {
4603 fn default() -> Self {
4604 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
4605 unsafe {
4606 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4607 s.assume_init()
4608 }
4609 }
4610}
4611impl Default for btf_type {
4612 fn default() -> Self {
4613 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
4614 unsafe {
4615 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4616 s.assume_init()
4617 }
4618 }
4619}
4620pub const BTF_KIND_UNKN: _bindgen_ty_88 = 0;
4621pub const BTF_KIND_INT: _bindgen_ty_88 = 1;
4622pub const BTF_KIND_PTR: _bindgen_ty_88 = 2;
4623pub const BTF_KIND_ARRAY: _bindgen_ty_88 = 3;
4624pub const BTF_KIND_STRUCT: _bindgen_ty_88 = 4;
4625pub const BTF_KIND_UNION: _bindgen_ty_88 = 5;
4626pub const BTF_KIND_ENUM: _bindgen_ty_88 = 6;
4627pub const BTF_KIND_FWD: _bindgen_ty_88 = 7;
4628pub const BTF_KIND_TYPEDEF: _bindgen_ty_88 = 8;
4629pub const BTF_KIND_VOLATILE: _bindgen_ty_88 = 9;
4630pub const BTF_KIND_CONST: _bindgen_ty_88 = 10;
4631pub const BTF_KIND_RESTRICT: _bindgen_ty_88 = 11;
4632pub const BTF_KIND_FUNC: _bindgen_ty_88 = 12;
4633pub const BTF_KIND_FUNC_PROTO: _bindgen_ty_88 = 13;
4634pub const BTF_KIND_VAR: _bindgen_ty_88 = 14;
4635pub const BTF_KIND_DATASEC: _bindgen_ty_88 = 15;
4636pub const BTF_KIND_FLOAT: _bindgen_ty_88 = 16;
4637pub const BTF_KIND_DECL_TAG: _bindgen_ty_88 = 17;
4638pub const BTF_KIND_TYPE_TAG: _bindgen_ty_88 = 18;
4639pub const BTF_KIND_ENUM64: _bindgen_ty_88 = 19;
4640pub const NR_BTF_KINDS: _bindgen_ty_88 = 20;
4641pub const BTF_KIND_MAX: _bindgen_ty_88 = 19;
4642pub type _bindgen_ty_88 = ::std::os::raw::c_uint;
4643#[repr(C)]
4644#[derive(Debug, Default, Copy, Clone)]
4645pub struct btf_enum {
4646 pub name_off: __u32,
4647 pub val: __s32,
4648}
4649#[repr(C)]
4650#[derive(Debug, Default, Copy, Clone)]
4651pub struct btf_array {
4652 pub type_: __u32,
4653 pub index_type: __u32,
4654 pub nelems: __u32,
4655}
4656#[repr(C)]
4657#[derive(Debug, Default, Copy, Clone)]
4658pub struct btf_member {
4659 pub name_off: __u32,
4660 pub type_: __u32,
4661 pub offset: __u32,
4662}
4663#[repr(C)]
4664#[derive(Debug, Default, Copy, Clone)]
4665pub struct btf_param {
4666 pub name_off: __u32,
4667 pub type_: __u32,
4668}
4669pub const BTF_VAR_STATIC: _bindgen_ty_89 = 0;
4670pub const BTF_VAR_GLOBAL_ALLOCATED: _bindgen_ty_89 = 1;
4671pub const BTF_VAR_GLOBAL_EXTERN: _bindgen_ty_89 = 2;
4672pub type _bindgen_ty_89 = ::std::os::raw::c_uint;
4673pub const BTF_FUNC_STATIC: btf_func_linkage = 0;
4674pub const BTF_FUNC_GLOBAL: btf_func_linkage = 1;
4675pub const BTF_FUNC_EXTERN: btf_func_linkage = 2;
4676pub type btf_func_linkage = ::std::os::raw::c_uint;
4677#[repr(C)]
4678#[derive(Debug, Default, Copy, Clone)]
4679pub struct btf_var {
4680 pub linkage: __u32,
4681}
4682#[repr(C)]
4683#[derive(Debug, Default, Copy, Clone)]
4684pub struct btf_var_secinfo {
4685 pub type_: __u32,
4686 pub offset: __u32,
4687 pub size: __u32,
4688}
4689#[repr(C)]
4690#[derive(Debug, Default, Copy, Clone)]
4691pub struct btf_decl_tag {
4692 pub component_idx: __s32,
4693}
4694#[repr(C)]
4695#[derive(Debug, Default, Copy, Clone)]
4696pub struct btf_enum64 {
4697 pub name_off: __u32,
4698 pub val_lo32: __u32,
4699 pub val_hi32: __u32,
4700}
4701#[repr(C)]
4702#[derive(Debug, Copy, Clone)]
4703pub struct bpf_object {
4704 _unused: [u8; 0],
4705}
4706pub const BTF_LITTLE_ENDIAN: btf_endianness = 0;
4707pub const BTF_BIG_ENDIAN: btf_endianness = 1;
4708pub type btf_endianness = ::std::os::raw::c_uint;
4709extern "C" {
4710 pub fn btf__free(btf: *mut btf);
4711}
4712extern "C" {
4713 pub fn btf__new(data: *const ::std::os::raw::c_void, size: __u32) -> *mut btf;
4714}
4715extern "C" {
4716 pub fn btf__new_split(
4717 data: *const ::std::os::raw::c_void,
4718 size: __u32,
4719 base_btf: *mut btf,
4720 ) -> *mut btf;
4721}
4722extern "C" {
4723 pub fn btf__new_empty() -> *mut btf;
4724}
4725extern "C" {
4726 pub fn btf__new_empty_split(base_btf: *mut btf) -> *mut btf;
4727}
4728extern "C" {
4729 pub fn btf__parse(path: *const ::std::os::raw::c_char, btf_ext: *mut *mut btf_ext) -> *mut btf;
4730}
4731extern "C" {
4732 pub fn btf__parse_split(path: *const ::std::os::raw::c_char, base_btf: *mut btf) -> *mut btf;
4733}
4734extern "C" {
4735 pub fn btf__parse_elf(
4736 path: *const ::std::os::raw::c_char,
4737 btf_ext: *mut *mut btf_ext,
4738 ) -> *mut btf;
4739}
4740extern "C" {
4741 pub fn btf__parse_elf_split(
4742 path: *const ::std::os::raw::c_char,
4743 base_btf: *mut btf,
4744 ) -> *mut btf;
4745}
4746extern "C" {
4747 pub fn btf__parse_raw(path: *const ::std::os::raw::c_char) -> *mut btf;
4748}
4749extern "C" {
4750 pub fn btf__parse_raw_split(
4751 path: *const ::std::os::raw::c_char,
4752 base_btf: *mut btf,
4753 ) -> *mut btf;
4754}
4755extern "C" {
4756 pub fn btf__load_vmlinux_btf() -> *mut btf;
4757}
4758extern "C" {
4759 pub fn btf__load_module_btf(
4760 module_name: *const ::std::os::raw::c_char,
4761 vmlinux_btf: *mut btf,
4762 ) -> *mut btf;
4763}
4764extern "C" {
4765 pub fn btf__load_from_kernel_by_id(id: __u32) -> *mut btf;
4766}
4767extern "C" {
4768 pub fn btf__load_from_kernel_by_id_split(id: __u32, base_btf: *mut btf) -> *mut btf;
4769}
4770extern "C" {
4771 pub fn btf__load_into_kernel(btf: *mut btf) -> ::std::os::raw::c_int;
4772}
4773extern "C" {
4774 pub fn btf__find_by_name(btf: *const btf, type_name: *const ::std::os::raw::c_char) -> __s32;
4775}
4776extern "C" {
4777 pub fn btf__find_by_name_kind(
4778 btf: *const btf,
4779 type_name: *const ::std::os::raw::c_char,
4780 kind: __u32,
4781 ) -> __s32;
4782}
4783extern "C" {
4784 pub fn btf__type_cnt(btf: *const btf) -> __u32;
4785}
4786extern "C" {
4787 pub fn btf__base_btf(btf: *const btf) -> *const btf;
4788}
4789extern "C" {
4790 pub fn btf__type_by_id(btf: *const btf, id: __u32) -> *const btf_type;
4791}
4792extern "C" {
4793 pub fn btf__pointer_size(btf: *const btf) -> size_t;
4794}
4795extern "C" {
4796 pub fn btf__set_pointer_size(btf: *mut btf, ptr_sz: size_t) -> ::std::os::raw::c_int;
4797}
4798extern "C" {
4799 pub fn btf__endianness(btf: *const btf) -> btf_endianness;
4800}
4801extern "C" {
4802 pub fn btf__set_endianness(btf: *mut btf, endian: btf_endianness) -> ::std::os::raw::c_int;
4803}
4804extern "C" {
4805 pub fn btf__resolve_size(btf: *const btf, type_id: __u32) -> __s64;
4806}
4807extern "C" {
4808 pub fn btf__resolve_type(btf: *const btf, type_id: __u32) -> ::std::os::raw::c_int;
4809}
4810extern "C" {
4811 pub fn btf__align_of(btf: *const btf, id: __u32) -> ::std::os::raw::c_int;
4812}
4813extern "C" {
4814 pub fn btf__fd(btf: *const btf) -> ::std::os::raw::c_int;
4815}
4816extern "C" {
4817 pub fn btf__set_fd(btf: *mut btf, fd: ::std::os::raw::c_int);
4818}
4819extern "C" {
4820 pub fn btf__raw_data(btf: *const btf, size: *mut __u32) -> *const ::std::os::raw::c_void;
4821}
4822extern "C" {
4823 pub fn btf__name_by_offset(btf: *const btf, offset: __u32) -> *const ::std::os::raw::c_char;
4824}
4825extern "C" {
4826 pub fn btf__str_by_offset(btf: *const btf, offset: __u32) -> *const ::std::os::raw::c_char;
4827}
4828extern "C" {
4829 pub fn btf_ext__new(data: *const __u8, size: __u32) -> *mut btf_ext;
4830}
4831extern "C" {
4832 pub fn btf_ext__free(btf_ext: *mut btf_ext);
4833}
4834extern "C" {
4835 pub fn btf_ext__raw_data(
4836 btf_ext: *const btf_ext,
4837 size: *mut __u32,
4838 ) -> *const ::std::os::raw::c_void;
4839}
4840extern "C" {
4841 pub fn btf__find_str(btf: *mut btf, s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
4842}
4843extern "C" {
4844 pub fn btf__add_str(btf: *mut btf, s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
4845}
4846extern "C" {
4847 pub fn btf__add_type(
4848 btf: *mut btf,
4849 src_btf: *const btf,
4850 src_type: *const btf_type,
4851 ) -> ::std::os::raw::c_int;
4852}
4853extern "C" {
4854 pub fn btf__add_btf(btf: *mut btf, src_btf: *const btf) -> ::std::os::raw::c_int;
4855}
4856extern "C" {
4857 pub fn btf__add_int(
4858 btf: *mut btf,
4859 name: *const ::std::os::raw::c_char,
4860 byte_sz: size_t,
4861 encoding: ::std::os::raw::c_int,
4862 ) -> ::std::os::raw::c_int;
4863}
4864extern "C" {
4865 pub fn btf__add_float(
4866 btf: *mut btf,
4867 name: *const ::std::os::raw::c_char,
4868 byte_sz: size_t,
4869 ) -> ::std::os::raw::c_int;
4870}
4871extern "C" {
4872 pub fn btf__add_ptr(btf: *mut btf, ref_type_id: ::std::os::raw::c_int)
4873 -> ::std::os::raw::c_int;
4874}
4875extern "C" {
4876 pub fn btf__add_array(
4877 btf: *mut btf,
4878 index_type_id: ::std::os::raw::c_int,
4879 elem_type_id: ::std::os::raw::c_int,
4880 nr_elems: __u32,
4881 ) -> ::std::os::raw::c_int;
4882}
4883extern "C" {
4884 pub fn btf__add_struct(
4885 btf: *mut btf,
4886 name: *const ::std::os::raw::c_char,
4887 sz: __u32,
4888 ) -> ::std::os::raw::c_int;
4889}
4890extern "C" {
4891 pub fn btf__add_union(
4892 btf: *mut btf,
4893 name: *const ::std::os::raw::c_char,
4894 sz: __u32,
4895 ) -> ::std::os::raw::c_int;
4896}
4897extern "C" {
4898 pub fn btf__add_field(
4899 btf: *mut btf,
4900 name: *const ::std::os::raw::c_char,
4901 field_type_id: ::std::os::raw::c_int,
4902 bit_offset: __u32,
4903 bit_size: __u32,
4904 ) -> ::std::os::raw::c_int;
4905}
4906extern "C" {
4907 pub fn btf__add_enum(
4908 btf: *mut btf,
4909 name: *const ::std::os::raw::c_char,
4910 bytes_sz: __u32,
4911 ) -> ::std::os::raw::c_int;
4912}
4913extern "C" {
4914 pub fn btf__add_enum_value(
4915 btf: *mut btf,
4916 name: *const ::std::os::raw::c_char,
4917 value: __s64,
4918 ) -> ::std::os::raw::c_int;
4919}
4920extern "C" {
4921 pub fn btf__add_enum64(
4922 btf: *mut btf,
4923 name: *const ::std::os::raw::c_char,
4924 bytes_sz: __u32,
4925 is_signed: bool,
4926 ) -> ::std::os::raw::c_int;
4927}
4928extern "C" {
4929 pub fn btf__add_enum64_value(
4930 btf: *mut btf,
4931 name: *const ::std::os::raw::c_char,
4932 value: __u64,
4933 ) -> ::std::os::raw::c_int;
4934}
4935pub const BTF_FWD_STRUCT: btf_fwd_kind = 0;
4936pub const BTF_FWD_UNION: btf_fwd_kind = 1;
4937pub const BTF_FWD_ENUM: btf_fwd_kind = 2;
4938pub type btf_fwd_kind = ::std::os::raw::c_uint;
4939extern "C" {
4940 pub fn btf__add_fwd(
4941 btf: *mut btf,
4942 name: *const ::std::os::raw::c_char,
4943 fwd_kind: btf_fwd_kind,
4944 ) -> ::std::os::raw::c_int;
4945}
4946extern "C" {
4947 pub fn btf__add_typedef(
4948 btf: *mut btf,
4949 name: *const ::std::os::raw::c_char,
4950 ref_type_id: ::std::os::raw::c_int,
4951 ) -> ::std::os::raw::c_int;
4952}
4953extern "C" {
4954 pub fn btf__add_volatile(
4955 btf: *mut btf,
4956 ref_type_id: ::std::os::raw::c_int,
4957 ) -> ::std::os::raw::c_int;
4958}
4959extern "C" {
4960 pub fn btf__add_const(
4961 btf: *mut btf,
4962 ref_type_id: ::std::os::raw::c_int,
4963 ) -> ::std::os::raw::c_int;
4964}
4965extern "C" {
4966 pub fn btf__add_restrict(
4967 btf: *mut btf,
4968 ref_type_id: ::std::os::raw::c_int,
4969 ) -> ::std::os::raw::c_int;
4970}
4971extern "C" {
4972 pub fn btf__add_type_tag(
4973 btf: *mut btf,
4974 value: *const ::std::os::raw::c_char,
4975 ref_type_id: ::std::os::raw::c_int,
4976 ) -> ::std::os::raw::c_int;
4977}
4978extern "C" {
4979 pub fn btf__add_func(
4980 btf: *mut btf,
4981 name: *const ::std::os::raw::c_char,
4982 linkage: btf_func_linkage,
4983 proto_type_id: ::std::os::raw::c_int,
4984 ) -> ::std::os::raw::c_int;
4985}
4986extern "C" {
4987 pub fn btf__add_func_proto(
4988 btf: *mut btf,
4989 ret_type_id: ::std::os::raw::c_int,
4990 ) -> ::std::os::raw::c_int;
4991}
4992extern "C" {
4993 pub fn btf__add_func_param(
4994 btf: *mut btf,
4995 name: *const ::std::os::raw::c_char,
4996 type_id: ::std::os::raw::c_int,
4997 ) -> ::std::os::raw::c_int;
4998}
4999extern "C" {
5000 pub fn btf__add_var(
5001 btf: *mut btf,
5002 name: *const ::std::os::raw::c_char,
5003 linkage: ::std::os::raw::c_int,
5004 type_id: ::std::os::raw::c_int,
5005 ) -> ::std::os::raw::c_int;
5006}
5007extern "C" {
5008 pub fn btf__add_datasec(
5009 btf: *mut btf,
5010 name: *const ::std::os::raw::c_char,
5011 byte_sz: __u32,
5012 ) -> ::std::os::raw::c_int;
5013}
5014extern "C" {
5015 pub fn btf__add_datasec_var_info(
5016 btf: *mut btf,
5017 var_type_id: ::std::os::raw::c_int,
5018 offset: __u32,
5019 byte_sz: __u32,
5020 ) -> ::std::os::raw::c_int;
5021}
5022extern "C" {
5023 pub fn btf__add_decl_tag(
5024 btf: *mut btf,
5025 value: *const ::std::os::raw::c_char,
5026 ref_type_id: ::std::os::raw::c_int,
5027 component_idx: ::std::os::raw::c_int,
5028 ) -> ::std::os::raw::c_int;
5029}
5030#[repr(C)]
5031#[derive(Debug, Copy, Clone)]
5032pub struct btf_dedup_opts {
5033 pub sz: size_t,
5034 pub btf_ext: *mut btf_ext,
5035 pub force_collisions: bool,
5036 pub __bindgen_padding_0: [u8; 7usize],
5037}
5038impl Default for btf_dedup_opts {
5039 fn default() -> Self {
5040 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
5041 unsafe {
5042 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5043 s.assume_init()
5044 }
5045 }
5046}
5047extern "C" {
5048 pub fn btf__dedup(btf: *mut btf, opts: *const btf_dedup_opts) -> ::std::os::raw::c_int;
5049}
5050#[repr(C)]
5051#[derive(Debug, Copy, Clone)]
5052pub struct btf_dump {
5053 _unused: [u8; 0],
5054}
5055#[repr(C)]
5056#[derive(Debug, Default, Copy, Clone)]
5057pub struct btf_dump_opts {
5058 pub sz: size_t,
5059}
5060pub type btf_dump_printf_fn_t = ::std::option::Option<
5061 unsafe extern "C" fn(
5062 ctx: *mut ::std::os::raw::c_void,
5063 fmt: *const ::std::os::raw::c_char,
5064 args: *mut __va_list_tag,
5065 ),
5066>;
5067extern "C" {
5068 pub fn btf_dump__new(
5069 btf: *const btf,
5070 printf_fn: btf_dump_printf_fn_t,
5071 ctx: *mut ::std::os::raw::c_void,
5072 opts: *const btf_dump_opts,
5073 ) -> *mut btf_dump;
5074}
5075extern "C" {
5076 pub fn btf_dump__free(d: *mut btf_dump);
5077}
5078extern "C" {
5079 pub fn btf_dump__dump_type(d: *mut btf_dump, id: __u32) -> ::std::os::raw::c_int;
5080}
5081#[repr(C)]
5082#[derive(Debug, Copy, Clone)]
5083pub struct btf_dump_emit_type_decl_opts {
5084 pub sz: size_t,
5085 pub field_name: *const ::std::os::raw::c_char,
5086 pub indent_level: ::std::os::raw::c_int,
5087 pub strip_mods: bool,
5088 pub __bindgen_padding_0: [u8; 3usize],
5089}
5090impl Default for btf_dump_emit_type_decl_opts {
5091 fn default() -> Self {
5092 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
5093 unsafe {
5094 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5095 s.assume_init()
5096 }
5097 }
5098}
5099extern "C" {
5100 pub fn btf_dump__emit_type_decl(
5101 d: *mut btf_dump,
5102 id: __u32,
5103 opts: *const btf_dump_emit_type_decl_opts,
5104 ) -> ::std::os::raw::c_int;
5105}
5106#[repr(C)]
5107#[derive(Debug, Copy, Clone)]
5108pub struct btf_dump_type_data_opts {
5109 pub sz: size_t,
5110 pub indent_str: *const ::std::os::raw::c_char,
5111 pub indent_level: ::std::os::raw::c_int,
5112 pub compact: bool,
5113 pub skip_names: bool,
5114 pub emit_zeroes: bool,
5115 pub __bindgen_padding_0: u8,
5116}
5117impl Default for btf_dump_type_data_opts {
5118 fn default() -> Self {
5119 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
5120 unsafe {
5121 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5122 s.assume_init()
5123 }
5124 }
5125}
5126extern "C" {
5127 pub fn btf_dump__dump_type_data(
5128 d: *mut btf_dump,
5129 id: __u32,
5130 data: *const ::std::os::raw::c_void,
5131 data_sz: size_t,
5132 opts: *const btf_dump_type_data_opts,
5133 ) -> ::std::os::raw::c_int;
5134}
5135extern "C" {
5136 pub fn vdprintf(
5137 __fd: ::std::os::raw::c_int,
5138 __fmt: *const ::std::os::raw::c_char,
5139 __arg: *mut __va_list_tag,
5140 ) -> ::std::os::raw::c_int;
5141}
5142pub type pid_t = __pid_t;
5143extern "C" {
5144 pub fn libbpf_major_version() -> __u32;
5145}
5146extern "C" {
5147 pub fn libbpf_minor_version() -> __u32;
5148}
5149extern "C" {
5150 pub fn libbpf_version_string() -> *const ::std::os::raw::c_char;
5151}
5152extern "C" {
5153 pub fn libbpf_strerror(
5154 err: ::std::os::raw::c_int,
5155 buf: *mut ::std::os::raw::c_char,
5156 size: size_t,
5157 ) -> ::std::os::raw::c_int;
5158}
5159extern "C" {
5160 pub fn libbpf_bpf_attach_type_str(t: bpf_attach_type) -> *const ::std::os::raw::c_char;
5161}
5162extern "C" {
5163 pub fn libbpf_bpf_link_type_str(t: bpf_link_type) -> *const ::std::os::raw::c_char;
5164}
5165extern "C" {
5166 pub fn libbpf_bpf_map_type_str(t: bpf_map_type) -> *const ::std::os::raw::c_char;
5167}
5168extern "C" {
5169 pub fn libbpf_bpf_prog_type_str(t: bpf_prog_type) -> *const ::std::os::raw::c_char;
5170}
5171pub const LIBBPF_WARN: libbpf_print_level = 0;
5172pub const LIBBPF_INFO: libbpf_print_level = 1;
5173pub const LIBBPF_DEBUG: libbpf_print_level = 2;
5174pub type libbpf_print_level = ::std::os::raw::c_uint;
5175pub type libbpf_print_fn_t = ::std::option::Option<
5176 unsafe extern "C" fn(
5177 level: libbpf_print_level,
5178 arg1: *const ::std::os::raw::c_char,
5179 ap: *mut __va_list_tag,
5180 ) -> ::std::os::raw::c_int,
5181>;
5182extern "C" {
5183 pub fn libbpf_set_print(fn_: libbpf_print_fn_t) -> libbpf_print_fn_t;
5184}
5185#[repr(C)]
5186#[derive(Debug, Copy, Clone)]
5187pub struct bpf_object_open_opts {
5188 pub sz: size_t,
5189 pub object_name: *const ::std::os::raw::c_char,
5190 pub relaxed_maps: bool,
5191 pub __bindgen_padding_0: [u8; 7usize],
5192 pub pin_root_path: *const ::std::os::raw::c_char,
5193 pub kconfig: *const ::std::os::raw::c_char,
5194 pub btf_custom_path: *const ::std::os::raw::c_char,
5195 pub kernel_log_buf: *mut ::std::os::raw::c_char,
5196 pub kernel_log_size: size_t,
5197 pub kernel_log_level: __u32,
5198 pub __bindgen_padding_1: [u8; 4usize],
5199}
5200impl Default for bpf_object_open_opts {
5201 fn default() -> Self {
5202 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
5203 unsafe {
5204 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5205 s.assume_init()
5206 }
5207 }
5208}
5209extern "C" {
5210 pub fn bpf_object__open(path: *const ::std::os::raw::c_char) -> *mut bpf_object;
5211}
5212extern "C" {
5213 pub fn bpf_object__open_file(
5214 path: *const ::std::os::raw::c_char,
5215 opts: *const bpf_object_open_opts,
5216 ) -> *mut bpf_object;
5217}
5218extern "C" {
5219 pub fn bpf_object__open_mem(
5220 obj_buf: *const ::std::os::raw::c_void,
5221 obj_buf_sz: size_t,
5222 opts: *const bpf_object_open_opts,
5223 ) -> *mut bpf_object;
5224}
5225extern "C" {
5226 pub fn bpf_object__load(obj: *mut bpf_object) -> ::std::os::raw::c_int;
5227}
5228extern "C" {
5229 pub fn bpf_object__close(object: *mut bpf_object);
5230}
5231extern "C" {
5232 pub fn bpf_object__pin_maps(
5233 obj: *mut bpf_object,
5234 path: *const ::std::os::raw::c_char,
5235 ) -> ::std::os::raw::c_int;
5236}
5237extern "C" {
5238 pub fn bpf_object__unpin_maps(
5239 obj: *mut bpf_object,
5240 path: *const ::std::os::raw::c_char,
5241 ) -> ::std::os::raw::c_int;
5242}
5243extern "C" {
5244 pub fn bpf_object__pin_programs(
5245 obj: *mut bpf_object,
5246 path: *const ::std::os::raw::c_char,
5247 ) -> ::std::os::raw::c_int;
5248}
5249extern "C" {
5250 pub fn bpf_object__unpin_programs(
5251 obj: *mut bpf_object,
5252 path: *const ::std::os::raw::c_char,
5253 ) -> ::std::os::raw::c_int;
5254}
5255extern "C" {
5256 pub fn bpf_object__pin(
5257 object: *mut bpf_object,
5258 path: *const ::std::os::raw::c_char,
5259 ) -> ::std::os::raw::c_int;
5260}
5261extern "C" {
5262 pub fn bpf_object__name(obj: *const bpf_object) -> *const ::std::os::raw::c_char;
5263}
5264extern "C" {
5265 pub fn bpf_object__kversion(obj: *const bpf_object) -> ::std::os::raw::c_uint;
5266}
5267extern "C" {
5268 pub fn bpf_object__set_kversion(
5269 obj: *mut bpf_object,
5270 kern_version: __u32,
5271 ) -> ::std::os::raw::c_int;
5272}
5273extern "C" {
5274 pub fn bpf_object__btf(obj: *const bpf_object) -> *mut btf;
5275}
5276extern "C" {
5277 pub fn bpf_object__btf_fd(obj: *const bpf_object) -> ::std::os::raw::c_int;
5278}
5279extern "C" {
5280 pub fn bpf_object__find_program_by_name(
5281 obj: *const bpf_object,
5282 name: *const ::std::os::raw::c_char,
5283 ) -> *mut bpf_program;
5284}
5285extern "C" {
5286 pub fn libbpf_prog_type_by_name(
5287 name: *const ::std::os::raw::c_char,
5288 prog_type: *mut bpf_prog_type,
5289 expected_attach_type: *mut bpf_attach_type,
5290 ) -> ::std::os::raw::c_int;
5291}
5292extern "C" {
5293 pub fn libbpf_attach_type_by_name(
5294 name: *const ::std::os::raw::c_char,
5295 attach_type: *mut bpf_attach_type,
5296 ) -> ::std::os::raw::c_int;
5297}
5298extern "C" {
5299 pub fn libbpf_find_vmlinux_btf_id(
5300 name: *const ::std::os::raw::c_char,
5301 attach_type: bpf_attach_type,
5302 ) -> ::std::os::raw::c_int;
5303}
5304extern "C" {
5305 pub fn bpf_object__next_program(
5306 obj: *const bpf_object,
5307 prog: *mut bpf_program,
5308 ) -> *mut bpf_program;
5309}
5310extern "C" {
5311 pub fn bpf_object__prev_program(
5312 obj: *const bpf_object,
5313 prog: *mut bpf_program,
5314 ) -> *mut bpf_program;
5315}
5316extern "C" {
5317 pub fn bpf_program__set_ifindex(prog: *mut bpf_program, ifindex: __u32);
5318}
5319extern "C" {
5320 pub fn bpf_program__name(prog: *const bpf_program) -> *const ::std::os::raw::c_char;
5321}
5322extern "C" {
5323 pub fn bpf_program__section_name(prog: *const bpf_program) -> *const ::std::os::raw::c_char;
5324}
5325extern "C" {
5326 pub fn bpf_program__autoload(prog: *const bpf_program) -> bool;
5327}
5328extern "C" {
5329 pub fn bpf_program__set_autoload(
5330 prog: *mut bpf_program,
5331 autoload: bool,
5332 ) -> ::std::os::raw::c_int;
5333}
5334extern "C" {
5335 pub fn bpf_program__autoattach(prog: *const bpf_program) -> bool;
5336}
5337extern "C" {
5338 pub fn bpf_program__set_autoattach(prog: *mut bpf_program, autoattach: bool);
5339}
5340extern "C" {
5341 pub fn bpf_program__insns(prog: *const bpf_program) -> *const bpf_insn;
5342}
5343extern "C" {
5344 pub fn bpf_program__set_insns(
5345 prog: *mut bpf_program,
5346 new_insns: *mut bpf_insn,
5347 new_insn_cnt: size_t,
5348 ) -> ::std::os::raw::c_int;
5349}
5350extern "C" {
5351 pub fn bpf_program__insn_cnt(prog: *const bpf_program) -> size_t;
5352}
5353extern "C" {
5354 pub fn bpf_program__fd(prog: *const bpf_program) -> ::std::os::raw::c_int;
5355}
5356extern "C" {
5357 pub fn bpf_program__pin(
5358 prog: *mut bpf_program,
5359 path: *const ::std::os::raw::c_char,
5360 ) -> ::std::os::raw::c_int;
5361}
5362extern "C" {
5363 pub fn bpf_program__unpin(
5364 prog: *mut bpf_program,
5365 path: *const ::std::os::raw::c_char,
5366 ) -> ::std::os::raw::c_int;
5367}
5368extern "C" {
5369 pub fn bpf_program__unload(prog: *mut bpf_program);
5370}
5371#[repr(C)]
5372#[derive(Debug, Copy, Clone)]
5373pub struct bpf_link {
5374 _unused: [u8; 0],
5375}
5376extern "C" {
5377 pub fn bpf_link__open(path: *const ::std::os::raw::c_char) -> *mut bpf_link;
5378}
5379extern "C" {
5380 pub fn bpf_link__fd(link: *const bpf_link) -> ::std::os::raw::c_int;
5381}
5382extern "C" {
5383 pub fn bpf_link__pin_path(link: *const bpf_link) -> *const ::std::os::raw::c_char;
5384}
5385extern "C" {
5386 pub fn bpf_link__pin(
5387 link: *mut bpf_link,
5388 path: *const ::std::os::raw::c_char,
5389 ) -> ::std::os::raw::c_int;
5390}
5391extern "C" {
5392 pub fn bpf_link__unpin(link: *mut bpf_link) -> ::std::os::raw::c_int;
5393}
5394extern "C" {
5395 pub fn bpf_link__update_program(
5396 link: *mut bpf_link,
5397 prog: *mut bpf_program,
5398 ) -> ::std::os::raw::c_int;
5399}
5400extern "C" {
5401 pub fn bpf_link__disconnect(link: *mut bpf_link);
5402}
5403extern "C" {
5404 pub fn bpf_link__detach(link: *mut bpf_link) -> ::std::os::raw::c_int;
5405}
5406extern "C" {
5407 pub fn bpf_link__destroy(link: *mut bpf_link) -> ::std::os::raw::c_int;
5408}
5409extern "C" {
5410 pub fn bpf_program__attach(prog: *const bpf_program) -> *mut bpf_link;
5411}
5412#[repr(C)]
5413#[derive(Debug, Default, Copy, Clone)]
5414pub struct bpf_perf_event_opts {
5415 pub sz: size_t,
5416 pub bpf_cookie: __u64,
5417}
5418extern "C" {
5419 pub fn bpf_program__attach_perf_event(
5420 prog: *const bpf_program,
5421 pfd: ::std::os::raw::c_int,
5422 ) -> *mut bpf_link;
5423}
5424extern "C" {
5425 pub fn bpf_program__attach_perf_event_opts(
5426 prog: *const bpf_program,
5427 pfd: ::std::os::raw::c_int,
5428 opts: *const bpf_perf_event_opts,
5429 ) -> *mut bpf_link;
5430}
5431#[repr(C)]
5432#[derive(Debug, Default, Copy, Clone)]
5433pub struct bpf_kprobe_opts {
5434 pub sz: size_t,
5435 pub bpf_cookie: __u64,
5436 pub offset: size_t,
5437 pub retprobe: bool,
5438 pub __bindgen_padding_0: [u8; 7usize],
5439}
5440extern "C" {
5441 pub fn bpf_program__attach_kprobe(
5442 prog: *const bpf_program,
5443 retprobe: bool,
5444 func_name: *const ::std::os::raw::c_char,
5445 ) -> *mut bpf_link;
5446}
5447extern "C" {
5448 pub fn bpf_program__attach_kprobe_opts(
5449 prog: *const bpf_program,
5450 func_name: *const ::std::os::raw::c_char,
5451 opts: *const bpf_kprobe_opts,
5452 ) -> *mut bpf_link;
5453}
5454#[repr(C)]
5455#[derive(Debug, Copy, Clone)]
5456pub struct bpf_kprobe_multi_opts {
5457 pub sz: size_t,
5458 pub syms: *mut *const ::std::os::raw::c_char,
5459 pub addrs: *const ::std::os::raw::c_ulong,
5460 pub cookies: *const __u64,
5461 pub cnt: size_t,
5462 pub retprobe: bool,
5463 pub __bindgen_padding_0: [u8; 7usize],
5464}
5465impl Default for bpf_kprobe_multi_opts {
5466 fn default() -> Self {
5467 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
5468 unsafe {
5469 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5470 s.assume_init()
5471 }
5472 }
5473}
5474extern "C" {
5475 pub fn bpf_program__attach_kprobe_multi_opts(
5476 prog: *const bpf_program,
5477 pattern: *const ::std::os::raw::c_char,
5478 opts: *const bpf_kprobe_multi_opts,
5479 ) -> *mut bpf_link;
5480}
5481#[repr(C)]
5482#[derive(Debug, Default, Copy, Clone)]
5483pub struct bpf_ksyscall_opts {
5484 pub sz: size_t,
5485 pub bpf_cookie: __u64,
5486 pub retprobe: bool,
5487 pub __bindgen_padding_0: [u8; 7usize],
5488}
5489extern "C" {
5490 pub fn bpf_program__attach_ksyscall(
5491 prog: *const bpf_program,
5492 syscall_name: *const ::std::os::raw::c_char,
5493 opts: *const bpf_ksyscall_opts,
5494 ) -> *mut bpf_link;
5495}
5496#[repr(C)]
5497#[derive(Debug, Copy, Clone)]
5498pub struct bpf_uprobe_opts {
5499 pub sz: size_t,
5500 pub ref_ctr_offset: size_t,
5501 pub bpf_cookie: __u64,
5502 pub retprobe: bool,
5503 pub __bindgen_padding_0: [u8; 7usize],
5504 pub func_name: *const ::std::os::raw::c_char,
5505}
5506impl Default for bpf_uprobe_opts {
5507 fn default() -> Self {
5508 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
5509 unsafe {
5510 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5511 s.assume_init()
5512 }
5513 }
5514}
5515extern "C" {
5516 pub fn bpf_program__attach_uprobe(
5517 prog: *const bpf_program,
5518 retprobe: bool,
5519 pid: pid_t,
5520 binary_path: *const ::std::os::raw::c_char,
5521 func_offset: size_t,
5522 ) -> *mut bpf_link;
5523}
5524extern "C" {
5525 pub fn bpf_program__attach_uprobe_opts(
5526 prog: *const bpf_program,
5527 pid: pid_t,
5528 binary_path: *const ::std::os::raw::c_char,
5529 func_offset: size_t,
5530 opts: *const bpf_uprobe_opts,
5531 ) -> *mut bpf_link;
5532}
5533#[repr(C)]
5534#[derive(Debug, Default, Copy, Clone)]
5535pub struct bpf_usdt_opts {
5536 pub sz: size_t,
5537 pub usdt_cookie: __u64,
5538}
5539extern "C" {
5540 pub fn bpf_program__attach_usdt(
5541 prog: *const bpf_program,
5542 pid: pid_t,
5543 binary_path: *const ::std::os::raw::c_char,
5544 usdt_provider: *const ::std::os::raw::c_char,
5545 usdt_name: *const ::std::os::raw::c_char,
5546 opts: *const bpf_usdt_opts,
5547 ) -> *mut bpf_link;
5548}
5549#[repr(C)]
5550#[derive(Debug, Default, Copy, Clone)]
5551pub struct bpf_tracepoint_opts {
5552 pub sz: size_t,
5553 pub bpf_cookie: __u64,
5554}
5555extern "C" {
5556 pub fn bpf_program__attach_tracepoint(
5557 prog: *const bpf_program,
5558 tp_category: *const ::std::os::raw::c_char,
5559 tp_name: *const ::std::os::raw::c_char,
5560 ) -> *mut bpf_link;
5561}
5562extern "C" {
5563 pub fn bpf_program__attach_tracepoint_opts(
5564 prog: *const bpf_program,
5565 tp_category: *const ::std::os::raw::c_char,
5566 tp_name: *const ::std::os::raw::c_char,
5567 opts: *const bpf_tracepoint_opts,
5568 ) -> *mut bpf_link;
5569}
5570extern "C" {
5571 pub fn bpf_program__attach_raw_tracepoint(
5572 prog: *const bpf_program,
5573 tp_name: *const ::std::os::raw::c_char,
5574 ) -> *mut bpf_link;
5575}
5576#[repr(C)]
5577#[derive(Debug, Default, Copy, Clone)]
5578pub struct bpf_trace_opts {
5579 pub sz: size_t,
5580 pub cookie: __u64,
5581}
5582extern "C" {
5583 pub fn bpf_program__attach_trace(prog: *const bpf_program) -> *mut bpf_link;
5584}
5585extern "C" {
5586 pub fn bpf_program__attach_trace_opts(
5587 prog: *const bpf_program,
5588 opts: *const bpf_trace_opts,
5589 ) -> *mut bpf_link;
5590}
5591extern "C" {
5592 pub fn bpf_program__attach_lsm(prog: *const bpf_program) -> *mut bpf_link;
5593}
5594extern "C" {
5595 pub fn bpf_program__attach_cgroup(
5596 prog: *const bpf_program,
5597 cgroup_fd: ::std::os::raw::c_int,
5598 ) -> *mut bpf_link;
5599}
5600extern "C" {
5601 pub fn bpf_program__attach_netns(
5602 prog: *const bpf_program,
5603 netns_fd: ::std::os::raw::c_int,
5604 ) -> *mut bpf_link;
5605}
5606extern "C" {
5607 pub fn bpf_program__attach_xdp(
5608 prog: *const bpf_program,
5609 ifindex: ::std::os::raw::c_int,
5610 ) -> *mut bpf_link;
5611}
5612extern "C" {
5613 pub fn bpf_program__attach_freplace(
5614 prog: *const bpf_program,
5615 target_fd: ::std::os::raw::c_int,
5616 attach_func_name: *const ::std::os::raw::c_char,
5617 ) -> *mut bpf_link;
5618}
5619extern "C" {
5620 pub fn bpf_map__attach_struct_ops(map: *const bpf_map) -> *mut bpf_link;
5621}
5622#[repr(C)]
5623#[derive(Debug, Copy, Clone)]
5624pub struct bpf_iter_attach_opts {
5625 pub sz: size_t,
5626 pub link_info: *mut bpf_iter_link_info,
5627 pub link_info_len: __u32,
5628 pub __bindgen_padding_0: [u8; 4usize],
5629}
5630impl Default for bpf_iter_attach_opts {
5631 fn default() -> Self {
5632 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
5633 unsafe {
5634 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5635 s.assume_init()
5636 }
5637 }
5638}
5639extern "C" {
5640 pub fn bpf_program__attach_iter(
5641 prog: *const bpf_program,
5642 opts: *const bpf_iter_attach_opts,
5643 ) -> *mut bpf_link;
5644}
5645extern "C" {
5646 pub fn bpf_program__type(prog: *const bpf_program) -> bpf_prog_type;
5647}
5648extern "C" {
5649 pub fn bpf_program__set_type(
5650 prog: *mut bpf_program,
5651 type_: bpf_prog_type,
5652 ) -> ::std::os::raw::c_int;
5653}
5654extern "C" {
5655 pub fn bpf_program__expected_attach_type(prog: *const bpf_program) -> bpf_attach_type;
5656}
5657extern "C" {
5658 pub fn bpf_program__set_expected_attach_type(
5659 prog: *mut bpf_program,
5660 type_: bpf_attach_type,
5661 ) -> ::std::os::raw::c_int;
5662}
5663extern "C" {
5664 pub fn bpf_program__flags(prog: *const bpf_program) -> __u32;
5665}
5666extern "C" {
5667 pub fn bpf_program__set_flags(prog: *mut bpf_program, flags: __u32) -> ::std::os::raw::c_int;
5668}
5669extern "C" {
5670 pub fn bpf_program__log_level(prog: *const bpf_program) -> __u32;
5671}
5672extern "C" {
5673 pub fn bpf_program__set_log_level(
5674 prog: *mut bpf_program,
5675 log_level: __u32,
5676 ) -> ::std::os::raw::c_int;
5677}
5678extern "C" {
5679 pub fn bpf_program__log_buf(
5680 prog: *const bpf_program,
5681 log_size: *mut size_t,
5682 ) -> *const ::std::os::raw::c_char;
5683}
5684extern "C" {
5685 pub fn bpf_program__set_log_buf(
5686 prog: *mut bpf_program,
5687 log_buf: *mut ::std::os::raw::c_char,
5688 log_size: size_t,
5689 ) -> ::std::os::raw::c_int;
5690}
5691extern "C" {
5692 pub fn bpf_program__set_attach_target(
5693 prog: *mut bpf_program,
5694 attach_prog_fd: ::std::os::raw::c_int,
5695 attach_func_name: *const ::std::os::raw::c_char,
5696 ) -> ::std::os::raw::c_int;
5697}
5698extern "C" {
5699 pub fn bpf_object__find_map_by_name(
5700 obj: *const bpf_object,
5701 name: *const ::std::os::raw::c_char,
5702 ) -> *mut bpf_map;
5703}
5704extern "C" {
5705 pub fn bpf_object__find_map_fd_by_name(
5706 obj: *const bpf_object,
5707 name: *const ::std::os::raw::c_char,
5708 ) -> ::std::os::raw::c_int;
5709}
5710extern "C" {
5711 pub fn bpf_object__next_map(obj: *const bpf_object, map: *const bpf_map) -> *mut bpf_map;
5712}
5713extern "C" {
5714 pub fn bpf_object__prev_map(obj: *const bpf_object, map: *const bpf_map) -> *mut bpf_map;
5715}
5716extern "C" {
5717 pub fn bpf_map__set_autocreate(map: *mut bpf_map, autocreate: bool) -> ::std::os::raw::c_int;
5718}
5719extern "C" {
5720 pub fn bpf_map__autocreate(map: *const bpf_map) -> bool;
5721}
5722extern "C" {
5723 pub fn bpf_map__fd(map: *const bpf_map) -> ::std::os::raw::c_int;
5724}
5725extern "C" {
5726 pub fn bpf_map__reuse_fd(map: *mut bpf_map, fd: ::std::os::raw::c_int)
5727 -> ::std::os::raw::c_int;
5728}
5729extern "C" {
5730 pub fn bpf_map__name(map: *const bpf_map) -> *const ::std::os::raw::c_char;
5731}
5732extern "C" {
5733 pub fn bpf_map__type(map: *const bpf_map) -> bpf_map_type;
5734}
5735extern "C" {
5736 pub fn bpf_map__set_type(map: *mut bpf_map, type_: bpf_map_type) -> ::std::os::raw::c_int;
5737}
5738extern "C" {
5739 pub fn bpf_map__max_entries(map: *const bpf_map) -> __u32;
5740}
5741extern "C" {
5742 pub fn bpf_map__set_max_entries(map: *mut bpf_map, max_entries: __u32)
5743 -> ::std::os::raw::c_int;
5744}
5745extern "C" {
5746 pub fn bpf_map__map_flags(map: *const bpf_map) -> __u32;
5747}
5748extern "C" {
5749 pub fn bpf_map__set_map_flags(map: *mut bpf_map, flags: __u32) -> ::std::os::raw::c_int;
5750}
5751extern "C" {
5752 pub fn bpf_map__numa_node(map: *const bpf_map) -> __u32;
5753}
5754extern "C" {
5755 pub fn bpf_map__set_numa_node(map: *mut bpf_map, numa_node: __u32) -> ::std::os::raw::c_int;
5756}
5757extern "C" {
5758 pub fn bpf_map__key_size(map: *const bpf_map) -> __u32;
5759}
5760extern "C" {
5761 pub fn bpf_map__set_key_size(map: *mut bpf_map, size: __u32) -> ::std::os::raw::c_int;
5762}
5763extern "C" {
5764 pub fn bpf_map__value_size(map: *const bpf_map) -> __u32;
5765}
5766extern "C" {
5767 pub fn bpf_map__set_value_size(map: *mut bpf_map, size: __u32) -> ::std::os::raw::c_int;
5768}
5769extern "C" {
5770 pub fn bpf_map__btf_key_type_id(map: *const bpf_map) -> __u32;
5771}
5772extern "C" {
5773 pub fn bpf_map__btf_value_type_id(map: *const bpf_map) -> __u32;
5774}
5775extern "C" {
5776 pub fn bpf_map__ifindex(map: *const bpf_map) -> __u32;
5777}
5778extern "C" {
5779 pub fn bpf_map__set_ifindex(map: *mut bpf_map, ifindex: __u32) -> ::std::os::raw::c_int;
5780}
5781extern "C" {
5782 pub fn bpf_map__map_extra(map: *const bpf_map) -> __u64;
5783}
5784extern "C" {
5785 pub fn bpf_map__set_map_extra(map: *mut bpf_map, map_extra: __u64) -> ::std::os::raw::c_int;
5786}
5787extern "C" {
5788 pub fn bpf_map__set_initial_value(
5789 map: *mut bpf_map,
5790 data: *const ::std::os::raw::c_void,
5791 size: size_t,
5792 ) -> ::std::os::raw::c_int;
5793}
5794extern "C" {
5795 pub fn bpf_map__initial_value(
5796 map: *mut bpf_map,
5797 psize: *mut size_t,
5798 ) -> *const ::std::os::raw::c_void;
5799}
5800extern "C" {
5801 pub fn bpf_map__is_internal(map: *const bpf_map) -> bool;
5802}
5803extern "C" {
5804 pub fn bpf_map__set_pin_path(
5805 map: *mut bpf_map,
5806 path: *const ::std::os::raw::c_char,
5807 ) -> ::std::os::raw::c_int;
5808}
5809extern "C" {
5810 pub fn bpf_map__pin_path(map: *const bpf_map) -> *const ::std::os::raw::c_char;
5811}
5812extern "C" {
5813 pub fn bpf_map__is_pinned(map: *const bpf_map) -> bool;
5814}
5815extern "C" {
5816 pub fn bpf_map__pin(
5817 map: *mut bpf_map,
5818 path: *const ::std::os::raw::c_char,
5819 ) -> ::std::os::raw::c_int;
5820}
5821extern "C" {
5822 pub fn bpf_map__unpin(
5823 map: *mut bpf_map,
5824 path: *const ::std::os::raw::c_char,
5825 ) -> ::std::os::raw::c_int;
5826}
5827extern "C" {
5828 pub fn bpf_map__set_inner_map_fd(
5829 map: *mut bpf_map,
5830 fd: ::std::os::raw::c_int,
5831 ) -> ::std::os::raw::c_int;
5832}
5833extern "C" {
5834 pub fn bpf_map__inner_map(map: *mut bpf_map) -> *mut bpf_map;
5835}
5836extern "C" {
5837 pub fn bpf_map__lookup_elem(
5838 map: *const bpf_map,
5839 key: *const ::std::os::raw::c_void,
5840 key_sz: size_t,
5841 value: *mut ::std::os::raw::c_void,
5842 value_sz: size_t,
5843 flags: __u64,
5844 ) -> ::std::os::raw::c_int;
5845}
5846extern "C" {
5847 pub fn bpf_map__update_elem(
5848 map: *const bpf_map,
5849 key: *const ::std::os::raw::c_void,
5850 key_sz: size_t,
5851 value: *const ::std::os::raw::c_void,
5852 value_sz: size_t,
5853 flags: __u64,
5854 ) -> ::std::os::raw::c_int;
5855}
5856extern "C" {
5857 pub fn bpf_map__delete_elem(
5858 map: *const bpf_map,
5859 key: *const ::std::os::raw::c_void,
5860 key_sz: size_t,
5861 flags: __u64,
5862 ) -> ::std::os::raw::c_int;
5863}
5864extern "C" {
5865 pub fn bpf_map__lookup_and_delete_elem(
5866 map: *const bpf_map,
5867 key: *const ::std::os::raw::c_void,
5868 key_sz: size_t,
5869 value: *mut ::std::os::raw::c_void,
5870 value_sz: size_t,
5871 flags: __u64,
5872 ) -> ::std::os::raw::c_int;
5873}
5874extern "C" {
5875 pub fn bpf_map__get_next_key(
5876 map: *const bpf_map,
5877 cur_key: *const ::std::os::raw::c_void,
5878 next_key: *mut ::std::os::raw::c_void,
5879 key_sz: size_t,
5880 ) -> ::std::os::raw::c_int;
5881}
5882#[repr(C)]
5883#[derive(Debug, Default, Copy, Clone)]
5884pub struct bpf_xdp_set_link_opts {
5885 pub sz: size_t,
5886 pub old_fd: ::std::os::raw::c_int,
5887 pub __bindgen_padding_0: [u8; 4usize],
5888}
5889#[repr(C)]
5890#[derive(Debug, Default, Copy, Clone)]
5891pub struct bpf_xdp_attach_opts {
5892 pub sz: size_t,
5893 pub old_prog_fd: ::std::os::raw::c_int,
5894 pub __bindgen_padding_0: [u8; 4usize],
5895}
5896#[repr(C)]
5897#[derive(Debug, Default, Copy, Clone)]
5898pub struct bpf_xdp_query_opts {
5899 pub sz: size_t,
5900 pub prog_id: __u32,
5901 pub drv_prog_id: __u32,
5902 pub hw_prog_id: __u32,
5903 pub skb_prog_id: __u32,
5904 pub attach_mode: __u8,
5905 pub __bindgen_padding_0: [u8; 7usize],
5906}
5907extern "C" {
5908 pub fn bpf_xdp_attach(
5909 ifindex: ::std::os::raw::c_int,
5910 prog_fd: ::std::os::raw::c_int,
5911 flags: __u32,
5912 opts: *const bpf_xdp_attach_opts,
5913 ) -> ::std::os::raw::c_int;
5914}
5915extern "C" {
5916 pub fn bpf_xdp_detach(
5917 ifindex: ::std::os::raw::c_int,
5918 flags: __u32,
5919 opts: *const bpf_xdp_attach_opts,
5920 ) -> ::std::os::raw::c_int;
5921}
5922extern "C" {
5923 pub fn bpf_xdp_query(
5924 ifindex: ::std::os::raw::c_int,
5925 flags: ::std::os::raw::c_int,
5926 opts: *mut bpf_xdp_query_opts,
5927 ) -> ::std::os::raw::c_int;
5928}
5929extern "C" {
5930 pub fn bpf_xdp_query_id(
5931 ifindex: ::std::os::raw::c_int,
5932 flags: ::std::os::raw::c_int,
5933 prog_id: *mut __u32,
5934 ) -> ::std::os::raw::c_int;
5935}
5936pub const BPF_TC_INGRESS: bpf_tc_attach_point = 1;
5937pub const BPF_TC_EGRESS: bpf_tc_attach_point = 2;
5938pub const BPF_TC_CUSTOM: bpf_tc_attach_point = 4;
5939pub type bpf_tc_attach_point = ::std::os::raw::c_uint;
5940pub const BPF_TC_F_REPLACE: bpf_tc_flags = 1;
5941pub type bpf_tc_flags = ::std::os::raw::c_uint;
5942#[repr(C)]
5943#[derive(Debug, Copy, Clone)]
5944pub struct bpf_tc_hook {
5945 pub sz: size_t,
5946 pub ifindex: ::std::os::raw::c_int,
5947 pub attach_point: bpf_tc_attach_point,
5948 pub parent: __u32,
5949 pub __bindgen_padding_0: [u8; 4usize],
5950}
5951impl Default for bpf_tc_hook {
5952 fn default() -> Self {
5953 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
5954 unsafe {
5955 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5956 s.assume_init()
5957 }
5958 }
5959}
5960#[repr(C)]
5961#[derive(Debug, Default, Copy, Clone)]
5962pub struct bpf_tc_opts {
5963 pub sz: size_t,
5964 pub prog_fd: ::std::os::raw::c_int,
5965 pub flags: __u32,
5966 pub prog_id: __u32,
5967 pub handle: __u32,
5968 pub priority: __u32,
5969 pub __bindgen_padding_0: [u8; 4usize],
5970}
5971extern "C" {
5972 pub fn bpf_tc_hook_create(hook: *mut bpf_tc_hook) -> ::std::os::raw::c_int;
5973}
5974extern "C" {
5975 pub fn bpf_tc_hook_destroy(hook: *mut bpf_tc_hook) -> ::std::os::raw::c_int;
5976}
5977extern "C" {
5978 pub fn bpf_tc_attach(hook: *const bpf_tc_hook, opts: *mut bpf_tc_opts)
5979 -> ::std::os::raw::c_int;
5980}
5981extern "C" {
5982 pub fn bpf_tc_detach(
5983 hook: *const bpf_tc_hook,
5984 opts: *const bpf_tc_opts,
5985 ) -> ::std::os::raw::c_int;
5986}
5987extern "C" {
5988 pub fn bpf_tc_query(hook: *const bpf_tc_hook, opts: *mut bpf_tc_opts) -> ::std::os::raw::c_int;
5989}
5990#[repr(C)]
5991#[derive(Debug, Copy, Clone)]
5992pub struct ring_buffer {
5993 _unused: [u8; 0],
5994}
5995pub type ring_buffer_sample_fn = ::std::option::Option<
5996 unsafe extern "C" fn(
5997 ctx: *mut ::std::os::raw::c_void,
5998 data: *mut ::std::os::raw::c_void,
5999 size: size_t,
6000 ) -> ::std::os::raw::c_int,
6001>;
6002#[repr(C)]
6003#[derive(Debug, Default, Copy, Clone)]
6004pub struct ring_buffer_opts {
6005 pub sz: size_t,
6006}
6007extern "C" {
6008 pub fn ring_buffer__new(
6009 map_fd: ::std::os::raw::c_int,
6010 sample_cb: ring_buffer_sample_fn,
6011 ctx: *mut ::std::os::raw::c_void,
6012 opts: *const ring_buffer_opts,
6013 ) -> *mut ring_buffer;
6014}
6015extern "C" {
6016 pub fn ring_buffer__free(rb: *mut ring_buffer);
6017}
6018extern "C" {
6019 pub fn ring_buffer__add(
6020 rb: *mut ring_buffer,
6021 map_fd: ::std::os::raw::c_int,
6022 sample_cb: ring_buffer_sample_fn,
6023 ctx: *mut ::std::os::raw::c_void,
6024 ) -> ::std::os::raw::c_int;
6025}
6026extern "C" {
6027 pub fn ring_buffer__poll(
6028 rb: *mut ring_buffer,
6029 timeout_ms: ::std::os::raw::c_int,
6030 ) -> ::std::os::raw::c_int;
6031}
6032extern "C" {
6033 pub fn ring_buffer__consume(rb: *mut ring_buffer) -> ::std::os::raw::c_int;
6034}
6035extern "C" {
6036 pub fn ring_buffer__epoll_fd(rb: *const ring_buffer) -> ::std::os::raw::c_int;
6037}
6038#[repr(C)]
6039#[derive(Debug, Copy, Clone)]
6040pub struct perf_buffer {
6041 _unused: [u8; 0],
6042}
6043pub type perf_buffer_sample_fn = ::std::option::Option<
6044 unsafe extern "C" fn(
6045 ctx: *mut ::std::os::raw::c_void,
6046 cpu: ::std::os::raw::c_int,
6047 data: *mut ::std::os::raw::c_void,
6048 size: __u32,
6049 ),
6050>;
6051pub type perf_buffer_lost_fn = ::std::option::Option<
6052 unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void, cpu: ::std::os::raw::c_int, cnt: __u64),
6053>;
6054#[repr(C)]
6055#[derive(Debug, Default, Copy, Clone)]
6056pub struct perf_buffer_opts {
6057 pub sz: size_t,
6058}
6059extern "C" {
6060 pub fn perf_buffer__new(
6061 map_fd: ::std::os::raw::c_int,
6062 page_cnt: size_t,
6063 sample_cb: perf_buffer_sample_fn,
6064 lost_cb: perf_buffer_lost_fn,
6065 ctx: *mut ::std::os::raw::c_void,
6066 opts: *const perf_buffer_opts,
6067 ) -> *mut perf_buffer;
6068}
6069pub const LIBBPF_PERF_EVENT_DONE: bpf_perf_event_ret = 0;
6070pub const LIBBPF_PERF_EVENT_ERROR: bpf_perf_event_ret = -1;
6071pub const LIBBPF_PERF_EVENT_CONT: bpf_perf_event_ret = -2;
6072pub type bpf_perf_event_ret = ::std::os::raw::c_int;
6073pub type perf_buffer_event_fn = ::std::option::Option<
6074 unsafe extern "C" fn(
6075 ctx: *mut ::std::os::raw::c_void,
6076 cpu: ::std::os::raw::c_int,
6077 event: *mut perf_event_header,
6078 ) -> bpf_perf_event_ret,
6079>;
6080#[repr(C)]
6081#[derive(Debug, Copy, Clone)]
6082pub struct perf_buffer_raw_opts {
6083 pub sz: size_t,
6084 pub cpu_cnt: ::std::os::raw::c_int,
6085 pub __bindgen_padding_0: [u8; 4usize],
6086 pub cpus: *mut ::std::os::raw::c_int,
6087 pub map_keys: *mut ::std::os::raw::c_int,
6088}
6089impl Default for perf_buffer_raw_opts {
6090 fn default() -> Self {
6091 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
6092 unsafe {
6093 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
6094 s.assume_init()
6095 }
6096 }
6097}
6098extern "C" {
6099 pub fn perf_buffer__new_raw(
6100 map_fd: ::std::os::raw::c_int,
6101 page_cnt: size_t,
6102 attr: *mut perf_event_attr,
6103 event_cb: perf_buffer_event_fn,
6104 ctx: *mut ::std::os::raw::c_void,
6105 opts: *const perf_buffer_raw_opts,
6106 ) -> *mut perf_buffer;
6107}
6108extern "C" {
6109 pub fn perf_buffer__free(pb: *mut perf_buffer);
6110}
6111extern "C" {
6112 pub fn perf_buffer__epoll_fd(pb: *const perf_buffer) -> ::std::os::raw::c_int;
6113}
6114extern "C" {
6115 pub fn perf_buffer__poll(
6116 pb: *mut perf_buffer,
6117 timeout_ms: ::std::os::raw::c_int,
6118 ) -> ::std::os::raw::c_int;
6119}
6120extern "C" {
6121 pub fn perf_buffer__consume(pb: *mut perf_buffer) -> ::std::os::raw::c_int;
6122}
6123extern "C" {
6124 pub fn perf_buffer__consume_buffer(
6125 pb: *mut perf_buffer,
6126 buf_idx: size_t,
6127 ) -> ::std::os::raw::c_int;
6128}
6129extern "C" {
6130 pub fn perf_buffer__buffer_cnt(pb: *const perf_buffer) -> size_t;
6131}
6132extern "C" {
6133 pub fn perf_buffer__buffer_fd(pb: *const perf_buffer, buf_idx: size_t)
6134 -> ::std::os::raw::c_int;
6135}
6136extern "C" {
6137 pub fn perf_buffer__buffer(
6138 pb: *mut perf_buffer,
6139 buf_idx: ::std::os::raw::c_int,
6140 buf: *mut *mut ::std::os::raw::c_void,
6141 buf_size: *mut size_t,
6142 ) -> ::std::os::raw::c_int;
6143}
6144#[repr(C)]
6145#[derive(Debug, Copy, Clone)]
6146pub struct bpf_prog_linfo {
6147 _unused: [u8; 0],
6148}
6149extern "C" {
6150 pub fn bpf_prog_linfo__free(prog_linfo: *mut bpf_prog_linfo);
6151}
6152extern "C" {
6153 pub fn bpf_prog_linfo__new(info: *const bpf_prog_info) -> *mut bpf_prog_linfo;
6154}
6155extern "C" {
6156 pub fn bpf_prog_linfo__lfind_addr_func(
6157 prog_linfo: *const bpf_prog_linfo,
6158 addr: __u64,
6159 func_idx: __u32,
6160 nr_skip: __u32,
6161 ) -> *const bpf_line_info;
6162}
6163extern "C" {
6164 pub fn bpf_prog_linfo__lfind(
6165 prog_linfo: *const bpf_prog_linfo,
6166 insn_off: __u32,
6167 nr_skip: __u32,
6168 ) -> *const bpf_line_info;
6169}
6170extern "C" {
6171 pub fn libbpf_probe_bpf_prog_type(
6172 prog_type: bpf_prog_type,
6173 opts: *const ::std::os::raw::c_void,
6174 ) -> ::std::os::raw::c_int;
6175}
6176extern "C" {
6177 pub fn libbpf_probe_bpf_map_type(
6178 map_type: bpf_map_type,
6179 opts: *const ::std::os::raw::c_void,
6180 ) -> ::std::os::raw::c_int;
6181}
6182extern "C" {
6183 pub fn libbpf_probe_bpf_helper(
6184 prog_type: bpf_prog_type,
6185 helper_id: bpf_func_id,
6186 opts: *const ::std::os::raw::c_void,
6187 ) -> ::std::os::raw::c_int;
6188}
6189extern "C" {
6190 pub fn libbpf_num_possible_cpus() -> ::std::os::raw::c_int;
6191}
6192#[repr(C)]
6193#[derive(Debug, Copy, Clone)]
6194pub struct bpf_map_skeleton {
6195 pub name: *const ::std::os::raw::c_char,
6196 pub map: *mut *mut bpf_map,
6197 pub mmaped: *mut *mut ::std::os::raw::c_void,
6198}
6199impl Default for bpf_map_skeleton {
6200 fn default() -> Self {
6201 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
6202 unsafe {
6203 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
6204 s.assume_init()
6205 }
6206 }
6207}
6208#[repr(C)]
6209#[derive(Debug, Copy, Clone)]
6210pub struct bpf_prog_skeleton {
6211 pub name: *const ::std::os::raw::c_char,
6212 pub prog: *mut *mut bpf_program,
6213 pub link: *mut *mut bpf_link,
6214}
6215impl Default for bpf_prog_skeleton {
6216 fn default() -> Self {
6217 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
6218 unsafe {
6219 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
6220 s.assume_init()
6221 }
6222 }
6223}
6224#[repr(C)]
6225#[derive(Debug, Copy, Clone)]
6226pub struct bpf_object_skeleton {
6227 pub sz: size_t,
6228 pub name: *const ::std::os::raw::c_char,
6229 pub data: *const ::std::os::raw::c_void,
6230 pub data_sz: size_t,
6231 pub obj: *mut *mut bpf_object,
6232 pub map_cnt: ::std::os::raw::c_int,
6233 pub map_skel_sz: ::std::os::raw::c_int,
6234 pub maps: *mut bpf_map_skeleton,
6235 pub prog_cnt: ::std::os::raw::c_int,
6236 pub prog_skel_sz: ::std::os::raw::c_int,
6237 pub progs: *mut bpf_prog_skeleton,
6238}
6239impl Default for bpf_object_skeleton {
6240 fn default() -> Self {
6241 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
6242 unsafe {
6243 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
6244 s.assume_init()
6245 }
6246 }
6247}
6248extern "C" {
6249 pub fn bpf_object__open_skeleton(
6250 s: *mut bpf_object_skeleton,
6251 opts: *const bpf_object_open_opts,
6252 ) -> ::std::os::raw::c_int;
6253}
6254extern "C" {
6255 pub fn bpf_object__load_skeleton(s: *mut bpf_object_skeleton) -> ::std::os::raw::c_int;
6256}
6257extern "C" {
6258 pub fn bpf_object__attach_skeleton(s: *mut bpf_object_skeleton) -> ::std::os::raw::c_int;
6259}
6260extern "C" {
6261 pub fn bpf_object__detach_skeleton(s: *mut bpf_object_skeleton);
6262}
6263extern "C" {
6264 pub fn bpf_object__destroy_skeleton(s: *mut bpf_object_skeleton);
6265}
6266#[repr(C)]
6267#[derive(Debug, Copy, Clone)]
6268pub struct bpf_var_skeleton {
6269 pub name: *const ::std::os::raw::c_char,
6270 pub map: *mut *mut bpf_map,
6271 pub addr: *mut *mut ::std::os::raw::c_void,
6272}
6273impl Default for bpf_var_skeleton {
6274 fn default() -> Self {
6275 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
6276 unsafe {
6277 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
6278 s.assume_init()
6279 }
6280 }
6281}
6282#[repr(C)]
6283#[derive(Debug, Copy, Clone)]
6284pub struct bpf_object_subskeleton {
6285 pub sz: size_t,
6286 pub obj: *const bpf_object,
6287 pub map_cnt: ::std::os::raw::c_int,
6288 pub map_skel_sz: ::std::os::raw::c_int,
6289 pub maps: *mut bpf_map_skeleton,
6290 pub prog_cnt: ::std::os::raw::c_int,
6291 pub prog_skel_sz: ::std::os::raw::c_int,
6292 pub progs: *mut bpf_prog_skeleton,
6293 pub var_cnt: ::std::os::raw::c_int,
6294 pub var_skel_sz: ::std::os::raw::c_int,
6295 pub vars: *mut bpf_var_skeleton,
6296}
6297impl Default for bpf_object_subskeleton {
6298 fn default() -> Self {
6299 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
6300 unsafe {
6301 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
6302 s.assume_init()
6303 }
6304 }
6305}
6306extern "C" {
6307 pub fn bpf_object__open_subskeleton(s: *mut bpf_object_subskeleton) -> ::std::os::raw::c_int;
6308}
6309extern "C" {
6310 pub fn bpf_object__destroy_subskeleton(s: *mut bpf_object_subskeleton);
6311}
6312#[repr(C)]
6313#[derive(Debug, Copy, Clone)]
6314pub struct gen_loader_opts {
6315 pub sz: size_t,
6316 pub data: *const ::std::os::raw::c_char,
6317 pub insns: *const ::std::os::raw::c_char,
6318 pub data_sz: __u32,
6319 pub insns_sz: __u32,
6320}
6321impl Default for gen_loader_opts {
6322 fn default() -> Self {
6323 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
6324 unsafe {
6325 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
6326 s.assume_init()
6327 }
6328 }
6329}
6330extern "C" {
6331 pub fn bpf_object__gen_loader(
6332 obj: *mut bpf_object,
6333 opts: *mut gen_loader_opts,
6334 ) -> ::std::os::raw::c_int;
6335}
6336#[repr(C)]
6337#[derive(Debug, Default, Copy, Clone)]
6338pub struct bpf_linker_opts {
6339 pub sz: size_t,
6340}
6341#[repr(C)]
6342#[derive(Debug, Default, Copy, Clone)]
6343pub struct bpf_linker_file_opts {
6344 pub sz: size_t,
6345}
6346#[repr(C)]
6347#[derive(Debug, Copy, Clone)]
6348pub struct bpf_linker {
6349 _unused: [u8; 0],
6350}
6351extern "C" {
6352 pub fn bpf_linker__new(
6353 filename: *const ::std::os::raw::c_char,
6354 opts: *mut bpf_linker_opts,
6355 ) -> *mut bpf_linker;
6356}
6357extern "C" {
6358 pub fn bpf_linker__add_file(
6359 linker: *mut bpf_linker,
6360 filename: *const ::std::os::raw::c_char,
6361 opts: *const bpf_linker_file_opts,
6362 ) -> ::std::os::raw::c_int;
6363}
6364extern "C" {
6365 pub fn bpf_linker__finalize(linker: *mut bpf_linker) -> ::std::os::raw::c_int;
6366}
6367extern "C" {
6368 pub fn bpf_linker__free(linker: *mut bpf_linker);
6369}
6370pub type libbpf_prog_setup_fn_t = ::std::option::Option<
6371 unsafe extern "C" fn(
6372 prog: *mut bpf_program,
6373 cookie: ::std::os::raw::c_long,
6374 ) -> ::std::os::raw::c_int,
6375>;
6376pub type libbpf_prog_prepare_load_fn_t = ::std::option::Option<
6377 unsafe extern "C" fn(
6378 prog: *mut bpf_program,
6379 opts: *mut bpf_prog_load_opts,
6380 cookie: ::std::os::raw::c_long,
6381 ) -> ::std::os::raw::c_int,
6382>;
6383pub type libbpf_prog_attach_fn_t = ::std::option::Option<
6384 unsafe extern "C" fn(
6385 prog: *const bpf_program,
6386 cookie: ::std::os::raw::c_long,
6387 link: *mut *mut bpf_link,
6388 ) -> ::std::os::raw::c_int,
6389>;
6390#[repr(C)]
6391#[derive(Debug, Default, Copy, Clone)]
6392pub struct libbpf_prog_handler_opts {
6393 pub sz: size_t,
6394 pub cookie: ::std::os::raw::c_long,
6395 pub prog_setup_fn: libbpf_prog_setup_fn_t,
6396 pub prog_prepare_load_fn: libbpf_prog_prepare_load_fn_t,
6397 pub prog_attach_fn: libbpf_prog_attach_fn_t,
6398}
6399extern "C" {
6400 pub fn libbpf_register_prog_handler(
6401 sec: *const ::std::os::raw::c_char,
6402 prog_type: bpf_prog_type,
6403 exp_attach_type: bpf_attach_type,
6404 opts: *const libbpf_prog_handler_opts,
6405 ) -> ::std::os::raw::c_int;
6406}
6407extern "C" {
6408 pub fn libbpf_unregister_prog_handler(
6409 handler_id: ::std::os::raw::c_int,
6410 ) -> ::std::os::raw::c_int;
6411}
6412extern "C" {
6413 pub fn _BPF_MOV64_IMM(dst: __u8, imm: __s32) -> bpf_insn;
6414}
6415extern "C" {
6416 pub fn _BPF_ALU64_IMM(op: __u8, dst: __u8, imm: __s32) -> bpf_insn;
6417}
6418extern "C" {
6419 pub fn _BPF_JMP_IMM(op: __u8, dst: __u8, imm: __s32, off: __s16) -> bpf_insn;
6420}
6421extern "C" {
6422 pub fn _BPF_JMP32_IMM(op: __u8, dst: __u8, imm: __s32, off: __s16) -> bpf_insn;
6423}
6424extern "C" {
6425 pub fn _BPF_EXIT_INSN() -> bpf_insn;
6426}
6427pub type __builtin_va_list = [__va_list_tag; 1usize];
6428#[repr(C)]
6429#[derive(Debug, Copy, Clone)]
6430pub struct __va_list_tag {
6431 pub gp_offset: ::std::os::raw::c_uint,
6432 pub fp_offset: ::std::os::raw::c_uint,
6433 pub overflow_arg_area: *mut ::std::os::raw::c_void,
6434 pub reg_save_area: *mut ::std::os::raw::c_void,
6435}
6436impl Default for __va_list_tag {
6437 fn default() -> Self {
6438 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
6439 unsafe {
6440 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
6441 s.assume_init()
6442 }
6443 }
6444}