1 /* automatically generated by rust-bindgen 0.69.4 */ 2 3 #[repr(C)] 4 #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] 5 pub struct __BindgenBitfieldUnit<Storage> { 6 storage: Storage, 7 } 8 impl<Storage> __BindgenBitfieldUnit<Storage> { 9 #[inline] new(storage: Storage) -> Self10 pub const fn new(storage: Storage) -> Self { 11 Self { storage } 12 } 13 } 14 impl<Storage> __BindgenBitfieldUnit<Storage> 15 where 16 Storage: AsRef<[u8]> + AsMut<[u8]>, 17 { 18 #[inline] get_bit(&self, index: usize) -> bool19 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] set_bit(&mut self, index: usize, val: bool)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] get(&self, bit_offset: usize, bit_width: u8) -> u6449 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] set(&mut self, bit_offset: usize, bit_width: u8, val: u64)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)] 85 pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]); 86 impl<T> __IncompleteArrayField<T> { 87 #[inline] new() -> Self88 pub const fn new() -> Self { 89 __IncompleteArrayField(::std::marker::PhantomData, []) 90 } 91 #[inline] as_ptr(&self) -> *const T92 pub fn as_ptr(&self) -> *const T { 93 self as *const _ as *const T 94 } 95 #[inline] as_mut_ptr(&mut self) -> *mut T96 pub fn as_mut_ptr(&mut self) -> *mut T { 97 self as *mut _ as *mut T 98 } 99 #[inline] as_slice(&self, len: usize) -> &[T]100 pub unsafe fn as_slice(&self, len: usize) -> &[T] { 101 ::std::slice::from_raw_parts(self.as_ptr(), len) 102 } 103 #[inline] as_mut_slice(&mut self, len: usize) -> &mut [T]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 } 108 impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> { fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result109 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { 110 fmt.write_str("__IncompleteArrayField") 111 } 112 } 113 pub const XDP_FLAGS_UPDATE_IF_NOEXIST: u32 = 1; 114 pub const XDP_FLAGS_SKB_MODE: u32 = 2; 115 pub const XDP_FLAGS_DRV_MODE: u32 = 4; 116 pub const XDP_FLAGS_HW_MODE: u32 = 8; 117 pub const XDP_FLAGS_REPLACE: u32 = 16; 118 pub const XDP_FLAGS_MODES: u32 = 14; 119 pub const XDP_FLAGS_MASK: u32 = 31; 120 pub const PERF_PMU_TYPE_SHIFT: u32 = 32; 121 pub const PERF_HW_EVENT_MASK: u32 = 4294967295; 122 pub const PERF_ATTR_SIZE_VER0: u32 = 64; 123 pub const PERF_ATTR_SIZE_VER1: u32 = 72; 124 pub const PERF_ATTR_SIZE_VER2: u32 = 80; 125 pub const PERF_ATTR_SIZE_VER3: u32 = 96; 126 pub const PERF_ATTR_SIZE_VER4: u32 = 104; 127 pub const PERF_ATTR_SIZE_VER5: u32 = 112; 128 pub const PERF_ATTR_SIZE_VER6: u32 = 120; 129 pub const PERF_ATTR_SIZE_VER7: u32 = 128; 130 pub const PERF_ATTR_SIZE_VER8: u32 = 136; 131 pub const PERF_RECORD_MISC_CPUMODE_MASK: u32 = 7; 132 pub const PERF_RECORD_MISC_CPUMODE_UNKNOWN: u32 = 0; 133 pub const PERF_RECORD_MISC_KERNEL: u32 = 1; 134 pub const PERF_RECORD_MISC_USER: u32 = 2; 135 pub const PERF_RECORD_MISC_HYPERVISOR: u32 = 3; 136 pub const PERF_RECORD_MISC_GUEST_KERNEL: u32 = 4; 137 pub const PERF_RECORD_MISC_GUEST_USER: u32 = 5; 138 pub const PERF_RECORD_MISC_PROC_MAP_PARSE_TIMEOUT: u32 = 4096; 139 pub const PERF_RECORD_MISC_MMAP_DATA: u32 = 8192; 140 pub const PERF_RECORD_MISC_COMM_EXEC: u32 = 8192; 141 pub const PERF_RECORD_MISC_FORK_EXEC: u32 = 8192; 142 pub const PERF_RECORD_MISC_SWITCH_OUT: u32 = 8192; 143 pub const PERF_RECORD_MISC_EXACT_IP: u32 = 16384; 144 pub const PERF_RECORD_MISC_SWITCH_OUT_PREEMPT: u32 = 16384; 145 pub const PERF_RECORD_MISC_MMAP_BUILD_ID: u32 = 16384; 146 pub const PERF_RECORD_MISC_EXT_RESERVED: u32 = 32768; 147 pub const PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER: u32 = 1; 148 pub const PERF_MAX_STACK_DEPTH: u32 = 127; 149 pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; 150 pub const PERF_AUX_FLAG_TRUNCATED: u32 = 1; 151 pub const PERF_AUX_FLAG_OVERWRITE: u32 = 2; 152 pub const PERF_AUX_FLAG_PARTIAL: u32 = 4; 153 pub const PERF_AUX_FLAG_COLLISION: u32 = 8; 154 pub const PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK: u32 = 65280; 155 pub const PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT: u32 = 0; 156 pub const PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW: u32 = 256; 157 pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; 158 pub const PERF_FLAG_FD_OUTPUT: u32 = 2; 159 pub const PERF_FLAG_PID_CGROUP: u32 = 4; 160 pub const PERF_FLAG_FD_CLOEXEC: u32 = 8; 161 pub const PERF_MEM_OP_NA: u32 = 1; 162 pub const PERF_MEM_OP_LOAD: u32 = 2; 163 pub const PERF_MEM_OP_STORE: u32 = 4; 164 pub const PERF_MEM_OP_PFETCH: u32 = 8; 165 pub const PERF_MEM_OP_EXEC: u32 = 16; 166 pub const PERF_MEM_OP_SHIFT: u32 = 0; 167 pub const PERF_MEM_LVL_NA: u32 = 1; 168 pub const PERF_MEM_LVL_HIT: u32 = 2; 169 pub const PERF_MEM_LVL_MISS: u32 = 4; 170 pub const PERF_MEM_LVL_L1: u32 = 8; 171 pub const PERF_MEM_LVL_LFB: u32 = 16; 172 pub const PERF_MEM_LVL_L2: u32 = 32; 173 pub const PERF_MEM_LVL_L3: u32 = 64; 174 pub const PERF_MEM_LVL_LOC_RAM: u32 = 128; 175 pub const PERF_MEM_LVL_REM_RAM1: u32 = 256; 176 pub const PERF_MEM_LVL_REM_RAM2: u32 = 512; 177 pub const PERF_MEM_LVL_REM_CCE1: u32 = 1024; 178 pub const PERF_MEM_LVL_REM_CCE2: u32 = 2048; 179 pub const PERF_MEM_LVL_IO: u32 = 4096; 180 pub const PERF_MEM_LVL_UNC: u32 = 8192; 181 pub const PERF_MEM_LVL_SHIFT: u32 = 5; 182 pub const PERF_MEM_REMOTE_REMOTE: u32 = 1; 183 pub const PERF_MEM_REMOTE_SHIFT: u32 = 37; 184 pub const PERF_MEM_LVLNUM_L1: u32 = 1; 185 pub const PERF_MEM_LVLNUM_L2: u32 = 2; 186 pub const PERF_MEM_LVLNUM_L3: u32 = 3; 187 pub const PERF_MEM_LVLNUM_L4: u32 = 4; 188 pub const PERF_MEM_LVLNUM_UNC: u32 = 8; 189 pub const PERF_MEM_LVLNUM_CXL: u32 = 9; 190 pub const PERF_MEM_LVLNUM_IO: u32 = 10; 191 pub const PERF_MEM_LVLNUM_ANY_CACHE: u32 = 11; 192 pub const PERF_MEM_LVLNUM_LFB: u32 = 12; 193 pub const PERF_MEM_LVLNUM_RAM: u32 = 13; 194 pub const PERF_MEM_LVLNUM_PMEM: u32 = 14; 195 pub const PERF_MEM_LVLNUM_NA: u32 = 15; 196 pub const PERF_MEM_LVLNUM_SHIFT: u32 = 33; 197 pub const PERF_MEM_SNOOP_NA: u32 = 1; 198 pub const PERF_MEM_SNOOP_NONE: u32 = 2; 199 pub const PERF_MEM_SNOOP_HIT: u32 = 4; 200 pub const PERF_MEM_SNOOP_MISS: u32 = 8; 201 pub const PERF_MEM_SNOOP_HITM: u32 = 16; 202 pub const PERF_MEM_SNOOP_SHIFT: u32 = 19; 203 pub const PERF_MEM_SNOOPX_FWD: u32 = 1; 204 pub const PERF_MEM_SNOOPX_PEER: u32 = 2; 205 pub const PERF_MEM_SNOOPX_SHIFT: u32 = 38; 206 pub const PERF_MEM_LOCK_NA: u32 = 1; 207 pub const PERF_MEM_LOCK_LOCKED: u32 = 2; 208 pub const PERF_MEM_LOCK_SHIFT: u32 = 24; 209 pub const PERF_MEM_TLB_NA: u32 = 1; 210 pub const PERF_MEM_TLB_HIT: u32 = 2; 211 pub const PERF_MEM_TLB_MISS: u32 = 4; 212 pub const PERF_MEM_TLB_L1: u32 = 8; 213 pub const PERF_MEM_TLB_L2: u32 = 16; 214 pub const PERF_MEM_TLB_WK: u32 = 32; 215 pub const PERF_MEM_TLB_OS: u32 = 64; 216 pub const PERF_MEM_TLB_SHIFT: u32 = 26; 217 pub const PERF_MEM_BLK_NA: u32 = 1; 218 pub const PERF_MEM_BLK_DATA: u32 = 2; 219 pub const PERF_MEM_BLK_ADDR: u32 = 4; 220 pub const PERF_MEM_BLK_SHIFT: u32 = 40; 221 pub const PERF_MEM_HOPS_0: u32 = 1; 222 pub const PERF_MEM_HOPS_1: u32 = 2; 223 pub const PERF_MEM_HOPS_2: u32 = 3; 224 pub const PERF_MEM_HOPS_3: u32 = 4; 225 pub const PERF_MEM_HOPS_SHIFT: u32 = 43; 226 pub const PERF_BRANCH_ENTRY_INFO_BITS_MAX: u32 = 33; 227 pub const BPF_LD: u32 = 0; 228 pub const BPF_LDX: u32 = 1; 229 pub const BPF_ST: u32 = 2; 230 pub const BPF_STX: u32 = 3; 231 pub const BPF_ALU: u32 = 4; 232 pub const BPF_JMP: u32 = 5; 233 pub const BPF_RET: u32 = 6; 234 pub const BPF_MISC: u32 = 7; 235 pub const BPF_W: u32 = 0; 236 pub const BPF_H: u32 = 8; 237 pub const BPF_B: u32 = 16; 238 pub const BPF_IMM: u32 = 0; 239 pub const BPF_ABS: u32 = 32; 240 pub const BPF_IND: u32 = 64; 241 pub const BPF_MEM: u32 = 96; 242 pub const BPF_LEN: u32 = 128; 243 pub const BPF_MSH: u32 = 160; 244 pub const BPF_ADD: u32 = 0; 245 pub const BPF_SUB: u32 = 16; 246 pub const BPF_MUL: u32 = 32; 247 pub const BPF_DIV: u32 = 48; 248 pub const BPF_OR: u32 = 64; 249 pub const BPF_AND: u32 = 80; 250 pub const BPF_LSH: u32 = 96; 251 pub const BPF_RSH: u32 = 112; 252 pub const BPF_NEG: u32 = 128; 253 pub const BPF_MOD: u32 = 144; 254 pub const BPF_XOR: u32 = 160; 255 pub const BPF_JA: u32 = 0; 256 pub const BPF_JEQ: u32 = 16; 257 pub const BPF_JGT: u32 = 32; 258 pub const BPF_JGE: u32 = 48; 259 pub const BPF_JSET: u32 = 64; 260 pub const BPF_K: u32 = 0; 261 pub const BPF_X: u32 = 8; 262 pub const BPF_MAXINSNS: u32 = 4096; 263 pub const BPF_JMP32: u32 = 6; 264 pub const BPF_ALU64: u32 = 7; 265 pub const BPF_DW: u32 = 24; 266 pub const BPF_MEMSX: u32 = 128; 267 pub const BPF_ATOMIC: u32 = 192; 268 pub const BPF_XADD: u32 = 192; 269 pub const BPF_MOV: u32 = 176; 270 pub const BPF_ARSH: u32 = 192; 271 pub const BPF_END: u32 = 208; 272 pub const BPF_TO_LE: u32 = 0; 273 pub const BPF_TO_BE: u32 = 8; 274 pub const BPF_FROM_LE: u32 = 0; 275 pub const BPF_FROM_BE: u32 = 8; 276 pub const BPF_JNE: u32 = 80; 277 pub const BPF_JLT: u32 = 160; 278 pub const BPF_JLE: u32 = 176; 279 pub const BPF_JSGT: u32 = 96; 280 pub const BPF_JSGE: u32 = 112; 281 pub const BPF_JSLT: u32 = 192; 282 pub const BPF_JSLE: u32 = 208; 283 pub const BPF_JCOND: u32 = 224; 284 pub const BPF_CALL: u32 = 128; 285 pub const BPF_EXIT: u32 = 144; 286 pub const BPF_FETCH: u32 = 1; 287 pub const BPF_XCHG: u32 = 225; 288 pub const BPF_CMPXCHG: u32 = 241; 289 pub const BPF_F_ALLOW_OVERRIDE: u32 = 1; 290 pub const BPF_F_ALLOW_MULTI: u32 = 2; 291 pub const BPF_F_REPLACE: u32 = 4; 292 pub const BPF_F_BEFORE: u32 = 8; 293 pub const BPF_F_AFTER: u32 = 16; 294 pub const BPF_F_ID: u32 = 32; 295 pub const BPF_F_STRICT_ALIGNMENT: u32 = 1; 296 pub const BPF_F_ANY_ALIGNMENT: u32 = 2; 297 pub const BPF_F_TEST_RND_HI32: u32 = 4; 298 pub const BPF_F_TEST_STATE_FREQ: u32 = 8; 299 pub const BPF_F_SLEEPABLE: u32 = 16; 300 pub const BPF_F_XDP_HAS_FRAGS: u32 = 32; 301 pub const BPF_F_XDP_DEV_BOUND_ONLY: u32 = 64; 302 pub const BPF_F_TEST_REG_INVARIANTS: u32 = 128; 303 pub const BPF_F_NETFILTER_IP_DEFRAG: u32 = 1; 304 pub const BPF_PSEUDO_MAP_FD: u32 = 1; 305 pub const BPF_PSEUDO_MAP_IDX: u32 = 5; 306 pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; 307 pub const BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6; 308 pub const BPF_PSEUDO_BTF_ID: u32 = 3; 309 pub const BPF_PSEUDO_FUNC: u32 = 4; 310 pub const BPF_PSEUDO_CALL: u32 = 1; 311 pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; 312 pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; 313 pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; 314 pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2; 315 pub const BPF_BUILD_ID_SIZE: u32 = 20; 316 pub const BPF_OBJ_NAME_LEN: u32 = 16; 317 pub const XDP_PACKET_HEADROOM: u32 = 256; 318 pub const BPF_TAG_SIZE: u32 = 8; 319 pub const BPF_LOG_BUF_SIZE: u32 = 16777215; 320 pub const BTF_MAGIC: u32 = 60319; 321 pub const BTF_VERSION: u32 = 1; 322 pub const BTF_MAX_TYPE: u32 = 1048575; 323 pub const BTF_MAX_NAME_OFFSET: u32 = 16777215; 324 pub const BTF_MAX_VLEN: u32 = 65535; 325 pub const BTF_INT_SIGNED: u32 = 1; 326 pub const BTF_INT_CHAR: u32 = 2; 327 pub const BTF_INT_BOOL: u32 = 4; 328 pub const BTF_ELF_SEC: &[u8; 5] = b".BTF\0"; 329 pub const BTF_EXT_ELF_SEC: &[u8; 9] = b".BTF.ext\0"; 330 pub type size_t = ::std::os::raw::c_ulong; 331 pub type __pid_t = ::std::os::raw::c_int; 332 pub type __u8 = ::std::os::raw::c_uchar; 333 pub type __s16 = ::std::os::raw::c_short; 334 pub type __u16 = ::std::os::raw::c_ushort; 335 pub type __s32 = ::std::os::raw::c_int; 336 pub type __u32 = ::std::os::raw::c_uint; 337 pub type __s64 = ::std::os::raw::c_longlong; 338 pub type __u64 = ::std::os::raw::c_ulonglong; 339 pub type __be16 = __u16; 340 pub type __be32 = __u32; 341 pub const XDP_ATTACHED_NONE: _bindgen_ty_48 = 0; 342 pub const XDP_ATTACHED_DRV: _bindgen_ty_48 = 1; 343 pub const XDP_ATTACHED_SKB: _bindgen_ty_48 = 2; 344 pub const XDP_ATTACHED_HW: _bindgen_ty_48 = 3; 345 pub const XDP_ATTACHED_MULTI: _bindgen_ty_48 = 4; 346 pub type _bindgen_ty_48 = ::std::os::raw::c_uint; 347 pub const PERF_TYPE_HARDWARE: perf_type_id = 0; 348 pub const PERF_TYPE_SOFTWARE: perf_type_id = 1; 349 pub const PERF_TYPE_TRACEPOINT: perf_type_id = 2; 350 pub const PERF_TYPE_HW_CACHE: perf_type_id = 3; 351 pub const PERF_TYPE_RAW: perf_type_id = 4; 352 pub const PERF_TYPE_BREAKPOINT: perf_type_id = 5; 353 pub const PERF_TYPE_MAX: perf_type_id = 6; 354 pub type perf_type_id = ::std::os::raw::c_uint; 355 pub const PERF_COUNT_HW_CPU_CYCLES: perf_hw_id = 0; 356 pub const PERF_COUNT_HW_INSTRUCTIONS: perf_hw_id = 1; 357 pub const PERF_COUNT_HW_CACHE_REFERENCES: perf_hw_id = 2; 358 pub const PERF_COUNT_HW_CACHE_MISSES: perf_hw_id = 3; 359 pub const PERF_COUNT_HW_BRANCH_INSTRUCTIONS: perf_hw_id = 4; 360 pub const PERF_COUNT_HW_BRANCH_MISSES: perf_hw_id = 5; 361 pub const PERF_COUNT_HW_BUS_CYCLES: perf_hw_id = 6; 362 pub const PERF_COUNT_HW_STALLED_CYCLES_FRONTEND: perf_hw_id = 7; 363 pub const PERF_COUNT_HW_STALLED_CYCLES_BACKEND: perf_hw_id = 8; 364 pub const PERF_COUNT_HW_REF_CPU_CYCLES: perf_hw_id = 9; 365 pub const PERF_COUNT_HW_MAX: perf_hw_id = 10; 366 pub type perf_hw_id = ::std::os::raw::c_uint; 367 pub const PERF_COUNT_HW_CACHE_L1D: perf_hw_cache_id = 0; 368 pub const PERF_COUNT_HW_CACHE_L1I: perf_hw_cache_id = 1; 369 pub const PERF_COUNT_HW_CACHE_LL: perf_hw_cache_id = 2; 370 pub const PERF_COUNT_HW_CACHE_DTLB: perf_hw_cache_id = 3; 371 pub const PERF_COUNT_HW_CACHE_ITLB: perf_hw_cache_id = 4; 372 pub const PERF_COUNT_HW_CACHE_BPU: perf_hw_cache_id = 5; 373 pub const PERF_COUNT_HW_CACHE_NODE: perf_hw_cache_id = 6; 374 pub const PERF_COUNT_HW_CACHE_MAX: perf_hw_cache_id = 7; 375 pub type perf_hw_cache_id = ::std::os::raw::c_uint; 376 pub const PERF_COUNT_HW_CACHE_OP_READ: perf_hw_cache_op_id = 0; 377 pub const PERF_COUNT_HW_CACHE_OP_WRITE: perf_hw_cache_op_id = 1; 378 pub const PERF_COUNT_HW_CACHE_OP_PREFETCH: perf_hw_cache_op_id = 2; 379 pub const PERF_COUNT_HW_CACHE_OP_MAX: perf_hw_cache_op_id = 3; 380 pub type perf_hw_cache_op_id = ::std::os::raw::c_uint; 381 pub const PERF_COUNT_HW_CACHE_RESULT_ACCESS: perf_hw_cache_op_result_id = 0; 382 pub const PERF_COUNT_HW_CACHE_RESULT_MISS: perf_hw_cache_op_result_id = 1; 383 pub const PERF_COUNT_HW_CACHE_RESULT_MAX: perf_hw_cache_op_result_id = 2; 384 pub type perf_hw_cache_op_result_id = ::std::os::raw::c_uint; 385 pub const PERF_COUNT_SW_CPU_CLOCK: perf_sw_ids = 0; 386 pub const PERF_COUNT_SW_TASK_CLOCK: perf_sw_ids = 1; 387 pub const PERF_COUNT_SW_PAGE_FAULTS: perf_sw_ids = 2; 388 pub const PERF_COUNT_SW_CONTEXT_SWITCHES: perf_sw_ids = 3; 389 pub const PERF_COUNT_SW_CPU_MIGRATIONS: perf_sw_ids = 4; 390 pub const PERF_COUNT_SW_PAGE_FAULTS_MIN: perf_sw_ids = 5; 391 pub const PERF_COUNT_SW_PAGE_FAULTS_MAJ: perf_sw_ids = 6; 392 pub const PERF_COUNT_SW_ALIGNMENT_FAULTS: perf_sw_ids = 7; 393 pub const PERF_COUNT_SW_EMULATION_FAULTS: perf_sw_ids = 8; 394 pub const PERF_COUNT_SW_DUMMY: perf_sw_ids = 9; 395 pub const PERF_COUNT_SW_BPF_OUTPUT: perf_sw_ids = 10; 396 pub const PERF_COUNT_SW_CGROUP_SWITCHES: perf_sw_ids = 11; 397 pub const PERF_COUNT_SW_MAX: perf_sw_ids = 12; 398 pub type perf_sw_ids = ::std::os::raw::c_uint; 399 pub const PERF_SAMPLE_IP: perf_event_sample_format = 1; 400 pub const PERF_SAMPLE_TID: perf_event_sample_format = 2; 401 pub const PERF_SAMPLE_TIME: perf_event_sample_format = 4; 402 pub const PERF_SAMPLE_ADDR: perf_event_sample_format = 8; 403 pub const PERF_SAMPLE_READ: perf_event_sample_format = 16; 404 pub const PERF_SAMPLE_CALLCHAIN: perf_event_sample_format = 32; 405 pub const PERF_SAMPLE_ID: perf_event_sample_format = 64; 406 pub const PERF_SAMPLE_CPU: perf_event_sample_format = 128; 407 pub const PERF_SAMPLE_PERIOD: perf_event_sample_format = 256; 408 pub const PERF_SAMPLE_STREAM_ID: perf_event_sample_format = 512; 409 pub const PERF_SAMPLE_RAW: perf_event_sample_format = 1024; 410 pub const PERF_SAMPLE_BRANCH_STACK: perf_event_sample_format = 2048; 411 pub const PERF_SAMPLE_REGS_USER: perf_event_sample_format = 4096; 412 pub const PERF_SAMPLE_STACK_USER: perf_event_sample_format = 8192; 413 pub const PERF_SAMPLE_WEIGHT: perf_event_sample_format = 16384; 414 pub const PERF_SAMPLE_DATA_SRC: perf_event_sample_format = 32768; 415 pub const PERF_SAMPLE_IDENTIFIER: perf_event_sample_format = 65536; 416 pub const PERF_SAMPLE_TRANSACTION: perf_event_sample_format = 131072; 417 pub const PERF_SAMPLE_REGS_INTR: perf_event_sample_format = 262144; 418 pub const PERF_SAMPLE_PHYS_ADDR: perf_event_sample_format = 524288; 419 pub const PERF_SAMPLE_AUX: perf_event_sample_format = 1048576; 420 pub const PERF_SAMPLE_CGROUP: perf_event_sample_format = 2097152; 421 pub const PERF_SAMPLE_DATA_PAGE_SIZE: perf_event_sample_format = 4194304; 422 pub const PERF_SAMPLE_CODE_PAGE_SIZE: perf_event_sample_format = 8388608; 423 pub const PERF_SAMPLE_WEIGHT_STRUCT: perf_event_sample_format = 16777216; 424 pub const PERF_SAMPLE_MAX: perf_event_sample_format = 33554432; 425 pub type perf_event_sample_format = ::std::os::raw::c_uint; 426 pub const PERF_SAMPLE_BRANCH_USER_SHIFT: perf_branch_sample_type_shift = 0; 427 pub const PERF_SAMPLE_BRANCH_KERNEL_SHIFT: perf_branch_sample_type_shift = 1; 428 pub const PERF_SAMPLE_BRANCH_HV_SHIFT: perf_branch_sample_type_shift = 2; 429 pub const PERF_SAMPLE_BRANCH_ANY_SHIFT: perf_branch_sample_type_shift = 3; 430 pub const PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT: perf_branch_sample_type_shift = 4; 431 pub const PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT: perf_branch_sample_type_shift = 5; 432 pub const PERF_SAMPLE_BRANCH_IND_CALL_SHIFT: perf_branch_sample_type_shift = 6; 433 pub const PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT: perf_branch_sample_type_shift = 7; 434 pub const PERF_SAMPLE_BRANCH_IN_TX_SHIFT: perf_branch_sample_type_shift = 8; 435 pub const PERF_SAMPLE_BRANCH_NO_TX_SHIFT: perf_branch_sample_type_shift = 9; 436 pub const PERF_SAMPLE_BRANCH_COND_SHIFT: perf_branch_sample_type_shift = 10; 437 pub const PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT: perf_branch_sample_type_shift = 11; 438 pub const PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT: perf_branch_sample_type_shift = 12; 439 pub const PERF_SAMPLE_BRANCH_CALL_SHIFT: perf_branch_sample_type_shift = 13; 440 pub const PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT: perf_branch_sample_type_shift = 14; 441 pub const PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT: perf_branch_sample_type_shift = 15; 442 pub const PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT: perf_branch_sample_type_shift = 16; 443 pub const PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT: perf_branch_sample_type_shift = 17; 444 pub const PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT: perf_branch_sample_type_shift = 18; 445 pub const PERF_SAMPLE_BRANCH_COUNTERS_SHIFT: perf_branch_sample_type_shift = 19; 446 pub const PERF_SAMPLE_BRANCH_MAX_SHIFT: perf_branch_sample_type_shift = 20; 447 pub type perf_branch_sample_type_shift = ::std::os::raw::c_uint; 448 pub const PERF_SAMPLE_BRANCH_USER: perf_branch_sample_type = 1; 449 pub const PERF_SAMPLE_BRANCH_KERNEL: perf_branch_sample_type = 2; 450 pub const PERF_SAMPLE_BRANCH_HV: perf_branch_sample_type = 4; 451 pub const PERF_SAMPLE_BRANCH_ANY: perf_branch_sample_type = 8; 452 pub const PERF_SAMPLE_BRANCH_ANY_CALL: perf_branch_sample_type = 16; 453 pub const PERF_SAMPLE_BRANCH_ANY_RETURN: perf_branch_sample_type = 32; 454 pub const PERF_SAMPLE_BRANCH_IND_CALL: perf_branch_sample_type = 64; 455 pub const PERF_SAMPLE_BRANCH_ABORT_TX: perf_branch_sample_type = 128; 456 pub const PERF_SAMPLE_BRANCH_IN_TX: perf_branch_sample_type = 256; 457 pub const PERF_SAMPLE_BRANCH_NO_TX: perf_branch_sample_type = 512; 458 pub const PERF_SAMPLE_BRANCH_COND: perf_branch_sample_type = 1024; 459 pub const PERF_SAMPLE_BRANCH_CALL_STACK: perf_branch_sample_type = 2048; 460 pub const PERF_SAMPLE_BRANCH_IND_JUMP: perf_branch_sample_type = 4096; 461 pub const PERF_SAMPLE_BRANCH_CALL: perf_branch_sample_type = 8192; 462 pub const PERF_SAMPLE_BRANCH_NO_FLAGS: perf_branch_sample_type = 16384; 463 pub const PERF_SAMPLE_BRANCH_NO_CYCLES: perf_branch_sample_type = 32768; 464 pub const PERF_SAMPLE_BRANCH_TYPE_SAVE: perf_branch_sample_type = 65536; 465 pub const PERF_SAMPLE_BRANCH_HW_INDEX: perf_branch_sample_type = 131072; 466 pub const PERF_SAMPLE_BRANCH_PRIV_SAVE: perf_branch_sample_type = 262144; 467 pub const PERF_SAMPLE_BRANCH_COUNTERS: perf_branch_sample_type = 524288; 468 pub const PERF_SAMPLE_BRANCH_MAX: perf_branch_sample_type = 1048576; 469 pub type perf_branch_sample_type = ::std::os::raw::c_uint; 470 pub const PERF_BR_UNKNOWN: _bindgen_ty_55 = 0; 471 pub const PERF_BR_COND: _bindgen_ty_55 = 1; 472 pub const PERF_BR_UNCOND: _bindgen_ty_55 = 2; 473 pub const PERF_BR_IND: _bindgen_ty_55 = 3; 474 pub const PERF_BR_CALL: _bindgen_ty_55 = 4; 475 pub const PERF_BR_IND_CALL: _bindgen_ty_55 = 5; 476 pub const PERF_BR_RET: _bindgen_ty_55 = 6; 477 pub const PERF_BR_SYSCALL: _bindgen_ty_55 = 7; 478 pub const PERF_BR_SYSRET: _bindgen_ty_55 = 8; 479 pub const PERF_BR_COND_CALL: _bindgen_ty_55 = 9; 480 pub const PERF_BR_COND_RET: _bindgen_ty_55 = 10; 481 pub const PERF_BR_ERET: _bindgen_ty_55 = 11; 482 pub const PERF_BR_IRQ: _bindgen_ty_55 = 12; 483 pub const PERF_BR_SERROR: _bindgen_ty_55 = 13; 484 pub const PERF_BR_NO_TX: _bindgen_ty_55 = 14; 485 pub const PERF_BR_EXTEND_ABI: _bindgen_ty_55 = 15; 486 pub const PERF_BR_MAX: _bindgen_ty_55 = 16; 487 pub type _bindgen_ty_55 = ::std::os::raw::c_uint; 488 pub const PERF_BR_SPEC_NA: _bindgen_ty_56 = 0; 489 pub const PERF_BR_SPEC_WRONG_PATH: _bindgen_ty_56 = 1; 490 pub const PERF_BR_NON_SPEC_CORRECT_PATH: _bindgen_ty_56 = 2; 491 pub const PERF_BR_SPEC_CORRECT_PATH: _bindgen_ty_56 = 3; 492 pub const PERF_BR_SPEC_MAX: _bindgen_ty_56 = 4; 493 pub type _bindgen_ty_56 = ::std::os::raw::c_uint; 494 pub const PERF_BR_NEW_FAULT_ALGN: _bindgen_ty_57 = 0; 495 pub const PERF_BR_NEW_FAULT_DATA: _bindgen_ty_57 = 1; 496 pub const PERF_BR_NEW_FAULT_INST: _bindgen_ty_57 = 2; 497 pub const PERF_BR_NEW_ARCH_1: _bindgen_ty_57 = 3; 498 pub const PERF_BR_NEW_ARCH_2: _bindgen_ty_57 = 4; 499 pub const PERF_BR_NEW_ARCH_3: _bindgen_ty_57 = 5; 500 pub const PERF_BR_NEW_ARCH_4: _bindgen_ty_57 = 6; 501 pub const PERF_BR_NEW_ARCH_5: _bindgen_ty_57 = 7; 502 pub const PERF_BR_NEW_MAX: _bindgen_ty_57 = 8; 503 pub type _bindgen_ty_57 = ::std::os::raw::c_uint; 504 pub const PERF_BR_PRIV_UNKNOWN: _bindgen_ty_58 = 0; 505 pub const PERF_BR_PRIV_USER: _bindgen_ty_58 = 1; 506 pub const PERF_BR_PRIV_KERNEL: _bindgen_ty_58 = 2; 507 pub const PERF_BR_PRIV_HV: _bindgen_ty_58 = 3; 508 pub type _bindgen_ty_58 = ::std::os::raw::c_uint; 509 pub const PERF_SAMPLE_REGS_ABI_NONE: perf_sample_regs_abi = 0; 510 pub const PERF_SAMPLE_REGS_ABI_32: perf_sample_regs_abi = 1; 511 pub const PERF_SAMPLE_REGS_ABI_64: perf_sample_regs_abi = 2; 512 pub type perf_sample_regs_abi = ::std::os::raw::c_uint; 513 pub const PERF_TXN_ELISION: _bindgen_ty_59 = 1; 514 pub const PERF_TXN_TRANSACTION: _bindgen_ty_59 = 2; 515 pub const PERF_TXN_SYNC: _bindgen_ty_59 = 4; 516 pub const PERF_TXN_ASYNC: _bindgen_ty_59 = 8; 517 pub const PERF_TXN_RETRY: _bindgen_ty_59 = 16; 518 pub const PERF_TXN_CONFLICT: _bindgen_ty_59 = 32; 519 pub const PERF_TXN_CAPACITY_WRITE: _bindgen_ty_59 = 64; 520 pub const PERF_TXN_CAPACITY_READ: _bindgen_ty_59 = 128; 521 pub const PERF_TXN_MAX: _bindgen_ty_59 = 256; 522 pub const PERF_TXN_ABORT_MASK: _bindgen_ty_59 = 18446744069414584320; 523 pub const PERF_TXN_ABORT_SHIFT: _bindgen_ty_59 = 32; 524 pub type _bindgen_ty_59 = ::std::os::raw::c_ulong; 525 pub const PERF_FORMAT_TOTAL_TIME_ENABLED: perf_event_read_format = 1; 526 pub const PERF_FORMAT_TOTAL_TIME_RUNNING: perf_event_read_format = 2; 527 pub const PERF_FORMAT_ID: perf_event_read_format = 4; 528 pub const PERF_FORMAT_GROUP: perf_event_read_format = 8; 529 pub const PERF_FORMAT_LOST: perf_event_read_format = 16; 530 pub const PERF_FORMAT_MAX: perf_event_read_format = 32; 531 pub type perf_event_read_format = ::std::os::raw::c_uint; 532 #[repr(C)] 533 #[derive(Copy, Clone)] 534 pub struct perf_event_attr { 535 pub type_: __u32, 536 pub size: __u32, 537 pub config: __u64, 538 pub __bindgen_anon_1: perf_event_attr__bindgen_ty_1, 539 pub sample_type: __u64, 540 pub read_format: __u64, 541 pub _bitfield_align_1: [u32; 0], 542 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, 543 pub __bindgen_anon_2: perf_event_attr__bindgen_ty_2, 544 pub bp_type: __u32, 545 pub __bindgen_anon_3: perf_event_attr__bindgen_ty_3, 546 pub __bindgen_anon_4: perf_event_attr__bindgen_ty_4, 547 pub branch_sample_type: __u64, 548 pub sample_regs_user: __u64, 549 pub sample_stack_user: __u32, 550 pub clockid: __s32, 551 pub sample_regs_intr: __u64, 552 pub aux_watermark: __u32, 553 pub sample_max_stack: __u16, 554 pub __reserved_2: __u16, 555 pub aux_sample_size: __u32, 556 pub __reserved_3: __u32, 557 pub sig_data: __u64, 558 pub config3: __u64, 559 } 560 #[repr(C)] 561 #[derive(Copy, Clone)] 562 pub union perf_event_attr__bindgen_ty_1 { 563 pub sample_period: __u64, 564 pub sample_freq: __u64, 565 } 566 impl Default for perf_event_attr__bindgen_ty_1 { default() -> Self567 fn default() -> Self { 568 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 569 unsafe { 570 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 571 s.assume_init() 572 } 573 } 574 } 575 #[repr(C)] 576 #[derive(Copy, Clone)] 577 pub union perf_event_attr__bindgen_ty_2 { 578 pub wakeup_events: __u32, 579 pub wakeup_watermark: __u32, 580 } 581 impl Default for perf_event_attr__bindgen_ty_2 { default() -> Self582 fn default() -> Self { 583 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 584 unsafe { 585 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 586 s.assume_init() 587 } 588 } 589 } 590 #[repr(C)] 591 #[derive(Copy, Clone)] 592 pub union perf_event_attr__bindgen_ty_3 { 593 pub bp_addr: __u64, 594 pub kprobe_func: __u64, 595 pub uprobe_path: __u64, 596 pub config1: __u64, 597 } 598 impl Default for perf_event_attr__bindgen_ty_3 { default() -> Self599 fn default() -> Self { 600 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 601 unsafe { 602 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 603 s.assume_init() 604 } 605 } 606 } 607 #[repr(C)] 608 #[derive(Copy, Clone)] 609 pub union perf_event_attr__bindgen_ty_4 { 610 pub bp_len: __u64, 611 pub kprobe_addr: __u64, 612 pub probe_offset: __u64, 613 pub config2: __u64, 614 } 615 impl Default for perf_event_attr__bindgen_ty_4 { default() -> Self616 fn default() -> Self { 617 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 618 unsafe { 619 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 620 s.assume_init() 621 } 622 } 623 } 624 impl Default for perf_event_attr { default() -> Self625 fn default() -> Self { 626 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 627 unsafe { 628 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 629 s.assume_init() 630 } 631 } 632 } 633 impl perf_event_attr { 634 #[inline] disabled(&self) -> __u64635 pub fn disabled(&self) -> __u64 { 636 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } 637 } 638 #[inline] set_disabled(&mut self, val: __u64)639 pub fn set_disabled(&mut self, val: __u64) { 640 unsafe { 641 let val: u64 = ::std::mem::transmute(val); 642 self._bitfield_1.set(0usize, 1u8, val as u64) 643 } 644 } 645 #[inline] inherit(&self) -> __u64646 pub fn inherit(&self) -> __u64 { 647 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } 648 } 649 #[inline] set_inherit(&mut self, val: __u64)650 pub fn set_inherit(&mut self, val: __u64) { 651 unsafe { 652 let val: u64 = ::std::mem::transmute(val); 653 self._bitfield_1.set(1usize, 1u8, val as u64) 654 } 655 } 656 #[inline] pinned(&self) -> __u64657 pub fn pinned(&self) -> __u64 { 658 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } 659 } 660 #[inline] set_pinned(&mut self, val: __u64)661 pub fn set_pinned(&mut self, val: __u64) { 662 unsafe { 663 let val: u64 = ::std::mem::transmute(val); 664 self._bitfield_1.set(2usize, 1u8, val as u64) 665 } 666 } 667 #[inline] exclusive(&self) -> __u64668 pub fn exclusive(&self) -> __u64 { 669 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } 670 } 671 #[inline] set_exclusive(&mut self, val: __u64)672 pub fn set_exclusive(&mut self, val: __u64) { 673 unsafe { 674 let val: u64 = ::std::mem::transmute(val); 675 self._bitfield_1.set(3usize, 1u8, val as u64) 676 } 677 } 678 #[inline] exclude_user(&self) -> __u64679 pub fn exclude_user(&self) -> __u64 { 680 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } 681 } 682 #[inline] set_exclude_user(&mut self, val: __u64)683 pub fn set_exclude_user(&mut self, val: __u64) { 684 unsafe { 685 let val: u64 = ::std::mem::transmute(val); 686 self._bitfield_1.set(4usize, 1u8, val as u64) 687 } 688 } 689 #[inline] exclude_kernel(&self) -> __u64690 pub fn exclude_kernel(&self) -> __u64 { 691 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } 692 } 693 #[inline] set_exclude_kernel(&mut self, val: __u64)694 pub fn set_exclude_kernel(&mut self, val: __u64) { 695 unsafe { 696 let val: u64 = ::std::mem::transmute(val); 697 self._bitfield_1.set(5usize, 1u8, val as u64) 698 } 699 } 700 #[inline] exclude_hv(&self) -> __u64701 pub fn exclude_hv(&self) -> __u64 { 702 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } 703 } 704 #[inline] set_exclude_hv(&mut self, val: __u64)705 pub fn set_exclude_hv(&mut self, val: __u64) { 706 unsafe { 707 let val: u64 = ::std::mem::transmute(val); 708 self._bitfield_1.set(6usize, 1u8, val as u64) 709 } 710 } 711 #[inline] exclude_idle(&self) -> __u64712 pub fn exclude_idle(&self) -> __u64 { 713 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } 714 } 715 #[inline] set_exclude_idle(&mut self, val: __u64)716 pub fn set_exclude_idle(&mut self, val: __u64) { 717 unsafe { 718 let val: u64 = ::std::mem::transmute(val); 719 self._bitfield_1.set(7usize, 1u8, val as u64) 720 } 721 } 722 #[inline] mmap(&self) -> __u64723 pub fn mmap(&self) -> __u64 { 724 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } 725 } 726 #[inline] set_mmap(&mut self, val: __u64)727 pub fn set_mmap(&mut self, val: __u64) { 728 unsafe { 729 let val: u64 = ::std::mem::transmute(val); 730 self._bitfield_1.set(8usize, 1u8, val as u64) 731 } 732 } 733 #[inline] comm(&self) -> __u64734 pub fn comm(&self) -> __u64 { 735 unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } 736 } 737 #[inline] set_comm(&mut self, val: __u64)738 pub fn set_comm(&mut self, val: __u64) { 739 unsafe { 740 let val: u64 = ::std::mem::transmute(val); 741 self._bitfield_1.set(9usize, 1u8, val as u64) 742 } 743 } 744 #[inline] freq(&self) -> __u64745 pub fn freq(&self) -> __u64 { 746 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } 747 } 748 #[inline] set_freq(&mut self, val: __u64)749 pub fn set_freq(&mut self, val: __u64) { 750 unsafe { 751 let val: u64 = ::std::mem::transmute(val); 752 self._bitfield_1.set(10usize, 1u8, val as u64) 753 } 754 } 755 #[inline] inherit_stat(&self) -> __u64756 pub fn inherit_stat(&self) -> __u64 { 757 unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } 758 } 759 #[inline] set_inherit_stat(&mut self, val: __u64)760 pub fn set_inherit_stat(&mut self, val: __u64) { 761 unsafe { 762 let val: u64 = ::std::mem::transmute(val); 763 self._bitfield_1.set(11usize, 1u8, val as u64) 764 } 765 } 766 #[inline] enable_on_exec(&self) -> __u64767 pub fn enable_on_exec(&self) -> __u64 { 768 unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } 769 } 770 #[inline] set_enable_on_exec(&mut self, val: __u64)771 pub fn set_enable_on_exec(&mut self, val: __u64) { 772 unsafe { 773 let val: u64 = ::std::mem::transmute(val); 774 self._bitfield_1.set(12usize, 1u8, val as u64) 775 } 776 } 777 #[inline] task(&self) -> __u64778 pub fn task(&self) -> __u64 { 779 unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } 780 } 781 #[inline] set_task(&mut self, val: __u64)782 pub fn set_task(&mut self, val: __u64) { 783 unsafe { 784 let val: u64 = ::std::mem::transmute(val); 785 self._bitfield_1.set(13usize, 1u8, val as u64) 786 } 787 } 788 #[inline] watermark(&self) -> __u64789 pub fn watermark(&self) -> __u64 { 790 unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } 791 } 792 #[inline] set_watermark(&mut self, val: __u64)793 pub fn set_watermark(&mut self, val: __u64) { 794 unsafe { 795 let val: u64 = ::std::mem::transmute(val); 796 self._bitfield_1.set(14usize, 1u8, val as u64) 797 } 798 } 799 #[inline] precise_ip(&self) -> __u64800 pub fn precise_ip(&self) -> __u64 { 801 unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } 802 } 803 #[inline] set_precise_ip(&mut self, val: __u64)804 pub fn set_precise_ip(&mut self, val: __u64) { 805 unsafe { 806 let val: u64 = ::std::mem::transmute(val); 807 self._bitfield_1.set(15usize, 2u8, val as u64) 808 } 809 } 810 #[inline] mmap_data(&self) -> __u64811 pub fn mmap_data(&self) -> __u64 { 812 unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } 813 } 814 #[inline] set_mmap_data(&mut self, val: __u64)815 pub fn set_mmap_data(&mut self, val: __u64) { 816 unsafe { 817 let val: u64 = ::std::mem::transmute(val); 818 self._bitfield_1.set(17usize, 1u8, val as u64) 819 } 820 } 821 #[inline] sample_id_all(&self) -> __u64822 pub fn sample_id_all(&self) -> __u64 { 823 unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } 824 } 825 #[inline] set_sample_id_all(&mut self, val: __u64)826 pub fn set_sample_id_all(&mut self, val: __u64) { 827 unsafe { 828 let val: u64 = ::std::mem::transmute(val); 829 self._bitfield_1.set(18usize, 1u8, val as u64) 830 } 831 } 832 #[inline] exclude_host(&self) -> __u64833 pub fn exclude_host(&self) -> __u64 { 834 unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } 835 } 836 #[inline] set_exclude_host(&mut self, val: __u64)837 pub fn set_exclude_host(&mut self, val: __u64) { 838 unsafe { 839 let val: u64 = ::std::mem::transmute(val); 840 self._bitfield_1.set(19usize, 1u8, val as u64) 841 } 842 } 843 #[inline] exclude_guest(&self) -> __u64844 pub fn exclude_guest(&self) -> __u64 { 845 unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } 846 } 847 #[inline] set_exclude_guest(&mut self, val: __u64)848 pub fn set_exclude_guest(&mut self, val: __u64) { 849 unsafe { 850 let val: u64 = ::std::mem::transmute(val); 851 self._bitfield_1.set(20usize, 1u8, val as u64) 852 } 853 } 854 #[inline] exclude_callchain_kernel(&self) -> __u64855 pub fn exclude_callchain_kernel(&self) -> __u64 { 856 unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } 857 } 858 #[inline] set_exclude_callchain_kernel(&mut self, val: __u64)859 pub fn set_exclude_callchain_kernel(&mut self, val: __u64) { 860 unsafe { 861 let val: u64 = ::std::mem::transmute(val); 862 self._bitfield_1.set(21usize, 1u8, val as u64) 863 } 864 } 865 #[inline] exclude_callchain_user(&self) -> __u64866 pub fn exclude_callchain_user(&self) -> __u64 { 867 unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } 868 } 869 #[inline] set_exclude_callchain_user(&mut self, val: __u64)870 pub fn set_exclude_callchain_user(&mut self, val: __u64) { 871 unsafe { 872 let val: u64 = ::std::mem::transmute(val); 873 self._bitfield_1.set(22usize, 1u8, val as u64) 874 } 875 } 876 #[inline] mmap2(&self) -> __u64877 pub fn mmap2(&self) -> __u64 { 878 unsafe { ::std::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } 879 } 880 #[inline] set_mmap2(&mut self, val: __u64)881 pub fn set_mmap2(&mut self, val: __u64) { 882 unsafe { 883 let val: u64 = ::std::mem::transmute(val); 884 self._bitfield_1.set(23usize, 1u8, val as u64) 885 } 886 } 887 #[inline] comm_exec(&self) -> __u64888 pub fn comm_exec(&self) -> __u64 { 889 unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } 890 } 891 #[inline] set_comm_exec(&mut self, val: __u64)892 pub fn set_comm_exec(&mut self, val: __u64) { 893 unsafe { 894 let val: u64 = ::std::mem::transmute(val); 895 self._bitfield_1.set(24usize, 1u8, val as u64) 896 } 897 } 898 #[inline] use_clockid(&self) -> __u64899 pub fn use_clockid(&self) -> __u64 { 900 unsafe { ::std::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } 901 } 902 #[inline] set_use_clockid(&mut self, val: __u64)903 pub fn set_use_clockid(&mut self, val: __u64) { 904 unsafe { 905 let val: u64 = ::std::mem::transmute(val); 906 self._bitfield_1.set(25usize, 1u8, val as u64) 907 } 908 } 909 #[inline] context_switch(&self) -> __u64910 pub fn context_switch(&self) -> __u64 { 911 unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } 912 } 913 #[inline] set_context_switch(&mut self, val: __u64)914 pub fn set_context_switch(&mut self, val: __u64) { 915 unsafe { 916 let val: u64 = ::std::mem::transmute(val); 917 self._bitfield_1.set(26usize, 1u8, val as u64) 918 } 919 } 920 #[inline] write_backward(&self) -> __u64921 pub fn write_backward(&self) -> __u64 { 922 unsafe { ::std::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } 923 } 924 #[inline] set_write_backward(&mut self, val: __u64)925 pub fn set_write_backward(&mut self, val: __u64) { 926 unsafe { 927 let val: u64 = ::std::mem::transmute(val); 928 self._bitfield_1.set(27usize, 1u8, val as u64) 929 } 930 } 931 #[inline] namespaces(&self) -> __u64932 pub fn namespaces(&self) -> __u64 { 933 unsafe { ::std::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } 934 } 935 #[inline] set_namespaces(&mut self, val: __u64)936 pub fn set_namespaces(&mut self, val: __u64) { 937 unsafe { 938 let val: u64 = ::std::mem::transmute(val); 939 self._bitfield_1.set(28usize, 1u8, val as u64) 940 } 941 } 942 #[inline] ksymbol(&self) -> __u64943 pub fn ksymbol(&self) -> __u64 { 944 unsafe { ::std::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } 945 } 946 #[inline] set_ksymbol(&mut self, val: __u64)947 pub fn set_ksymbol(&mut self, val: __u64) { 948 unsafe { 949 let val: u64 = ::std::mem::transmute(val); 950 self._bitfield_1.set(29usize, 1u8, val as u64) 951 } 952 } 953 #[inline] bpf_event(&self) -> __u64954 pub fn bpf_event(&self) -> __u64 { 955 unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } 956 } 957 #[inline] set_bpf_event(&mut self, val: __u64)958 pub fn set_bpf_event(&mut self, val: __u64) { 959 unsafe { 960 let val: u64 = ::std::mem::transmute(val); 961 self._bitfield_1.set(30usize, 1u8, val as u64) 962 } 963 } 964 #[inline] aux_output(&self) -> __u64965 pub fn aux_output(&self) -> __u64 { 966 unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } 967 } 968 #[inline] set_aux_output(&mut self, val: __u64)969 pub fn set_aux_output(&mut self, val: __u64) { 970 unsafe { 971 let val: u64 = ::std::mem::transmute(val); 972 self._bitfield_1.set(31usize, 1u8, val as u64) 973 } 974 } 975 #[inline] cgroup(&self) -> __u64976 pub fn cgroup(&self) -> __u64 { 977 unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } 978 } 979 #[inline] set_cgroup(&mut self, val: __u64)980 pub fn set_cgroup(&mut self, val: __u64) { 981 unsafe { 982 let val: u64 = ::std::mem::transmute(val); 983 self._bitfield_1.set(32usize, 1u8, val as u64) 984 } 985 } 986 #[inline] text_poke(&self) -> __u64987 pub fn text_poke(&self) -> __u64 { 988 unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } 989 } 990 #[inline] set_text_poke(&mut self, val: __u64)991 pub fn set_text_poke(&mut self, val: __u64) { 992 unsafe { 993 let val: u64 = ::std::mem::transmute(val); 994 self._bitfield_1.set(33usize, 1u8, val as u64) 995 } 996 } 997 #[inline] build_id(&self) -> __u64998 pub fn build_id(&self) -> __u64 { 999 unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } 1000 } 1001 #[inline] set_build_id(&mut self, val: __u64)1002 pub fn set_build_id(&mut self, val: __u64) { 1003 unsafe { 1004 let val: u64 = ::std::mem::transmute(val); 1005 self._bitfield_1.set(34usize, 1u8, val as u64) 1006 } 1007 } 1008 #[inline] inherit_thread(&self) -> __u641009 pub fn inherit_thread(&self) -> __u64 { 1010 unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } 1011 } 1012 #[inline] set_inherit_thread(&mut self, val: __u64)1013 pub fn set_inherit_thread(&mut self, val: __u64) { 1014 unsafe { 1015 let val: u64 = ::std::mem::transmute(val); 1016 self._bitfield_1.set(35usize, 1u8, val as u64) 1017 } 1018 } 1019 #[inline] remove_on_exec(&self) -> __u641020 pub fn remove_on_exec(&self) -> __u64 { 1021 unsafe { ::std::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } 1022 } 1023 #[inline] set_remove_on_exec(&mut self, val: __u64)1024 pub fn set_remove_on_exec(&mut self, val: __u64) { 1025 unsafe { 1026 let val: u64 = ::std::mem::transmute(val); 1027 self._bitfield_1.set(36usize, 1u8, val as u64) 1028 } 1029 } 1030 #[inline] sigtrap(&self) -> __u641031 pub fn sigtrap(&self) -> __u64 { 1032 unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } 1033 } 1034 #[inline] set_sigtrap(&mut self, val: __u64)1035 pub fn set_sigtrap(&mut self, val: __u64) { 1036 unsafe { 1037 let val: u64 = ::std::mem::transmute(val); 1038 self._bitfield_1.set(37usize, 1u8, val as u64) 1039 } 1040 } 1041 #[inline] __reserved_1(&self) -> __u641042 pub fn __reserved_1(&self) -> __u64 { 1043 unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } 1044 } 1045 #[inline] set___reserved_1(&mut self, val: __u64)1046 pub fn set___reserved_1(&mut self, val: __u64) { 1047 unsafe { 1048 let val: u64 = ::std::mem::transmute(val); 1049 self._bitfield_1.set(38usize, 26u8, val as u64) 1050 } 1051 } 1052 #[inline] new_bitfield_1( disabled: __u64, inherit: __u64, pinned: __u64, exclusive: __u64, exclude_user: __u64, exclude_kernel: __u64, exclude_hv: __u64, exclude_idle: __u64, mmap: __u64, comm: __u64, freq: __u64, inherit_stat: __u64, enable_on_exec: __u64, task: __u64, watermark: __u64, precise_ip: __u64, mmap_data: __u64, sample_id_all: __u64, exclude_host: __u64, exclude_guest: __u64, exclude_callchain_kernel: __u64, exclude_callchain_user: __u64, mmap2: __u64, comm_exec: __u64, use_clockid: __u64, context_switch: __u64, write_backward: __u64, namespaces: __u64, ksymbol: __u64, bpf_event: __u64, aux_output: __u64, cgroup: __u64, text_poke: __u64, build_id: __u64, inherit_thread: __u64, remove_on_exec: __u64, sigtrap: __u64, __reserved_1: __u64, ) -> __BindgenBitfieldUnit<[u8; 8usize]>1053 pub fn new_bitfield_1( 1054 disabled: __u64, 1055 inherit: __u64, 1056 pinned: __u64, 1057 exclusive: __u64, 1058 exclude_user: __u64, 1059 exclude_kernel: __u64, 1060 exclude_hv: __u64, 1061 exclude_idle: __u64, 1062 mmap: __u64, 1063 comm: __u64, 1064 freq: __u64, 1065 inherit_stat: __u64, 1066 enable_on_exec: __u64, 1067 task: __u64, 1068 watermark: __u64, 1069 precise_ip: __u64, 1070 mmap_data: __u64, 1071 sample_id_all: __u64, 1072 exclude_host: __u64, 1073 exclude_guest: __u64, 1074 exclude_callchain_kernel: __u64, 1075 exclude_callchain_user: __u64, 1076 mmap2: __u64, 1077 comm_exec: __u64, 1078 use_clockid: __u64, 1079 context_switch: __u64, 1080 write_backward: __u64, 1081 namespaces: __u64, 1082 ksymbol: __u64, 1083 bpf_event: __u64, 1084 aux_output: __u64, 1085 cgroup: __u64, 1086 text_poke: __u64, 1087 build_id: __u64, 1088 inherit_thread: __u64, 1089 remove_on_exec: __u64, 1090 sigtrap: __u64, 1091 __reserved_1: __u64, 1092 ) -> __BindgenBitfieldUnit<[u8; 8usize]> { 1093 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); 1094 __bindgen_bitfield_unit.set(0usize, 1u8, { 1095 let disabled: u64 = unsafe { ::std::mem::transmute(disabled) }; 1096 disabled as u64 1097 }); 1098 __bindgen_bitfield_unit.set(1usize, 1u8, { 1099 let inherit: u64 = unsafe { ::std::mem::transmute(inherit) }; 1100 inherit as u64 1101 }); 1102 __bindgen_bitfield_unit.set(2usize, 1u8, { 1103 let pinned: u64 = unsafe { ::std::mem::transmute(pinned) }; 1104 pinned as u64 1105 }); 1106 __bindgen_bitfield_unit.set(3usize, 1u8, { 1107 let exclusive: u64 = unsafe { ::std::mem::transmute(exclusive) }; 1108 exclusive as u64 1109 }); 1110 __bindgen_bitfield_unit.set(4usize, 1u8, { 1111 let exclude_user: u64 = unsafe { ::std::mem::transmute(exclude_user) }; 1112 exclude_user as u64 1113 }); 1114 __bindgen_bitfield_unit.set(5usize, 1u8, { 1115 let exclude_kernel: u64 = unsafe { ::std::mem::transmute(exclude_kernel) }; 1116 exclude_kernel as u64 1117 }); 1118 __bindgen_bitfield_unit.set(6usize, 1u8, { 1119 let exclude_hv: u64 = unsafe { ::std::mem::transmute(exclude_hv) }; 1120 exclude_hv as u64 1121 }); 1122 __bindgen_bitfield_unit.set(7usize, 1u8, { 1123 let exclude_idle: u64 = unsafe { ::std::mem::transmute(exclude_idle) }; 1124 exclude_idle as u64 1125 }); 1126 __bindgen_bitfield_unit.set(8usize, 1u8, { 1127 let mmap: u64 = unsafe { ::std::mem::transmute(mmap) }; 1128 mmap as u64 1129 }); 1130 __bindgen_bitfield_unit.set(9usize, 1u8, { 1131 let comm: u64 = unsafe { ::std::mem::transmute(comm) }; 1132 comm as u64 1133 }); 1134 __bindgen_bitfield_unit.set(10usize, 1u8, { 1135 let freq: u64 = unsafe { ::std::mem::transmute(freq) }; 1136 freq as u64 1137 }); 1138 __bindgen_bitfield_unit.set(11usize, 1u8, { 1139 let inherit_stat: u64 = unsafe { ::std::mem::transmute(inherit_stat) }; 1140 inherit_stat as u64 1141 }); 1142 __bindgen_bitfield_unit.set(12usize, 1u8, { 1143 let enable_on_exec: u64 = unsafe { ::std::mem::transmute(enable_on_exec) }; 1144 enable_on_exec as u64 1145 }); 1146 __bindgen_bitfield_unit.set(13usize, 1u8, { 1147 let task: u64 = unsafe { ::std::mem::transmute(task) }; 1148 task as u64 1149 }); 1150 __bindgen_bitfield_unit.set(14usize, 1u8, { 1151 let watermark: u64 = unsafe { ::std::mem::transmute(watermark) }; 1152 watermark as u64 1153 }); 1154 __bindgen_bitfield_unit.set(15usize, 2u8, { 1155 let precise_ip: u64 = unsafe { ::std::mem::transmute(precise_ip) }; 1156 precise_ip as u64 1157 }); 1158 __bindgen_bitfield_unit.set(17usize, 1u8, { 1159 let mmap_data: u64 = unsafe { ::std::mem::transmute(mmap_data) }; 1160 mmap_data as u64 1161 }); 1162 __bindgen_bitfield_unit.set(18usize, 1u8, { 1163 let sample_id_all: u64 = unsafe { ::std::mem::transmute(sample_id_all) }; 1164 sample_id_all as u64 1165 }); 1166 __bindgen_bitfield_unit.set(19usize, 1u8, { 1167 let exclude_host: u64 = unsafe { ::std::mem::transmute(exclude_host) }; 1168 exclude_host as u64 1169 }); 1170 __bindgen_bitfield_unit.set(20usize, 1u8, { 1171 let exclude_guest: u64 = unsafe { ::std::mem::transmute(exclude_guest) }; 1172 exclude_guest as u64 1173 }); 1174 __bindgen_bitfield_unit.set(21usize, 1u8, { 1175 let exclude_callchain_kernel: u64 = 1176 unsafe { ::std::mem::transmute(exclude_callchain_kernel) }; 1177 exclude_callchain_kernel as u64 1178 }); 1179 __bindgen_bitfield_unit.set(22usize, 1u8, { 1180 let exclude_callchain_user: u64 = 1181 unsafe { ::std::mem::transmute(exclude_callchain_user) }; 1182 exclude_callchain_user as u64 1183 }); 1184 __bindgen_bitfield_unit.set(23usize, 1u8, { 1185 let mmap2: u64 = unsafe { ::std::mem::transmute(mmap2) }; 1186 mmap2 as u64 1187 }); 1188 __bindgen_bitfield_unit.set(24usize, 1u8, { 1189 let comm_exec: u64 = unsafe { ::std::mem::transmute(comm_exec) }; 1190 comm_exec as u64 1191 }); 1192 __bindgen_bitfield_unit.set(25usize, 1u8, { 1193 let use_clockid: u64 = unsafe { ::std::mem::transmute(use_clockid) }; 1194 use_clockid as u64 1195 }); 1196 __bindgen_bitfield_unit.set(26usize, 1u8, { 1197 let context_switch: u64 = unsafe { ::std::mem::transmute(context_switch) }; 1198 context_switch as u64 1199 }); 1200 __bindgen_bitfield_unit.set(27usize, 1u8, { 1201 let write_backward: u64 = unsafe { ::std::mem::transmute(write_backward) }; 1202 write_backward as u64 1203 }); 1204 __bindgen_bitfield_unit.set(28usize, 1u8, { 1205 let namespaces: u64 = unsafe { ::std::mem::transmute(namespaces) }; 1206 namespaces as u64 1207 }); 1208 __bindgen_bitfield_unit.set(29usize, 1u8, { 1209 let ksymbol: u64 = unsafe { ::std::mem::transmute(ksymbol) }; 1210 ksymbol as u64 1211 }); 1212 __bindgen_bitfield_unit.set(30usize, 1u8, { 1213 let bpf_event: u64 = unsafe { ::std::mem::transmute(bpf_event) }; 1214 bpf_event as u64 1215 }); 1216 __bindgen_bitfield_unit.set(31usize, 1u8, { 1217 let aux_output: u64 = unsafe { ::std::mem::transmute(aux_output) }; 1218 aux_output as u64 1219 }); 1220 __bindgen_bitfield_unit.set(32usize, 1u8, { 1221 let cgroup: u64 = unsafe { ::std::mem::transmute(cgroup) }; 1222 cgroup as u64 1223 }); 1224 __bindgen_bitfield_unit.set(33usize, 1u8, { 1225 let text_poke: u64 = unsafe { ::std::mem::transmute(text_poke) }; 1226 text_poke as u64 1227 }); 1228 __bindgen_bitfield_unit.set(34usize, 1u8, { 1229 let build_id: u64 = unsafe { ::std::mem::transmute(build_id) }; 1230 build_id as u64 1231 }); 1232 __bindgen_bitfield_unit.set(35usize, 1u8, { 1233 let inherit_thread: u64 = unsafe { ::std::mem::transmute(inherit_thread) }; 1234 inherit_thread as u64 1235 }); 1236 __bindgen_bitfield_unit.set(36usize, 1u8, { 1237 let remove_on_exec: u64 = unsafe { ::std::mem::transmute(remove_on_exec) }; 1238 remove_on_exec as u64 1239 }); 1240 __bindgen_bitfield_unit.set(37usize, 1u8, { 1241 let sigtrap: u64 = unsafe { ::std::mem::transmute(sigtrap) }; 1242 sigtrap as u64 1243 }); 1244 __bindgen_bitfield_unit.set(38usize, 26u8, { 1245 let __reserved_1: u64 = unsafe { ::std::mem::transmute(__reserved_1) }; 1246 __reserved_1 as u64 1247 }); 1248 __bindgen_bitfield_unit 1249 } 1250 } 1251 #[repr(C)] 1252 #[derive(Debug, Default)] 1253 pub struct perf_event_query_bpf { 1254 pub ids_len: __u32, 1255 pub prog_cnt: __u32, 1256 pub ids: __IncompleteArrayField<__u32>, 1257 } 1258 pub const PERF_IOC_FLAG_GROUP: perf_event_ioc_flags = 1; 1259 pub type perf_event_ioc_flags = ::std::os::raw::c_uint; 1260 #[repr(C)] 1261 #[derive(Copy, Clone)] 1262 pub struct perf_event_mmap_page { 1263 pub version: __u32, 1264 pub compat_version: __u32, 1265 pub lock: __u32, 1266 pub index: __u32, 1267 pub offset: __s64, 1268 pub time_enabled: __u64, 1269 pub time_running: __u64, 1270 pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1, 1271 pub pmc_width: __u16, 1272 pub time_shift: __u16, 1273 pub time_mult: __u32, 1274 pub time_offset: __u64, 1275 pub time_zero: __u64, 1276 pub size: __u32, 1277 pub __reserved_1: __u32, 1278 pub time_cycles: __u64, 1279 pub time_mask: __u64, 1280 pub __reserved: [__u8; 928usize], 1281 pub data_head: __u64, 1282 pub data_tail: __u64, 1283 pub data_offset: __u64, 1284 pub data_size: __u64, 1285 pub aux_head: __u64, 1286 pub aux_tail: __u64, 1287 pub aux_offset: __u64, 1288 pub aux_size: __u64, 1289 } 1290 #[repr(C)] 1291 #[derive(Copy, Clone)] 1292 pub union perf_event_mmap_page__bindgen_ty_1 { 1293 pub capabilities: __u64, 1294 pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1, 1295 } 1296 #[repr(C)] 1297 #[derive(Debug, Default, Copy, Clone)] 1298 pub struct perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { 1299 pub _bitfield_align_1: [u64; 0], 1300 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, 1301 } 1302 impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { 1303 #[inline] cap_bit0(&self) -> __u641304 pub fn cap_bit0(&self) -> __u64 { 1305 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } 1306 } 1307 #[inline] set_cap_bit0(&mut self, val: __u64)1308 pub fn set_cap_bit0(&mut self, val: __u64) { 1309 unsafe { 1310 let val: u64 = ::std::mem::transmute(val); 1311 self._bitfield_1.set(0usize, 1u8, val as u64) 1312 } 1313 } 1314 #[inline] cap_bit0_is_deprecated(&self) -> __u641315 pub fn cap_bit0_is_deprecated(&self) -> __u64 { 1316 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } 1317 } 1318 #[inline] set_cap_bit0_is_deprecated(&mut self, val: __u64)1319 pub fn set_cap_bit0_is_deprecated(&mut self, val: __u64) { 1320 unsafe { 1321 let val: u64 = ::std::mem::transmute(val); 1322 self._bitfield_1.set(1usize, 1u8, val as u64) 1323 } 1324 } 1325 #[inline] cap_user_rdpmc(&self) -> __u641326 pub fn cap_user_rdpmc(&self) -> __u64 { 1327 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } 1328 } 1329 #[inline] set_cap_user_rdpmc(&mut self, val: __u64)1330 pub fn set_cap_user_rdpmc(&mut self, val: __u64) { 1331 unsafe { 1332 let val: u64 = ::std::mem::transmute(val); 1333 self._bitfield_1.set(2usize, 1u8, val as u64) 1334 } 1335 } 1336 #[inline] cap_user_time(&self) -> __u641337 pub fn cap_user_time(&self) -> __u64 { 1338 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } 1339 } 1340 #[inline] set_cap_user_time(&mut self, val: __u64)1341 pub fn set_cap_user_time(&mut self, val: __u64) { 1342 unsafe { 1343 let val: u64 = ::std::mem::transmute(val); 1344 self._bitfield_1.set(3usize, 1u8, val as u64) 1345 } 1346 } 1347 #[inline] cap_user_time_zero(&self) -> __u641348 pub fn cap_user_time_zero(&self) -> __u64 { 1349 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } 1350 } 1351 #[inline] set_cap_user_time_zero(&mut self, val: __u64)1352 pub fn set_cap_user_time_zero(&mut self, val: __u64) { 1353 unsafe { 1354 let val: u64 = ::std::mem::transmute(val); 1355 self._bitfield_1.set(4usize, 1u8, val as u64) 1356 } 1357 } 1358 #[inline] cap_user_time_short(&self) -> __u641359 pub fn cap_user_time_short(&self) -> __u64 { 1360 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } 1361 } 1362 #[inline] set_cap_user_time_short(&mut self, val: __u64)1363 pub fn set_cap_user_time_short(&mut self, val: __u64) { 1364 unsafe { 1365 let val: u64 = ::std::mem::transmute(val); 1366 self._bitfield_1.set(5usize, 1u8, val as u64) 1367 } 1368 } 1369 #[inline] cap_____res(&self) -> __u641370 pub fn cap_____res(&self) -> __u64 { 1371 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } 1372 } 1373 #[inline] set_cap_____res(&mut self, val: __u64)1374 pub fn set_cap_____res(&mut self, val: __u64) { 1375 unsafe { 1376 let val: u64 = ::std::mem::transmute(val); 1377 self._bitfield_1.set(6usize, 58u8, val as u64) 1378 } 1379 } 1380 #[inline] new_bitfield_1( cap_bit0: __u64, cap_bit0_is_deprecated: __u64, cap_user_rdpmc: __u64, cap_user_time: __u64, cap_user_time_zero: __u64, cap_user_time_short: __u64, cap_____res: __u64, ) -> __BindgenBitfieldUnit<[u8; 8usize]>1381 pub fn new_bitfield_1( 1382 cap_bit0: __u64, 1383 cap_bit0_is_deprecated: __u64, 1384 cap_user_rdpmc: __u64, 1385 cap_user_time: __u64, 1386 cap_user_time_zero: __u64, 1387 cap_user_time_short: __u64, 1388 cap_____res: __u64, 1389 ) -> __BindgenBitfieldUnit<[u8; 8usize]> { 1390 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); 1391 __bindgen_bitfield_unit.set(0usize, 1u8, { 1392 let cap_bit0: u64 = unsafe { ::std::mem::transmute(cap_bit0) }; 1393 cap_bit0 as u64 1394 }); 1395 __bindgen_bitfield_unit.set(1usize, 1u8, { 1396 let cap_bit0_is_deprecated: u64 = 1397 unsafe { ::std::mem::transmute(cap_bit0_is_deprecated) }; 1398 cap_bit0_is_deprecated as u64 1399 }); 1400 __bindgen_bitfield_unit.set(2usize, 1u8, { 1401 let cap_user_rdpmc: u64 = unsafe { ::std::mem::transmute(cap_user_rdpmc) }; 1402 cap_user_rdpmc as u64 1403 }); 1404 __bindgen_bitfield_unit.set(3usize, 1u8, { 1405 let cap_user_time: u64 = unsafe { ::std::mem::transmute(cap_user_time) }; 1406 cap_user_time as u64 1407 }); 1408 __bindgen_bitfield_unit.set(4usize, 1u8, { 1409 let cap_user_time_zero: u64 = unsafe { ::std::mem::transmute(cap_user_time_zero) }; 1410 cap_user_time_zero as u64 1411 }); 1412 __bindgen_bitfield_unit.set(5usize, 1u8, { 1413 let cap_user_time_short: u64 = unsafe { ::std::mem::transmute(cap_user_time_short) }; 1414 cap_user_time_short as u64 1415 }); 1416 __bindgen_bitfield_unit.set(6usize, 58u8, { 1417 let cap_____res: u64 = unsafe { ::std::mem::transmute(cap_____res) }; 1418 cap_____res as u64 1419 }); 1420 __bindgen_bitfield_unit 1421 } 1422 } 1423 impl Default for perf_event_mmap_page__bindgen_ty_1 { default() -> Self1424 fn default() -> Self { 1425 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 1426 unsafe { 1427 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 1428 s.assume_init() 1429 } 1430 } 1431 } 1432 impl Default for perf_event_mmap_page { default() -> Self1433 fn default() -> Self { 1434 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 1435 unsafe { 1436 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 1437 s.assume_init() 1438 } 1439 } 1440 } 1441 #[repr(C)] 1442 #[derive(Debug, Default, Copy, Clone)] 1443 pub struct perf_event_header { 1444 pub type_: __u32, 1445 pub misc: __u16, 1446 pub size: __u16, 1447 } 1448 #[repr(C)] 1449 #[derive(Debug, Default, Copy, Clone)] 1450 pub struct perf_ns_link_info { 1451 pub dev: __u64, 1452 pub ino: __u64, 1453 } 1454 pub const PERF_RECORD_MMAP: perf_event_type = 1; 1455 pub const PERF_RECORD_LOST: perf_event_type = 2; 1456 pub const PERF_RECORD_COMM: perf_event_type = 3; 1457 pub const PERF_RECORD_EXIT: perf_event_type = 4; 1458 pub const PERF_RECORD_THROTTLE: perf_event_type = 5; 1459 pub const PERF_RECORD_UNTHROTTLE: perf_event_type = 6; 1460 pub const PERF_RECORD_FORK: perf_event_type = 7; 1461 pub const PERF_RECORD_READ: perf_event_type = 8; 1462 pub const PERF_RECORD_SAMPLE: perf_event_type = 9; 1463 pub const PERF_RECORD_MMAP2: perf_event_type = 10; 1464 pub const PERF_RECORD_AUX: perf_event_type = 11; 1465 pub const PERF_RECORD_ITRACE_START: perf_event_type = 12; 1466 pub const PERF_RECORD_LOST_SAMPLES: perf_event_type = 13; 1467 pub const PERF_RECORD_SWITCH: perf_event_type = 14; 1468 pub const PERF_RECORD_SWITCH_CPU_WIDE: perf_event_type = 15; 1469 pub const PERF_RECORD_NAMESPACES: perf_event_type = 16; 1470 pub const PERF_RECORD_KSYMBOL: perf_event_type = 17; 1471 pub const PERF_RECORD_BPF_EVENT: perf_event_type = 18; 1472 pub const PERF_RECORD_CGROUP: perf_event_type = 19; 1473 pub const PERF_RECORD_TEXT_POKE: perf_event_type = 20; 1474 pub const PERF_RECORD_AUX_OUTPUT_HW_ID: perf_event_type = 21; 1475 pub const PERF_RECORD_MAX: perf_event_type = 22; 1476 pub type perf_event_type = ::std::os::raw::c_uint; 1477 pub const PERF_RECORD_KSYMBOL_TYPE_UNKNOWN: perf_record_ksymbol_type = 0; 1478 pub const PERF_RECORD_KSYMBOL_TYPE_BPF: perf_record_ksymbol_type = 1; 1479 pub const PERF_RECORD_KSYMBOL_TYPE_OOL: perf_record_ksymbol_type = 2; 1480 pub const PERF_RECORD_KSYMBOL_TYPE_MAX: perf_record_ksymbol_type = 3; 1481 pub type perf_record_ksymbol_type = ::std::os::raw::c_uint; 1482 pub const PERF_BPF_EVENT_UNKNOWN: perf_bpf_event_type = 0; 1483 pub const PERF_BPF_EVENT_PROG_LOAD: perf_bpf_event_type = 1; 1484 pub const PERF_BPF_EVENT_PROG_UNLOAD: perf_bpf_event_type = 2; 1485 pub const PERF_BPF_EVENT_MAX: perf_bpf_event_type = 3; 1486 pub type perf_bpf_event_type = ::std::os::raw::c_uint; 1487 pub const PERF_CONTEXT_HV: perf_callchain_context = 18446744073709551584; 1488 pub const PERF_CONTEXT_KERNEL: perf_callchain_context = 18446744073709551488; 1489 pub const PERF_CONTEXT_USER: perf_callchain_context = 18446744073709551104; 1490 pub const PERF_CONTEXT_GUEST: perf_callchain_context = 18446744073709549568; 1491 pub const PERF_CONTEXT_GUEST_KERNEL: perf_callchain_context = 18446744073709549440; 1492 pub const PERF_CONTEXT_GUEST_USER: perf_callchain_context = 18446744073709549056; 1493 pub const PERF_CONTEXT_MAX: perf_callchain_context = 18446744073709547521; 1494 pub type perf_callchain_context = ::std::os::raw::c_ulong; 1495 #[repr(C)] 1496 #[derive(Copy, Clone)] 1497 pub union perf_mem_data_src { 1498 pub val: __u64, 1499 pub __bindgen_anon_1: perf_mem_data_src__bindgen_ty_1, 1500 } 1501 #[repr(C)] 1502 #[repr(align(8))] 1503 #[derive(Debug, Default, Copy, Clone)] 1504 pub struct perf_mem_data_src__bindgen_ty_1 { 1505 pub _bitfield_align_1: [u32; 0], 1506 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, 1507 } 1508 impl perf_mem_data_src__bindgen_ty_1 { 1509 #[inline] mem_op(&self) -> __u641510 pub fn mem_op(&self) -> __u64 { 1511 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u64) } 1512 } 1513 #[inline] set_mem_op(&mut self, val: __u64)1514 pub fn set_mem_op(&mut self, val: __u64) { 1515 unsafe { 1516 let val: u64 = ::std::mem::transmute(val); 1517 self._bitfield_1.set(0usize, 5u8, val as u64) 1518 } 1519 } 1520 #[inline] mem_lvl(&self) -> __u641521 pub fn mem_lvl(&self) -> __u64 { 1522 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 14u8) as u64) } 1523 } 1524 #[inline] set_mem_lvl(&mut self, val: __u64)1525 pub fn set_mem_lvl(&mut self, val: __u64) { 1526 unsafe { 1527 let val: u64 = ::std::mem::transmute(val); 1528 self._bitfield_1.set(5usize, 14u8, val as u64) 1529 } 1530 } 1531 #[inline] mem_snoop(&self) -> __u641532 pub fn mem_snoop(&self) -> __u64 { 1533 unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 5u8) as u64) } 1534 } 1535 #[inline] set_mem_snoop(&mut self, val: __u64)1536 pub fn set_mem_snoop(&mut self, val: __u64) { 1537 unsafe { 1538 let val: u64 = ::std::mem::transmute(val); 1539 self._bitfield_1.set(19usize, 5u8, val as u64) 1540 } 1541 } 1542 #[inline] mem_lock(&self) -> __u641543 pub fn mem_lock(&self) -> __u64 { 1544 unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 2u8) as u64) } 1545 } 1546 #[inline] set_mem_lock(&mut self, val: __u64)1547 pub fn set_mem_lock(&mut self, val: __u64) { 1548 unsafe { 1549 let val: u64 = ::std::mem::transmute(val); 1550 self._bitfield_1.set(24usize, 2u8, val as u64) 1551 } 1552 } 1553 #[inline] mem_dtlb(&self) -> __u641554 pub fn mem_dtlb(&self) -> __u64 { 1555 unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 7u8) as u64) } 1556 } 1557 #[inline] set_mem_dtlb(&mut self, val: __u64)1558 pub fn set_mem_dtlb(&mut self, val: __u64) { 1559 unsafe { 1560 let val: u64 = ::std::mem::transmute(val); 1561 self._bitfield_1.set(26usize, 7u8, val as u64) 1562 } 1563 } 1564 #[inline] mem_lvl_num(&self) -> __u641565 pub fn mem_lvl_num(&self) -> __u64 { 1566 unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 4u8) as u64) } 1567 } 1568 #[inline] set_mem_lvl_num(&mut self, val: __u64)1569 pub fn set_mem_lvl_num(&mut self, val: __u64) { 1570 unsafe { 1571 let val: u64 = ::std::mem::transmute(val); 1572 self._bitfield_1.set(33usize, 4u8, val as u64) 1573 } 1574 } 1575 #[inline] mem_remote(&self) -> __u641576 pub fn mem_remote(&self) -> __u64 { 1577 unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } 1578 } 1579 #[inline] set_mem_remote(&mut self, val: __u64)1580 pub fn set_mem_remote(&mut self, val: __u64) { 1581 unsafe { 1582 let val: u64 = ::std::mem::transmute(val); 1583 self._bitfield_1.set(37usize, 1u8, val as u64) 1584 } 1585 } 1586 #[inline] mem_snoopx(&self) -> __u641587 pub fn mem_snoopx(&self) -> __u64 { 1588 unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 2u8) as u64) } 1589 } 1590 #[inline] set_mem_snoopx(&mut self, val: __u64)1591 pub fn set_mem_snoopx(&mut self, val: __u64) { 1592 unsafe { 1593 let val: u64 = ::std::mem::transmute(val); 1594 self._bitfield_1.set(38usize, 2u8, val as u64) 1595 } 1596 } 1597 #[inline] mem_blk(&self) -> __u641598 pub fn mem_blk(&self) -> __u64 { 1599 unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 3u8) as u64) } 1600 } 1601 #[inline] set_mem_blk(&mut self, val: __u64)1602 pub fn set_mem_blk(&mut self, val: __u64) { 1603 unsafe { 1604 let val: u64 = ::std::mem::transmute(val); 1605 self._bitfield_1.set(40usize, 3u8, val as u64) 1606 } 1607 } 1608 #[inline] mem_hops(&self) -> __u641609 pub fn mem_hops(&self) -> __u64 { 1610 unsafe { ::std::mem::transmute(self._bitfield_1.get(43usize, 3u8) as u64) } 1611 } 1612 #[inline] set_mem_hops(&mut self, val: __u64)1613 pub fn set_mem_hops(&mut self, val: __u64) { 1614 unsafe { 1615 let val: u64 = ::std::mem::transmute(val); 1616 self._bitfield_1.set(43usize, 3u8, val as u64) 1617 } 1618 } 1619 #[inline] mem_rsvd(&self) -> __u641620 pub fn mem_rsvd(&self) -> __u64 { 1621 unsafe { ::std::mem::transmute(self._bitfield_1.get(46usize, 18u8) as u64) } 1622 } 1623 #[inline] set_mem_rsvd(&mut self, val: __u64)1624 pub fn set_mem_rsvd(&mut self, val: __u64) { 1625 unsafe { 1626 let val: u64 = ::std::mem::transmute(val); 1627 self._bitfield_1.set(46usize, 18u8, val as u64) 1628 } 1629 } 1630 #[inline] new_bitfield_1( mem_op: __u64, mem_lvl: __u64, mem_snoop: __u64, mem_lock: __u64, mem_dtlb: __u64, mem_lvl_num: __u64, mem_remote: __u64, mem_snoopx: __u64, mem_blk: __u64, mem_hops: __u64, mem_rsvd: __u64, ) -> __BindgenBitfieldUnit<[u8; 8usize]>1631 pub fn new_bitfield_1( 1632 mem_op: __u64, 1633 mem_lvl: __u64, 1634 mem_snoop: __u64, 1635 mem_lock: __u64, 1636 mem_dtlb: __u64, 1637 mem_lvl_num: __u64, 1638 mem_remote: __u64, 1639 mem_snoopx: __u64, 1640 mem_blk: __u64, 1641 mem_hops: __u64, 1642 mem_rsvd: __u64, 1643 ) -> __BindgenBitfieldUnit<[u8; 8usize]> { 1644 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); 1645 __bindgen_bitfield_unit.set(0usize, 5u8, { 1646 let mem_op: u64 = unsafe { ::std::mem::transmute(mem_op) }; 1647 mem_op as u64 1648 }); 1649 __bindgen_bitfield_unit.set(5usize, 14u8, { 1650 let mem_lvl: u64 = unsafe { ::std::mem::transmute(mem_lvl) }; 1651 mem_lvl as u64 1652 }); 1653 __bindgen_bitfield_unit.set(19usize, 5u8, { 1654 let mem_snoop: u64 = unsafe { ::std::mem::transmute(mem_snoop) }; 1655 mem_snoop as u64 1656 }); 1657 __bindgen_bitfield_unit.set(24usize, 2u8, { 1658 let mem_lock: u64 = unsafe { ::std::mem::transmute(mem_lock) }; 1659 mem_lock as u64 1660 }); 1661 __bindgen_bitfield_unit.set(26usize, 7u8, { 1662 let mem_dtlb: u64 = unsafe { ::std::mem::transmute(mem_dtlb) }; 1663 mem_dtlb as u64 1664 }); 1665 __bindgen_bitfield_unit.set(33usize, 4u8, { 1666 let mem_lvl_num: u64 = unsafe { ::std::mem::transmute(mem_lvl_num) }; 1667 mem_lvl_num as u64 1668 }); 1669 __bindgen_bitfield_unit.set(37usize, 1u8, { 1670 let mem_remote: u64 = unsafe { ::std::mem::transmute(mem_remote) }; 1671 mem_remote as u64 1672 }); 1673 __bindgen_bitfield_unit.set(38usize, 2u8, { 1674 let mem_snoopx: u64 = unsafe { ::std::mem::transmute(mem_snoopx) }; 1675 mem_snoopx as u64 1676 }); 1677 __bindgen_bitfield_unit.set(40usize, 3u8, { 1678 let mem_blk: u64 = unsafe { ::std::mem::transmute(mem_blk) }; 1679 mem_blk as u64 1680 }); 1681 __bindgen_bitfield_unit.set(43usize, 3u8, { 1682 let mem_hops: u64 = unsafe { ::std::mem::transmute(mem_hops) }; 1683 mem_hops as u64 1684 }); 1685 __bindgen_bitfield_unit.set(46usize, 18u8, { 1686 let mem_rsvd: u64 = unsafe { ::std::mem::transmute(mem_rsvd) }; 1687 mem_rsvd as u64 1688 }); 1689 __bindgen_bitfield_unit 1690 } 1691 } 1692 impl Default for perf_mem_data_src { default() -> Self1693 fn default() -> Self { 1694 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 1695 unsafe { 1696 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 1697 s.assume_init() 1698 } 1699 } 1700 } 1701 #[repr(C)] 1702 #[derive(Debug, Default, Copy, Clone)] 1703 pub struct perf_branch_entry { 1704 pub from: __u64, 1705 pub to: __u64, 1706 pub _bitfield_align_1: [u32; 0], 1707 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, 1708 } 1709 impl perf_branch_entry { 1710 #[inline] mispred(&self) -> __u641711 pub fn mispred(&self) -> __u64 { 1712 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } 1713 } 1714 #[inline] set_mispred(&mut self, val: __u64)1715 pub fn set_mispred(&mut self, val: __u64) { 1716 unsafe { 1717 let val: u64 = ::std::mem::transmute(val); 1718 self._bitfield_1.set(0usize, 1u8, val as u64) 1719 } 1720 } 1721 #[inline] predicted(&self) -> __u641722 pub fn predicted(&self) -> __u64 { 1723 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } 1724 } 1725 #[inline] set_predicted(&mut self, val: __u64)1726 pub fn set_predicted(&mut self, val: __u64) { 1727 unsafe { 1728 let val: u64 = ::std::mem::transmute(val); 1729 self._bitfield_1.set(1usize, 1u8, val as u64) 1730 } 1731 } 1732 #[inline] in_tx(&self) -> __u641733 pub fn in_tx(&self) -> __u64 { 1734 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } 1735 } 1736 #[inline] set_in_tx(&mut self, val: __u64)1737 pub fn set_in_tx(&mut self, val: __u64) { 1738 unsafe { 1739 let val: u64 = ::std::mem::transmute(val); 1740 self._bitfield_1.set(2usize, 1u8, val as u64) 1741 } 1742 } 1743 #[inline] abort(&self) -> __u641744 pub fn abort(&self) -> __u64 { 1745 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } 1746 } 1747 #[inline] set_abort(&mut self, val: __u64)1748 pub fn set_abort(&mut self, val: __u64) { 1749 unsafe { 1750 let val: u64 = ::std::mem::transmute(val); 1751 self._bitfield_1.set(3usize, 1u8, val as u64) 1752 } 1753 } 1754 #[inline] cycles(&self) -> __u641755 pub fn cycles(&self) -> __u64 { 1756 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 16u8) as u64) } 1757 } 1758 #[inline] set_cycles(&mut self, val: __u64)1759 pub fn set_cycles(&mut self, val: __u64) { 1760 unsafe { 1761 let val: u64 = ::std::mem::transmute(val); 1762 self._bitfield_1.set(4usize, 16u8, val as u64) 1763 } 1764 } 1765 #[inline] type_(&self) -> __u641766 pub fn type_(&self) -> __u64 { 1767 unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 4u8) as u64) } 1768 } 1769 #[inline] set_type(&mut self, val: __u64)1770 pub fn set_type(&mut self, val: __u64) { 1771 unsafe { 1772 let val: u64 = ::std::mem::transmute(val); 1773 self._bitfield_1.set(20usize, 4u8, val as u64) 1774 } 1775 } 1776 #[inline] spec(&self) -> __u641777 pub fn spec(&self) -> __u64 { 1778 unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 2u8) as u64) } 1779 } 1780 #[inline] set_spec(&mut self, val: __u64)1781 pub fn set_spec(&mut self, val: __u64) { 1782 unsafe { 1783 let val: u64 = ::std::mem::transmute(val); 1784 self._bitfield_1.set(24usize, 2u8, val as u64) 1785 } 1786 } 1787 #[inline] new_type(&self) -> __u641788 pub fn new_type(&self) -> __u64 { 1789 unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 4u8) as u64) } 1790 } 1791 #[inline] set_new_type(&mut self, val: __u64)1792 pub fn set_new_type(&mut self, val: __u64) { 1793 unsafe { 1794 let val: u64 = ::std::mem::transmute(val); 1795 self._bitfield_1.set(26usize, 4u8, val as u64) 1796 } 1797 } 1798 #[inline] priv_(&self) -> __u641799 pub fn priv_(&self) -> __u64 { 1800 unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 3u8) as u64) } 1801 } 1802 #[inline] set_priv(&mut self, val: __u64)1803 pub fn set_priv(&mut self, val: __u64) { 1804 unsafe { 1805 let val: u64 = ::std::mem::transmute(val); 1806 self._bitfield_1.set(30usize, 3u8, val as u64) 1807 } 1808 } 1809 #[inline] reserved(&self) -> __u641810 pub fn reserved(&self) -> __u64 { 1811 unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 31u8) as u64) } 1812 } 1813 #[inline] set_reserved(&mut self, val: __u64)1814 pub fn set_reserved(&mut self, val: __u64) { 1815 unsafe { 1816 let val: u64 = ::std::mem::transmute(val); 1817 self._bitfield_1.set(33usize, 31u8, val as u64) 1818 } 1819 } 1820 #[inline] new_bitfield_1( mispred: __u64, predicted: __u64, in_tx: __u64, abort: __u64, cycles: __u64, type_: __u64, spec: __u64, new_type: __u64, priv_: __u64, reserved: __u64, ) -> __BindgenBitfieldUnit<[u8; 8usize]>1821 pub fn new_bitfield_1( 1822 mispred: __u64, 1823 predicted: __u64, 1824 in_tx: __u64, 1825 abort: __u64, 1826 cycles: __u64, 1827 type_: __u64, 1828 spec: __u64, 1829 new_type: __u64, 1830 priv_: __u64, 1831 reserved: __u64, 1832 ) -> __BindgenBitfieldUnit<[u8; 8usize]> { 1833 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); 1834 __bindgen_bitfield_unit.set(0usize, 1u8, { 1835 let mispred: u64 = unsafe { ::std::mem::transmute(mispred) }; 1836 mispred as u64 1837 }); 1838 __bindgen_bitfield_unit.set(1usize, 1u8, { 1839 let predicted: u64 = unsafe { ::std::mem::transmute(predicted) }; 1840 predicted as u64 1841 }); 1842 __bindgen_bitfield_unit.set(2usize, 1u8, { 1843 let in_tx: u64 = unsafe { ::std::mem::transmute(in_tx) }; 1844 in_tx as u64 1845 }); 1846 __bindgen_bitfield_unit.set(3usize, 1u8, { 1847 let abort: u64 = unsafe { ::std::mem::transmute(abort) }; 1848 abort as u64 1849 }); 1850 __bindgen_bitfield_unit.set(4usize, 16u8, { 1851 let cycles: u64 = unsafe { ::std::mem::transmute(cycles) }; 1852 cycles as u64 1853 }); 1854 __bindgen_bitfield_unit.set(20usize, 4u8, { 1855 let type_: u64 = unsafe { ::std::mem::transmute(type_) }; 1856 type_ as u64 1857 }); 1858 __bindgen_bitfield_unit.set(24usize, 2u8, { 1859 let spec: u64 = unsafe { ::std::mem::transmute(spec) }; 1860 spec as u64 1861 }); 1862 __bindgen_bitfield_unit.set(26usize, 4u8, { 1863 let new_type: u64 = unsafe { ::std::mem::transmute(new_type) }; 1864 new_type as u64 1865 }); 1866 __bindgen_bitfield_unit.set(30usize, 3u8, { 1867 let priv_: u64 = unsafe { ::std::mem::transmute(priv_) }; 1868 priv_ as u64 1869 }); 1870 __bindgen_bitfield_unit.set(33usize, 31u8, { 1871 let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; 1872 reserved as u64 1873 }); 1874 __bindgen_bitfield_unit 1875 } 1876 } 1877 #[repr(C)] 1878 #[derive(Copy, Clone)] 1879 pub union perf_sample_weight { 1880 pub full: __u64, 1881 pub __bindgen_anon_1: perf_sample_weight__bindgen_ty_1, 1882 } 1883 #[repr(C)] 1884 #[derive(Debug, Default, Copy, Clone)] 1885 pub struct perf_sample_weight__bindgen_ty_1 { 1886 pub var1_dw: __u32, 1887 pub var2_w: __u16, 1888 pub var3_w: __u16, 1889 } 1890 impl Default for perf_sample_weight { default() -> Self1891 fn default() -> Self { 1892 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 1893 unsafe { 1894 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 1895 s.assume_init() 1896 } 1897 } 1898 } 1899 pub const BPF_MAY_GOTO: bpf_cond_pseudo_jmp = 0; 1900 pub type bpf_cond_pseudo_jmp = ::std::os::raw::c_uint; 1901 pub const BPF_REG_0: _bindgen_ty_61 = 0; 1902 pub const BPF_REG_1: _bindgen_ty_61 = 1; 1903 pub const BPF_REG_2: _bindgen_ty_61 = 2; 1904 pub const BPF_REG_3: _bindgen_ty_61 = 3; 1905 pub const BPF_REG_4: _bindgen_ty_61 = 4; 1906 pub const BPF_REG_5: _bindgen_ty_61 = 5; 1907 pub const BPF_REG_6: _bindgen_ty_61 = 6; 1908 pub const BPF_REG_7: _bindgen_ty_61 = 7; 1909 pub const BPF_REG_8: _bindgen_ty_61 = 8; 1910 pub const BPF_REG_9: _bindgen_ty_61 = 9; 1911 pub const BPF_REG_10: _bindgen_ty_61 = 10; 1912 pub const __MAX_BPF_REG: _bindgen_ty_61 = 11; 1913 pub type _bindgen_ty_61 = ::std::os::raw::c_uint; 1914 #[repr(C)] 1915 #[derive(Debug, Default, Copy, Clone)] 1916 pub struct bpf_insn { 1917 pub code: __u8, 1918 pub _bitfield_align_1: [u8; 0], 1919 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, 1920 pub off: __s16, 1921 pub imm: __s32, 1922 } 1923 impl bpf_insn { 1924 #[inline] dst_reg(&self) -> __u81925 pub fn dst_reg(&self) -> __u8 { 1926 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) } 1927 } 1928 #[inline] set_dst_reg(&mut self, val: __u8)1929 pub fn set_dst_reg(&mut self, val: __u8) { 1930 unsafe { 1931 let val: u8 = ::std::mem::transmute(val); 1932 self._bitfield_1.set(0usize, 4u8, val as u64) 1933 } 1934 } 1935 #[inline] src_reg(&self) -> __u81936 pub fn src_reg(&self) -> __u8 { 1937 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } 1938 } 1939 #[inline] set_src_reg(&mut self, val: __u8)1940 pub fn set_src_reg(&mut self, val: __u8) { 1941 unsafe { 1942 let val: u8 = ::std::mem::transmute(val); 1943 self._bitfield_1.set(4usize, 4u8, val as u64) 1944 } 1945 } 1946 #[inline] new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]>1947 pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { 1948 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); 1949 __bindgen_bitfield_unit.set(0usize, 4u8, { 1950 let dst_reg: u8 = unsafe { ::std::mem::transmute(dst_reg) }; 1951 dst_reg as u64 1952 }); 1953 __bindgen_bitfield_unit.set(4usize, 4u8, { 1954 let src_reg: u8 = unsafe { ::std::mem::transmute(src_reg) }; 1955 src_reg as u64 1956 }); 1957 __bindgen_bitfield_unit 1958 } 1959 } 1960 #[repr(C)] 1961 #[derive(Debug, Default)] 1962 pub struct bpf_lpm_trie_key { 1963 pub prefixlen: __u32, 1964 pub data: __IncompleteArrayField<__u8>, 1965 } 1966 #[repr(C)] 1967 #[derive(Debug, Default, Copy, Clone)] 1968 pub struct bpf_lpm_trie_key_hdr { 1969 pub prefixlen: __u32, 1970 } 1971 #[repr(C)] 1972 pub struct bpf_lpm_trie_key_u8 { 1973 pub __bindgen_anon_1: bpf_lpm_trie_key_u8__bindgen_ty_1, 1974 pub data: __IncompleteArrayField<__u8>, 1975 } 1976 #[repr(C)] 1977 #[derive(Copy, Clone)] 1978 pub union bpf_lpm_trie_key_u8__bindgen_ty_1 { 1979 pub hdr: bpf_lpm_trie_key_hdr, 1980 pub prefixlen: __u32, 1981 } 1982 impl Default for bpf_lpm_trie_key_u8__bindgen_ty_1 { default() -> Self1983 fn default() -> Self { 1984 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 1985 unsafe { 1986 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 1987 s.assume_init() 1988 } 1989 } 1990 } 1991 impl Default for bpf_lpm_trie_key_u8 { default() -> Self1992 fn default() -> Self { 1993 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 1994 unsafe { 1995 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 1996 s.assume_init() 1997 } 1998 } 1999 } 2000 #[repr(C)] 2001 #[derive(Debug, Default, Copy, Clone)] 2002 pub struct bpf_cgroup_storage_key { 2003 pub cgroup_inode_id: __u64, 2004 pub attach_type: __u32, 2005 pub __bindgen_padding_0: [u8; 4usize], 2006 } 2007 pub const BPF_CGROUP_ITER_ORDER_UNSPEC: bpf_cgroup_iter_order = 0; 2008 pub const BPF_CGROUP_ITER_SELF_ONLY: bpf_cgroup_iter_order = 1; 2009 pub const BPF_CGROUP_ITER_DESCENDANTS_PRE: bpf_cgroup_iter_order = 2; 2010 pub const BPF_CGROUP_ITER_DESCENDANTS_POST: bpf_cgroup_iter_order = 3; 2011 pub const BPF_CGROUP_ITER_ANCESTORS_UP: bpf_cgroup_iter_order = 4; 2012 pub type bpf_cgroup_iter_order = ::std::os::raw::c_uint; 2013 #[repr(C)] 2014 #[derive(Copy, Clone)] 2015 pub union bpf_iter_link_info { 2016 pub map: bpf_iter_link_info__bindgen_ty_1, 2017 pub cgroup: bpf_iter_link_info__bindgen_ty_2, 2018 pub task: bpf_iter_link_info__bindgen_ty_3, 2019 } 2020 #[repr(C)] 2021 #[derive(Debug, Default, Copy, Clone)] 2022 pub struct bpf_iter_link_info__bindgen_ty_1 { 2023 pub map_fd: __u32, 2024 } 2025 #[repr(C)] 2026 #[derive(Debug, Copy, Clone)] 2027 pub struct bpf_iter_link_info__bindgen_ty_2 { 2028 pub order: bpf_cgroup_iter_order, 2029 pub cgroup_fd: __u32, 2030 pub cgroup_id: __u64, 2031 } 2032 impl Default for bpf_iter_link_info__bindgen_ty_2 { default() -> Self2033 fn default() -> Self { 2034 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2035 unsafe { 2036 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2037 s.assume_init() 2038 } 2039 } 2040 } 2041 #[repr(C)] 2042 #[derive(Debug, Default, Copy, Clone)] 2043 pub struct bpf_iter_link_info__bindgen_ty_3 { 2044 pub tid: __u32, 2045 pub pid: __u32, 2046 pub pid_fd: __u32, 2047 } 2048 impl Default for bpf_iter_link_info { default() -> Self2049 fn default() -> Self { 2050 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2051 unsafe { 2052 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2053 s.assume_init() 2054 } 2055 } 2056 } 2057 pub const BPF_MAP_CREATE: bpf_cmd = 0; 2058 pub const BPF_MAP_LOOKUP_ELEM: bpf_cmd = 1; 2059 pub const BPF_MAP_UPDATE_ELEM: bpf_cmd = 2; 2060 pub const BPF_MAP_DELETE_ELEM: bpf_cmd = 3; 2061 pub const BPF_MAP_GET_NEXT_KEY: bpf_cmd = 4; 2062 pub const BPF_PROG_LOAD: bpf_cmd = 5; 2063 pub const BPF_OBJ_PIN: bpf_cmd = 6; 2064 pub const BPF_OBJ_GET: bpf_cmd = 7; 2065 pub const BPF_PROG_ATTACH: bpf_cmd = 8; 2066 pub const BPF_PROG_DETACH: bpf_cmd = 9; 2067 pub const BPF_PROG_TEST_RUN: bpf_cmd = 10; 2068 pub const BPF_PROG_RUN: bpf_cmd = 10; 2069 pub const BPF_PROG_GET_NEXT_ID: bpf_cmd = 11; 2070 pub const BPF_MAP_GET_NEXT_ID: bpf_cmd = 12; 2071 pub const BPF_PROG_GET_FD_BY_ID: bpf_cmd = 13; 2072 pub const BPF_MAP_GET_FD_BY_ID: bpf_cmd = 14; 2073 pub const BPF_OBJ_GET_INFO_BY_FD: bpf_cmd = 15; 2074 pub const BPF_PROG_QUERY: bpf_cmd = 16; 2075 pub const BPF_RAW_TRACEPOINT_OPEN: bpf_cmd = 17; 2076 pub const BPF_BTF_LOAD: bpf_cmd = 18; 2077 pub const BPF_BTF_GET_FD_BY_ID: bpf_cmd = 19; 2078 pub const BPF_TASK_FD_QUERY: bpf_cmd = 20; 2079 pub const BPF_MAP_LOOKUP_AND_DELETE_ELEM: bpf_cmd = 21; 2080 pub const BPF_MAP_FREEZE: bpf_cmd = 22; 2081 pub const BPF_BTF_GET_NEXT_ID: bpf_cmd = 23; 2082 pub const BPF_MAP_LOOKUP_BATCH: bpf_cmd = 24; 2083 pub const BPF_MAP_LOOKUP_AND_DELETE_BATCH: bpf_cmd = 25; 2084 pub const BPF_MAP_UPDATE_BATCH: bpf_cmd = 26; 2085 pub const BPF_MAP_DELETE_BATCH: bpf_cmd = 27; 2086 pub const BPF_LINK_CREATE: bpf_cmd = 28; 2087 pub const BPF_LINK_UPDATE: bpf_cmd = 29; 2088 pub const BPF_LINK_GET_FD_BY_ID: bpf_cmd = 30; 2089 pub const BPF_LINK_GET_NEXT_ID: bpf_cmd = 31; 2090 pub const BPF_ENABLE_STATS: bpf_cmd = 32; 2091 pub const BPF_ITER_CREATE: bpf_cmd = 33; 2092 pub const BPF_LINK_DETACH: bpf_cmd = 34; 2093 pub const BPF_PROG_BIND_MAP: bpf_cmd = 35; 2094 pub const BPF_TOKEN_CREATE: bpf_cmd = 36; 2095 pub const __MAX_BPF_CMD: bpf_cmd = 37; 2096 pub type bpf_cmd = ::std::os::raw::c_uint; 2097 pub const BPF_MAP_TYPE_UNSPEC: bpf_map_type = 0; 2098 pub const BPF_MAP_TYPE_HASH: bpf_map_type = 1; 2099 pub const BPF_MAP_TYPE_ARRAY: bpf_map_type = 2; 2100 pub const BPF_MAP_TYPE_PROG_ARRAY: bpf_map_type = 3; 2101 pub const BPF_MAP_TYPE_PERF_EVENT_ARRAY: bpf_map_type = 4; 2102 pub const BPF_MAP_TYPE_PERCPU_HASH: bpf_map_type = 5; 2103 pub const BPF_MAP_TYPE_PERCPU_ARRAY: bpf_map_type = 6; 2104 pub const BPF_MAP_TYPE_STACK_TRACE: bpf_map_type = 7; 2105 pub const BPF_MAP_TYPE_CGROUP_ARRAY: bpf_map_type = 8; 2106 pub const BPF_MAP_TYPE_LRU_HASH: bpf_map_type = 9; 2107 pub const BPF_MAP_TYPE_LRU_PERCPU_HASH: bpf_map_type = 10; 2108 pub const BPF_MAP_TYPE_LPM_TRIE: bpf_map_type = 11; 2109 pub const BPF_MAP_TYPE_ARRAY_OF_MAPS: bpf_map_type = 12; 2110 pub const BPF_MAP_TYPE_HASH_OF_MAPS: bpf_map_type = 13; 2111 pub const BPF_MAP_TYPE_DEVMAP: bpf_map_type = 14; 2112 pub const BPF_MAP_TYPE_SOCKMAP: bpf_map_type = 15; 2113 pub const BPF_MAP_TYPE_CPUMAP: bpf_map_type = 16; 2114 pub const BPF_MAP_TYPE_XSKMAP: bpf_map_type = 17; 2115 pub const BPF_MAP_TYPE_SOCKHASH: bpf_map_type = 18; 2116 pub const BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED: bpf_map_type = 19; 2117 pub const BPF_MAP_TYPE_CGROUP_STORAGE: bpf_map_type = 19; 2118 pub const BPF_MAP_TYPE_REUSEPORT_SOCKARRAY: bpf_map_type = 20; 2119 pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED: bpf_map_type = 21; 2120 pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE: bpf_map_type = 21; 2121 pub const BPF_MAP_TYPE_QUEUE: bpf_map_type = 22; 2122 pub const BPF_MAP_TYPE_STACK: bpf_map_type = 23; 2123 pub const BPF_MAP_TYPE_SK_STORAGE: bpf_map_type = 24; 2124 pub const BPF_MAP_TYPE_DEVMAP_HASH: bpf_map_type = 25; 2125 pub const BPF_MAP_TYPE_STRUCT_OPS: bpf_map_type = 26; 2126 pub const BPF_MAP_TYPE_RINGBUF: bpf_map_type = 27; 2127 pub const BPF_MAP_TYPE_INODE_STORAGE: bpf_map_type = 28; 2128 pub const BPF_MAP_TYPE_TASK_STORAGE: bpf_map_type = 29; 2129 pub const BPF_MAP_TYPE_BLOOM_FILTER: bpf_map_type = 30; 2130 pub const BPF_MAP_TYPE_USER_RINGBUF: bpf_map_type = 31; 2131 pub const BPF_MAP_TYPE_CGRP_STORAGE: bpf_map_type = 32; 2132 pub const BPF_MAP_TYPE_ARENA: bpf_map_type = 33; 2133 pub const __MAX_BPF_MAP_TYPE: bpf_map_type = 34; 2134 pub type bpf_map_type = ::std::os::raw::c_uint; 2135 pub const BPF_PROG_TYPE_UNSPEC: bpf_prog_type = 0; 2136 pub const BPF_PROG_TYPE_SOCKET_FILTER: bpf_prog_type = 1; 2137 pub const BPF_PROG_TYPE_KPROBE: bpf_prog_type = 2; 2138 pub const BPF_PROG_TYPE_SCHED_CLS: bpf_prog_type = 3; 2139 pub const BPF_PROG_TYPE_SCHED_ACT: bpf_prog_type = 4; 2140 pub const BPF_PROG_TYPE_TRACEPOINT: bpf_prog_type = 5; 2141 pub const BPF_PROG_TYPE_XDP: bpf_prog_type = 6; 2142 pub const BPF_PROG_TYPE_PERF_EVENT: bpf_prog_type = 7; 2143 pub const BPF_PROG_TYPE_CGROUP_SKB: bpf_prog_type = 8; 2144 pub const BPF_PROG_TYPE_CGROUP_SOCK: bpf_prog_type = 9; 2145 pub const BPF_PROG_TYPE_LWT_IN: bpf_prog_type = 10; 2146 pub const BPF_PROG_TYPE_LWT_OUT: bpf_prog_type = 11; 2147 pub const BPF_PROG_TYPE_LWT_XMIT: bpf_prog_type = 12; 2148 pub const BPF_PROG_TYPE_SOCK_OPS: bpf_prog_type = 13; 2149 pub const BPF_PROG_TYPE_SK_SKB: bpf_prog_type = 14; 2150 pub const BPF_PROG_TYPE_CGROUP_DEVICE: bpf_prog_type = 15; 2151 pub const BPF_PROG_TYPE_SK_MSG: bpf_prog_type = 16; 2152 pub const BPF_PROG_TYPE_RAW_TRACEPOINT: bpf_prog_type = 17; 2153 pub const BPF_PROG_TYPE_CGROUP_SOCK_ADDR: bpf_prog_type = 18; 2154 pub const BPF_PROG_TYPE_LWT_SEG6LOCAL: bpf_prog_type = 19; 2155 pub const BPF_PROG_TYPE_LIRC_MODE2: bpf_prog_type = 20; 2156 pub const BPF_PROG_TYPE_SK_REUSEPORT: bpf_prog_type = 21; 2157 pub const BPF_PROG_TYPE_FLOW_DISSECTOR: bpf_prog_type = 22; 2158 pub const BPF_PROG_TYPE_CGROUP_SYSCTL: bpf_prog_type = 23; 2159 pub const BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE: bpf_prog_type = 24; 2160 pub const BPF_PROG_TYPE_CGROUP_SOCKOPT: bpf_prog_type = 25; 2161 pub const BPF_PROG_TYPE_TRACING: bpf_prog_type = 26; 2162 pub const BPF_PROG_TYPE_STRUCT_OPS: bpf_prog_type = 27; 2163 pub const BPF_PROG_TYPE_EXT: bpf_prog_type = 28; 2164 pub const BPF_PROG_TYPE_LSM: bpf_prog_type = 29; 2165 pub const BPF_PROG_TYPE_SK_LOOKUP: bpf_prog_type = 30; 2166 pub const BPF_PROG_TYPE_SYSCALL: bpf_prog_type = 31; 2167 pub const BPF_PROG_TYPE_NETFILTER: bpf_prog_type = 32; 2168 pub const __MAX_BPF_PROG_TYPE: bpf_prog_type = 33; 2169 pub type bpf_prog_type = ::std::os::raw::c_uint; 2170 pub const BPF_CGROUP_INET_INGRESS: bpf_attach_type = 0; 2171 pub const BPF_CGROUP_INET_EGRESS: bpf_attach_type = 1; 2172 pub const BPF_CGROUP_INET_SOCK_CREATE: bpf_attach_type = 2; 2173 pub const BPF_CGROUP_SOCK_OPS: bpf_attach_type = 3; 2174 pub const BPF_SK_SKB_STREAM_PARSER: bpf_attach_type = 4; 2175 pub const BPF_SK_SKB_STREAM_VERDICT: bpf_attach_type = 5; 2176 pub const BPF_CGROUP_DEVICE: bpf_attach_type = 6; 2177 pub const BPF_SK_MSG_VERDICT: bpf_attach_type = 7; 2178 pub const BPF_CGROUP_INET4_BIND: bpf_attach_type = 8; 2179 pub const BPF_CGROUP_INET6_BIND: bpf_attach_type = 9; 2180 pub const BPF_CGROUP_INET4_CONNECT: bpf_attach_type = 10; 2181 pub const BPF_CGROUP_INET6_CONNECT: bpf_attach_type = 11; 2182 pub const BPF_CGROUP_INET4_POST_BIND: bpf_attach_type = 12; 2183 pub const BPF_CGROUP_INET6_POST_BIND: bpf_attach_type = 13; 2184 pub const BPF_CGROUP_UDP4_SENDMSG: bpf_attach_type = 14; 2185 pub const BPF_CGROUP_UDP6_SENDMSG: bpf_attach_type = 15; 2186 pub const BPF_LIRC_MODE2: bpf_attach_type = 16; 2187 pub const BPF_FLOW_DISSECTOR: bpf_attach_type = 17; 2188 pub const BPF_CGROUP_SYSCTL: bpf_attach_type = 18; 2189 pub const BPF_CGROUP_UDP4_RECVMSG: bpf_attach_type = 19; 2190 pub const BPF_CGROUP_UDP6_RECVMSG: bpf_attach_type = 20; 2191 pub const BPF_CGROUP_GETSOCKOPT: bpf_attach_type = 21; 2192 pub const BPF_CGROUP_SETSOCKOPT: bpf_attach_type = 22; 2193 pub const BPF_TRACE_RAW_TP: bpf_attach_type = 23; 2194 pub const BPF_TRACE_FENTRY: bpf_attach_type = 24; 2195 pub const BPF_TRACE_FEXIT: bpf_attach_type = 25; 2196 pub const BPF_MODIFY_RETURN: bpf_attach_type = 26; 2197 pub const BPF_LSM_MAC: bpf_attach_type = 27; 2198 pub const BPF_TRACE_ITER: bpf_attach_type = 28; 2199 pub const BPF_CGROUP_INET4_GETPEERNAME: bpf_attach_type = 29; 2200 pub const BPF_CGROUP_INET6_GETPEERNAME: bpf_attach_type = 30; 2201 pub const BPF_CGROUP_INET4_GETSOCKNAME: bpf_attach_type = 31; 2202 pub const BPF_CGROUP_INET6_GETSOCKNAME: bpf_attach_type = 32; 2203 pub const BPF_XDP_DEVMAP: bpf_attach_type = 33; 2204 pub const BPF_CGROUP_INET_SOCK_RELEASE: bpf_attach_type = 34; 2205 pub const BPF_XDP_CPUMAP: bpf_attach_type = 35; 2206 pub const BPF_SK_LOOKUP: bpf_attach_type = 36; 2207 pub const BPF_XDP: bpf_attach_type = 37; 2208 pub const BPF_SK_SKB_VERDICT: bpf_attach_type = 38; 2209 pub const BPF_SK_REUSEPORT_SELECT: bpf_attach_type = 39; 2210 pub const BPF_SK_REUSEPORT_SELECT_OR_MIGRATE: bpf_attach_type = 40; 2211 pub const BPF_PERF_EVENT: bpf_attach_type = 41; 2212 pub const BPF_TRACE_KPROBE_MULTI: bpf_attach_type = 42; 2213 pub const BPF_LSM_CGROUP: bpf_attach_type = 43; 2214 pub const BPF_STRUCT_OPS: bpf_attach_type = 44; 2215 pub const BPF_NETFILTER: bpf_attach_type = 45; 2216 pub const BPF_TCX_INGRESS: bpf_attach_type = 46; 2217 pub const BPF_TCX_EGRESS: bpf_attach_type = 47; 2218 pub const BPF_TRACE_UPROBE_MULTI: bpf_attach_type = 48; 2219 pub const BPF_CGROUP_UNIX_CONNECT: bpf_attach_type = 49; 2220 pub const BPF_CGROUP_UNIX_SENDMSG: bpf_attach_type = 50; 2221 pub const BPF_CGROUP_UNIX_RECVMSG: bpf_attach_type = 51; 2222 pub const BPF_CGROUP_UNIX_GETPEERNAME: bpf_attach_type = 52; 2223 pub const BPF_CGROUP_UNIX_GETSOCKNAME: bpf_attach_type = 53; 2224 pub const BPF_NETKIT_PRIMARY: bpf_attach_type = 54; 2225 pub const BPF_NETKIT_PEER: bpf_attach_type = 55; 2226 pub const __MAX_BPF_ATTACH_TYPE: bpf_attach_type = 56; 2227 pub type bpf_attach_type = ::std::os::raw::c_uint; 2228 pub const BPF_LINK_TYPE_UNSPEC: bpf_link_type = 0; 2229 pub const BPF_LINK_TYPE_RAW_TRACEPOINT: bpf_link_type = 1; 2230 pub const BPF_LINK_TYPE_TRACING: bpf_link_type = 2; 2231 pub const BPF_LINK_TYPE_CGROUP: bpf_link_type = 3; 2232 pub const BPF_LINK_TYPE_ITER: bpf_link_type = 4; 2233 pub const BPF_LINK_TYPE_NETNS: bpf_link_type = 5; 2234 pub const BPF_LINK_TYPE_XDP: bpf_link_type = 6; 2235 pub const BPF_LINK_TYPE_PERF_EVENT: bpf_link_type = 7; 2236 pub const BPF_LINK_TYPE_KPROBE_MULTI: bpf_link_type = 8; 2237 pub const BPF_LINK_TYPE_STRUCT_OPS: bpf_link_type = 9; 2238 pub const BPF_LINK_TYPE_NETFILTER: bpf_link_type = 10; 2239 pub const BPF_LINK_TYPE_TCX: bpf_link_type = 11; 2240 pub const BPF_LINK_TYPE_UPROBE_MULTI: bpf_link_type = 12; 2241 pub const BPF_LINK_TYPE_NETKIT: bpf_link_type = 13; 2242 pub const __MAX_BPF_LINK_TYPE: bpf_link_type = 14; 2243 pub type bpf_link_type = ::std::os::raw::c_uint; 2244 pub const BPF_PERF_EVENT_UNSPEC: bpf_perf_event_type = 0; 2245 pub const BPF_PERF_EVENT_UPROBE: bpf_perf_event_type = 1; 2246 pub const BPF_PERF_EVENT_URETPROBE: bpf_perf_event_type = 2; 2247 pub const BPF_PERF_EVENT_KPROBE: bpf_perf_event_type = 3; 2248 pub const BPF_PERF_EVENT_KRETPROBE: bpf_perf_event_type = 4; 2249 pub const BPF_PERF_EVENT_TRACEPOINT: bpf_perf_event_type = 5; 2250 pub const BPF_PERF_EVENT_EVENT: bpf_perf_event_type = 6; 2251 pub type bpf_perf_event_type = ::std::os::raw::c_uint; 2252 pub const BPF_F_KPROBE_MULTI_RETURN: _bindgen_ty_62 = 1; 2253 pub type _bindgen_ty_62 = ::std::os::raw::c_uint; 2254 pub const BPF_F_UPROBE_MULTI_RETURN: _bindgen_ty_63 = 1; 2255 pub type _bindgen_ty_63 = ::std::os::raw::c_uint; 2256 pub const BPF_ADDR_SPACE_CAST: bpf_addr_space_cast = 1; 2257 pub type bpf_addr_space_cast = ::std::os::raw::c_uint; 2258 pub const BPF_ANY: _bindgen_ty_64 = 0; 2259 pub const BPF_NOEXIST: _bindgen_ty_64 = 1; 2260 pub const BPF_EXIST: _bindgen_ty_64 = 2; 2261 pub const BPF_F_LOCK: _bindgen_ty_64 = 4; 2262 pub type _bindgen_ty_64 = ::std::os::raw::c_uint; 2263 pub const BPF_F_NO_PREALLOC: _bindgen_ty_65 = 1; 2264 pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_65 = 2; 2265 pub const BPF_F_NUMA_NODE: _bindgen_ty_65 = 4; 2266 pub const BPF_F_RDONLY: _bindgen_ty_65 = 8; 2267 pub const BPF_F_WRONLY: _bindgen_ty_65 = 16; 2268 pub const BPF_F_STACK_BUILD_ID: _bindgen_ty_65 = 32; 2269 pub const BPF_F_ZERO_SEED: _bindgen_ty_65 = 64; 2270 pub const BPF_F_RDONLY_PROG: _bindgen_ty_65 = 128; 2271 pub const BPF_F_WRONLY_PROG: _bindgen_ty_65 = 256; 2272 pub const BPF_F_CLONE: _bindgen_ty_65 = 512; 2273 pub const BPF_F_MMAPABLE: _bindgen_ty_65 = 1024; 2274 pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_65 = 2048; 2275 pub const BPF_F_INNER_MAP: _bindgen_ty_65 = 4096; 2276 pub const BPF_F_LINK: _bindgen_ty_65 = 8192; 2277 pub const BPF_F_PATH_FD: _bindgen_ty_65 = 16384; 2278 pub const BPF_F_VTYPE_BTF_OBJ_FD: _bindgen_ty_65 = 32768; 2279 pub const BPF_F_TOKEN_FD: _bindgen_ty_65 = 65536; 2280 pub const BPF_F_SEGV_ON_FAULT: _bindgen_ty_65 = 131072; 2281 pub const BPF_F_NO_USER_CONV: _bindgen_ty_65 = 262144; 2282 pub type _bindgen_ty_65 = ::std::os::raw::c_uint; 2283 pub const BPF_STATS_RUN_TIME: bpf_stats_type = 0; 2284 pub type bpf_stats_type = ::std::os::raw::c_uint; 2285 pub const BPF_STACK_BUILD_ID_EMPTY: bpf_stack_build_id_status = 0; 2286 pub const BPF_STACK_BUILD_ID_VALID: bpf_stack_build_id_status = 1; 2287 pub const BPF_STACK_BUILD_ID_IP: bpf_stack_build_id_status = 2; 2288 pub type bpf_stack_build_id_status = ::std::os::raw::c_uint; 2289 #[repr(C)] 2290 #[derive(Copy, Clone)] 2291 pub struct bpf_stack_build_id { 2292 pub status: __s32, 2293 pub build_id: [::std::os::raw::c_uchar; 20usize], 2294 pub __bindgen_anon_1: bpf_stack_build_id__bindgen_ty_1, 2295 } 2296 #[repr(C)] 2297 #[derive(Copy, Clone)] 2298 pub union bpf_stack_build_id__bindgen_ty_1 { 2299 pub offset: __u64, 2300 pub ip: __u64, 2301 } 2302 impl Default for bpf_stack_build_id__bindgen_ty_1 { default() -> Self2303 fn default() -> Self { 2304 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2305 unsafe { 2306 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2307 s.assume_init() 2308 } 2309 } 2310 } 2311 impl Default for bpf_stack_build_id { default() -> Self2312 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 } 2320 #[repr(C)] 2321 #[derive(Copy, Clone)] 2322 pub union bpf_attr { 2323 pub __bindgen_anon_1: bpf_attr__bindgen_ty_1, 2324 pub __bindgen_anon_2: bpf_attr__bindgen_ty_2, 2325 pub batch: bpf_attr__bindgen_ty_3, 2326 pub __bindgen_anon_3: bpf_attr__bindgen_ty_4, 2327 pub __bindgen_anon_4: bpf_attr__bindgen_ty_5, 2328 pub __bindgen_anon_5: bpf_attr__bindgen_ty_6, 2329 pub test: bpf_attr__bindgen_ty_7, 2330 pub __bindgen_anon_6: bpf_attr__bindgen_ty_8, 2331 pub info: bpf_attr__bindgen_ty_9, 2332 pub query: bpf_attr__bindgen_ty_10, 2333 pub raw_tracepoint: bpf_attr__bindgen_ty_11, 2334 pub __bindgen_anon_7: bpf_attr__bindgen_ty_12, 2335 pub task_fd_query: bpf_attr__bindgen_ty_13, 2336 pub link_create: bpf_attr__bindgen_ty_14, 2337 pub link_update: bpf_attr__bindgen_ty_15, 2338 pub link_detach: bpf_attr__bindgen_ty_16, 2339 pub enable_stats: bpf_attr__bindgen_ty_17, 2340 pub iter_create: bpf_attr__bindgen_ty_18, 2341 pub prog_bind_map: bpf_attr__bindgen_ty_19, 2342 pub token_create: bpf_attr__bindgen_ty_20, 2343 } 2344 #[repr(C)] 2345 #[derive(Debug, Default, Copy, Clone)] 2346 pub struct bpf_attr__bindgen_ty_1 { 2347 pub map_type: __u32, 2348 pub key_size: __u32, 2349 pub value_size: __u32, 2350 pub max_entries: __u32, 2351 pub map_flags: __u32, 2352 pub inner_map_fd: __u32, 2353 pub numa_node: __u32, 2354 pub map_name: [::std::os::raw::c_char; 16usize], 2355 pub map_ifindex: __u32, 2356 pub btf_fd: __u32, 2357 pub btf_key_type_id: __u32, 2358 pub btf_value_type_id: __u32, 2359 pub btf_vmlinux_value_type_id: __u32, 2360 pub map_extra: __u64, 2361 pub value_type_btf_obj_fd: __s32, 2362 pub map_token_fd: __s32, 2363 } 2364 #[repr(C)] 2365 #[derive(Copy, Clone)] 2366 pub struct bpf_attr__bindgen_ty_2 { 2367 pub map_fd: __u32, 2368 pub __bindgen_padding_0: [u8; 4usize], 2369 pub key: __u64, 2370 pub __bindgen_anon_1: bpf_attr__bindgen_ty_2__bindgen_ty_1, 2371 pub flags: __u64, 2372 } 2373 #[repr(C)] 2374 #[derive(Copy, Clone)] 2375 pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 { 2376 pub value: __u64, 2377 pub next_key: __u64, 2378 } 2379 impl Default for bpf_attr__bindgen_ty_2__bindgen_ty_1 { default() -> Self2380 fn default() -> Self { 2381 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2382 unsafe { 2383 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2384 s.assume_init() 2385 } 2386 } 2387 } 2388 impl Default for bpf_attr__bindgen_ty_2 { default() -> Self2389 fn default() -> Self { 2390 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2391 unsafe { 2392 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2393 s.assume_init() 2394 } 2395 } 2396 } 2397 #[repr(C)] 2398 #[derive(Debug, Default, Copy, Clone)] 2399 pub struct bpf_attr__bindgen_ty_3 { 2400 pub in_batch: __u64, 2401 pub out_batch: __u64, 2402 pub keys: __u64, 2403 pub values: __u64, 2404 pub count: __u32, 2405 pub map_fd: __u32, 2406 pub elem_flags: __u64, 2407 pub flags: __u64, 2408 } 2409 #[repr(C)] 2410 #[derive(Copy, Clone)] 2411 pub struct bpf_attr__bindgen_ty_4 { 2412 pub prog_type: __u32, 2413 pub insn_cnt: __u32, 2414 pub insns: __u64, 2415 pub license: __u64, 2416 pub log_level: __u32, 2417 pub log_size: __u32, 2418 pub log_buf: __u64, 2419 pub kern_version: __u32, 2420 pub prog_flags: __u32, 2421 pub prog_name: [::std::os::raw::c_char; 16usize], 2422 pub prog_ifindex: __u32, 2423 pub expected_attach_type: __u32, 2424 pub prog_btf_fd: __u32, 2425 pub func_info_rec_size: __u32, 2426 pub func_info: __u64, 2427 pub func_info_cnt: __u32, 2428 pub line_info_rec_size: __u32, 2429 pub line_info: __u64, 2430 pub line_info_cnt: __u32, 2431 pub attach_btf_id: __u32, 2432 pub __bindgen_anon_1: bpf_attr__bindgen_ty_4__bindgen_ty_1, 2433 pub core_relo_cnt: __u32, 2434 pub fd_array: __u64, 2435 pub core_relos: __u64, 2436 pub core_relo_rec_size: __u32, 2437 pub log_true_size: __u32, 2438 pub prog_token_fd: __s32, 2439 pub __bindgen_padding_0: [u8; 4usize], 2440 } 2441 #[repr(C)] 2442 #[derive(Copy, Clone)] 2443 pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 { 2444 pub attach_prog_fd: __u32, 2445 pub attach_btf_obj_fd: __u32, 2446 } 2447 impl Default for bpf_attr__bindgen_ty_4__bindgen_ty_1 { default() -> Self2448 fn default() -> Self { 2449 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2450 unsafe { 2451 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2452 s.assume_init() 2453 } 2454 } 2455 } 2456 impl Default for bpf_attr__bindgen_ty_4 { default() -> Self2457 fn default() -> Self { 2458 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2459 unsafe { 2460 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2461 s.assume_init() 2462 } 2463 } 2464 } 2465 #[repr(C)] 2466 #[derive(Debug, Default, Copy, Clone)] 2467 pub struct bpf_attr__bindgen_ty_5 { 2468 pub pathname: __u64, 2469 pub bpf_fd: __u32, 2470 pub file_flags: __u32, 2471 pub path_fd: __s32, 2472 pub __bindgen_padding_0: [u8; 4usize], 2473 } 2474 #[repr(C)] 2475 #[derive(Copy, Clone)] 2476 pub struct bpf_attr__bindgen_ty_6 { 2477 pub __bindgen_anon_1: bpf_attr__bindgen_ty_6__bindgen_ty_1, 2478 pub attach_bpf_fd: __u32, 2479 pub attach_type: __u32, 2480 pub attach_flags: __u32, 2481 pub replace_bpf_fd: __u32, 2482 pub __bindgen_anon_2: bpf_attr__bindgen_ty_6__bindgen_ty_2, 2483 pub expected_revision: __u64, 2484 } 2485 #[repr(C)] 2486 #[derive(Copy, Clone)] 2487 pub union bpf_attr__bindgen_ty_6__bindgen_ty_1 { 2488 pub target_fd: __u32, 2489 pub target_ifindex: __u32, 2490 } 2491 impl Default for bpf_attr__bindgen_ty_6__bindgen_ty_1 { default() -> Self2492 fn default() -> Self { 2493 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2494 unsafe { 2495 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2496 s.assume_init() 2497 } 2498 } 2499 } 2500 #[repr(C)] 2501 #[derive(Copy, Clone)] 2502 pub union bpf_attr__bindgen_ty_6__bindgen_ty_2 { 2503 pub relative_fd: __u32, 2504 pub relative_id: __u32, 2505 } 2506 impl Default for bpf_attr__bindgen_ty_6__bindgen_ty_2 { default() -> Self2507 fn default() -> Self { 2508 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2509 unsafe { 2510 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2511 s.assume_init() 2512 } 2513 } 2514 } 2515 impl Default for bpf_attr__bindgen_ty_6 { default() -> Self2516 fn default() -> Self { 2517 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2518 unsafe { 2519 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2520 s.assume_init() 2521 } 2522 } 2523 } 2524 #[repr(C)] 2525 #[derive(Debug, Default, Copy, Clone)] 2526 pub struct bpf_attr__bindgen_ty_7 { 2527 pub prog_fd: __u32, 2528 pub retval: __u32, 2529 pub data_size_in: __u32, 2530 pub data_size_out: __u32, 2531 pub data_in: __u64, 2532 pub data_out: __u64, 2533 pub repeat: __u32, 2534 pub duration: __u32, 2535 pub ctx_size_in: __u32, 2536 pub ctx_size_out: __u32, 2537 pub ctx_in: __u64, 2538 pub ctx_out: __u64, 2539 pub flags: __u32, 2540 pub cpu: __u32, 2541 pub batch_size: __u32, 2542 pub __bindgen_padding_0: [u8; 4usize], 2543 } 2544 #[repr(C)] 2545 #[derive(Copy, Clone)] 2546 pub struct bpf_attr__bindgen_ty_8 { 2547 pub __bindgen_anon_1: bpf_attr__bindgen_ty_8__bindgen_ty_1, 2548 pub next_id: __u32, 2549 pub open_flags: __u32, 2550 } 2551 #[repr(C)] 2552 #[derive(Copy, Clone)] 2553 pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 { 2554 pub start_id: __u32, 2555 pub prog_id: __u32, 2556 pub map_id: __u32, 2557 pub btf_id: __u32, 2558 pub link_id: __u32, 2559 } 2560 impl Default for bpf_attr__bindgen_ty_8__bindgen_ty_1 { default() -> Self2561 fn default() -> Self { 2562 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2563 unsafe { 2564 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2565 s.assume_init() 2566 } 2567 } 2568 } 2569 impl Default for bpf_attr__bindgen_ty_8 { default() -> Self2570 fn default() -> Self { 2571 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2572 unsafe { 2573 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2574 s.assume_init() 2575 } 2576 } 2577 } 2578 #[repr(C)] 2579 #[derive(Debug, Default, Copy, Clone)] 2580 pub struct bpf_attr__bindgen_ty_9 { 2581 pub bpf_fd: __u32, 2582 pub info_len: __u32, 2583 pub info: __u64, 2584 } 2585 #[repr(C)] 2586 #[derive(Copy, Clone)] 2587 pub struct bpf_attr__bindgen_ty_10 { 2588 pub __bindgen_anon_1: bpf_attr__bindgen_ty_10__bindgen_ty_1, 2589 pub attach_type: __u32, 2590 pub query_flags: __u32, 2591 pub attach_flags: __u32, 2592 pub prog_ids: __u64, 2593 pub __bindgen_anon_2: bpf_attr__bindgen_ty_10__bindgen_ty_2, 2594 pub _bitfield_align_1: [u8; 0], 2595 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, 2596 pub prog_attach_flags: __u64, 2597 pub link_ids: __u64, 2598 pub link_attach_flags: __u64, 2599 pub revision: __u64, 2600 } 2601 #[repr(C)] 2602 #[derive(Copy, Clone)] 2603 pub union bpf_attr__bindgen_ty_10__bindgen_ty_1 { 2604 pub target_fd: __u32, 2605 pub target_ifindex: __u32, 2606 } 2607 impl Default for bpf_attr__bindgen_ty_10__bindgen_ty_1 { default() -> Self2608 fn default() -> Self { 2609 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2610 unsafe { 2611 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2612 s.assume_init() 2613 } 2614 } 2615 } 2616 #[repr(C)] 2617 #[derive(Copy, Clone)] 2618 pub union bpf_attr__bindgen_ty_10__bindgen_ty_2 { 2619 pub prog_cnt: __u32, 2620 pub count: __u32, 2621 } 2622 impl Default for bpf_attr__bindgen_ty_10__bindgen_ty_2 { default() -> Self2623 fn default() -> Self { 2624 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2625 unsafe { 2626 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2627 s.assume_init() 2628 } 2629 } 2630 } 2631 impl Default for bpf_attr__bindgen_ty_10 { default() -> Self2632 fn default() -> Self { 2633 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2634 unsafe { 2635 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2636 s.assume_init() 2637 } 2638 } 2639 } 2640 impl bpf_attr__bindgen_ty_10 { 2641 #[inline] new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]>2642 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { 2643 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); 2644 __bindgen_bitfield_unit 2645 } 2646 } 2647 #[repr(C)] 2648 #[derive(Debug, Default, Copy, Clone)] 2649 pub struct bpf_attr__bindgen_ty_11 { 2650 pub name: __u64, 2651 pub prog_fd: __u32, 2652 pub _bitfield_align_1: [u8; 0], 2653 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, 2654 pub cookie: __u64, 2655 } 2656 impl bpf_attr__bindgen_ty_11 { 2657 #[inline] new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]>2658 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { 2659 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); 2660 __bindgen_bitfield_unit 2661 } 2662 } 2663 #[repr(C)] 2664 #[derive(Debug, Default, Copy, Clone)] 2665 pub struct bpf_attr__bindgen_ty_12 { 2666 pub btf: __u64, 2667 pub btf_log_buf: __u64, 2668 pub btf_size: __u32, 2669 pub btf_log_size: __u32, 2670 pub btf_log_level: __u32, 2671 pub btf_log_true_size: __u32, 2672 pub btf_flags: __u32, 2673 pub btf_token_fd: __s32, 2674 } 2675 #[repr(C)] 2676 #[derive(Debug, Default, Copy, Clone)] 2677 pub struct bpf_attr__bindgen_ty_13 { 2678 pub pid: __u32, 2679 pub fd: __u32, 2680 pub flags: __u32, 2681 pub buf_len: __u32, 2682 pub buf: __u64, 2683 pub prog_id: __u32, 2684 pub fd_type: __u32, 2685 pub probe_offset: __u64, 2686 pub probe_addr: __u64, 2687 } 2688 #[repr(C)] 2689 #[derive(Copy, Clone)] 2690 pub struct bpf_attr__bindgen_ty_14 { 2691 pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1, 2692 pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2, 2693 pub attach_type: __u32, 2694 pub flags: __u32, 2695 pub __bindgen_anon_3: bpf_attr__bindgen_ty_14__bindgen_ty_3, 2696 } 2697 #[repr(C)] 2698 #[derive(Copy, Clone)] 2699 pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 { 2700 pub prog_fd: __u32, 2701 pub map_fd: __u32, 2702 } 2703 impl Default for bpf_attr__bindgen_ty_14__bindgen_ty_1 { default() -> Self2704 fn default() -> Self { 2705 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2706 unsafe { 2707 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2708 s.assume_init() 2709 } 2710 } 2711 } 2712 #[repr(C)] 2713 #[derive(Copy, Clone)] 2714 pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { 2715 pub target_fd: __u32, 2716 pub target_ifindex: __u32, 2717 } 2718 impl Default for bpf_attr__bindgen_ty_14__bindgen_ty_2 { default() -> Self2719 fn default() -> Self { 2720 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2721 unsafe { 2722 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2723 s.assume_init() 2724 } 2725 } 2726 } 2727 #[repr(C)] 2728 #[derive(Copy, Clone)] 2729 pub union bpf_attr__bindgen_ty_14__bindgen_ty_3 { 2730 pub target_btf_id: __u32, 2731 pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1, 2732 pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2, 2733 pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3, 2734 pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4, 2735 pub netfilter: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5, 2736 pub tcx: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6, 2737 pub uprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7, 2738 pub netkit: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8, 2739 } 2740 #[repr(C)] 2741 #[derive(Debug, Default, Copy, Clone)] 2742 pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 { 2743 pub iter_info: __u64, 2744 pub iter_info_len: __u32, 2745 pub __bindgen_padding_0: [u8; 4usize], 2746 } 2747 #[repr(C)] 2748 #[derive(Debug, Default, Copy, Clone)] 2749 pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 { 2750 pub bpf_cookie: __u64, 2751 } 2752 #[repr(C)] 2753 #[derive(Debug, Default, Copy, Clone)] 2754 pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 { 2755 pub flags: __u32, 2756 pub cnt: __u32, 2757 pub syms: __u64, 2758 pub addrs: __u64, 2759 pub cookies: __u64, 2760 } 2761 #[repr(C)] 2762 #[derive(Debug, Default, Copy, Clone)] 2763 pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 { 2764 pub target_btf_id: __u32, 2765 pub __bindgen_padding_0: [u8; 4usize], 2766 pub cookie: __u64, 2767 } 2768 #[repr(C)] 2769 #[derive(Debug, Default, Copy, Clone)] 2770 pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 { 2771 pub pf: __u32, 2772 pub hooknum: __u32, 2773 pub priority: __s32, 2774 pub flags: __u32, 2775 } 2776 #[repr(C)] 2777 #[derive(Copy, Clone)] 2778 pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 { 2779 pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1, 2780 pub __bindgen_padding_0: [u8; 4usize], 2781 pub expected_revision: __u64, 2782 } 2783 #[repr(C)] 2784 #[derive(Copy, Clone)] 2785 pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 { 2786 pub relative_fd: __u32, 2787 pub relative_id: __u32, 2788 } 2789 impl Default for bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 { default() -> Self2790 fn default() -> Self { 2791 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2792 unsafe { 2793 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2794 s.assume_init() 2795 } 2796 } 2797 } 2798 impl Default for bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 { default() -> Self2799 fn default() -> Self { 2800 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2801 unsafe { 2802 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2803 s.assume_init() 2804 } 2805 } 2806 } 2807 #[repr(C)] 2808 #[derive(Debug, Default, Copy, Clone)] 2809 pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 { 2810 pub path: __u64, 2811 pub offsets: __u64, 2812 pub ref_ctr_offsets: __u64, 2813 pub cookies: __u64, 2814 pub cnt: __u32, 2815 pub flags: __u32, 2816 pub pid: __u32, 2817 pub __bindgen_padding_0: [u8; 4usize], 2818 } 2819 #[repr(C)] 2820 #[derive(Copy, Clone)] 2821 pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 { 2822 pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1, 2823 pub __bindgen_padding_0: [u8; 4usize], 2824 pub expected_revision: __u64, 2825 } 2826 #[repr(C)] 2827 #[derive(Copy, Clone)] 2828 pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 { 2829 pub relative_fd: __u32, 2830 pub relative_id: __u32, 2831 } 2832 impl Default for bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 { default() -> Self2833 fn default() -> Self { 2834 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2835 unsafe { 2836 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2837 s.assume_init() 2838 } 2839 } 2840 } 2841 impl Default for bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 { default() -> Self2842 fn default() -> Self { 2843 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2844 unsafe { 2845 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2846 s.assume_init() 2847 } 2848 } 2849 } 2850 impl Default for bpf_attr__bindgen_ty_14__bindgen_ty_3 { default() -> Self2851 fn default() -> Self { 2852 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2853 unsafe { 2854 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2855 s.assume_init() 2856 } 2857 } 2858 } 2859 impl Default for bpf_attr__bindgen_ty_14 { default() -> Self2860 fn default() -> Self { 2861 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2862 unsafe { 2863 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2864 s.assume_init() 2865 } 2866 } 2867 } 2868 #[repr(C)] 2869 #[derive(Copy, Clone)] 2870 pub struct bpf_attr__bindgen_ty_15 { 2871 pub link_fd: __u32, 2872 pub __bindgen_anon_1: bpf_attr__bindgen_ty_15__bindgen_ty_1, 2873 pub flags: __u32, 2874 pub __bindgen_anon_2: bpf_attr__bindgen_ty_15__bindgen_ty_2, 2875 } 2876 #[repr(C)] 2877 #[derive(Copy, Clone)] 2878 pub union bpf_attr__bindgen_ty_15__bindgen_ty_1 { 2879 pub new_prog_fd: __u32, 2880 pub new_map_fd: __u32, 2881 } 2882 impl Default for bpf_attr__bindgen_ty_15__bindgen_ty_1 { default() -> Self2883 fn default() -> Self { 2884 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2885 unsafe { 2886 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2887 s.assume_init() 2888 } 2889 } 2890 } 2891 #[repr(C)] 2892 #[derive(Copy, Clone)] 2893 pub union bpf_attr__bindgen_ty_15__bindgen_ty_2 { 2894 pub old_prog_fd: __u32, 2895 pub old_map_fd: __u32, 2896 } 2897 impl Default for bpf_attr__bindgen_ty_15__bindgen_ty_2 { default() -> Self2898 fn default() -> Self { 2899 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2900 unsafe { 2901 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2902 s.assume_init() 2903 } 2904 } 2905 } 2906 impl Default for bpf_attr__bindgen_ty_15 { default() -> Self2907 fn default() -> Self { 2908 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2909 unsafe { 2910 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2911 s.assume_init() 2912 } 2913 } 2914 } 2915 #[repr(C)] 2916 #[derive(Debug, Default, Copy, Clone)] 2917 pub struct bpf_attr__bindgen_ty_16 { 2918 pub link_fd: __u32, 2919 } 2920 #[repr(C)] 2921 #[derive(Debug, Default, Copy, Clone)] 2922 pub struct bpf_attr__bindgen_ty_17 { 2923 pub type_: __u32, 2924 } 2925 #[repr(C)] 2926 #[derive(Debug, Default, Copy, Clone)] 2927 pub struct bpf_attr__bindgen_ty_18 { 2928 pub link_fd: __u32, 2929 pub flags: __u32, 2930 } 2931 #[repr(C)] 2932 #[derive(Debug, Default, Copy, Clone)] 2933 pub struct bpf_attr__bindgen_ty_19 { 2934 pub prog_fd: __u32, 2935 pub map_fd: __u32, 2936 pub flags: __u32, 2937 } 2938 #[repr(C)] 2939 #[derive(Debug, Default, Copy, Clone)] 2940 pub struct bpf_attr__bindgen_ty_20 { 2941 pub flags: __u32, 2942 pub bpffs_fd: __u32, 2943 } 2944 impl Default for bpf_attr { default() -> Self2945 fn default() -> Self { 2946 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 2947 unsafe { 2948 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 2949 s.assume_init() 2950 } 2951 } 2952 } 2953 pub const BPF_FUNC_unspec: bpf_func_id = 0; 2954 pub const BPF_FUNC_map_lookup_elem: bpf_func_id = 1; 2955 pub const BPF_FUNC_map_update_elem: bpf_func_id = 2; 2956 pub const BPF_FUNC_map_delete_elem: bpf_func_id = 3; 2957 pub const BPF_FUNC_probe_read: bpf_func_id = 4; 2958 pub const BPF_FUNC_ktime_get_ns: bpf_func_id = 5; 2959 pub const BPF_FUNC_trace_printk: bpf_func_id = 6; 2960 pub const BPF_FUNC_get_prandom_u32: bpf_func_id = 7; 2961 pub const BPF_FUNC_get_smp_processor_id: bpf_func_id = 8; 2962 pub const BPF_FUNC_skb_store_bytes: bpf_func_id = 9; 2963 pub const BPF_FUNC_l3_csum_replace: bpf_func_id = 10; 2964 pub const BPF_FUNC_l4_csum_replace: bpf_func_id = 11; 2965 pub const BPF_FUNC_tail_call: bpf_func_id = 12; 2966 pub const BPF_FUNC_clone_redirect: bpf_func_id = 13; 2967 pub const BPF_FUNC_get_current_pid_tgid: bpf_func_id = 14; 2968 pub const BPF_FUNC_get_current_uid_gid: bpf_func_id = 15; 2969 pub const BPF_FUNC_get_current_comm: bpf_func_id = 16; 2970 pub const BPF_FUNC_get_cgroup_classid: bpf_func_id = 17; 2971 pub const BPF_FUNC_skb_vlan_push: bpf_func_id = 18; 2972 pub const BPF_FUNC_skb_vlan_pop: bpf_func_id = 19; 2973 pub const BPF_FUNC_skb_get_tunnel_key: bpf_func_id = 20; 2974 pub const BPF_FUNC_skb_set_tunnel_key: bpf_func_id = 21; 2975 pub const BPF_FUNC_perf_event_read: bpf_func_id = 22; 2976 pub const BPF_FUNC_redirect: bpf_func_id = 23; 2977 pub const BPF_FUNC_get_route_realm: bpf_func_id = 24; 2978 pub const BPF_FUNC_perf_event_output: bpf_func_id = 25; 2979 pub const BPF_FUNC_skb_load_bytes: bpf_func_id = 26; 2980 pub const BPF_FUNC_get_stackid: bpf_func_id = 27; 2981 pub const BPF_FUNC_csum_diff: bpf_func_id = 28; 2982 pub const BPF_FUNC_skb_get_tunnel_opt: bpf_func_id = 29; 2983 pub const BPF_FUNC_skb_set_tunnel_opt: bpf_func_id = 30; 2984 pub const BPF_FUNC_skb_change_proto: bpf_func_id = 31; 2985 pub const BPF_FUNC_skb_change_type: bpf_func_id = 32; 2986 pub const BPF_FUNC_skb_under_cgroup: bpf_func_id = 33; 2987 pub const BPF_FUNC_get_hash_recalc: bpf_func_id = 34; 2988 pub const BPF_FUNC_get_current_task: bpf_func_id = 35; 2989 pub const BPF_FUNC_probe_write_user: bpf_func_id = 36; 2990 pub const BPF_FUNC_current_task_under_cgroup: bpf_func_id = 37; 2991 pub const BPF_FUNC_skb_change_tail: bpf_func_id = 38; 2992 pub const BPF_FUNC_skb_pull_data: bpf_func_id = 39; 2993 pub const BPF_FUNC_csum_update: bpf_func_id = 40; 2994 pub const BPF_FUNC_set_hash_invalid: bpf_func_id = 41; 2995 pub const BPF_FUNC_get_numa_node_id: bpf_func_id = 42; 2996 pub const BPF_FUNC_skb_change_head: bpf_func_id = 43; 2997 pub const BPF_FUNC_xdp_adjust_head: bpf_func_id = 44; 2998 pub const BPF_FUNC_probe_read_str: bpf_func_id = 45; 2999 pub const BPF_FUNC_get_socket_cookie: bpf_func_id = 46; 3000 pub const BPF_FUNC_get_socket_uid: bpf_func_id = 47; 3001 pub const BPF_FUNC_set_hash: bpf_func_id = 48; 3002 pub const BPF_FUNC_setsockopt: bpf_func_id = 49; 3003 pub const BPF_FUNC_skb_adjust_room: bpf_func_id = 50; 3004 pub const BPF_FUNC_redirect_map: bpf_func_id = 51; 3005 pub const BPF_FUNC_sk_redirect_map: bpf_func_id = 52; 3006 pub const BPF_FUNC_sock_map_update: bpf_func_id = 53; 3007 pub const BPF_FUNC_xdp_adjust_meta: bpf_func_id = 54; 3008 pub const BPF_FUNC_perf_event_read_value: bpf_func_id = 55; 3009 pub const BPF_FUNC_perf_prog_read_value: bpf_func_id = 56; 3010 pub const BPF_FUNC_getsockopt: bpf_func_id = 57; 3011 pub const BPF_FUNC_override_return: bpf_func_id = 58; 3012 pub const BPF_FUNC_sock_ops_cb_flags_set: bpf_func_id = 59; 3013 pub const BPF_FUNC_msg_redirect_map: bpf_func_id = 60; 3014 pub const BPF_FUNC_msg_apply_bytes: bpf_func_id = 61; 3015 pub const BPF_FUNC_msg_cork_bytes: bpf_func_id = 62; 3016 pub const BPF_FUNC_msg_pull_data: bpf_func_id = 63; 3017 pub const BPF_FUNC_bind: bpf_func_id = 64; 3018 pub const BPF_FUNC_xdp_adjust_tail: bpf_func_id = 65; 3019 pub const BPF_FUNC_skb_get_xfrm_state: bpf_func_id = 66; 3020 pub const BPF_FUNC_get_stack: bpf_func_id = 67; 3021 pub const BPF_FUNC_skb_load_bytes_relative: bpf_func_id = 68; 3022 pub const BPF_FUNC_fib_lookup: bpf_func_id = 69; 3023 pub const BPF_FUNC_sock_hash_update: bpf_func_id = 70; 3024 pub const BPF_FUNC_msg_redirect_hash: bpf_func_id = 71; 3025 pub const BPF_FUNC_sk_redirect_hash: bpf_func_id = 72; 3026 pub const BPF_FUNC_lwt_push_encap: bpf_func_id = 73; 3027 pub const BPF_FUNC_lwt_seg6_store_bytes: bpf_func_id = 74; 3028 pub const BPF_FUNC_lwt_seg6_adjust_srh: bpf_func_id = 75; 3029 pub const BPF_FUNC_lwt_seg6_action: bpf_func_id = 76; 3030 pub const BPF_FUNC_rc_repeat: bpf_func_id = 77; 3031 pub const BPF_FUNC_rc_keydown: bpf_func_id = 78; 3032 pub const BPF_FUNC_skb_cgroup_id: bpf_func_id = 79; 3033 pub const BPF_FUNC_get_current_cgroup_id: bpf_func_id = 80; 3034 pub const BPF_FUNC_get_local_storage: bpf_func_id = 81; 3035 pub const BPF_FUNC_sk_select_reuseport: bpf_func_id = 82; 3036 pub const BPF_FUNC_skb_ancestor_cgroup_id: bpf_func_id = 83; 3037 pub const BPF_FUNC_sk_lookup_tcp: bpf_func_id = 84; 3038 pub const BPF_FUNC_sk_lookup_udp: bpf_func_id = 85; 3039 pub const BPF_FUNC_sk_release: bpf_func_id = 86; 3040 pub const BPF_FUNC_map_push_elem: bpf_func_id = 87; 3041 pub const BPF_FUNC_map_pop_elem: bpf_func_id = 88; 3042 pub const BPF_FUNC_map_peek_elem: bpf_func_id = 89; 3043 pub const BPF_FUNC_msg_push_data: bpf_func_id = 90; 3044 pub const BPF_FUNC_msg_pop_data: bpf_func_id = 91; 3045 pub const BPF_FUNC_rc_pointer_rel: bpf_func_id = 92; 3046 pub const BPF_FUNC_spin_lock: bpf_func_id = 93; 3047 pub const BPF_FUNC_spin_unlock: bpf_func_id = 94; 3048 pub const BPF_FUNC_sk_fullsock: bpf_func_id = 95; 3049 pub const BPF_FUNC_tcp_sock: bpf_func_id = 96; 3050 pub const BPF_FUNC_skb_ecn_set_ce: bpf_func_id = 97; 3051 pub const BPF_FUNC_get_listener_sock: bpf_func_id = 98; 3052 pub const BPF_FUNC_skc_lookup_tcp: bpf_func_id = 99; 3053 pub const BPF_FUNC_tcp_check_syncookie: bpf_func_id = 100; 3054 pub const BPF_FUNC_sysctl_get_name: bpf_func_id = 101; 3055 pub const BPF_FUNC_sysctl_get_current_value: bpf_func_id = 102; 3056 pub const BPF_FUNC_sysctl_get_new_value: bpf_func_id = 103; 3057 pub const BPF_FUNC_sysctl_set_new_value: bpf_func_id = 104; 3058 pub const BPF_FUNC_strtol: bpf_func_id = 105; 3059 pub const BPF_FUNC_strtoul: bpf_func_id = 106; 3060 pub const BPF_FUNC_sk_storage_get: bpf_func_id = 107; 3061 pub const BPF_FUNC_sk_storage_delete: bpf_func_id = 108; 3062 pub const BPF_FUNC_send_signal: bpf_func_id = 109; 3063 pub const BPF_FUNC_tcp_gen_syncookie: bpf_func_id = 110; 3064 pub const BPF_FUNC_skb_output: bpf_func_id = 111; 3065 pub const BPF_FUNC_probe_read_user: bpf_func_id = 112; 3066 pub const BPF_FUNC_probe_read_kernel: bpf_func_id = 113; 3067 pub const BPF_FUNC_probe_read_user_str: bpf_func_id = 114; 3068 pub const BPF_FUNC_probe_read_kernel_str: bpf_func_id = 115; 3069 pub const BPF_FUNC_tcp_send_ack: bpf_func_id = 116; 3070 pub const BPF_FUNC_send_signal_thread: bpf_func_id = 117; 3071 pub const BPF_FUNC_jiffies64: bpf_func_id = 118; 3072 pub const BPF_FUNC_read_branch_records: bpf_func_id = 119; 3073 pub const BPF_FUNC_get_ns_current_pid_tgid: bpf_func_id = 120; 3074 pub const BPF_FUNC_xdp_output: bpf_func_id = 121; 3075 pub const BPF_FUNC_get_netns_cookie: bpf_func_id = 122; 3076 pub const BPF_FUNC_get_current_ancestor_cgroup_id: bpf_func_id = 123; 3077 pub const BPF_FUNC_sk_assign: bpf_func_id = 124; 3078 pub const BPF_FUNC_ktime_get_boot_ns: bpf_func_id = 125; 3079 pub const BPF_FUNC_seq_printf: bpf_func_id = 126; 3080 pub const BPF_FUNC_seq_write: bpf_func_id = 127; 3081 pub const BPF_FUNC_sk_cgroup_id: bpf_func_id = 128; 3082 pub const BPF_FUNC_sk_ancestor_cgroup_id: bpf_func_id = 129; 3083 pub const BPF_FUNC_ringbuf_output: bpf_func_id = 130; 3084 pub const BPF_FUNC_ringbuf_reserve: bpf_func_id = 131; 3085 pub const BPF_FUNC_ringbuf_submit: bpf_func_id = 132; 3086 pub const BPF_FUNC_ringbuf_discard: bpf_func_id = 133; 3087 pub const BPF_FUNC_ringbuf_query: bpf_func_id = 134; 3088 pub const BPF_FUNC_csum_level: bpf_func_id = 135; 3089 pub const BPF_FUNC_skc_to_tcp6_sock: bpf_func_id = 136; 3090 pub const BPF_FUNC_skc_to_tcp_sock: bpf_func_id = 137; 3091 pub const BPF_FUNC_skc_to_tcp_timewait_sock: bpf_func_id = 138; 3092 pub const BPF_FUNC_skc_to_tcp_request_sock: bpf_func_id = 139; 3093 pub const BPF_FUNC_skc_to_udp6_sock: bpf_func_id = 140; 3094 pub const BPF_FUNC_get_task_stack: bpf_func_id = 141; 3095 pub const BPF_FUNC_load_hdr_opt: bpf_func_id = 142; 3096 pub const BPF_FUNC_store_hdr_opt: bpf_func_id = 143; 3097 pub const BPF_FUNC_reserve_hdr_opt: bpf_func_id = 144; 3098 pub const BPF_FUNC_inode_storage_get: bpf_func_id = 145; 3099 pub const BPF_FUNC_inode_storage_delete: bpf_func_id = 146; 3100 pub const BPF_FUNC_d_path: bpf_func_id = 147; 3101 pub const BPF_FUNC_copy_from_user: bpf_func_id = 148; 3102 pub const BPF_FUNC_snprintf_btf: bpf_func_id = 149; 3103 pub const BPF_FUNC_seq_printf_btf: bpf_func_id = 150; 3104 pub const BPF_FUNC_skb_cgroup_classid: bpf_func_id = 151; 3105 pub const BPF_FUNC_redirect_neigh: bpf_func_id = 152; 3106 pub const BPF_FUNC_per_cpu_ptr: bpf_func_id = 153; 3107 pub const BPF_FUNC_this_cpu_ptr: bpf_func_id = 154; 3108 pub const BPF_FUNC_redirect_peer: bpf_func_id = 155; 3109 pub const BPF_FUNC_task_storage_get: bpf_func_id = 156; 3110 pub const BPF_FUNC_task_storage_delete: bpf_func_id = 157; 3111 pub const BPF_FUNC_get_current_task_btf: bpf_func_id = 158; 3112 pub const BPF_FUNC_bprm_opts_set: bpf_func_id = 159; 3113 pub const BPF_FUNC_ktime_get_coarse_ns: bpf_func_id = 160; 3114 pub const BPF_FUNC_ima_inode_hash: bpf_func_id = 161; 3115 pub const BPF_FUNC_sock_from_file: bpf_func_id = 162; 3116 pub const BPF_FUNC_check_mtu: bpf_func_id = 163; 3117 pub const BPF_FUNC_for_each_map_elem: bpf_func_id = 164; 3118 pub const BPF_FUNC_snprintf: bpf_func_id = 165; 3119 pub const BPF_FUNC_sys_bpf: bpf_func_id = 166; 3120 pub const BPF_FUNC_btf_find_by_name_kind: bpf_func_id = 167; 3121 pub const BPF_FUNC_sys_close: bpf_func_id = 168; 3122 pub const BPF_FUNC_timer_init: bpf_func_id = 169; 3123 pub const BPF_FUNC_timer_set_callback: bpf_func_id = 170; 3124 pub const BPF_FUNC_timer_start: bpf_func_id = 171; 3125 pub const BPF_FUNC_timer_cancel: bpf_func_id = 172; 3126 pub const BPF_FUNC_get_func_ip: bpf_func_id = 173; 3127 pub const BPF_FUNC_get_attach_cookie: bpf_func_id = 174; 3128 pub const BPF_FUNC_task_pt_regs: bpf_func_id = 175; 3129 pub const BPF_FUNC_get_branch_snapshot: bpf_func_id = 176; 3130 pub const BPF_FUNC_trace_vprintk: bpf_func_id = 177; 3131 pub const BPF_FUNC_skc_to_unix_sock: bpf_func_id = 178; 3132 pub const BPF_FUNC_kallsyms_lookup_name: bpf_func_id = 179; 3133 pub const BPF_FUNC_find_vma: bpf_func_id = 180; 3134 pub const BPF_FUNC_loop: bpf_func_id = 181; 3135 pub const BPF_FUNC_strncmp: bpf_func_id = 182; 3136 pub const BPF_FUNC_get_func_arg: bpf_func_id = 183; 3137 pub const BPF_FUNC_get_func_ret: bpf_func_id = 184; 3138 pub const BPF_FUNC_get_func_arg_cnt: bpf_func_id = 185; 3139 pub const BPF_FUNC_get_retval: bpf_func_id = 186; 3140 pub const BPF_FUNC_set_retval: bpf_func_id = 187; 3141 pub const BPF_FUNC_xdp_get_buff_len: bpf_func_id = 188; 3142 pub const BPF_FUNC_xdp_load_bytes: bpf_func_id = 189; 3143 pub const BPF_FUNC_xdp_store_bytes: bpf_func_id = 190; 3144 pub const BPF_FUNC_copy_from_user_task: bpf_func_id = 191; 3145 pub const BPF_FUNC_skb_set_tstamp: bpf_func_id = 192; 3146 pub const BPF_FUNC_ima_file_hash: bpf_func_id = 193; 3147 pub const BPF_FUNC_kptr_xchg: bpf_func_id = 194; 3148 pub const BPF_FUNC_map_lookup_percpu_elem: bpf_func_id = 195; 3149 pub const BPF_FUNC_skc_to_mptcp_sock: bpf_func_id = 196; 3150 pub const BPF_FUNC_dynptr_from_mem: bpf_func_id = 197; 3151 pub const BPF_FUNC_ringbuf_reserve_dynptr: bpf_func_id = 198; 3152 pub const BPF_FUNC_ringbuf_submit_dynptr: bpf_func_id = 199; 3153 pub const BPF_FUNC_ringbuf_discard_dynptr: bpf_func_id = 200; 3154 pub const BPF_FUNC_dynptr_read: bpf_func_id = 201; 3155 pub const BPF_FUNC_dynptr_write: bpf_func_id = 202; 3156 pub const BPF_FUNC_dynptr_data: bpf_func_id = 203; 3157 pub const BPF_FUNC_tcp_raw_gen_syncookie_ipv4: bpf_func_id = 204; 3158 pub const BPF_FUNC_tcp_raw_gen_syncookie_ipv6: bpf_func_id = 205; 3159 pub const BPF_FUNC_tcp_raw_check_syncookie_ipv4: bpf_func_id = 206; 3160 pub const BPF_FUNC_tcp_raw_check_syncookie_ipv6: bpf_func_id = 207; 3161 pub const BPF_FUNC_ktime_get_tai_ns: bpf_func_id = 208; 3162 pub const BPF_FUNC_user_ringbuf_drain: bpf_func_id = 209; 3163 pub const BPF_FUNC_cgrp_storage_get: bpf_func_id = 210; 3164 pub const BPF_FUNC_cgrp_storage_delete: bpf_func_id = 211; 3165 pub const __BPF_FUNC_MAX_ID: bpf_func_id = 212; 3166 pub type bpf_func_id = ::std::os::raw::c_uint; 3167 pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_66 = 1; 3168 pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_66 = 2; 3169 pub type _bindgen_ty_66 = ::std::os::raw::c_uint; 3170 pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_67 = 15; 3171 pub type _bindgen_ty_67 = ::std::os::raw::c_uint; 3172 pub const BPF_F_PSEUDO_HDR: _bindgen_ty_68 = 16; 3173 pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_68 = 32; 3174 pub const BPF_F_MARK_ENFORCE: _bindgen_ty_68 = 64; 3175 pub type _bindgen_ty_68 = ::std::os::raw::c_uint; 3176 pub const BPF_F_INGRESS: _bindgen_ty_69 = 1; 3177 pub type _bindgen_ty_69 = ::std::os::raw::c_uint; 3178 pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_70 = 1; 3179 pub type _bindgen_ty_70 = ::std::os::raw::c_uint; 3180 pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_71 = 255; 3181 pub const BPF_F_USER_STACK: _bindgen_ty_71 = 256; 3182 pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_71 = 512; 3183 pub const BPF_F_REUSE_STACKID: _bindgen_ty_71 = 1024; 3184 pub const BPF_F_USER_BUILD_ID: _bindgen_ty_71 = 2048; 3185 pub type _bindgen_ty_71 = ::std::os::raw::c_uint; 3186 pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_72 = 2; 3187 pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_72 = 4; 3188 pub const BPF_F_SEQ_NUMBER: _bindgen_ty_72 = 8; 3189 pub const BPF_F_NO_TUNNEL_KEY: _bindgen_ty_72 = 16; 3190 pub type _bindgen_ty_72 = ::std::os::raw::c_uint; 3191 pub const BPF_F_TUNINFO_FLAGS: _bindgen_ty_73 = 16; 3192 pub type _bindgen_ty_73 = ::std::os::raw::c_uint; 3193 pub const BPF_F_INDEX_MASK: _bindgen_ty_74 = 4294967295; 3194 pub const BPF_F_CURRENT_CPU: _bindgen_ty_74 = 4294967295; 3195 pub const BPF_F_CTXLEN_MASK: _bindgen_ty_74 = 4503595332403200; 3196 pub type _bindgen_ty_74 = ::std::os::raw::c_ulong; 3197 pub const BPF_F_CURRENT_NETNS: _bindgen_ty_75 = -1; 3198 pub type _bindgen_ty_75 = ::std::os::raw::c_int; 3199 pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_76 = 0; 3200 pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_76 = 1; 3201 pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_76 = 2; 3202 pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_76 = 3; 3203 pub type _bindgen_ty_76 = ::std::os::raw::c_uint; 3204 pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_77 = 1; 3205 pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_77 = 2; 3206 pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_77 = 4; 3207 pub const BPF_F_ADJ_ROOM_ENCAP_L4_GRE: _bindgen_ty_77 = 8; 3208 pub const BPF_F_ADJ_ROOM_ENCAP_L4_UDP: _bindgen_ty_77 = 16; 3209 pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_77 = 32; 3210 pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_77 = 64; 3211 pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_77 = 128; 3212 pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_77 = 256; 3213 pub type _bindgen_ty_77 = ::std::os::raw::c_uint; 3214 pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_78 = 255; 3215 pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_78 = 56; 3216 pub type _bindgen_ty_78 = ::std::os::raw::c_uint; 3217 pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_79 = 1; 3218 pub type _bindgen_ty_79 = ::std::os::raw::c_uint; 3219 pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_80 = 1; 3220 pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_80 = 1; 3221 pub type _bindgen_ty_80 = ::std::os::raw::c_uint; 3222 pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_81 = 1; 3223 pub type _bindgen_ty_81 = ::std::os::raw::c_uint; 3224 pub const BPF_RB_NO_WAKEUP: _bindgen_ty_82 = 1; 3225 pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_82 = 2; 3226 pub type _bindgen_ty_82 = ::std::os::raw::c_uint; 3227 pub const BPF_RB_AVAIL_DATA: _bindgen_ty_83 = 0; 3228 pub const BPF_RB_RING_SIZE: _bindgen_ty_83 = 1; 3229 pub const BPF_RB_CONS_POS: _bindgen_ty_83 = 2; 3230 pub const BPF_RB_PROD_POS: _bindgen_ty_83 = 3; 3231 pub type _bindgen_ty_83 = ::std::os::raw::c_uint; 3232 pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_84 = 2147483648; 3233 pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_84 = 1073741824; 3234 pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_84 = 8; 3235 pub type _bindgen_ty_84 = ::std::os::raw::c_uint; 3236 pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_85 = 1; 3237 pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_85 = 2; 3238 pub type _bindgen_ty_85 = ::std::os::raw::c_uint; 3239 pub const BPF_ADJ_ROOM_NET: bpf_adj_room_mode = 0; 3240 pub const BPF_ADJ_ROOM_MAC: bpf_adj_room_mode = 1; 3241 pub type bpf_adj_room_mode = ::std::os::raw::c_uint; 3242 pub const BPF_HDR_START_MAC: bpf_hdr_start_off = 0; 3243 pub const BPF_HDR_START_NET: bpf_hdr_start_off = 1; 3244 pub type bpf_hdr_start_off = ::std::os::raw::c_uint; 3245 pub const BPF_LWT_ENCAP_SEG6: bpf_lwt_encap_mode = 0; 3246 pub const BPF_LWT_ENCAP_SEG6_INLINE: bpf_lwt_encap_mode = 1; 3247 pub const BPF_LWT_ENCAP_IP: bpf_lwt_encap_mode = 2; 3248 pub type bpf_lwt_encap_mode = ::std::os::raw::c_uint; 3249 pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_86 = 1; 3250 pub type _bindgen_ty_86 = ::std::os::raw::c_uint; 3251 pub const BPF_F_BROADCAST: _bindgen_ty_87 = 8; 3252 pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_87 = 16; 3253 pub type _bindgen_ty_87 = ::std::os::raw::c_uint; 3254 pub const BPF_SKB_TSTAMP_UNSPEC: _bindgen_ty_88 = 0; 3255 pub const BPF_SKB_TSTAMP_DELIVERY_MONO: _bindgen_ty_88 = 1; 3256 pub type _bindgen_ty_88 = ::std::os::raw::c_uint; 3257 #[repr(C)] 3258 #[derive(Copy, Clone)] 3259 pub struct bpf_tunnel_key { 3260 pub tunnel_id: __u32, 3261 pub __bindgen_anon_1: bpf_tunnel_key__bindgen_ty_1, 3262 pub tunnel_tos: __u8, 3263 pub tunnel_ttl: __u8, 3264 pub __bindgen_anon_2: bpf_tunnel_key__bindgen_ty_2, 3265 pub tunnel_label: __u32, 3266 pub __bindgen_anon_3: bpf_tunnel_key__bindgen_ty_3, 3267 } 3268 #[repr(C)] 3269 #[derive(Copy, Clone)] 3270 pub union bpf_tunnel_key__bindgen_ty_1 { 3271 pub remote_ipv4: __u32, 3272 pub remote_ipv6: [__u32; 4usize], 3273 } 3274 impl Default for bpf_tunnel_key__bindgen_ty_1 { default() -> Self3275 fn default() -> Self { 3276 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3277 unsafe { 3278 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3279 s.assume_init() 3280 } 3281 } 3282 } 3283 #[repr(C)] 3284 #[derive(Copy, Clone)] 3285 pub union bpf_tunnel_key__bindgen_ty_2 { 3286 pub tunnel_ext: __u16, 3287 pub tunnel_flags: __be16, 3288 } 3289 impl Default for bpf_tunnel_key__bindgen_ty_2 { default() -> Self3290 fn default() -> Self { 3291 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3292 unsafe { 3293 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3294 s.assume_init() 3295 } 3296 } 3297 } 3298 #[repr(C)] 3299 #[derive(Copy, Clone)] 3300 pub union bpf_tunnel_key__bindgen_ty_3 { 3301 pub local_ipv4: __u32, 3302 pub local_ipv6: [__u32; 4usize], 3303 } 3304 impl Default for bpf_tunnel_key__bindgen_ty_3 { default() -> Self3305 fn default() -> Self { 3306 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3307 unsafe { 3308 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3309 s.assume_init() 3310 } 3311 } 3312 } 3313 impl Default for bpf_tunnel_key { default() -> Self3314 fn default() -> Self { 3315 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3316 unsafe { 3317 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3318 s.assume_init() 3319 } 3320 } 3321 } 3322 #[repr(C)] 3323 #[derive(Copy, Clone)] 3324 pub struct bpf_xfrm_state { 3325 pub reqid: __u32, 3326 pub spi: __u32, 3327 pub family: __u16, 3328 pub ext: __u16, 3329 pub __bindgen_anon_1: bpf_xfrm_state__bindgen_ty_1, 3330 } 3331 #[repr(C)] 3332 #[derive(Copy, Clone)] 3333 pub union bpf_xfrm_state__bindgen_ty_1 { 3334 pub remote_ipv4: __u32, 3335 pub remote_ipv6: [__u32; 4usize], 3336 } 3337 impl Default for bpf_xfrm_state__bindgen_ty_1 { default() -> Self3338 fn default() -> Self { 3339 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3340 unsafe { 3341 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3342 s.assume_init() 3343 } 3344 } 3345 } 3346 impl Default for bpf_xfrm_state { default() -> Self3347 fn default() -> Self { 3348 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3349 unsafe { 3350 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3351 s.assume_init() 3352 } 3353 } 3354 } 3355 pub const BPF_OK: bpf_ret_code = 0; 3356 pub const BPF_DROP: bpf_ret_code = 2; 3357 pub const BPF_REDIRECT: bpf_ret_code = 7; 3358 pub const BPF_LWT_REROUTE: bpf_ret_code = 128; 3359 pub const BPF_FLOW_DISSECTOR_CONTINUE: bpf_ret_code = 129; 3360 pub type bpf_ret_code = ::std::os::raw::c_uint; 3361 #[repr(C)] 3362 #[derive(Debug, Default, Copy, Clone)] 3363 pub struct bpf_sock { 3364 pub bound_dev_if: __u32, 3365 pub family: __u32, 3366 pub type_: __u32, 3367 pub protocol: __u32, 3368 pub mark: __u32, 3369 pub priority: __u32, 3370 pub src_ip4: __u32, 3371 pub src_ip6: [__u32; 4usize], 3372 pub src_port: __u32, 3373 pub dst_port: __be16, 3374 pub _bitfield_align_1: [u8; 0], 3375 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, 3376 pub dst_ip4: __u32, 3377 pub dst_ip6: [__u32; 4usize], 3378 pub state: __u32, 3379 pub rx_queue_mapping: __s32, 3380 } 3381 impl bpf_sock { 3382 #[inline] new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]>3383 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> { 3384 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); 3385 __bindgen_bitfield_unit 3386 } 3387 } 3388 #[repr(C)] 3389 #[derive(Debug, Default, Copy, Clone)] 3390 pub struct bpf_tcp_sock { 3391 pub snd_cwnd: __u32, 3392 pub srtt_us: __u32, 3393 pub rtt_min: __u32, 3394 pub snd_ssthresh: __u32, 3395 pub rcv_nxt: __u32, 3396 pub snd_nxt: __u32, 3397 pub snd_una: __u32, 3398 pub mss_cache: __u32, 3399 pub ecn_flags: __u32, 3400 pub rate_delivered: __u32, 3401 pub rate_interval_us: __u32, 3402 pub packets_out: __u32, 3403 pub retrans_out: __u32, 3404 pub total_retrans: __u32, 3405 pub segs_in: __u32, 3406 pub data_segs_in: __u32, 3407 pub segs_out: __u32, 3408 pub data_segs_out: __u32, 3409 pub lost_out: __u32, 3410 pub sacked_out: __u32, 3411 pub bytes_received: __u64, 3412 pub bytes_acked: __u64, 3413 pub dsack_dups: __u32, 3414 pub delivered: __u32, 3415 pub delivered_ce: __u32, 3416 pub icsk_retransmits: __u32, 3417 } 3418 #[repr(C)] 3419 #[derive(Copy, Clone)] 3420 pub struct bpf_sock_tuple { 3421 pub __bindgen_anon_1: bpf_sock_tuple__bindgen_ty_1, 3422 } 3423 #[repr(C)] 3424 #[derive(Copy, Clone)] 3425 pub union bpf_sock_tuple__bindgen_ty_1 { 3426 pub ipv4: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1, 3427 pub ipv6: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2, 3428 } 3429 #[repr(C)] 3430 #[derive(Debug, Default, Copy, Clone)] 3431 pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 { 3432 pub saddr: __be32, 3433 pub daddr: __be32, 3434 pub sport: __be16, 3435 pub dport: __be16, 3436 } 3437 #[repr(C)] 3438 #[derive(Debug, Default, Copy, Clone)] 3439 pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { 3440 pub saddr: [__be32; 4usize], 3441 pub daddr: [__be32; 4usize], 3442 pub sport: __be16, 3443 pub dport: __be16, 3444 } 3445 impl Default for bpf_sock_tuple__bindgen_ty_1 { default() -> Self3446 fn default() -> Self { 3447 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3448 unsafe { 3449 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3450 s.assume_init() 3451 } 3452 } 3453 } 3454 impl Default for bpf_sock_tuple { default() -> Self3455 fn default() -> Self { 3456 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3457 unsafe { 3458 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3459 s.assume_init() 3460 } 3461 } 3462 } 3463 #[repr(C)] 3464 #[derive(Debug, Default, Copy, Clone)] 3465 pub struct bpf_xdp_sock { 3466 pub queue_id: __u32, 3467 } 3468 pub const XDP_ABORTED: xdp_action = 0; 3469 pub const XDP_DROP: xdp_action = 1; 3470 pub const XDP_PASS: xdp_action = 2; 3471 pub const XDP_TX: xdp_action = 3; 3472 pub const XDP_REDIRECT: xdp_action = 4; 3473 pub type xdp_action = ::std::os::raw::c_uint; 3474 #[repr(C)] 3475 #[derive(Debug, Default, Copy, Clone)] 3476 pub struct xdp_md { 3477 pub data: __u32, 3478 pub data_end: __u32, 3479 pub data_meta: __u32, 3480 pub ingress_ifindex: __u32, 3481 pub rx_queue_index: __u32, 3482 pub egress_ifindex: __u32, 3483 } 3484 #[repr(C)] 3485 #[derive(Copy, Clone)] 3486 pub struct bpf_devmap_val { 3487 pub ifindex: __u32, 3488 pub bpf_prog: bpf_devmap_val__bindgen_ty_1, 3489 } 3490 #[repr(C)] 3491 #[derive(Copy, Clone)] 3492 pub union bpf_devmap_val__bindgen_ty_1 { 3493 pub fd: ::std::os::raw::c_int, 3494 pub id: __u32, 3495 } 3496 impl Default for bpf_devmap_val__bindgen_ty_1 { default() -> Self3497 fn default() -> Self { 3498 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3499 unsafe { 3500 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3501 s.assume_init() 3502 } 3503 } 3504 } 3505 impl Default for bpf_devmap_val { default() -> Self3506 fn default() -> Self { 3507 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3508 unsafe { 3509 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3510 s.assume_init() 3511 } 3512 } 3513 } 3514 #[repr(C)] 3515 #[derive(Copy, Clone)] 3516 pub struct bpf_cpumap_val { 3517 pub qsize: __u32, 3518 pub bpf_prog: bpf_cpumap_val__bindgen_ty_1, 3519 } 3520 #[repr(C)] 3521 #[derive(Copy, Clone)] 3522 pub union bpf_cpumap_val__bindgen_ty_1 { 3523 pub fd: ::std::os::raw::c_int, 3524 pub id: __u32, 3525 } 3526 impl Default for bpf_cpumap_val__bindgen_ty_1 { default() -> Self3527 fn default() -> Self { 3528 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3529 unsafe { 3530 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3531 s.assume_init() 3532 } 3533 } 3534 } 3535 impl Default for bpf_cpumap_val { default() -> Self3536 fn default() -> Self { 3537 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3538 unsafe { 3539 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3540 s.assume_init() 3541 } 3542 } 3543 } 3544 #[repr(C)] 3545 #[derive(Debug, Default, Copy, Clone)] 3546 pub struct bpf_prog_info { 3547 pub type_: __u32, 3548 pub id: __u32, 3549 pub tag: [__u8; 8usize], 3550 pub jited_prog_len: __u32, 3551 pub xlated_prog_len: __u32, 3552 pub jited_prog_insns: __u64, 3553 pub xlated_prog_insns: __u64, 3554 pub load_time: __u64, 3555 pub created_by_uid: __u32, 3556 pub nr_map_ids: __u32, 3557 pub map_ids: __u64, 3558 pub name: [::std::os::raw::c_char; 16usize], 3559 pub ifindex: __u32, 3560 pub _bitfield_align_1: [u8; 0], 3561 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, 3562 pub netns_dev: __u64, 3563 pub netns_ino: __u64, 3564 pub nr_jited_ksyms: __u32, 3565 pub nr_jited_func_lens: __u32, 3566 pub jited_ksyms: __u64, 3567 pub jited_func_lens: __u64, 3568 pub btf_id: __u32, 3569 pub func_info_rec_size: __u32, 3570 pub func_info: __u64, 3571 pub nr_func_info: __u32, 3572 pub nr_line_info: __u32, 3573 pub line_info: __u64, 3574 pub jited_line_info: __u64, 3575 pub nr_jited_line_info: __u32, 3576 pub line_info_rec_size: __u32, 3577 pub jited_line_info_rec_size: __u32, 3578 pub nr_prog_tags: __u32, 3579 pub prog_tags: __u64, 3580 pub run_time_ns: __u64, 3581 pub run_cnt: __u64, 3582 pub recursion_misses: __u64, 3583 pub verified_insns: __u32, 3584 pub attach_btf_obj_id: __u32, 3585 pub attach_btf_id: __u32, 3586 pub __bindgen_padding_0: [u8; 4usize], 3587 } 3588 impl bpf_prog_info { 3589 #[inline] gpl_compatible(&self) -> __u323590 pub fn gpl_compatible(&self) -> __u32 { 3591 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } 3592 } 3593 #[inline] set_gpl_compatible(&mut self, val: __u32)3594 pub fn set_gpl_compatible(&mut self, val: __u32) { 3595 unsafe { 3596 let val: u32 = ::std::mem::transmute(val); 3597 self._bitfield_1.set(0usize, 1u8, val as u64) 3598 } 3599 } 3600 #[inline] new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]>3601 pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { 3602 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); 3603 __bindgen_bitfield_unit.set(0usize, 1u8, { 3604 let gpl_compatible: u32 = unsafe { ::std::mem::transmute(gpl_compatible) }; 3605 gpl_compatible as u64 3606 }); 3607 __bindgen_bitfield_unit 3608 } 3609 } 3610 #[repr(C)] 3611 #[derive(Debug, Default, Copy, Clone)] 3612 pub struct bpf_map_info { 3613 pub type_: __u32, 3614 pub id: __u32, 3615 pub key_size: __u32, 3616 pub value_size: __u32, 3617 pub max_entries: __u32, 3618 pub map_flags: __u32, 3619 pub name: [::std::os::raw::c_char; 16usize], 3620 pub ifindex: __u32, 3621 pub btf_vmlinux_value_type_id: __u32, 3622 pub netns_dev: __u64, 3623 pub netns_ino: __u64, 3624 pub btf_id: __u32, 3625 pub btf_key_type_id: __u32, 3626 pub btf_value_type_id: __u32, 3627 pub btf_vmlinux_id: __u32, 3628 pub map_extra: __u64, 3629 } 3630 #[repr(C)] 3631 #[derive(Debug, Default, Copy, Clone)] 3632 pub struct bpf_btf_info { 3633 pub btf: __u64, 3634 pub btf_size: __u32, 3635 pub id: __u32, 3636 pub name: __u64, 3637 pub name_len: __u32, 3638 pub kernel_btf: __u32, 3639 } 3640 #[repr(C)] 3641 #[derive(Copy, Clone)] 3642 pub struct bpf_link_info { 3643 pub type_: __u32, 3644 pub id: __u32, 3645 pub prog_id: __u32, 3646 pub __bindgen_padding_0: [u8; 4usize], 3647 pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1, 3648 } 3649 #[repr(C)] 3650 #[derive(Copy, Clone)] 3651 pub union bpf_link_info__bindgen_ty_1 { 3652 pub raw_tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_1, 3653 pub tracing: bpf_link_info__bindgen_ty_1__bindgen_ty_2, 3654 pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_3, 3655 pub iter: bpf_link_info__bindgen_ty_1__bindgen_ty_4, 3656 pub netns: bpf_link_info__bindgen_ty_1__bindgen_ty_5, 3657 pub xdp: bpf_link_info__bindgen_ty_1__bindgen_ty_6, 3658 pub struct_ops: bpf_link_info__bindgen_ty_1__bindgen_ty_7, 3659 pub netfilter: bpf_link_info__bindgen_ty_1__bindgen_ty_8, 3660 pub kprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_9, 3661 pub uprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_10, 3662 pub perf_event: bpf_link_info__bindgen_ty_1__bindgen_ty_11, 3663 pub tcx: bpf_link_info__bindgen_ty_1__bindgen_ty_12, 3664 pub netkit: bpf_link_info__bindgen_ty_1__bindgen_ty_13, 3665 } 3666 #[repr(C)] 3667 #[derive(Debug, Default, Copy, Clone)] 3668 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_1 { 3669 pub tp_name: __u64, 3670 pub tp_name_len: __u32, 3671 pub __bindgen_padding_0: [u8; 4usize], 3672 } 3673 #[repr(C)] 3674 #[derive(Debug, Default, Copy, Clone)] 3675 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_2 { 3676 pub attach_type: __u32, 3677 pub target_obj_id: __u32, 3678 pub target_btf_id: __u32, 3679 } 3680 #[repr(C)] 3681 #[derive(Debug, Default, Copy, Clone)] 3682 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_3 { 3683 pub cgroup_id: __u64, 3684 pub attach_type: __u32, 3685 pub __bindgen_padding_0: [u8; 4usize], 3686 } 3687 #[repr(C)] 3688 #[derive(Copy, Clone)] 3689 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4 { 3690 pub target_name: __u64, 3691 pub target_name_len: __u32, 3692 pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, 3693 pub __bindgen_anon_2: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2, 3694 } 3695 #[repr(C)] 3696 #[derive(Copy, Clone)] 3697 pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { 3698 pub map: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, 3699 } 3700 #[repr(C)] 3701 #[derive(Debug, Default, Copy, Clone)] 3702 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { 3703 pub map_id: __u32, 3704 } 3705 impl Default for bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { default() -> Self3706 fn default() -> Self { 3707 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3708 unsafe { 3709 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3710 s.assume_init() 3711 } 3712 } 3713 } 3714 #[repr(C)] 3715 #[derive(Copy, Clone)] 3716 pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 { 3717 pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1, 3718 pub task: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2, 3719 } 3720 #[repr(C)] 3721 #[derive(Debug, Default, Copy, Clone)] 3722 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 { 3723 pub cgroup_id: __u64, 3724 pub order: __u32, 3725 pub __bindgen_padding_0: [u8; 4usize], 3726 } 3727 #[repr(C)] 3728 #[derive(Debug, Default, Copy, Clone)] 3729 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 { 3730 pub tid: __u32, 3731 pub pid: __u32, 3732 } 3733 impl Default for bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 { default() -> Self3734 fn default() -> Self { 3735 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3736 unsafe { 3737 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3738 s.assume_init() 3739 } 3740 } 3741 } 3742 impl Default for bpf_link_info__bindgen_ty_1__bindgen_ty_4 { default() -> Self3743 fn default() -> Self { 3744 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3745 unsafe { 3746 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3747 s.assume_init() 3748 } 3749 } 3750 } 3751 #[repr(C)] 3752 #[derive(Debug, Default, Copy, Clone)] 3753 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 { 3754 pub netns_ino: __u32, 3755 pub attach_type: __u32, 3756 } 3757 #[repr(C)] 3758 #[derive(Debug, Default, Copy, Clone)] 3759 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 { 3760 pub ifindex: __u32, 3761 } 3762 #[repr(C)] 3763 #[derive(Debug, Default, Copy, Clone)] 3764 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_7 { 3765 pub map_id: __u32, 3766 } 3767 #[repr(C)] 3768 #[derive(Debug, Default, Copy, Clone)] 3769 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_8 { 3770 pub pf: __u32, 3771 pub hooknum: __u32, 3772 pub priority: __s32, 3773 pub flags: __u32, 3774 } 3775 #[repr(C)] 3776 #[derive(Debug, Default, Copy, Clone)] 3777 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_9 { 3778 pub addrs: __u64, 3779 pub count: __u32, 3780 pub flags: __u32, 3781 pub missed: __u64, 3782 pub cookies: __u64, 3783 } 3784 #[repr(C)] 3785 #[derive(Debug, Default, Copy, Clone)] 3786 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_10 { 3787 pub path: __u64, 3788 pub offsets: __u64, 3789 pub ref_ctr_offsets: __u64, 3790 pub cookies: __u64, 3791 pub path_size: __u32, 3792 pub count: __u32, 3793 pub flags: __u32, 3794 pub pid: __u32, 3795 } 3796 #[repr(C)] 3797 #[derive(Copy, Clone)] 3798 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11 { 3799 pub type_: __u32, 3800 pub _bitfield_align_1: [u8; 0], 3801 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, 3802 pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1, 3803 } 3804 #[repr(C)] 3805 #[derive(Copy, Clone)] 3806 pub union bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 { 3807 pub uprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1, 3808 pub kprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2, 3809 pub tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3, 3810 pub event: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4, 3811 } 3812 #[repr(C)] 3813 #[derive(Debug, Default, Copy, Clone)] 3814 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 { 3815 pub file_name: __u64, 3816 pub name_len: __u32, 3817 pub offset: __u32, 3818 pub cookie: __u64, 3819 } 3820 #[repr(C)] 3821 #[derive(Debug, Default, Copy, Clone)] 3822 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 { 3823 pub func_name: __u64, 3824 pub name_len: __u32, 3825 pub offset: __u32, 3826 pub addr: __u64, 3827 pub missed: __u64, 3828 pub cookie: __u64, 3829 } 3830 #[repr(C)] 3831 #[derive(Debug, Default, Copy, Clone)] 3832 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { 3833 pub tp_name: __u64, 3834 pub name_len: __u32, 3835 pub _bitfield_align_1: [u8; 0], 3836 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, 3837 pub cookie: __u64, 3838 } 3839 impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { 3840 #[inline] new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]>3841 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { 3842 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); 3843 __bindgen_bitfield_unit 3844 } 3845 } 3846 #[repr(C)] 3847 #[derive(Debug, Default, Copy, Clone)] 3848 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { 3849 pub config: __u64, 3850 pub type_: __u32, 3851 pub _bitfield_align_1: [u8; 0], 3852 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, 3853 pub cookie: __u64, 3854 } 3855 impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { 3856 #[inline] new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]>3857 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { 3858 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); 3859 __bindgen_bitfield_unit 3860 } 3861 } 3862 impl Default for bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 { default() -> Self3863 fn default() -> Self { 3864 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3865 unsafe { 3866 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3867 s.assume_init() 3868 } 3869 } 3870 } 3871 impl Default for bpf_link_info__bindgen_ty_1__bindgen_ty_11 { default() -> Self3872 fn default() -> Self { 3873 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3874 unsafe { 3875 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3876 s.assume_init() 3877 } 3878 } 3879 } 3880 impl bpf_link_info__bindgen_ty_1__bindgen_ty_11 { 3881 #[inline] new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]>3882 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { 3883 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); 3884 __bindgen_bitfield_unit 3885 } 3886 } 3887 #[repr(C)] 3888 #[derive(Debug, Default, Copy, Clone)] 3889 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_12 { 3890 pub ifindex: __u32, 3891 pub attach_type: __u32, 3892 } 3893 #[repr(C)] 3894 #[derive(Debug, Default, Copy, Clone)] 3895 pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { 3896 pub ifindex: __u32, 3897 pub attach_type: __u32, 3898 } 3899 impl Default for bpf_link_info__bindgen_ty_1 { default() -> Self3900 fn default() -> Self { 3901 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3902 unsafe { 3903 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3904 s.assume_init() 3905 } 3906 } 3907 } 3908 impl Default for bpf_link_info { default() -> Self3909 fn default() -> Self { 3910 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3911 unsafe { 3912 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3913 s.assume_init() 3914 } 3915 } 3916 } 3917 #[repr(C)] 3918 #[derive(Copy, Clone)] 3919 pub struct bpf_sock_addr { 3920 pub user_family: __u32, 3921 pub user_ip4: __u32, 3922 pub user_ip6: [__u32; 4usize], 3923 pub user_port: __u32, 3924 pub family: __u32, 3925 pub type_: __u32, 3926 pub protocol: __u32, 3927 pub msg_src_ip4: __u32, 3928 pub msg_src_ip6: [__u32; 4usize], 3929 pub __bindgen_padding_0: [u8; 4usize], 3930 pub __bindgen_anon_1: bpf_sock_addr__bindgen_ty_1, 3931 } 3932 #[repr(C)] 3933 #[derive(Copy, Clone)] 3934 pub union bpf_sock_addr__bindgen_ty_1 { 3935 pub sk: *mut bpf_sock, 3936 pub _bitfield_align_1: [u8; 0], 3937 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, 3938 } 3939 impl Default for bpf_sock_addr__bindgen_ty_1 { default() -> Self3940 fn default() -> Self { 3941 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3942 unsafe { 3943 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3944 s.assume_init() 3945 } 3946 } 3947 } 3948 impl bpf_sock_addr__bindgen_ty_1 { 3949 #[inline] new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]>3950 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { 3951 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); 3952 __bindgen_bitfield_unit 3953 } 3954 } 3955 impl Default for bpf_sock_addr { default() -> Self3956 fn default() -> Self { 3957 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 3958 unsafe { 3959 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 3960 s.assume_init() 3961 } 3962 } 3963 } 3964 #[repr(C)] 3965 #[derive(Copy, Clone)] 3966 pub struct bpf_sock_ops { 3967 pub op: __u32, 3968 pub __bindgen_anon_1: bpf_sock_ops__bindgen_ty_1, 3969 pub family: __u32, 3970 pub remote_ip4: __u32, 3971 pub local_ip4: __u32, 3972 pub remote_ip6: [__u32; 4usize], 3973 pub local_ip6: [__u32; 4usize], 3974 pub remote_port: __u32, 3975 pub local_port: __u32, 3976 pub is_fullsock: __u32, 3977 pub snd_cwnd: __u32, 3978 pub srtt_us: __u32, 3979 pub bpf_sock_ops_cb_flags: __u32, 3980 pub state: __u32, 3981 pub rtt_min: __u32, 3982 pub snd_ssthresh: __u32, 3983 pub rcv_nxt: __u32, 3984 pub snd_nxt: __u32, 3985 pub snd_una: __u32, 3986 pub mss_cache: __u32, 3987 pub ecn_flags: __u32, 3988 pub rate_delivered: __u32, 3989 pub rate_interval_us: __u32, 3990 pub packets_out: __u32, 3991 pub retrans_out: __u32, 3992 pub total_retrans: __u32, 3993 pub segs_in: __u32, 3994 pub data_segs_in: __u32, 3995 pub segs_out: __u32, 3996 pub data_segs_out: __u32, 3997 pub lost_out: __u32, 3998 pub sacked_out: __u32, 3999 pub sk_txhash: __u32, 4000 pub bytes_received: __u64, 4001 pub bytes_acked: __u64, 4002 pub __bindgen_anon_2: bpf_sock_ops__bindgen_ty_2, 4003 pub __bindgen_anon_3: bpf_sock_ops__bindgen_ty_3, 4004 pub __bindgen_anon_4: bpf_sock_ops__bindgen_ty_4, 4005 pub skb_len: __u32, 4006 pub skb_tcp_flags: __u32, 4007 pub skb_hwtstamp: __u64, 4008 } 4009 #[repr(C)] 4010 #[derive(Copy, Clone)] 4011 pub union bpf_sock_ops__bindgen_ty_1 { 4012 pub args: [__u32; 4usize], 4013 pub reply: __u32, 4014 pub replylong: [__u32; 4usize], 4015 } 4016 impl Default for bpf_sock_ops__bindgen_ty_1 { default() -> Self4017 fn default() -> Self { 4018 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4019 unsafe { 4020 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4021 s.assume_init() 4022 } 4023 } 4024 } 4025 #[repr(C)] 4026 #[derive(Copy, Clone)] 4027 pub union bpf_sock_ops__bindgen_ty_2 { 4028 pub sk: *mut bpf_sock, 4029 pub _bitfield_align_1: [u8; 0], 4030 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, 4031 } 4032 impl Default for bpf_sock_ops__bindgen_ty_2 { default() -> Self4033 fn default() -> Self { 4034 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4035 unsafe { 4036 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4037 s.assume_init() 4038 } 4039 } 4040 } 4041 impl bpf_sock_ops__bindgen_ty_2 { 4042 #[inline] new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]>4043 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { 4044 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); 4045 __bindgen_bitfield_unit 4046 } 4047 } 4048 #[repr(C)] 4049 #[derive(Copy, Clone)] 4050 pub union bpf_sock_ops__bindgen_ty_3 { 4051 pub skb_data: *mut ::std::os::raw::c_void, 4052 pub _bitfield_align_1: [u8; 0], 4053 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, 4054 } 4055 impl Default for bpf_sock_ops__bindgen_ty_3 { default() -> Self4056 fn default() -> Self { 4057 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4058 unsafe { 4059 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4060 s.assume_init() 4061 } 4062 } 4063 } 4064 impl bpf_sock_ops__bindgen_ty_3 { 4065 #[inline] new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]>4066 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { 4067 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); 4068 __bindgen_bitfield_unit 4069 } 4070 } 4071 #[repr(C)] 4072 #[derive(Copy, Clone)] 4073 pub union bpf_sock_ops__bindgen_ty_4 { 4074 pub skb_data_end: *mut ::std::os::raw::c_void, 4075 pub _bitfield_align_1: [u8; 0], 4076 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, 4077 } 4078 impl Default for bpf_sock_ops__bindgen_ty_4 { default() -> Self4079 fn default() -> Self { 4080 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4081 unsafe { 4082 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4083 s.assume_init() 4084 } 4085 } 4086 } 4087 impl bpf_sock_ops__bindgen_ty_4 { 4088 #[inline] new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]>4089 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { 4090 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); 4091 __bindgen_bitfield_unit 4092 } 4093 } 4094 impl Default for bpf_sock_ops { default() -> Self4095 fn default() -> Self { 4096 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4097 unsafe { 4098 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4099 s.assume_init() 4100 } 4101 } 4102 } 4103 pub const BPF_SOCK_OPS_RTO_CB_FLAG: _bindgen_ty_89 = 1; 4104 pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: _bindgen_ty_89 = 2; 4105 pub const BPF_SOCK_OPS_STATE_CB_FLAG: _bindgen_ty_89 = 4; 4106 pub const BPF_SOCK_OPS_RTT_CB_FLAG: _bindgen_ty_89 = 8; 4107 pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_89 = 16; 4108 pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_89 = 32; 4109 pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_89 = 64; 4110 pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_89 = 127; 4111 pub type _bindgen_ty_89 = ::std::os::raw::c_uint; 4112 pub const BPF_SOCK_OPS_VOID: _bindgen_ty_90 = 0; 4113 pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_90 = 1; 4114 pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_90 = 2; 4115 pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_90 = 3; 4116 pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_90 = 4; 4117 pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_90 = 5; 4118 pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_90 = 6; 4119 pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_90 = 7; 4120 pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_90 = 8; 4121 pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_90 = 9; 4122 pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_90 = 10; 4123 pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_90 = 11; 4124 pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_90 = 12; 4125 pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_90 = 13; 4126 pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_90 = 14; 4127 pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_90 = 15; 4128 pub type _bindgen_ty_90 = ::std::os::raw::c_uint; 4129 pub const BPF_TCP_ESTABLISHED: _bindgen_ty_91 = 1; 4130 pub const BPF_TCP_SYN_SENT: _bindgen_ty_91 = 2; 4131 pub const BPF_TCP_SYN_RECV: _bindgen_ty_91 = 3; 4132 pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_91 = 4; 4133 pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_91 = 5; 4134 pub const BPF_TCP_TIME_WAIT: _bindgen_ty_91 = 6; 4135 pub const BPF_TCP_CLOSE: _bindgen_ty_91 = 7; 4136 pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_91 = 8; 4137 pub const BPF_TCP_LAST_ACK: _bindgen_ty_91 = 9; 4138 pub const BPF_TCP_LISTEN: _bindgen_ty_91 = 10; 4139 pub const BPF_TCP_CLOSING: _bindgen_ty_91 = 11; 4140 pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_91 = 12; 4141 pub const BPF_TCP_BOUND_INACTIVE: _bindgen_ty_91 = 13; 4142 pub const BPF_TCP_MAX_STATES: _bindgen_ty_91 = 14; 4143 pub type _bindgen_ty_91 = ::std::os::raw::c_uint; 4144 pub const BPF_LOAD_HDR_OPT_TCP_SYN: _bindgen_ty_93 = 1; 4145 pub type _bindgen_ty_93 = ::std::os::raw::c_uint; 4146 pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: _bindgen_ty_94 = 1; 4147 pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: _bindgen_ty_94 = 2; 4148 pub type _bindgen_ty_94 = ::std::os::raw::c_uint; 4149 #[repr(C)] 4150 #[derive(Debug, Default, Copy, Clone)] 4151 pub struct bpf_perf_event_value { 4152 pub counter: __u64, 4153 pub enabled: __u64, 4154 pub running: __u64, 4155 } 4156 pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_95 = 1; 4157 pub const BPF_DEVCG_ACC_READ: _bindgen_ty_95 = 2; 4158 pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_95 = 4; 4159 pub type _bindgen_ty_95 = ::std::os::raw::c_uint; 4160 pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_96 = 1; 4161 pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_96 = 2; 4162 pub type _bindgen_ty_96 = ::std::os::raw::c_uint; 4163 #[repr(C)] 4164 #[derive(Debug, Default, Copy, Clone)] 4165 pub struct bpf_cgroup_dev_ctx { 4166 pub access_type: __u32, 4167 pub major: __u32, 4168 pub minor: __u32, 4169 } 4170 #[repr(C)] 4171 #[derive(Debug, Default)] 4172 pub struct bpf_raw_tracepoint_args { 4173 pub args: __IncompleteArrayField<__u64>, 4174 } 4175 pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_97 = 1; 4176 pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_97 = 2; 4177 pub const BPF_FIB_LOOKUP_SKIP_NEIGH: _bindgen_ty_97 = 4; 4178 pub const BPF_FIB_LOOKUP_TBID: _bindgen_ty_97 = 8; 4179 pub const BPF_FIB_LOOKUP_SRC: _bindgen_ty_97 = 16; 4180 pub type _bindgen_ty_97 = ::std::os::raw::c_uint; 4181 pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_98 = 0; 4182 pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_98 = 1; 4183 pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_98 = 2; 4184 pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_98 = 3; 4185 pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_98 = 4; 4186 pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_98 = 5; 4187 pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_98 = 6; 4188 pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_98 = 7; 4189 pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_98 = 8; 4190 pub const BPF_FIB_LKUP_RET_NO_SRC_ADDR: _bindgen_ty_98 = 9; 4191 pub type _bindgen_ty_98 = ::std::os::raw::c_uint; 4192 #[repr(C)] 4193 #[derive(Copy, Clone)] 4194 pub struct bpf_fib_lookup { 4195 pub family: __u8, 4196 pub l4_protocol: __u8, 4197 pub sport: __be16, 4198 pub dport: __be16, 4199 pub __bindgen_anon_1: bpf_fib_lookup__bindgen_ty_1, 4200 pub ifindex: __u32, 4201 pub __bindgen_anon_2: bpf_fib_lookup__bindgen_ty_2, 4202 pub __bindgen_anon_3: bpf_fib_lookup__bindgen_ty_3, 4203 pub __bindgen_anon_4: bpf_fib_lookup__bindgen_ty_4, 4204 pub __bindgen_anon_5: bpf_fib_lookup__bindgen_ty_5, 4205 pub smac: [__u8; 6usize], 4206 pub dmac: [__u8; 6usize], 4207 } 4208 #[repr(C)] 4209 #[derive(Copy, Clone)] 4210 pub union bpf_fib_lookup__bindgen_ty_1 { 4211 pub tot_len: __u16, 4212 pub mtu_result: __u16, 4213 } 4214 impl Default for bpf_fib_lookup__bindgen_ty_1 { default() -> Self4215 fn default() -> Self { 4216 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4217 unsafe { 4218 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4219 s.assume_init() 4220 } 4221 } 4222 } 4223 #[repr(C)] 4224 #[derive(Copy, Clone)] 4225 pub union bpf_fib_lookup__bindgen_ty_2 { 4226 pub tos: __u8, 4227 pub flowinfo: __be32, 4228 pub rt_metric: __u32, 4229 } 4230 impl Default for bpf_fib_lookup__bindgen_ty_2 { default() -> Self4231 fn default() -> Self { 4232 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4233 unsafe { 4234 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4235 s.assume_init() 4236 } 4237 } 4238 } 4239 #[repr(C)] 4240 #[derive(Copy, Clone)] 4241 pub union bpf_fib_lookup__bindgen_ty_3 { 4242 pub ipv4_src: __be32, 4243 pub ipv6_src: [__u32; 4usize], 4244 } 4245 impl Default for bpf_fib_lookup__bindgen_ty_3 { default() -> Self4246 fn default() -> Self { 4247 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4248 unsafe { 4249 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4250 s.assume_init() 4251 } 4252 } 4253 } 4254 #[repr(C)] 4255 #[derive(Copy, Clone)] 4256 pub union bpf_fib_lookup__bindgen_ty_4 { 4257 pub ipv4_dst: __be32, 4258 pub ipv6_dst: [__u32; 4usize], 4259 } 4260 impl Default for bpf_fib_lookup__bindgen_ty_4 { default() -> Self4261 fn default() -> Self { 4262 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4263 unsafe { 4264 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4265 s.assume_init() 4266 } 4267 } 4268 } 4269 #[repr(C)] 4270 #[derive(Copy, Clone)] 4271 pub union bpf_fib_lookup__bindgen_ty_5 { 4272 pub __bindgen_anon_1: bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1, 4273 pub tbid: __u32, 4274 } 4275 #[repr(C)] 4276 #[derive(Debug, Default, Copy, Clone)] 4277 pub struct bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1 { 4278 pub h_vlan_proto: __be16, 4279 pub h_vlan_TCI: __be16, 4280 } 4281 impl Default for bpf_fib_lookup__bindgen_ty_5 { default() -> Self4282 fn default() -> Self { 4283 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4284 unsafe { 4285 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4286 s.assume_init() 4287 } 4288 } 4289 } 4290 impl Default for bpf_fib_lookup { default() -> Self4291 fn default() -> Self { 4292 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4293 unsafe { 4294 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4295 s.assume_init() 4296 } 4297 } 4298 } 4299 #[repr(C)] 4300 #[derive(Copy, Clone)] 4301 pub struct bpf_redir_neigh { 4302 pub nh_family: __u32, 4303 pub __bindgen_anon_1: bpf_redir_neigh__bindgen_ty_1, 4304 } 4305 #[repr(C)] 4306 #[derive(Copy, Clone)] 4307 pub union bpf_redir_neigh__bindgen_ty_1 { 4308 pub ipv4_nh: __be32, 4309 pub ipv6_nh: [__u32; 4usize], 4310 } 4311 impl Default for bpf_redir_neigh__bindgen_ty_1 { default() -> Self4312 fn default() -> Self { 4313 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4314 unsafe { 4315 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4316 s.assume_init() 4317 } 4318 } 4319 } 4320 impl Default for bpf_redir_neigh { default() -> Self4321 fn default() -> Self { 4322 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4323 unsafe { 4324 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4325 s.assume_init() 4326 } 4327 } 4328 } 4329 pub const BPF_MTU_CHK_SEGS: bpf_check_mtu_flags = 1; 4330 pub type bpf_check_mtu_flags = ::std::os::raw::c_uint; 4331 pub const BPF_MTU_CHK_RET_SUCCESS: bpf_check_mtu_ret = 0; 4332 pub const BPF_MTU_CHK_RET_FRAG_NEEDED: bpf_check_mtu_ret = 1; 4333 pub const BPF_MTU_CHK_RET_SEGS_TOOBIG: bpf_check_mtu_ret = 2; 4334 pub type bpf_check_mtu_ret = ::std::os::raw::c_uint; 4335 pub const BPF_FD_TYPE_RAW_TRACEPOINT: bpf_task_fd_type = 0; 4336 pub const BPF_FD_TYPE_TRACEPOINT: bpf_task_fd_type = 1; 4337 pub const BPF_FD_TYPE_KPROBE: bpf_task_fd_type = 2; 4338 pub const BPF_FD_TYPE_KRETPROBE: bpf_task_fd_type = 3; 4339 pub const BPF_FD_TYPE_UPROBE: bpf_task_fd_type = 4; 4340 pub const BPF_FD_TYPE_URETPROBE: bpf_task_fd_type = 5; 4341 pub type bpf_task_fd_type = ::std::os::raw::c_uint; 4342 pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_99 = 1; 4343 pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_99 = 2; 4344 pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_99 = 4; 4345 pub type _bindgen_ty_99 = ::std::os::raw::c_uint; 4346 #[repr(C)] 4347 #[derive(Copy, Clone)] 4348 pub struct bpf_flow_keys { 4349 pub nhoff: __u16, 4350 pub thoff: __u16, 4351 pub addr_proto: __u16, 4352 pub is_frag: __u8, 4353 pub is_first_frag: __u8, 4354 pub is_encap: __u8, 4355 pub ip_proto: __u8, 4356 pub n_proto: __be16, 4357 pub sport: __be16, 4358 pub dport: __be16, 4359 pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1, 4360 pub flags: __u32, 4361 pub flow_label: __be32, 4362 } 4363 #[repr(C)] 4364 #[derive(Copy, Clone)] 4365 pub union bpf_flow_keys__bindgen_ty_1 { 4366 pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1__bindgen_ty_1, 4367 pub __bindgen_anon_2: bpf_flow_keys__bindgen_ty_1__bindgen_ty_2, 4368 } 4369 #[repr(C)] 4370 #[derive(Debug, Default, Copy, Clone)] 4371 pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 { 4372 pub ipv4_src: __be32, 4373 pub ipv4_dst: __be32, 4374 } 4375 #[repr(C)] 4376 #[derive(Debug, Default, Copy, Clone)] 4377 pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 { 4378 pub ipv6_src: [__u32; 4usize], 4379 pub ipv6_dst: [__u32; 4usize], 4380 } 4381 impl Default for bpf_flow_keys__bindgen_ty_1 { default() -> Self4382 fn default() -> Self { 4383 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4384 unsafe { 4385 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4386 s.assume_init() 4387 } 4388 } 4389 } 4390 impl Default for bpf_flow_keys { default() -> Self4391 fn default() -> Self { 4392 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4393 unsafe { 4394 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4395 s.assume_init() 4396 } 4397 } 4398 } 4399 #[repr(C)] 4400 #[derive(Debug, Default, Copy, Clone)] 4401 pub struct bpf_func_info { 4402 pub insn_off: __u32, 4403 pub type_id: __u32, 4404 } 4405 #[repr(C)] 4406 #[derive(Debug, Default, Copy, Clone)] 4407 pub struct bpf_line_info { 4408 pub insn_off: __u32, 4409 pub file_name_off: __u32, 4410 pub line_off: __u32, 4411 pub line_col: __u32, 4412 } 4413 #[repr(C)] 4414 #[derive(Debug, Default, Copy, Clone)] 4415 pub struct bpf_spin_lock { 4416 pub val: __u32, 4417 } 4418 #[repr(C)] 4419 #[derive(Debug, Default, Copy, Clone)] 4420 pub struct bpf_timer { 4421 pub __opaque: [__u64; 2usize], 4422 } 4423 #[repr(C)] 4424 #[derive(Debug, Default, Copy, Clone)] 4425 pub struct bpf_dynptr { 4426 pub __opaque: [__u64; 2usize], 4427 } 4428 #[repr(C)] 4429 #[derive(Debug, Default, Copy, Clone)] 4430 pub struct bpf_list_head { 4431 pub __opaque: [__u64; 2usize], 4432 } 4433 #[repr(C)] 4434 #[derive(Debug, Default, Copy, Clone)] 4435 pub struct bpf_list_node { 4436 pub __opaque: [__u64; 3usize], 4437 } 4438 #[repr(C)] 4439 #[derive(Debug, Default, Copy, Clone)] 4440 pub struct bpf_rb_root { 4441 pub __opaque: [__u64; 2usize], 4442 } 4443 #[repr(C)] 4444 #[derive(Debug, Default, Copy, Clone)] 4445 pub struct bpf_rb_node { 4446 pub __opaque: [__u64; 4usize], 4447 } 4448 #[repr(C)] 4449 #[derive(Debug, Default, Copy, Clone)] 4450 pub struct bpf_refcount { 4451 pub __opaque: [__u32; 1usize], 4452 } 4453 #[repr(C)] 4454 #[derive(Debug, Default, Copy, Clone)] 4455 pub struct bpf_sysctl { 4456 pub write: __u32, 4457 pub file_pos: __u32, 4458 } 4459 #[repr(C)] 4460 #[derive(Copy, Clone)] 4461 pub struct bpf_sockopt { 4462 pub __bindgen_anon_1: bpf_sockopt__bindgen_ty_1, 4463 pub __bindgen_anon_2: bpf_sockopt__bindgen_ty_2, 4464 pub __bindgen_anon_3: bpf_sockopt__bindgen_ty_3, 4465 pub level: __s32, 4466 pub optname: __s32, 4467 pub optlen: __s32, 4468 pub retval: __s32, 4469 } 4470 #[repr(C)] 4471 #[derive(Copy, Clone)] 4472 pub union bpf_sockopt__bindgen_ty_1 { 4473 pub sk: *mut bpf_sock, 4474 pub _bitfield_align_1: [u8; 0], 4475 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, 4476 } 4477 impl Default for bpf_sockopt__bindgen_ty_1 { default() -> Self4478 fn default() -> Self { 4479 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4480 unsafe { 4481 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4482 s.assume_init() 4483 } 4484 } 4485 } 4486 impl bpf_sockopt__bindgen_ty_1 { 4487 #[inline] new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]>4488 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { 4489 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); 4490 __bindgen_bitfield_unit 4491 } 4492 } 4493 #[repr(C)] 4494 #[derive(Copy, Clone)] 4495 pub union bpf_sockopt__bindgen_ty_2 { 4496 pub optval: *mut ::std::os::raw::c_void, 4497 pub _bitfield_align_1: [u8; 0], 4498 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, 4499 } 4500 impl Default for bpf_sockopt__bindgen_ty_2 { default() -> Self4501 fn default() -> Self { 4502 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4503 unsafe { 4504 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4505 s.assume_init() 4506 } 4507 } 4508 } 4509 impl bpf_sockopt__bindgen_ty_2 { 4510 #[inline] new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]>4511 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { 4512 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); 4513 __bindgen_bitfield_unit 4514 } 4515 } 4516 #[repr(C)] 4517 #[derive(Copy, Clone)] 4518 pub union bpf_sockopt__bindgen_ty_3 { 4519 pub optval_end: *mut ::std::os::raw::c_void, 4520 pub _bitfield_align_1: [u8; 0], 4521 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, 4522 } 4523 impl Default for bpf_sockopt__bindgen_ty_3 { default() -> Self4524 fn default() -> Self { 4525 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4526 unsafe { 4527 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4528 s.assume_init() 4529 } 4530 } 4531 } 4532 impl bpf_sockopt__bindgen_ty_3 { 4533 #[inline] new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]>4534 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { 4535 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); 4536 __bindgen_bitfield_unit 4537 } 4538 } 4539 impl Default for bpf_sockopt { default() -> Self4540 fn default() -> Self { 4541 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4542 unsafe { 4543 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4544 s.assume_init() 4545 } 4546 } 4547 } 4548 #[repr(C)] 4549 #[derive(Debug, Default, Copy, Clone)] 4550 pub struct bpf_pidns_info { 4551 pub pid: __u32, 4552 pub tgid: __u32, 4553 } 4554 #[repr(C)] 4555 #[derive(Copy, Clone)] 4556 pub struct bpf_sk_lookup { 4557 pub __bindgen_anon_1: bpf_sk_lookup__bindgen_ty_1, 4558 pub family: __u32, 4559 pub protocol: __u32, 4560 pub remote_ip4: __u32, 4561 pub remote_ip6: [__u32; 4usize], 4562 pub remote_port: __be16, 4563 pub _bitfield_align_1: [u8; 0], 4564 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, 4565 pub local_ip4: __u32, 4566 pub local_ip6: [__u32; 4usize], 4567 pub local_port: __u32, 4568 pub ingress_ifindex: __u32, 4569 pub __bindgen_padding_0: [u8; 4usize], 4570 } 4571 #[repr(C)] 4572 #[derive(Copy, Clone)] 4573 pub union bpf_sk_lookup__bindgen_ty_1 { 4574 pub __bindgen_anon_1: bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1, 4575 pub cookie: __u64, 4576 } 4577 #[repr(C)] 4578 #[derive(Copy, Clone)] 4579 pub union bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 { 4580 pub sk: *mut bpf_sock, 4581 pub _bitfield_align_1: [u8; 0], 4582 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, 4583 } 4584 impl Default for bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 { default() -> Self4585 fn default() -> Self { 4586 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4587 unsafe { 4588 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4589 s.assume_init() 4590 } 4591 } 4592 } 4593 impl bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 { 4594 #[inline] new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]>4595 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { 4596 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); 4597 __bindgen_bitfield_unit 4598 } 4599 } 4600 impl Default for bpf_sk_lookup__bindgen_ty_1 { default() -> Self4601 fn default() -> Self { 4602 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4603 unsafe { 4604 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4605 s.assume_init() 4606 } 4607 } 4608 } 4609 impl Default for bpf_sk_lookup { default() -> Self4610 fn default() -> Self { 4611 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4612 unsafe { 4613 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4614 s.assume_init() 4615 } 4616 } 4617 } 4618 impl bpf_sk_lookup { 4619 #[inline] new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]>4620 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> { 4621 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); 4622 __bindgen_bitfield_unit 4623 } 4624 } 4625 #[repr(C)] 4626 #[derive(Debug, Copy, Clone)] 4627 pub struct btf_ptr { 4628 pub ptr: *mut ::std::os::raw::c_void, 4629 pub type_id: __u32, 4630 pub flags: __u32, 4631 } 4632 impl Default for btf_ptr { default() -> Self4633 fn default() -> Self { 4634 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4635 unsafe { 4636 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4637 s.assume_init() 4638 } 4639 } 4640 } 4641 pub const BTF_F_COMPACT: _bindgen_ty_100 = 1; 4642 pub const BTF_F_NONAME: _bindgen_ty_100 = 2; 4643 pub const BTF_F_PTR_RAW: _bindgen_ty_100 = 4; 4644 pub const BTF_F_ZERO: _bindgen_ty_100 = 8; 4645 pub type _bindgen_ty_100 = ::std::os::raw::c_uint; 4646 pub const BPF_CORE_FIELD_BYTE_OFFSET: bpf_core_relo_kind = 0; 4647 pub const BPF_CORE_FIELD_BYTE_SIZE: bpf_core_relo_kind = 1; 4648 pub const BPF_CORE_FIELD_EXISTS: bpf_core_relo_kind = 2; 4649 pub const BPF_CORE_FIELD_SIGNED: bpf_core_relo_kind = 3; 4650 pub const BPF_CORE_FIELD_LSHIFT_U64: bpf_core_relo_kind = 4; 4651 pub const BPF_CORE_FIELD_RSHIFT_U64: bpf_core_relo_kind = 5; 4652 pub const BPF_CORE_TYPE_ID_LOCAL: bpf_core_relo_kind = 6; 4653 pub const BPF_CORE_TYPE_ID_TARGET: bpf_core_relo_kind = 7; 4654 pub const BPF_CORE_TYPE_EXISTS: bpf_core_relo_kind = 8; 4655 pub const BPF_CORE_TYPE_SIZE: bpf_core_relo_kind = 9; 4656 pub const BPF_CORE_ENUMVAL_EXISTS: bpf_core_relo_kind = 10; 4657 pub const BPF_CORE_ENUMVAL_VALUE: bpf_core_relo_kind = 11; 4658 pub const BPF_CORE_TYPE_MATCHES: bpf_core_relo_kind = 12; 4659 pub type bpf_core_relo_kind = ::std::os::raw::c_uint; 4660 #[repr(C)] 4661 #[derive(Debug, Copy, Clone)] 4662 pub struct bpf_core_relo { 4663 pub insn_off: __u32, 4664 pub type_id: __u32, 4665 pub access_str_off: __u32, 4666 pub kind: bpf_core_relo_kind, 4667 } 4668 impl Default for bpf_core_relo { default() -> Self4669 fn default() -> Self { 4670 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4671 unsafe { 4672 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4673 s.assume_init() 4674 } 4675 } 4676 } 4677 pub const BPF_F_TIMER_ABS: _bindgen_ty_101 = 1; 4678 pub const BPF_F_TIMER_CPU_PIN: _bindgen_ty_101 = 2; 4679 pub type _bindgen_ty_101 = ::std::os::raw::c_uint; 4680 #[repr(C)] 4681 #[derive(Debug, Default, Copy, Clone)] 4682 pub struct bpf_iter_num { 4683 pub __opaque: [__u64; 1usize], 4684 } 4685 pub const LIBBPF_STRICT_ALL: libbpf_strict_mode = 4294967295; 4686 pub const LIBBPF_STRICT_NONE: libbpf_strict_mode = 0; 4687 pub const LIBBPF_STRICT_CLEAN_PTRS: libbpf_strict_mode = 1; 4688 pub const LIBBPF_STRICT_DIRECT_ERRS: libbpf_strict_mode = 2; 4689 pub const LIBBPF_STRICT_SEC_NAME: libbpf_strict_mode = 4; 4690 pub const LIBBPF_STRICT_NO_OBJECT_LIST: libbpf_strict_mode = 8; 4691 pub const LIBBPF_STRICT_AUTO_RLIMIT_MEMLOCK: libbpf_strict_mode = 16; 4692 pub const LIBBPF_STRICT_MAP_DEFINITIONS: libbpf_strict_mode = 32; 4693 pub const __LIBBPF_STRICT_LAST: libbpf_strict_mode = 33; 4694 pub type libbpf_strict_mode = ::std::os::raw::c_uint; 4695 extern "C" { libbpf_set_strict_mode(mode: libbpf_strict_mode) -> ::std::os::raw::c_int4696 pub fn libbpf_set_strict_mode(mode: libbpf_strict_mode) -> ::std::os::raw::c_int; 4697 } 4698 extern "C" { libbpf_get_error(ptr: *const ::std::os::raw::c_void) -> ::std::os::raw::c_long4699 pub fn libbpf_get_error(ptr: *const ::std::os::raw::c_void) -> ::std::os::raw::c_long; 4700 } 4701 #[repr(C)] 4702 #[derive(Debug, Copy, Clone)] 4703 pub struct bpf_program { 4704 _unused: [u8; 0], 4705 } 4706 #[repr(C)] 4707 #[derive(Debug, Copy, Clone)] 4708 pub struct bpf_map { 4709 _unused: [u8; 0], 4710 } 4711 #[repr(C)] 4712 #[derive(Debug, Copy, Clone)] 4713 pub struct btf { 4714 _unused: [u8; 0], 4715 } 4716 #[repr(C)] 4717 #[derive(Debug, Copy, Clone)] 4718 pub struct btf_ext { 4719 _unused: [u8; 0], 4720 } 4721 extern "C" { libbpf_find_kernel_btf() -> *mut btf4722 pub fn libbpf_find_kernel_btf() -> *mut btf; 4723 } 4724 extern "C" { bpf_program__get_type(prog: *const bpf_program) -> bpf_prog_type4725 pub fn bpf_program__get_type(prog: *const bpf_program) -> bpf_prog_type; 4726 } 4727 extern "C" { bpf_program__get_expected_attach_type(prog: *const bpf_program) -> bpf_attach_type4728 pub fn bpf_program__get_expected_attach_type(prog: *const bpf_program) -> bpf_attach_type; 4729 } 4730 extern "C" { bpf_map__get_pin_path(map: *const bpf_map) -> *const ::std::os::raw::c_char4731 pub fn bpf_map__get_pin_path(map: *const bpf_map) -> *const ::std::os::raw::c_char; 4732 } 4733 extern "C" { btf__get_raw_data(btf: *const btf, size: *mut __u32) -> *const ::std::os::raw::c_void4734 pub fn btf__get_raw_data(btf: *const btf, size: *mut __u32) -> *const ::std::os::raw::c_void; 4735 } 4736 extern "C" { btf_ext__get_raw_data( btf_ext: *const btf_ext, size: *mut __u32, ) -> *const ::std::os::raw::c_void4737 pub fn btf_ext__get_raw_data( 4738 btf_ext: *const btf_ext, 4739 size: *mut __u32, 4740 ) -> *const ::std::os::raw::c_void; 4741 } 4742 extern "C" { libbpf_set_memlock_rlim(memlock_bytes: size_t) -> ::std::os::raw::c_int4743 pub fn libbpf_set_memlock_rlim(memlock_bytes: size_t) -> ::std::os::raw::c_int; 4744 } 4745 #[repr(C)] 4746 #[derive(Debug, Default, Copy, Clone)] 4747 pub struct bpf_map_create_opts { 4748 pub sz: size_t, 4749 pub btf_fd: __u32, 4750 pub btf_key_type_id: __u32, 4751 pub btf_value_type_id: __u32, 4752 pub btf_vmlinux_value_type_id: __u32, 4753 pub inner_map_fd: __u32, 4754 pub map_flags: __u32, 4755 pub map_extra: __u64, 4756 pub numa_node: __u32, 4757 pub map_ifindex: __u32, 4758 pub value_type_btf_obj_fd: __s32, 4759 pub token_fd: __u32, 4760 } 4761 extern "C" { bpf_map_create( map_type: bpf_map_type, map_name: *const ::std::os::raw::c_char, key_size: __u32, value_size: __u32, max_entries: __u32, opts: *const bpf_map_create_opts, ) -> ::std::os::raw::c_int4762 pub fn bpf_map_create( 4763 map_type: bpf_map_type, 4764 map_name: *const ::std::os::raw::c_char, 4765 key_size: __u32, 4766 value_size: __u32, 4767 max_entries: __u32, 4768 opts: *const bpf_map_create_opts, 4769 ) -> ::std::os::raw::c_int; 4770 } 4771 #[repr(C)] 4772 #[derive(Debug, Copy, Clone)] 4773 pub struct bpf_prog_load_opts { 4774 pub sz: size_t, 4775 pub attempts: ::std::os::raw::c_int, 4776 pub expected_attach_type: bpf_attach_type, 4777 pub prog_btf_fd: __u32, 4778 pub prog_flags: __u32, 4779 pub prog_ifindex: __u32, 4780 pub kern_version: __u32, 4781 pub attach_btf_id: __u32, 4782 pub attach_prog_fd: __u32, 4783 pub attach_btf_obj_fd: __u32, 4784 pub __bindgen_padding_0: [u8; 4usize], 4785 pub fd_array: *const ::std::os::raw::c_int, 4786 pub func_info: *const ::std::os::raw::c_void, 4787 pub func_info_cnt: __u32, 4788 pub func_info_rec_size: __u32, 4789 pub line_info: *const ::std::os::raw::c_void, 4790 pub line_info_cnt: __u32, 4791 pub line_info_rec_size: __u32, 4792 pub log_level: __u32, 4793 pub log_size: __u32, 4794 pub log_buf: *mut ::std::os::raw::c_char, 4795 pub log_true_size: __u32, 4796 pub token_fd: __u32, 4797 } 4798 impl Default for bpf_prog_load_opts { default() -> Self4799 fn default() -> Self { 4800 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4801 unsafe { 4802 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4803 s.assume_init() 4804 } 4805 } 4806 } 4807 extern "C" { bpf_prog_load( prog_type: bpf_prog_type, prog_name: *const ::std::os::raw::c_char, license: *const ::std::os::raw::c_char, insns: *const bpf_insn, insn_cnt: size_t, opts: *mut bpf_prog_load_opts, ) -> ::std::os::raw::c_int4808 pub fn bpf_prog_load( 4809 prog_type: bpf_prog_type, 4810 prog_name: *const ::std::os::raw::c_char, 4811 license: *const ::std::os::raw::c_char, 4812 insns: *const bpf_insn, 4813 insn_cnt: size_t, 4814 opts: *mut bpf_prog_load_opts, 4815 ) -> ::std::os::raw::c_int; 4816 } 4817 #[repr(C)] 4818 #[derive(Debug, Copy, Clone)] 4819 pub struct bpf_btf_load_opts { 4820 pub sz: size_t, 4821 pub log_buf: *mut ::std::os::raw::c_char, 4822 pub log_level: __u32, 4823 pub log_size: __u32, 4824 pub log_true_size: __u32, 4825 pub btf_flags: __u32, 4826 pub token_fd: __u32, 4827 pub __bindgen_padding_0: [u8; 4usize], 4828 } 4829 impl Default for bpf_btf_load_opts { default() -> Self4830 fn default() -> Self { 4831 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 4832 unsafe { 4833 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 4834 s.assume_init() 4835 } 4836 } 4837 } 4838 extern "C" { bpf_btf_load( btf_data: *const ::std::os::raw::c_void, btf_size: size_t, opts: *mut bpf_btf_load_opts, ) -> ::std::os::raw::c_int4839 pub fn bpf_btf_load( 4840 btf_data: *const ::std::os::raw::c_void, 4841 btf_size: size_t, 4842 opts: *mut bpf_btf_load_opts, 4843 ) -> ::std::os::raw::c_int; 4844 } 4845 extern "C" { bpf_map_update_elem( fd: ::std::os::raw::c_int, key: *const ::std::os::raw::c_void, value: *const ::std::os::raw::c_void, flags: __u64, ) -> ::std::os::raw::c_int4846 pub fn bpf_map_update_elem( 4847 fd: ::std::os::raw::c_int, 4848 key: *const ::std::os::raw::c_void, 4849 value: *const ::std::os::raw::c_void, 4850 flags: __u64, 4851 ) -> ::std::os::raw::c_int; 4852 } 4853 extern "C" { bpf_map_lookup_elem( fd: ::std::os::raw::c_int, key: *const ::std::os::raw::c_void, value: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int4854 pub fn bpf_map_lookup_elem( 4855 fd: ::std::os::raw::c_int, 4856 key: *const ::std::os::raw::c_void, 4857 value: *mut ::std::os::raw::c_void, 4858 ) -> ::std::os::raw::c_int; 4859 } 4860 extern "C" { bpf_map_lookup_elem_flags( fd: ::std::os::raw::c_int, key: *const ::std::os::raw::c_void, value: *mut ::std::os::raw::c_void, flags: __u64, ) -> ::std::os::raw::c_int4861 pub fn bpf_map_lookup_elem_flags( 4862 fd: ::std::os::raw::c_int, 4863 key: *const ::std::os::raw::c_void, 4864 value: *mut ::std::os::raw::c_void, 4865 flags: __u64, 4866 ) -> ::std::os::raw::c_int; 4867 } 4868 extern "C" { bpf_map_lookup_and_delete_elem( fd: ::std::os::raw::c_int, key: *const ::std::os::raw::c_void, value: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int4869 pub fn bpf_map_lookup_and_delete_elem( 4870 fd: ::std::os::raw::c_int, 4871 key: *const ::std::os::raw::c_void, 4872 value: *mut ::std::os::raw::c_void, 4873 ) -> ::std::os::raw::c_int; 4874 } 4875 extern "C" { bpf_map_lookup_and_delete_elem_flags( fd: ::std::os::raw::c_int, key: *const ::std::os::raw::c_void, value: *mut ::std::os::raw::c_void, flags: __u64, ) -> ::std::os::raw::c_int4876 pub fn bpf_map_lookup_and_delete_elem_flags( 4877 fd: ::std::os::raw::c_int, 4878 key: *const ::std::os::raw::c_void, 4879 value: *mut ::std::os::raw::c_void, 4880 flags: __u64, 4881 ) -> ::std::os::raw::c_int; 4882 } 4883 extern "C" { bpf_map_delete_elem( fd: ::std::os::raw::c_int, key: *const ::std::os::raw::c_void, ) -> ::std::os::raw::c_int4884 pub fn bpf_map_delete_elem( 4885 fd: ::std::os::raw::c_int, 4886 key: *const ::std::os::raw::c_void, 4887 ) -> ::std::os::raw::c_int; 4888 } 4889 extern "C" { bpf_map_delete_elem_flags( fd: ::std::os::raw::c_int, key: *const ::std::os::raw::c_void, flags: __u64, ) -> ::std::os::raw::c_int4890 pub fn bpf_map_delete_elem_flags( 4891 fd: ::std::os::raw::c_int, 4892 key: *const ::std::os::raw::c_void, 4893 flags: __u64, 4894 ) -> ::std::os::raw::c_int; 4895 } 4896 extern "C" { bpf_map_get_next_key( fd: ::std::os::raw::c_int, key: *const ::std::os::raw::c_void, next_key: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int4897 pub fn bpf_map_get_next_key( 4898 fd: ::std::os::raw::c_int, 4899 key: *const ::std::os::raw::c_void, 4900 next_key: *mut ::std::os::raw::c_void, 4901 ) -> ::std::os::raw::c_int; 4902 } 4903 extern "C" { bpf_map_freeze(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int4904 pub fn bpf_map_freeze(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 4905 } 4906 #[repr(C)] 4907 #[derive(Debug, Default, Copy, Clone)] 4908 pub struct bpf_map_batch_opts { 4909 pub sz: size_t, 4910 pub elem_flags: __u64, 4911 pub flags: __u64, 4912 } 4913 extern "C" { bpf_map_delete_batch( fd: ::std::os::raw::c_int, keys: *const ::std::os::raw::c_void, count: *mut __u32, opts: *const bpf_map_batch_opts, ) -> ::std::os::raw::c_int4914 pub fn bpf_map_delete_batch( 4915 fd: ::std::os::raw::c_int, 4916 keys: *const ::std::os::raw::c_void, 4917 count: *mut __u32, 4918 opts: *const bpf_map_batch_opts, 4919 ) -> ::std::os::raw::c_int; 4920 } 4921 extern "C" { bpf_map_lookup_batch( fd: ::std::os::raw::c_int, in_batch: *mut ::std::os::raw::c_void, out_batch: *mut ::std::os::raw::c_void, keys: *mut ::std::os::raw::c_void, values: *mut ::std::os::raw::c_void, count: *mut __u32, opts: *const bpf_map_batch_opts, ) -> ::std::os::raw::c_int4922 pub fn bpf_map_lookup_batch( 4923 fd: ::std::os::raw::c_int, 4924 in_batch: *mut ::std::os::raw::c_void, 4925 out_batch: *mut ::std::os::raw::c_void, 4926 keys: *mut ::std::os::raw::c_void, 4927 values: *mut ::std::os::raw::c_void, 4928 count: *mut __u32, 4929 opts: *const bpf_map_batch_opts, 4930 ) -> ::std::os::raw::c_int; 4931 } 4932 extern "C" { bpf_map_lookup_and_delete_batch( fd: ::std::os::raw::c_int, in_batch: *mut ::std::os::raw::c_void, out_batch: *mut ::std::os::raw::c_void, keys: *mut ::std::os::raw::c_void, values: *mut ::std::os::raw::c_void, count: *mut __u32, opts: *const bpf_map_batch_opts, ) -> ::std::os::raw::c_int4933 pub fn bpf_map_lookup_and_delete_batch( 4934 fd: ::std::os::raw::c_int, 4935 in_batch: *mut ::std::os::raw::c_void, 4936 out_batch: *mut ::std::os::raw::c_void, 4937 keys: *mut ::std::os::raw::c_void, 4938 values: *mut ::std::os::raw::c_void, 4939 count: *mut __u32, 4940 opts: *const bpf_map_batch_opts, 4941 ) -> ::std::os::raw::c_int; 4942 } 4943 extern "C" { bpf_map_update_batch( fd: ::std::os::raw::c_int, keys: *const ::std::os::raw::c_void, values: *const ::std::os::raw::c_void, count: *mut __u32, opts: *const bpf_map_batch_opts, ) -> ::std::os::raw::c_int4944 pub fn bpf_map_update_batch( 4945 fd: ::std::os::raw::c_int, 4946 keys: *const ::std::os::raw::c_void, 4947 values: *const ::std::os::raw::c_void, 4948 count: *mut __u32, 4949 opts: *const bpf_map_batch_opts, 4950 ) -> ::std::os::raw::c_int; 4951 } 4952 #[repr(C)] 4953 #[derive(Debug, Default, Copy, Clone)] 4954 pub struct bpf_obj_pin_opts { 4955 pub sz: size_t, 4956 pub file_flags: __u32, 4957 pub path_fd: ::std::os::raw::c_int, 4958 } 4959 extern "C" { bpf_obj_pin( fd: ::std::os::raw::c_int, pathname: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int4960 pub fn bpf_obj_pin( 4961 fd: ::std::os::raw::c_int, 4962 pathname: *const ::std::os::raw::c_char, 4963 ) -> ::std::os::raw::c_int; 4964 } 4965 extern "C" { bpf_obj_pin_opts( fd: ::std::os::raw::c_int, pathname: *const ::std::os::raw::c_char, opts: *const bpf_obj_pin_opts, ) -> ::std::os::raw::c_int4966 pub fn bpf_obj_pin_opts( 4967 fd: ::std::os::raw::c_int, 4968 pathname: *const ::std::os::raw::c_char, 4969 opts: *const bpf_obj_pin_opts, 4970 ) -> ::std::os::raw::c_int; 4971 } 4972 #[repr(C)] 4973 #[derive(Debug, Default, Copy, Clone)] 4974 pub struct bpf_obj_get_opts { 4975 pub sz: size_t, 4976 pub file_flags: __u32, 4977 pub path_fd: ::std::os::raw::c_int, 4978 } 4979 extern "C" { bpf_obj_get(pathname: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int4980 pub fn bpf_obj_get(pathname: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; 4981 } 4982 extern "C" { bpf_obj_get_opts( pathname: *const ::std::os::raw::c_char, opts: *const bpf_obj_get_opts, ) -> ::std::os::raw::c_int4983 pub fn bpf_obj_get_opts( 4984 pathname: *const ::std::os::raw::c_char, 4985 opts: *const bpf_obj_get_opts, 4986 ) -> ::std::os::raw::c_int; 4987 } 4988 extern "C" { bpf_prog_attach( prog_fd: ::std::os::raw::c_int, attachable_fd: ::std::os::raw::c_int, type_: bpf_attach_type, flags: ::std::os::raw::c_uint, ) -> ::std::os::raw::c_int4989 pub fn bpf_prog_attach( 4990 prog_fd: ::std::os::raw::c_int, 4991 attachable_fd: ::std::os::raw::c_int, 4992 type_: bpf_attach_type, 4993 flags: ::std::os::raw::c_uint, 4994 ) -> ::std::os::raw::c_int; 4995 } 4996 extern "C" { bpf_prog_detach( attachable_fd: ::std::os::raw::c_int, type_: bpf_attach_type, ) -> ::std::os::raw::c_int4997 pub fn bpf_prog_detach( 4998 attachable_fd: ::std::os::raw::c_int, 4999 type_: bpf_attach_type, 5000 ) -> ::std::os::raw::c_int; 5001 } 5002 extern "C" { bpf_prog_detach2( prog_fd: ::std::os::raw::c_int, attachable_fd: ::std::os::raw::c_int, type_: bpf_attach_type, ) -> ::std::os::raw::c_int5003 pub fn bpf_prog_detach2( 5004 prog_fd: ::std::os::raw::c_int, 5005 attachable_fd: ::std::os::raw::c_int, 5006 type_: bpf_attach_type, 5007 ) -> ::std::os::raw::c_int; 5008 } 5009 #[repr(C)] 5010 #[derive(Copy, Clone)] 5011 pub struct bpf_prog_attach_opts { 5012 pub sz: size_t, 5013 pub flags: __u32, 5014 pub __bindgen_anon_1: bpf_prog_attach_opts__bindgen_ty_1, 5015 pub relative_fd: ::std::os::raw::c_int, 5016 pub relative_id: __u32, 5017 pub expected_revision: __u64, 5018 } 5019 #[repr(C)] 5020 #[derive(Copy, Clone)] 5021 pub union bpf_prog_attach_opts__bindgen_ty_1 { 5022 pub replace_prog_fd: ::std::os::raw::c_int, 5023 pub replace_fd: ::std::os::raw::c_int, 5024 } 5025 impl Default for bpf_prog_attach_opts__bindgen_ty_1 { default() -> Self5026 fn default() -> Self { 5027 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 5028 unsafe { 5029 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 5030 s.assume_init() 5031 } 5032 } 5033 } 5034 impl Default for bpf_prog_attach_opts { default() -> Self5035 fn default() -> Self { 5036 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 5037 unsafe { 5038 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 5039 s.assume_init() 5040 } 5041 } 5042 } 5043 #[repr(C)] 5044 #[derive(Debug, Default, Copy, Clone)] 5045 pub struct bpf_prog_detach_opts { 5046 pub sz: size_t, 5047 pub flags: __u32, 5048 pub relative_fd: ::std::os::raw::c_int, 5049 pub relative_id: __u32, 5050 pub __bindgen_padding_0: [u8; 4usize], 5051 pub expected_revision: __u64, 5052 } 5053 extern "C" { bpf_prog_attach_opts( prog_fd: ::std::os::raw::c_int, target: ::std::os::raw::c_int, type_: bpf_attach_type, opts: *const bpf_prog_attach_opts, ) -> ::std::os::raw::c_int5054 pub fn bpf_prog_attach_opts( 5055 prog_fd: ::std::os::raw::c_int, 5056 target: ::std::os::raw::c_int, 5057 type_: bpf_attach_type, 5058 opts: *const bpf_prog_attach_opts, 5059 ) -> ::std::os::raw::c_int; 5060 } 5061 extern "C" { bpf_prog_detach_opts( prog_fd: ::std::os::raw::c_int, target: ::std::os::raw::c_int, type_: bpf_attach_type, opts: *const bpf_prog_detach_opts, ) -> ::std::os::raw::c_int5062 pub fn bpf_prog_detach_opts( 5063 prog_fd: ::std::os::raw::c_int, 5064 target: ::std::os::raw::c_int, 5065 type_: bpf_attach_type, 5066 opts: *const bpf_prog_detach_opts, 5067 ) -> ::std::os::raw::c_int; 5068 } 5069 #[repr(C)] 5070 #[derive(Copy, Clone)] 5071 pub struct bpf_link_create_opts { 5072 pub sz: size_t, 5073 pub flags: __u32, 5074 pub __bindgen_padding_0: [u8; 4usize], 5075 pub iter_info: *mut bpf_iter_link_info, 5076 pub iter_info_len: __u32, 5077 pub target_btf_id: __u32, 5078 pub __bindgen_anon_1: bpf_link_create_opts__bindgen_ty_1, 5079 } 5080 #[repr(C)] 5081 #[derive(Copy, Clone)] 5082 pub union bpf_link_create_opts__bindgen_ty_1 { 5083 pub perf_event: bpf_link_create_opts__bindgen_ty_1__bindgen_ty_1, 5084 pub kprobe_multi: bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2, 5085 pub uprobe_multi: bpf_link_create_opts__bindgen_ty_1__bindgen_ty_3, 5086 pub tracing: bpf_link_create_opts__bindgen_ty_1__bindgen_ty_4, 5087 pub netfilter: bpf_link_create_opts__bindgen_ty_1__bindgen_ty_5, 5088 pub tcx: bpf_link_create_opts__bindgen_ty_1__bindgen_ty_6, 5089 pub netkit: bpf_link_create_opts__bindgen_ty_1__bindgen_ty_7, 5090 } 5091 #[repr(C)] 5092 #[derive(Debug, Default, Copy, Clone)] 5093 pub struct bpf_link_create_opts__bindgen_ty_1__bindgen_ty_1 { 5094 pub bpf_cookie: __u64, 5095 } 5096 #[repr(C)] 5097 #[derive(Debug, Copy, Clone)] 5098 pub struct bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2 { 5099 pub flags: __u32, 5100 pub cnt: __u32, 5101 pub syms: *mut *const ::std::os::raw::c_char, 5102 pub addrs: *const ::std::os::raw::c_ulong, 5103 pub cookies: *const __u64, 5104 } 5105 impl Default for bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2 { default() -> Self5106 fn default() -> Self { 5107 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 5108 unsafe { 5109 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 5110 s.assume_init() 5111 } 5112 } 5113 } 5114 #[repr(C)] 5115 #[derive(Debug, Copy, Clone)] 5116 pub struct bpf_link_create_opts__bindgen_ty_1__bindgen_ty_3 { 5117 pub flags: __u32, 5118 pub cnt: __u32, 5119 pub path: *const ::std::os::raw::c_char, 5120 pub offsets: *const ::std::os::raw::c_ulong, 5121 pub ref_ctr_offsets: *const ::std::os::raw::c_ulong, 5122 pub cookies: *const __u64, 5123 pub pid: __u32, 5124 pub __bindgen_padding_0: [u8; 4usize], 5125 } 5126 impl Default for bpf_link_create_opts__bindgen_ty_1__bindgen_ty_3 { default() -> Self5127 fn default() -> Self { 5128 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 5129 unsafe { 5130 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 5131 s.assume_init() 5132 } 5133 } 5134 } 5135 #[repr(C)] 5136 #[derive(Debug, Default, Copy, Clone)] 5137 pub struct bpf_link_create_opts__bindgen_ty_1__bindgen_ty_4 { 5138 pub cookie: __u64, 5139 } 5140 #[repr(C)] 5141 #[derive(Debug, Default, Copy, Clone)] 5142 pub struct bpf_link_create_opts__bindgen_ty_1__bindgen_ty_5 { 5143 pub pf: __u32, 5144 pub hooknum: __u32, 5145 pub priority: __s32, 5146 pub flags: __u32, 5147 } 5148 #[repr(C)] 5149 #[derive(Debug, Default, Copy, Clone)] 5150 pub struct bpf_link_create_opts__bindgen_ty_1__bindgen_ty_6 { 5151 pub relative_fd: __u32, 5152 pub relative_id: __u32, 5153 pub expected_revision: __u64, 5154 } 5155 #[repr(C)] 5156 #[derive(Debug, Default, Copy, Clone)] 5157 pub struct bpf_link_create_opts__bindgen_ty_1__bindgen_ty_7 { 5158 pub relative_fd: __u32, 5159 pub relative_id: __u32, 5160 pub expected_revision: __u64, 5161 } 5162 impl Default for bpf_link_create_opts__bindgen_ty_1 { default() -> Self5163 fn default() -> Self { 5164 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 5165 unsafe { 5166 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 5167 s.assume_init() 5168 } 5169 } 5170 } 5171 impl Default for bpf_link_create_opts { default() -> Self5172 fn default() -> Self { 5173 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 5174 unsafe { 5175 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 5176 s.assume_init() 5177 } 5178 } 5179 } 5180 extern "C" { bpf_link_create( prog_fd: ::std::os::raw::c_int, target_fd: ::std::os::raw::c_int, attach_type: bpf_attach_type, opts: *const bpf_link_create_opts, ) -> ::std::os::raw::c_int5181 pub fn bpf_link_create( 5182 prog_fd: ::std::os::raw::c_int, 5183 target_fd: ::std::os::raw::c_int, 5184 attach_type: bpf_attach_type, 5185 opts: *const bpf_link_create_opts, 5186 ) -> ::std::os::raw::c_int; 5187 } 5188 extern "C" { bpf_link_detach(link_fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int5189 pub fn bpf_link_detach(link_fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 5190 } 5191 #[repr(C)] 5192 #[derive(Debug, Default, Copy, Clone)] 5193 pub struct bpf_link_update_opts { 5194 pub sz: size_t, 5195 pub flags: __u32, 5196 pub old_prog_fd: __u32, 5197 pub old_map_fd: __u32, 5198 pub __bindgen_padding_0: [u8; 4usize], 5199 } 5200 extern "C" { bpf_link_update( link_fd: ::std::os::raw::c_int, new_prog_fd: ::std::os::raw::c_int, opts: *const bpf_link_update_opts, ) -> ::std::os::raw::c_int5201 pub fn bpf_link_update( 5202 link_fd: ::std::os::raw::c_int, 5203 new_prog_fd: ::std::os::raw::c_int, 5204 opts: *const bpf_link_update_opts, 5205 ) -> ::std::os::raw::c_int; 5206 } 5207 extern "C" { bpf_iter_create(link_fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int5208 pub fn bpf_iter_create(link_fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; 5209 } 5210 #[repr(C)] 5211 #[derive(Debug, Copy, Clone)] 5212 pub struct bpf_prog_test_run_attr { 5213 pub prog_fd: ::std::os::raw::c_int, 5214 pub repeat: ::std::os::raw::c_int, 5215 pub data_in: *const ::std::os::raw::c_void, 5216 pub data_size_in: __u32, 5217 pub __bindgen_padding_0: [u8; 4usize], 5218 pub data_out: *mut ::std::os::raw::c_void, 5219 pub data_size_out: __u32, 5220 pub retval: __u32, 5221 pub duration: __u32, 5222 pub __bindgen_padding_1: [u8; 4usize], 5223 pub ctx_in: *const ::std::os::raw::c_void, 5224 pub ctx_size_in: __u32, 5225 pub __bindgen_padding_2: [u8; 4usize], 5226 pub ctx_out: *mut ::std::os::raw::c_void, 5227 pub ctx_size_out: __u32, 5228 pub __bindgen_padding_3: [u8; 4usize], 5229 } 5230 impl Default for bpf_prog_test_run_attr { default() -> Self5231 fn default() -> Self { 5232 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 5233 unsafe { 5234 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 5235 s.assume_init() 5236 } 5237 } 5238 } 5239 extern "C" { bpf_prog_get_next_id(start_id: __u32, next_id: *mut __u32) -> ::std::os::raw::c_int5240 pub fn bpf_prog_get_next_id(start_id: __u32, next_id: *mut __u32) -> ::std::os::raw::c_int; 5241 } 5242 extern "C" { bpf_map_get_next_id(start_id: __u32, next_id: *mut __u32) -> ::std::os::raw::c_int5243 pub fn bpf_map_get_next_id(start_id: __u32, next_id: *mut __u32) -> ::std::os::raw::c_int; 5244 } 5245 extern "C" { bpf_btf_get_next_id(start_id: __u32, next_id: *mut __u32) -> ::std::os::raw::c_int5246 pub fn bpf_btf_get_next_id(start_id: __u32, next_id: *mut __u32) -> ::std::os::raw::c_int; 5247 } 5248 extern "C" { bpf_link_get_next_id(start_id: __u32, next_id: *mut __u32) -> ::std::os::raw::c_int5249 pub fn bpf_link_get_next_id(start_id: __u32, next_id: *mut __u32) -> ::std::os::raw::c_int; 5250 } 5251 #[repr(C)] 5252 #[derive(Debug, Default, Copy, Clone)] 5253 pub struct bpf_get_fd_by_id_opts { 5254 pub sz: size_t, 5255 pub open_flags: __u32, 5256 pub __bindgen_padding_0: [u8; 4usize], 5257 } 5258 extern "C" { bpf_prog_get_fd_by_id(id: __u32) -> ::std::os::raw::c_int5259 pub fn bpf_prog_get_fd_by_id(id: __u32) -> ::std::os::raw::c_int; 5260 } 5261 extern "C" { bpf_prog_get_fd_by_id_opts( id: __u32, opts: *const bpf_get_fd_by_id_opts, ) -> ::std::os::raw::c_int5262 pub fn bpf_prog_get_fd_by_id_opts( 5263 id: __u32, 5264 opts: *const bpf_get_fd_by_id_opts, 5265 ) -> ::std::os::raw::c_int; 5266 } 5267 extern "C" { bpf_map_get_fd_by_id(id: __u32) -> ::std::os::raw::c_int5268 pub fn bpf_map_get_fd_by_id(id: __u32) -> ::std::os::raw::c_int; 5269 } 5270 extern "C" { bpf_map_get_fd_by_id_opts( id: __u32, opts: *const bpf_get_fd_by_id_opts, ) -> ::std::os::raw::c_int5271 pub fn bpf_map_get_fd_by_id_opts( 5272 id: __u32, 5273 opts: *const bpf_get_fd_by_id_opts, 5274 ) -> ::std::os::raw::c_int; 5275 } 5276 extern "C" { bpf_btf_get_fd_by_id(id: __u32) -> ::std::os::raw::c_int5277 pub fn bpf_btf_get_fd_by_id(id: __u32) -> ::std::os::raw::c_int; 5278 } 5279 extern "C" { bpf_btf_get_fd_by_id_opts( id: __u32, opts: *const bpf_get_fd_by_id_opts, ) -> ::std::os::raw::c_int5280 pub fn bpf_btf_get_fd_by_id_opts( 5281 id: __u32, 5282 opts: *const bpf_get_fd_by_id_opts, 5283 ) -> ::std::os::raw::c_int; 5284 } 5285 extern "C" { bpf_link_get_fd_by_id(id: __u32) -> ::std::os::raw::c_int5286 pub fn bpf_link_get_fd_by_id(id: __u32) -> ::std::os::raw::c_int; 5287 } 5288 extern "C" { bpf_link_get_fd_by_id_opts( id: __u32, opts: *const bpf_get_fd_by_id_opts, ) -> ::std::os::raw::c_int5289 pub fn bpf_link_get_fd_by_id_opts( 5290 id: __u32, 5291 opts: *const bpf_get_fd_by_id_opts, 5292 ) -> ::std::os::raw::c_int; 5293 } 5294 extern "C" { bpf_obj_get_info_by_fd( bpf_fd: ::std::os::raw::c_int, info: *mut ::std::os::raw::c_void, info_len: *mut __u32, ) -> ::std::os::raw::c_int5295 pub fn bpf_obj_get_info_by_fd( 5296 bpf_fd: ::std::os::raw::c_int, 5297 info: *mut ::std::os::raw::c_void, 5298 info_len: *mut __u32, 5299 ) -> ::std::os::raw::c_int; 5300 } 5301 extern "C" { bpf_prog_get_info_by_fd( prog_fd: ::std::os::raw::c_int, info: *mut bpf_prog_info, info_len: *mut __u32, ) -> ::std::os::raw::c_int5302 pub fn bpf_prog_get_info_by_fd( 5303 prog_fd: ::std::os::raw::c_int, 5304 info: *mut bpf_prog_info, 5305 info_len: *mut __u32, 5306 ) -> ::std::os::raw::c_int; 5307 } 5308 extern "C" { bpf_map_get_info_by_fd( map_fd: ::std::os::raw::c_int, info: *mut bpf_map_info, info_len: *mut __u32, ) -> ::std::os::raw::c_int5309 pub fn bpf_map_get_info_by_fd( 5310 map_fd: ::std::os::raw::c_int, 5311 info: *mut bpf_map_info, 5312 info_len: *mut __u32, 5313 ) -> ::std::os::raw::c_int; 5314 } 5315 extern "C" { bpf_btf_get_info_by_fd( btf_fd: ::std::os::raw::c_int, info: *mut bpf_btf_info, info_len: *mut __u32, ) -> ::std::os::raw::c_int5316 pub fn bpf_btf_get_info_by_fd( 5317 btf_fd: ::std::os::raw::c_int, 5318 info: *mut bpf_btf_info, 5319 info_len: *mut __u32, 5320 ) -> ::std::os::raw::c_int; 5321 } 5322 extern "C" { bpf_link_get_info_by_fd( link_fd: ::std::os::raw::c_int, info: *mut bpf_link_info, info_len: *mut __u32, ) -> ::std::os::raw::c_int5323 pub fn bpf_link_get_info_by_fd( 5324 link_fd: ::std::os::raw::c_int, 5325 info: *mut bpf_link_info, 5326 info_len: *mut __u32, 5327 ) -> ::std::os::raw::c_int; 5328 } 5329 #[repr(C)] 5330 #[derive(Copy, Clone)] 5331 pub struct bpf_prog_query_opts { 5332 pub sz: size_t, 5333 pub query_flags: __u32, 5334 pub attach_flags: __u32, 5335 pub prog_ids: *mut __u32, 5336 pub __bindgen_anon_1: bpf_prog_query_opts__bindgen_ty_1, 5337 pub __bindgen_padding_0: [u8; 4usize], 5338 pub prog_attach_flags: *mut __u32, 5339 pub link_ids: *mut __u32, 5340 pub link_attach_flags: *mut __u32, 5341 pub revision: __u64, 5342 } 5343 #[repr(C)] 5344 #[derive(Copy, Clone)] 5345 pub union bpf_prog_query_opts__bindgen_ty_1 { 5346 pub prog_cnt: __u32, 5347 pub count: __u32, 5348 } 5349 impl Default for bpf_prog_query_opts__bindgen_ty_1 { default() -> Self5350 fn default() -> Self { 5351 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 5352 unsafe { 5353 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 5354 s.assume_init() 5355 } 5356 } 5357 } 5358 impl Default for bpf_prog_query_opts { default() -> Self5359 fn default() -> Self { 5360 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 5361 unsafe { 5362 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 5363 s.assume_init() 5364 } 5365 } 5366 } 5367 extern "C" { bpf_prog_query_opts( target: ::std::os::raw::c_int, type_: bpf_attach_type, opts: *mut bpf_prog_query_opts, ) -> ::std::os::raw::c_int5368 pub fn bpf_prog_query_opts( 5369 target: ::std::os::raw::c_int, 5370 type_: bpf_attach_type, 5371 opts: *mut bpf_prog_query_opts, 5372 ) -> ::std::os::raw::c_int; 5373 } 5374 extern "C" { bpf_prog_query( target_fd: ::std::os::raw::c_int, type_: bpf_attach_type, query_flags: __u32, attach_flags: *mut __u32, prog_ids: *mut __u32, prog_cnt: *mut __u32, ) -> ::std::os::raw::c_int5375 pub fn bpf_prog_query( 5376 target_fd: ::std::os::raw::c_int, 5377 type_: bpf_attach_type, 5378 query_flags: __u32, 5379 attach_flags: *mut __u32, 5380 prog_ids: *mut __u32, 5381 prog_cnt: *mut __u32, 5382 ) -> ::std::os::raw::c_int; 5383 } 5384 #[repr(C)] 5385 #[derive(Debug, Copy, Clone)] 5386 pub struct bpf_raw_tp_opts { 5387 pub sz: size_t, 5388 pub tp_name: *const ::std::os::raw::c_char, 5389 pub cookie: __u64, 5390 } 5391 impl Default for bpf_raw_tp_opts { default() -> Self5392 fn default() -> Self { 5393 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 5394 unsafe { 5395 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 5396 s.assume_init() 5397 } 5398 } 5399 } 5400 extern "C" { bpf_raw_tracepoint_open_opts( prog_fd: ::std::os::raw::c_int, opts: *mut bpf_raw_tp_opts, ) -> ::std::os::raw::c_int5401 pub fn bpf_raw_tracepoint_open_opts( 5402 prog_fd: ::std::os::raw::c_int, 5403 opts: *mut bpf_raw_tp_opts, 5404 ) -> ::std::os::raw::c_int; 5405 } 5406 extern "C" { bpf_raw_tracepoint_open( name: *const ::std::os::raw::c_char, prog_fd: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int5407 pub fn bpf_raw_tracepoint_open( 5408 name: *const ::std::os::raw::c_char, 5409 prog_fd: ::std::os::raw::c_int, 5410 ) -> ::std::os::raw::c_int; 5411 } 5412 extern "C" { bpf_task_fd_query( pid: ::std::os::raw::c_int, fd: ::std::os::raw::c_int, flags: __u32, buf: *mut ::std::os::raw::c_char, buf_len: *mut __u32, prog_id: *mut __u32, fd_type: *mut __u32, probe_offset: *mut __u64, probe_addr: *mut __u64, ) -> ::std::os::raw::c_int5413 pub fn bpf_task_fd_query( 5414 pid: ::std::os::raw::c_int, 5415 fd: ::std::os::raw::c_int, 5416 flags: __u32, 5417 buf: *mut ::std::os::raw::c_char, 5418 buf_len: *mut __u32, 5419 prog_id: *mut __u32, 5420 fd_type: *mut __u32, 5421 probe_offset: *mut __u64, 5422 probe_addr: *mut __u64, 5423 ) -> ::std::os::raw::c_int; 5424 } 5425 extern "C" { bpf_enable_stats(type_: bpf_stats_type) -> ::std::os::raw::c_int5426 pub fn bpf_enable_stats(type_: bpf_stats_type) -> ::std::os::raw::c_int; 5427 } 5428 #[repr(C)] 5429 #[derive(Debug, Default, Copy, Clone)] 5430 pub struct bpf_prog_bind_opts { 5431 pub sz: size_t, 5432 pub flags: __u32, 5433 pub __bindgen_padding_0: [u8; 4usize], 5434 } 5435 extern "C" { bpf_prog_bind_map( prog_fd: ::std::os::raw::c_int, map_fd: ::std::os::raw::c_int, opts: *const bpf_prog_bind_opts, ) -> ::std::os::raw::c_int5436 pub fn bpf_prog_bind_map( 5437 prog_fd: ::std::os::raw::c_int, 5438 map_fd: ::std::os::raw::c_int, 5439 opts: *const bpf_prog_bind_opts, 5440 ) -> ::std::os::raw::c_int; 5441 } 5442 #[repr(C)] 5443 #[derive(Debug, Copy, Clone)] 5444 pub struct bpf_test_run_opts { 5445 pub sz: size_t, 5446 pub data_in: *const ::std::os::raw::c_void, 5447 pub data_out: *mut ::std::os::raw::c_void, 5448 pub data_size_in: __u32, 5449 pub data_size_out: __u32, 5450 pub ctx_in: *const ::std::os::raw::c_void, 5451 pub ctx_out: *mut ::std::os::raw::c_void, 5452 pub ctx_size_in: __u32, 5453 pub ctx_size_out: __u32, 5454 pub retval: __u32, 5455 pub repeat: ::std::os::raw::c_int, 5456 pub duration: __u32, 5457 pub flags: __u32, 5458 pub cpu: __u32, 5459 pub batch_size: __u32, 5460 } 5461 impl Default for bpf_test_run_opts { default() -> Self5462 fn default() -> Self { 5463 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 5464 unsafe { 5465 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 5466 s.assume_init() 5467 } 5468 } 5469 } 5470 extern "C" { bpf_prog_test_run_opts( prog_fd: ::std::os::raw::c_int, opts: *mut bpf_test_run_opts, ) -> ::std::os::raw::c_int5471 pub fn bpf_prog_test_run_opts( 5472 prog_fd: ::std::os::raw::c_int, 5473 opts: *mut bpf_test_run_opts, 5474 ) -> ::std::os::raw::c_int; 5475 } 5476 #[repr(C)] 5477 #[derive(Debug, Default, Copy, Clone)] 5478 pub struct bpf_token_create_opts { 5479 pub sz: size_t, 5480 pub flags: __u32, 5481 pub __bindgen_padding_0: [u8; 4usize], 5482 } 5483 extern "C" { bpf_token_create( bpffs_fd: ::std::os::raw::c_int, opts: *mut bpf_token_create_opts, ) -> ::std::os::raw::c_int5484 pub fn bpf_token_create( 5485 bpffs_fd: ::std::os::raw::c_int, 5486 opts: *mut bpf_token_create_opts, 5487 ) -> ::std::os::raw::c_int; 5488 } 5489 pub type va_list = __builtin_va_list; 5490 pub type __gnuc_va_list = __builtin_va_list; 5491 #[repr(C)] 5492 #[derive(Debug, Default, Copy, Clone)] 5493 pub struct btf_header { 5494 pub magic: __u16, 5495 pub version: __u8, 5496 pub flags: __u8, 5497 pub hdr_len: __u32, 5498 pub type_off: __u32, 5499 pub type_len: __u32, 5500 pub str_off: __u32, 5501 pub str_len: __u32, 5502 } 5503 #[repr(C)] 5504 #[derive(Copy, Clone)] 5505 pub struct btf_type { 5506 pub name_off: __u32, 5507 pub info: __u32, 5508 pub __bindgen_anon_1: btf_type__bindgen_ty_1, 5509 } 5510 #[repr(C)] 5511 #[derive(Copy, Clone)] 5512 pub union btf_type__bindgen_ty_1 { 5513 pub size: __u32, 5514 pub type_: __u32, 5515 } 5516 impl Default for btf_type__bindgen_ty_1 { default() -> Self5517 fn default() -> Self { 5518 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 5519 unsafe { 5520 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 5521 s.assume_init() 5522 } 5523 } 5524 } 5525 impl Default for btf_type { default() -> Self5526 fn default() -> Self { 5527 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 5528 unsafe { 5529 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 5530 s.assume_init() 5531 } 5532 } 5533 } 5534 pub const BTF_KIND_UNKN: _bindgen_ty_102 = 0; 5535 pub const BTF_KIND_INT: _bindgen_ty_102 = 1; 5536 pub const BTF_KIND_PTR: _bindgen_ty_102 = 2; 5537 pub const BTF_KIND_ARRAY: _bindgen_ty_102 = 3; 5538 pub const BTF_KIND_STRUCT: _bindgen_ty_102 = 4; 5539 pub const BTF_KIND_UNION: _bindgen_ty_102 = 5; 5540 pub const BTF_KIND_ENUM: _bindgen_ty_102 = 6; 5541 pub const BTF_KIND_FWD: _bindgen_ty_102 = 7; 5542 pub const BTF_KIND_TYPEDEF: _bindgen_ty_102 = 8; 5543 pub const BTF_KIND_VOLATILE: _bindgen_ty_102 = 9; 5544 pub const BTF_KIND_CONST: _bindgen_ty_102 = 10; 5545 pub const BTF_KIND_RESTRICT: _bindgen_ty_102 = 11; 5546 pub const BTF_KIND_FUNC: _bindgen_ty_102 = 12; 5547 pub const BTF_KIND_FUNC_PROTO: _bindgen_ty_102 = 13; 5548 pub const BTF_KIND_VAR: _bindgen_ty_102 = 14; 5549 pub const BTF_KIND_DATASEC: _bindgen_ty_102 = 15; 5550 pub const BTF_KIND_FLOAT: _bindgen_ty_102 = 16; 5551 pub const BTF_KIND_DECL_TAG: _bindgen_ty_102 = 17; 5552 pub const BTF_KIND_TYPE_TAG: _bindgen_ty_102 = 18; 5553 pub const BTF_KIND_ENUM64: _bindgen_ty_102 = 19; 5554 pub const NR_BTF_KINDS: _bindgen_ty_102 = 20; 5555 pub const BTF_KIND_MAX: _bindgen_ty_102 = 19; 5556 pub type _bindgen_ty_102 = ::std::os::raw::c_uint; 5557 #[repr(C)] 5558 #[derive(Debug, Default, Copy, Clone)] 5559 pub struct btf_enum { 5560 pub name_off: __u32, 5561 pub val: __s32, 5562 } 5563 #[repr(C)] 5564 #[derive(Debug, Default, Copy, Clone)] 5565 pub struct btf_array { 5566 pub type_: __u32, 5567 pub index_type: __u32, 5568 pub nelems: __u32, 5569 } 5570 #[repr(C)] 5571 #[derive(Debug, Default, Copy, Clone)] 5572 pub struct btf_member { 5573 pub name_off: __u32, 5574 pub type_: __u32, 5575 pub offset: __u32, 5576 } 5577 #[repr(C)] 5578 #[derive(Debug, Default, Copy, Clone)] 5579 pub struct btf_param { 5580 pub name_off: __u32, 5581 pub type_: __u32, 5582 } 5583 pub const BTF_VAR_STATIC: _bindgen_ty_103 = 0; 5584 pub const BTF_VAR_GLOBAL_ALLOCATED: _bindgen_ty_103 = 1; 5585 pub const BTF_VAR_GLOBAL_EXTERN: _bindgen_ty_103 = 2; 5586 pub type _bindgen_ty_103 = ::std::os::raw::c_uint; 5587 pub const BTF_FUNC_STATIC: btf_func_linkage = 0; 5588 pub const BTF_FUNC_GLOBAL: btf_func_linkage = 1; 5589 pub const BTF_FUNC_EXTERN: btf_func_linkage = 2; 5590 pub type btf_func_linkage = ::std::os::raw::c_uint; 5591 #[repr(C)] 5592 #[derive(Debug, Default, Copy, Clone)] 5593 pub struct btf_var { 5594 pub linkage: __u32, 5595 } 5596 #[repr(C)] 5597 #[derive(Debug, Default, Copy, Clone)] 5598 pub struct btf_var_secinfo { 5599 pub type_: __u32, 5600 pub offset: __u32, 5601 pub size: __u32, 5602 } 5603 #[repr(C)] 5604 #[derive(Debug, Default, Copy, Clone)] 5605 pub struct btf_decl_tag { 5606 pub component_idx: __s32, 5607 } 5608 #[repr(C)] 5609 #[derive(Debug, Default, Copy, Clone)] 5610 pub struct btf_enum64 { 5611 pub name_off: __u32, 5612 pub val_lo32: __u32, 5613 pub val_hi32: __u32, 5614 } 5615 #[repr(C)] 5616 #[derive(Debug, Copy, Clone)] 5617 pub struct bpf_object { 5618 _unused: [u8; 0], 5619 } 5620 pub const BTF_LITTLE_ENDIAN: btf_endianness = 0; 5621 pub const BTF_BIG_ENDIAN: btf_endianness = 1; 5622 pub type btf_endianness = ::std::os::raw::c_uint; 5623 extern "C" { btf__free(btf: *mut btf)5624 pub fn btf__free(btf: *mut btf); 5625 } 5626 extern "C" { btf__new(data: *const ::std::os::raw::c_void, size: __u32) -> *mut btf5627 pub fn btf__new(data: *const ::std::os::raw::c_void, size: __u32) -> *mut btf; 5628 } 5629 extern "C" { btf__new_split( data: *const ::std::os::raw::c_void, size: __u32, base_btf: *mut btf, ) -> *mut btf5630 pub fn btf__new_split( 5631 data: *const ::std::os::raw::c_void, 5632 size: __u32, 5633 base_btf: *mut btf, 5634 ) -> *mut btf; 5635 } 5636 extern "C" { btf__new_empty() -> *mut btf5637 pub fn btf__new_empty() -> *mut btf; 5638 } 5639 extern "C" { btf__new_empty_split(base_btf: *mut btf) -> *mut btf5640 pub fn btf__new_empty_split(base_btf: *mut btf) -> *mut btf; 5641 } 5642 extern "C" { btf__parse(path: *const ::std::os::raw::c_char, btf_ext: *mut *mut btf_ext) -> *mut btf5643 pub fn btf__parse(path: *const ::std::os::raw::c_char, btf_ext: *mut *mut btf_ext) -> *mut btf; 5644 } 5645 extern "C" { btf__parse_split(path: *const ::std::os::raw::c_char, base_btf: *mut btf) -> *mut btf5646 pub fn btf__parse_split(path: *const ::std::os::raw::c_char, base_btf: *mut btf) -> *mut btf; 5647 } 5648 extern "C" { btf__parse_elf( path: *const ::std::os::raw::c_char, btf_ext: *mut *mut btf_ext, ) -> *mut btf5649 pub fn btf__parse_elf( 5650 path: *const ::std::os::raw::c_char, 5651 btf_ext: *mut *mut btf_ext, 5652 ) -> *mut btf; 5653 } 5654 extern "C" { btf__parse_elf_split( path: *const ::std::os::raw::c_char, base_btf: *mut btf, ) -> *mut btf5655 pub fn btf__parse_elf_split( 5656 path: *const ::std::os::raw::c_char, 5657 base_btf: *mut btf, 5658 ) -> *mut btf; 5659 } 5660 extern "C" { btf__parse_raw(path: *const ::std::os::raw::c_char) -> *mut btf5661 pub fn btf__parse_raw(path: *const ::std::os::raw::c_char) -> *mut btf; 5662 } 5663 extern "C" { btf__parse_raw_split( path: *const ::std::os::raw::c_char, base_btf: *mut btf, ) -> *mut btf5664 pub fn btf__parse_raw_split( 5665 path: *const ::std::os::raw::c_char, 5666 base_btf: *mut btf, 5667 ) -> *mut btf; 5668 } 5669 extern "C" { btf__load_vmlinux_btf() -> *mut btf5670 pub fn btf__load_vmlinux_btf() -> *mut btf; 5671 } 5672 extern "C" { btf__load_module_btf( module_name: *const ::std::os::raw::c_char, vmlinux_btf: *mut btf, ) -> *mut btf5673 pub fn btf__load_module_btf( 5674 module_name: *const ::std::os::raw::c_char, 5675 vmlinux_btf: *mut btf, 5676 ) -> *mut btf; 5677 } 5678 extern "C" { btf__load_from_kernel_by_id(id: __u32) -> *mut btf5679 pub fn btf__load_from_kernel_by_id(id: __u32) -> *mut btf; 5680 } 5681 extern "C" { btf__load_from_kernel_by_id_split(id: __u32, base_btf: *mut btf) -> *mut btf5682 pub fn btf__load_from_kernel_by_id_split(id: __u32, base_btf: *mut btf) -> *mut btf; 5683 } 5684 extern "C" { btf__load_into_kernel(btf: *mut btf) -> ::std::os::raw::c_int5685 pub fn btf__load_into_kernel(btf: *mut btf) -> ::std::os::raw::c_int; 5686 } 5687 extern "C" { btf__find_by_name(btf: *const btf, type_name: *const ::std::os::raw::c_char) -> __s325688 pub fn btf__find_by_name(btf: *const btf, type_name: *const ::std::os::raw::c_char) -> __s32; 5689 } 5690 extern "C" { btf__find_by_name_kind( btf: *const btf, type_name: *const ::std::os::raw::c_char, kind: __u32, ) -> __s325691 pub fn btf__find_by_name_kind( 5692 btf: *const btf, 5693 type_name: *const ::std::os::raw::c_char, 5694 kind: __u32, 5695 ) -> __s32; 5696 } 5697 extern "C" { btf__type_cnt(btf: *const btf) -> __u325698 pub fn btf__type_cnt(btf: *const btf) -> __u32; 5699 } 5700 extern "C" { btf__base_btf(btf: *const btf) -> *const btf5701 pub fn btf__base_btf(btf: *const btf) -> *const btf; 5702 } 5703 extern "C" { btf__type_by_id(btf: *const btf, id: __u32) -> *const btf_type5704 pub fn btf__type_by_id(btf: *const btf, id: __u32) -> *const btf_type; 5705 } 5706 extern "C" { btf__pointer_size(btf: *const btf) -> size_t5707 pub fn btf__pointer_size(btf: *const btf) -> size_t; 5708 } 5709 extern "C" { btf__set_pointer_size(btf: *mut btf, ptr_sz: size_t) -> ::std::os::raw::c_int5710 pub fn btf__set_pointer_size(btf: *mut btf, ptr_sz: size_t) -> ::std::os::raw::c_int; 5711 } 5712 extern "C" { btf__endianness(btf: *const btf) -> btf_endianness5713 pub fn btf__endianness(btf: *const btf) -> btf_endianness; 5714 } 5715 extern "C" { btf__set_endianness(btf: *mut btf, endian: btf_endianness) -> ::std::os::raw::c_int5716 pub fn btf__set_endianness(btf: *mut btf, endian: btf_endianness) -> ::std::os::raw::c_int; 5717 } 5718 extern "C" { btf__resolve_size(btf: *const btf, type_id: __u32) -> __s645719 pub fn btf__resolve_size(btf: *const btf, type_id: __u32) -> __s64; 5720 } 5721 extern "C" { btf__resolve_type(btf: *const btf, type_id: __u32) -> ::std::os::raw::c_int5722 pub fn btf__resolve_type(btf: *const btf, type_id: __u32) -> ::std::os::raw::c_int; 5723 } 5724 extern "C" { btf__align_of(btf: *const btf, id: __u32) -> ::std::os::raw::c_int5725 pub fn btf__align_of(btf: *const btf, id: __u32) -> ::std::os::raw::c_int; 5726 } 5727 extern "C" { btf__fd(btf: *const btf) -> ::std::os::raw::c_int5728 pub fn btf__fd(btf: *const btf) -> ::std::os::raw::c_int; 5729 } 5730 extern "C" { btf__set_fd(btf: *mut btf, fd: ::std::os::raw::c_int)5731 pub fn btf__set_fd(btf: *mut btf, fd: ::std::os::raw::c_int); 5732 } 5733 extern "C" { btf__raw_data(btf: *const btf, size: *mut __u32) -> *const ::std::os::raw::c_void5734 pub fn btf__raw_data(btf: *const btf, size: *mut __u32) -> *const ::std::os::raw::c_void; 5735 } 5736 extern "C" { btf__name_by_offset(btf: *const btf, offset: __u32) -> *const ::std::os::raw::c_char5737 pub fn btf__name_by_offset(btf: *const btf, offset: __u32) -> *const ::std::os::raw::c_char; 5738 } 5739 extern "C" { btf__str_by_offset(btf: *const btf, offset: __u32) -> *const ::std::os::raw::c_char5740 pub fn btf__str_by_offset(btf: *const btf, offset: __u32) -> *const ::std::os::raw::c_char; 5741 } 5742 extern "C" { btf_ext__new(data: *const __u8, size: __u32) -> *mut btf_ext5743 pub fn btf_ext__new(data: *const __u8, size: __u32) -> *mut btf_ext; 5744 } 5745 extern "C" { btf_ext__free(btf_ext: *mut btf_ext)5746 pub fn btf_ext__free(btf_ext: *mut btf_ext); 5747 } 5748 extern "C" { btf_ext__raw_data( btf_ext: *const btf_ext, size: *mut __u32, ) -> *const ::std::os::raw::c_void5749 pub fn btf_ext__raw_data( 5750 btf_ext: *const btf_ext, 5751 size: *mut __u32, 5752 ) -> *const ::std::os::raw::c_void; 5753 } 5754 extern "C" { btf__find_str(btf: *mut btf, s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int5755 pub fn btf__find_str(btf: *mut btf, s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; 5756 } 5757 extern "C" { btf__add_str(btf: *mut btf, s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int5758 pub fn btf__add_str(btf: *mut btf, s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; 5759 } 5760 extern "C" { btf__add_type( btf: *mut btf, src_btf: *const btf, src_type: *const btf_type, ) -> ::std::os::raw::c_int5761 pub fn btf__add_type( 5762 btf: *mut btf, 5763 src_btf: *const btf, 5764 src_type: *const btf_type, 5765 ) -> ::std::os::raw::c_int; 5766 } 5767 extern "C" { btf__add_btf(btf: *mut btf, src_btf: *const btf) -> ::std::os::raw::c_int5768 pub fn btf__add_btf(btf: *mut btf, src_btf: *const btf) -> ::std::os::raw::c_int; 5769 } 5770 extern "C" { btf__add_int( btf: *mut btf, name: *const ::std::os::raw::c_char, byte_sz: size_t, encoding: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int5771 pub fn btf__add_int( 5772 btf: *mut btf, 5773 name: *const ::std::os::raw::c_char, 5774 byte_sz: size_t, 5775 encoding: ::std::os::raw::c_int, 5776 ) -> ::std::os::raw::c_int; 5777 } 5778 extern "C" { btf__add_float( btf: *mut btf, name: *const ::std::os::raw::c_char, byte_sz: size_t, ) -> ::std::os::raw::c_int5779 pub fn btf__add_float( 5780 btf: *mut btf, 5781 name: *const ::std::os::raw::c_char, 5782 byte_sz: size_t, 5783 ) -> ::std::os::raw::c_int; 5784 } 5785 extern "C" { btf__add_ptr(btf: *mut btf, ref_type_id: ::std::os::raw::c_int) -> ::std::os::raw::c_int5786 pub fn btf__add_ptr(btf: *mut btf, ref_type_id: ::std::os::raw::c_int) 5787 -> ::std::os::raw::c_int; 5788 } 5789 extern "C" { btf__add_array( btf: *mut btf, index_type_id: ::std::os::raw::c_int, elem_type_id: ::std::os::raw::c_int, nr_elems: __u32, ) -> ::std::os::raw::c_int5790 pub fn btf__add_array( 5791 btf: *mut btf, 5792 index_type_id: ::std::os::raw::c_int, 5793 elem_type_id: ::std::os::raw::c_int, 5794 nr_elems: __u32, 5795 ) -> ::std::os::raw::c_int; 5796 } 5797 extern "C" { btf__add_struct( btf: *mut btf, name: *const ::std::os::raw::c_char, sz: __u32, ) -> ::std::os::raw::c_int5798 pub fn btf__add_struct( 5799 btf: *mut btf, 5800 name: *const ::std::os::raw::c_char, 5801 sz: __u32, 5802 ) -> ::std::os::raw::c_int; 5803 } 5804 extern "C" { btf__add_union( btf: *mut btf, name: *const ::std::os::raw::c_char, sz: __u32, ) -> ::std::os::raw::c_int5805 pub fn btf__add_union( 5806 btf: *mut btf, 5807 name: *const ::std::os::raw::c_char, 5808 sz: __u32, 5809 ) -> ::std::os::raw::c_int; 5810 } 5811 extern "C" { btf__add_field( btf: *mut btf, name: *const ::std::os::raw::c_char, field_type_id: ::std::os::raw::c_int, bit_offset: __u32, bit_size: __u32, ) -> ::std::os::raw::c_int5812 pub fn btf__add_field( 5813 btf: *mut btf, 5814 name: *const ::std::os::raw::c_char, 5815 field_type_id: ::std::os::raw::c_int, 5816 bit_offset: __u32, 5817 bit_size: __u32, 5818 ) -> ::std::os::raw::c_int; 5819 } 5820 extern "C" { btf__add_enum( btf: *mut btf, name: *const ::std::os::raw::c_char, bytes_sz: __u32, ) -> ::std::os::raw::c_int5821 pub fn btf__add_enum( 5822 btf: *mut btf, 5823 name: *const ::std::os::raw::c_char, 5824 bytes_sz: __u32, 5825 ) -> ::std::os::raw::c_int; 5826 } 5827 extern "C" { btf__add_enum_value( btf: *mut btf, name: *const ::std::os::raw::c_char, value: __s64, ) -> ::std::os::raw::c_int5828 pub fn btf__add_enum_value( 5829 btf: *mut btf, 5830 name: *const ::std::os::raw::c_char, 5831 value: __s64, 5832 ) -> ::std::os::raw::c_int; 5833 } 5834 extern "C" { btf__add_enum64( btf: *mut btf, name: *const ::std::os::raw::c_char, bytes_sz: __u32, is_signed: bool, ) -> ::std::os::raw::c_int5835 pub fn btf__add_enum64( 5836 btf: *mut btf, 5837 name: *const ::std::os::raw::c_char, 5838 bytes_sz: __u32, 5839 is_signed: bool, 5840 ) -> ::std::os::raw::c_int; 5841 } 5842 extern "C" { btf__add_enum64_value( btf: *mut btf, name: *const ::std::os::raw::c_char, value: __u64, ) -> ::std::os::raw::c_int5843 pub fn btf__add_enum64_value( 5844 btf: *mut btf, 5845 name: *const ::std::os::raw::c_char, 5846 value: __u64, 5847 ) -> ::std::os::raw::c_int; 5848 } 5849 pub const BTF_FWD_STRUCT: btf_fwd_kind = 0; 5850 pub const BTF_FWD_UNION: btf_fwd_kind = 1; 5851 pub const BTF_FWD_ENUM: btf_fwd_kind = 2; 5852 pub type btf_fwd_kind = ::std::os::raw::c_uint; 5853 extern "C" { btf__add_fwd( btf: *mut btf, name: *const ::std::os::raw::c_char, fwd_kind: btf_fwd_kind, ) -> ::std::os::raw::c_int5854 pub fn btf__add_fwd( 5855 btf: *mut btf, 5856 name: *const ::std::os::raw::c_char, 5857 fwd_kind: btf_fwd_kind, 5858 ) -> ::std::os::raw::c_int; 5859 } 5860 extern "C" { btf__add_typedef( btf: *mut btf, name: *const ::std::os::raw::c_char, ref_type_id: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int5861 pub fn btf__add_typedef( 5862 btf: *mut btf, 5863 name: *const ::std::os::raw::c_char, 5864 ref_type_id: ::std::os::raw::c_int, 5865 ) -> ::std::os::raw::c_int; 5866 } 5867 extern "C" { btf__add_volatile( btf: *mut btf, ref_type_id: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int5868 pub fn btf__add_volatile( 5869 btf: *mut btf, 5870 ref_type_id: ::std::os::raw::c_int, 5871 ) -> ::std::os::raw::c_int; 5872 } 5873 extern "C" { btf__add_const( btf: *mut btf, ref_type_id: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int5874 pub fn btf__add_const( 5875 btf: *mut btf, 5876 ref_type_id: ::std::os::raw::c_int, 5877 ) -> ::std::os::raw::c_int; 5878 } 5879 extern "C" { btf__add_restrict( btf: *mut btf, ref_type_id: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int5880 pub fn btf__add_restrict( 5881 btf: *mut btf, 5882 ref_type_id: ::std::os::raw::c_int, 5883 ) -> ::std::os::raw::c_int; 5884 } 5885 extern "C" { btf__add_type_tag( btf: *mut btf, value: *const ::std::os::raw::c_char, ref_type_id: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int5886 pub fn btf__add_type_tag( 5887 btf: *mut btf, 5888 value: *const ::std::os::raw::c_char, 5889 ref_type_id: ::std::os::raw::c_int, 5890 ) -> ::std::os::raw::c_int; 5891 } 5892 extern "C" { btf__add_func( btf: *mut btf, name: *const ::std::os::raw::c_char, linkage: btf_func_linkage, proto_type_id: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int5893 pub fn btf__add_func( 5894 btf: *mut btf, 5895 name: *const ::std::os::raw::c_char, 5896 linkage: btf_func_linkage, 5897 proto_type_id: ::std::os::raw::c_int, 5898 ) -> ::std::os::raw::c_int; 5899 } 5900 extern "C" { btf__add_func_proto( btf: *mut btf, ret_type_id: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int5901 pub fn btf__add_func_proto( 5902 btf: *mut btf, 5903 ret_type_id: ::std::os::raw::c_int, 5904 ) -> ::std::os::raw::c_int; 5905 } 5906 extern "C" { btf__add_func_param( btf: *mut btf, name: *const ::std::os::raw::c_char, type_id: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int5907 pub fn btf__add_func_param( 5908 btf: *mut btf, 5909 name: *const ::std::os::raw::c_char, 5910 type_id: ::std::os::raw::c_int, 5911 ) -> ::std::os::raw::c_int; 5912 } 5913 extern "C" { btf__add_var( btf: *mut btf, name: *const ::std::os::raw::c_char, linkage: ::std::os::raw::c_int, type_id: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int5914 pub fn btf__add_var( 5915 btf: *mut btf, 5916 name: *const ::std::os::raw::c_char, 5917 linkage: ::std::os::raw::c_int, 5918 type_id: ::std::os::raw::c_int, 5919 ) -> ::std::os::raw::c_int; 5920 } 5921 extern "C" { btf__add_datasec( btf: *mut btf, name: *const ::std::os::raw::c_char, byte_sz: __u32, ) -> ::std::os::raw::c_int5922 pub fn btf__add_datasec( 5923 btf: *mut btf, 5924 name: *const ::std::os::raw::c_char, 5925 byte_sz: __u32, 5926 ) -> ::std::os::raw::c_int; 5927 } 5928 extern "C" { btf__add_datasec_var_info( btf: *mut btf, var_type_id: ::std::os::raw::c_int, offset: __u32, byte_sz: __u32, ) -> ::std::os::raw::c_int5929 pub fn btf__add_datasec_var_info( 5930 btf: *mut btf, 5931 var_type_id: ::std::os::raw::c_int, 5932 offset: __u32, 5933 byte_sz: __u32, 5934 ) -> ::std::os::raw::c_int; 5935 } 5936 extern "C" { btf__add_decl_tag( btf: *mut btf, value: *const ::std::os::raw::c_char, ref_type_id: ::std::os::raw::c_int, component_idx: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int5937 pub fn btf__add_decl_tag( 5938 btf: *mut btf, 5939 value: *const ::std::os::raw::c_char, 5940 ref_type_id: ::std::os::raw::c_int, 5941 component_idx: ::std::os::raw::c_int, 5942 ) -> ::std::os::raw::c_int; 5943 } 5944 #[repr(C)] 5945 #[derive(Debug, Copy, Clone)] 5946 pub struct btf_dedup_opts { 5947 pub sz: size_t, 5948 pub btf_ext: *mut btf_ext, 5949 pub force_collisions: bool, 5950 pub __bindgen_padding_0: [u8; 7usize], 5951 } 5952 impl Default for btf_dedup_opts { default() -> Self5953 fn default() -> Self { 5954 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 5955 unsafe { 5956 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 5957 s.assume_init() 5958 } 5959 } 5960 } 5961 extern "C" { btf__dedup(btf: *mut btf, opts: *const btf_dedup_opts) -> ::std::os::raw::c_int5962 pub fn btf__dedup(btf: *mut btf, opts: *const btf_dedup_opts) -> ::std::os::raw::c_int; 5963 } 5964 #[repr(C)] 5965 #[derive(Debug, Copy, Clone)] 5966 pub struct btf_dump { 5967 _unused: [u8; 0], 5968 } 5969 #[repr(C)] 5970 #[derive(Debug, Default, Copy, Clone)] 5971 pub struct btf_dump_opts { 5972 pub sz: size_t, 5973 } 5974 pub type btf_dump_printf_fn_t = ::std::option::Option< 5975 unsafe extern "C" fn( 5976 ctx: *mut ::std::os::raw::c_void, 5977 fmt: *const ::std::os::raw::c_char, 5978 args: *mut __va_list_tag, 5979 ), 5980 >; 5981 extern "C" { btf_dump__new( btf: *const btf, printf_fn: btf_dump_printf_fn_t, ctx: *mut ::std::os::raw::c_void, opts: *const btf_dump_opts, ) -> *mut btf_dump5982 pub fn btf_dump__new( 5983 btf: *const btf, 5984 printf_fn: btf_dump_printf_fn_t, 5985 ctx: *mut ::std::os::raw::c_void, 5986 opts: *const btf_dump_opts, 5987 ) -> *mut btf_dump; 5988 } 5989 extern "C" { btf_dump__free(d: *mut btf_dump)5990 pub fn btf_dump__free(d: *mut btf_dump); 5991 } 5992 extern "C" { btf_dump__dump_type(d: *mut btf_dump, id: __u32) -> ::std::os::raw::c_int5993 pub fn btf_dump__dump_type(d: *mut btf_dump, id: __u32) -> ::std::os::raw::c_int; 5994 } 5995 #[repr(C)] 5996 #[derive(Debug, Copy, Clone)] 5997 pub struct btf_dump_emit_type_decl_opts { 5998 pub sz: size_t, 5999 pub field_name: *const ::std::os::raw::c_char, 6000 pub indent_level: ::std::os::raw::c_int, 6001 pub strip_mods: bool, 6002 pub __bindgen_padding_0: [u8; 3usize], 6003 } 6004 impl Default for btf_dump_emit_type_decl_opts { default() -> Self6005 fn default() -> Self { 6006 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 6007 unsafe { 6008 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 6009 s.assume_init() 6010 } 6011 } 6012 } 6013 extern "C" { btf_dump__emit_type_decl( d: *mut btf_dump, id: __u32, opts: *const btf_dump_emit_type_decl_opts, ) -> ::std::os::raw::c_int6014 pub fn btf_dump__emit_type_decl( 6015 d: *mut btf_dump, 6016 id: __u32, 6017 opts: *const btf_dump_emit_type_decl_opts, 6018 ) -> ::std::os::raw::c_int; 6019 } 6020 #[repr(C)] 6021 #[derive(Debug, Copy, Clone)] 6022 pub struct btf_dump_type_data_opts { 6023 pub sz: size_t, 6024 pub indent_str: *const ::std::os::raw::c_char, 6025 pub indent_level: ::std::os::raw::c_int, 6026 pub compact: bool, 6027 pub skip_names: bool, 6028 pub emit_zeroes: bool, 6029 pub __bindgen_padding_0: u8, 6030 } 6031 impl Default for btf_dump_type_data_opts { default() -> Self6032 fn default() -> Self { 6033 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 6034 unsafe { 6035 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 6036 s.assume_init() 6037 } 6038 } 6039 } 6040 extern "C" { btf_dump__dump_type_data( d: *mut btf_dump, id: __u32, data: *const ::std::os::raw::c_void, data_sz: size_t, opts: *const btf_dump_type_data_opts, ) -> ::std::os::raw::c_int6041 pub fn btf_dump__dump_type_data( 6042 d: *mut btf_dump, 6043 id: __u32, 6044 data: *const ::std::os::raw::c_void, 6045 data_sz: size_t, 6046 opts: *const btf_dump_type_data_opts, 6047 ) -> ::std::os::raw::c_int; 6048 } 6049 extern "C" { vdprintf( __fd: ::std::os::raw::c_int, __fmt: *const ::std::os::raw::c_char, __arg: *mut __va_list_tag, ) -> ::std::os::raw::c_int6050 pub fn vdprintf( 6051 __fd: ::std::os::raw::c_int, 6052 __fmt: *const ::std::os::raw::c_char, 6053 __arg: *mut __va_list_tag, 6054 ) -> ::std::os::raw::c_int; 6055 } 6056 pub type pid_t = __pid_t; 6057 extern "C" { libbpf_major_version() -> __u326058 pub fn libbpf_major_version() -> __u32; 6059 } 6060 extern "C" { libbpf_minor_version() -> __u326061 pub fn libbpf_minor_version() -> __u32; 6062 } 6063 extern "C" { libbpf_version_string() -> *const ::std::os::raw::c_char6064 pub fn libbpf_version_string() -> *const ::std::os::raw::c_char; 6065 } 6066 extern "C" { libbpf_strerror( err: ::std::os::raw::c_int, buf: *mut ::std::os::raw::c_char, size: size_t, ) -> ::std::os::raw::c_int6067 pub fn libbpf_strerror( 6068 err: ::std::os::raw::c_int, 6069 buf: *mut ::std::os::raw::c_char, 6070 size: size_t, 6071 ) -> ::std::os::raw::c_int; 6072 } 6073 extern "C" { libbpf_bpf_attach_type_str(t: bpf_attach_type) -> *const ::std::os::raw::c_char6074 pub fn libbpf_bpf_attach_type_str(t: bpf_attach_type) -> *const ::std::os::raw::c_char; 6075 } 6076 extern "C" { libbpf_bpf_link_type_str(t: bpf_link_type) -> *const ::std::os::raw::c_char6077 pub fn libbpf_bpf_link_type_str(t: bpf_link_type) -> *const ::std::os::raw::c_char; 6078 } 6079 extern "C" { libbpf_bpf_map_type_str(t: bpf_map_type) -> *const ::std::os::raw::c_char6080 pub fn libbpf_bpf_map_type_str(t: bpf_map_type) -> *const ::std::os::raw::c_char; 6081 } 6082 extern "C" { libbpf_bpf_prog_type_str(t: bpf_prog_type) -> *const ::std::os::raw::c_char6083 pub fn libbpf_bpf_prog_type_str(t: bpf_prog_type) -> *const ::std::os::raw::c_char; 6084 } 6085 pub const LIBBPF_WARN: libbpf_print_level = 0; 6086 pub const LIBBPF_INFO: libbpf_print_level = 1; 6087 pub const LIBBPF_DEBUG: libbpf_print_level = 2; 6088 pub type libbpf_print_level = ::std::os::raw::c_uint; 6089 pub type libbpf_print_fn_t = ::std::option::Option< 6090 unsafe extern "C" fn( 6091 level: libbpf_print_level, 6092 arg1: *const ::std::os::raw::c_char, 6093 ap: *mut __va_list_tag, 6094 ) -> ::std::os::raw::c_int, 6095 >; 6096 extern "C" { libbpf_set_print(fn_: libbpf_print_fn_t) -> libbpf_print_fn_t6097 pub fn libbpf_set_print(fn_: libbpf_print_fn_t) -> libbpf_print_fn_t; 6098 } 6099 #[repr(C)] 6100 #[derive(Debug, Copy, Clone)] 6101 pub struct bpf_object_open_opts { 6102 pub sz: size_t, 6103 pub object_name: *const ::std::os::raw::c_char, 6104 pub relaxed_maps: bool, 6105 pub __bindgen_padding_0: [u8; 7usize], 6106 pub pin_root_path: *const ::std::os::raw::c_char, 6107 pub _bitfield_align_1: [u8; 0], 6108 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, 6109 pub __bindgen_padding_1: [u8; 4usize], 6110 pub kconfig: *const ::std::os::raw::c_char, 6111 pub btf_custom_path: *const ::std::os::raw::c_char, 6112 pub kernel_log_buf: *mut ::std::os::raw::c_char, 6113 pub kernel_log_size: size_t, 6114 pub kernel_log_level: __u32, 6115 pub __bindgen_padding_2: [u8; 4usize], 6116 pub bpf_token_path: *const ::std::os::raw::c_char, 6117 } 6118 impl Default for bpf_object_open_opts { default() -> Self6119 fn default() -> Self { 6120 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 6121 unsafe { 6122 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 6123 s.assume_init() 6124 } 6125 } 6126 } 6127 impl bpf_object_open_opts { 6128 #[inline] new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]>6129 pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { 6130 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); 6131 __bindgen_bitfield_unit 6132 } 6133 } 6134 extern "C" { bpf_object__open(path: *const ::std::os::raw::c_char) -> *mut bpf_object6135 pub fn bpf_object__open(path: *const ::std::os::raw::c_char) -> *mut bpf_object; 6136 } 6137 extern "C" { bpf_object__open_file( path: *const ::std::os::raw::c_char, opts: *const bpf_object_open_opts, ) -> *mut bpf_object6138 pub fn bpf_object__open_file( 6139 path: *const ::std::os::raw::c_char, 6140 opts: *const bpf_object_open_opts, 6141 ) -> *mut bpf_object; 6142 } 6143 extern "C" { bpf_object__open_mem( obj_buf: *const ::std::os::raw::c_void, obj_buf_sz: size_t, opts: *const bpf_object_open_opts, ) -> *mut bpf_object6144 pub fn bpf_object__open_mem( 6145 obj_buf: *const ::std::os::raw::c_void, 6146 obj_buf_sz: size_t, 6147 opts: *const bpf_object_open_opts, 6148 ) -> *mut bpf_object; 6149 } 6150 extern "C" { bpf_object__load(obj: *mut bpf_object) -> ::std::os::raw::c_int6151 pub fn bpf_object__load(obj: *mut bpf_object) -> ::std::os::raw::c_int; 6152 } 6153 extern "C" { bpf_object__close(obj: *mut bpf_object)6154 pub fn bpf_object__close(obj: *mut bpf_object); 6155 } 6156 extern "C" { bpf_object__pin_maps( obj: *mut bpf_object, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int6157 pub fn bpf_object__pin_maps( 6158 obj: *mut bpf_object, 6159 path: *const ::std::os::raw::c_char, 6160 ) -> ::std::os::raw::c_int; 6161 } 6162 extern "C" { bpf_object__unpin_maps( obj: *mut bpf_object, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int6163 pub fn bpf_object__unpin_maps( 6164 obj: *mut bpf_object, 6165 path: *const ::std::os::raw::c_char, 6166 ) -> ::std::os::raw::c_int; 6167 } 6168 extern "C" { bpf_object__pin_programs( obj: *mut bpf_object, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int6169 pub fn bpf_object__pin_programs( 6170 obj: *mut bpf_object, 6171 path: *const ::std::os::raw::c_char, 6172 ) -> ::std::os::raw::c_int; 6173 } 6174 extern "C" { bpf_object__unpin_programs( obj: *mut bpf_object, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int6175 pub fn bpf_object__unpin_programs( 6176 obj: *mut bpf_object, 6177 path: *const ::std::os::raw::c_char, 6178 ) -> ::std::os::raw::c_int; 6179 } 6180 extern "C" { bpf_object__pin( object: *mut bpf_object, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int6181 pub fn bpf_object__pin( 6182 object: *mut bpf_object, 6183 path: *const ::std::os::raw::c_char, 6184 ) -> ::std::os::raw::c_int; 6185 } 6186 extern "C" { bpf_object__unpin( object: *mut bpf_object, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int6187 pub fn bpf_object__unpin( 6188 object: *mut bpf_object, 6189 path: *const ::std::os::raw::c_char, 6190 ) -> ::std::os::raw::c_int; 6191 } 6192 extern "C" { bpf_object__name(obj: *const bpf_object) -> *const ::std::os::raw::c_char6193 pub fn bpf_object__name(obj: *const bpf_object) -> *const ::std::os::raw::c_char; 6194 } 6195 extern "C" { bpf_object__kversion(obj: *const bpf_object) -> ::std::os::raw::c_uint6196 pub fn bpf_object__kversion(obj: *const bpf_object) -> ::std::os::raw::c_uint; 6197 } 6198 extern "C" { bpf_object__set_kversion( obj: *mut bpf_object, kern_version: __u32, ) -> ::std::os::raw::c_int6199 pub fn bpf_object__set_kversion( 6200 obj: *mut bpf_object, 6201 kern_version: __u32, 6202 ) -> ::std::os::raw::c_int; 6203 } 6204 extern "C" { bpf_object__btf(obj: *const bpf_object) -> *mut btf6205 pub fn bpf_object__btf(obj: *const bpf_object) -> *mut btf; 6206 } 6207 extern "C" { bpf_object__btf_fd(obj: *const bpf_object) -> ::std::os::raw::c_int6208 pub fn bpf_object__btf_fd(obj: *const bpf_object) -> ::std::os::raw::c_int; 6209 } 6210 extern "C" { bpf_object__find_program_by_name( obj: *const bpf_object, name: *const ::std::os::raw::c_char, ) -> *mut bpf_program6211 pub fn bpf_object__find_program_by_name( 6212 obj: *const bpf_object, 6213 name: *const ::std::os::raw::c_char, 6214 ) -> *mut bpf_program; 6215 } 6216 extern "C" { libbpf_prog_type_by_name( name: *const ::std::os::raw::c_char, prog_type: *mut bpf_prog_type, expected_attach_type: *mut bpf_attach_type, ) -> ::std::os::raw::c_int6217 pub fn libbpf_prog_type_by_name( 6218 name: *const ::std::os::raw::c_char, 6219 prog_type: *mut bpf_prog_type, 6220 expected_attach_type: *mut bpf_attach_type, 6221 ) -> ::std::os::raw::c_int; 6222 } 6223 extern "C" { libbpf_attach_type_by_name( name: *const ::std::os::raw::c_char, attach_type: *mut bpf_attach_type, ) -> ::std::os::raw::c_int6224 pub fn libbpf_attach_type_by_name( 6225 name: *const ::std::os::raw::c_char, 6226 attach_type: *mut bpf_attach_type, 6227 ) -> ::std::os::raw::c_int; 6228 } 6229 extern "C" { libbpf_find_vmlinux_btf_id( name: *const ::std::os::raw::c_char, attach_type: bpf_attach_type, ) -> ::std::os::raw::c_int6230 pub fn libbpf_find_vmlinux_btf_id( 6231 name: *const ::std::os::raw::c_char, 6232 attach_type: bpf_attach_type, 6233 ) -> ::std::os::raw::c_int; 6234 } 6235 extern "C" { bpf_object__next_program( obj: *const bpf_object, prog: *mut bpf_program, ) -> *mut bpf_program6236 pub fn bpf_object__next_program( 6237 obj: *const bpf_object, 6238 prog: *mut bpf_program, 6239 ) -> *mut bpf_program; 6240 } 6241 extern "C" { bpf_object__prev_program( obj: *const bpf_object, prog: *mut bpf_program, ) -> *mut bpf_program6242 pub fn bpf_object__prev_program( 6243 obj: *const bpf_object, 6244 prog: *mut bpf_program, 6245 ) -> *mut bpf_program; 6246 } 6247 extern "C" { bpf_program__set_ifindex(prog: *mut bpf_program, ifindex: __u32)6248 pub fn bpf_program__set_ifindex(prog: *mut bpf_program, ifindex: __u32); 6249 } 6250 extern "C" { bpf_program__name(prog: *const bpf_program) -> *const ::std::os::raw::c_char6251 pub fn bpf_program__name(prog: *const bpf_program) -> *const ::std::os::raw::c_char; 6252 } 6253 extern "C" { bpf_program__section_name(prog: *const bpf_program) -> *const ::std::os::raw::c_char6254 pub fn bpf_program__section_name(prog: *const bpf_program) -> *const ::std::os::raw::c_char; 6255 } 6256 extern "C" { bpf_program__autoload(prog: *const bpf_program) -> bool6257 pub fn bpf_program__autoload(prog: *const bpf_program) -> bool; 6258 } 6259 extern "C" { bpf_program__set_autoload( prog: *mut bpf_program, autoload: bool, ) -> ::std::os::raw::c_int6260 pub fn bpf_program__set_autoload( 6261 prog: *mut bpf_program, 6262 autoload: bool, 6263 ) -> ::std::os::raw::c_int; 6264 } 6265 extern "C" { bpf_program__autoattach(prog: *const bpf_program) -> bool6266 pub fn bpf_program__autoattach(prog: *const bpf_program) -> bool; 6267 } 6268 extern "C" { bpf_program__set_autoattach(prog: *mut bpf_program, autoattach: bool)6269 pub fn bpf_program__set_autoattach(prog: *mut bpf_program, autoattach: bool); 6270 } 6271 extern "C" { bpf_program__insns(prog: *const bpf_program) -> *const bpf_insn6272 pub fn bpf_program__insns(prog: *const bpf_program) -> *const bpf_insn; 6273 } 6274 extern "C" { bpf_program__set_insns( prog: *mut bpf_program, new_insns: *mut bpf_insn, new_insn_cnt: size_t, ) -> ::std::os::raw::c_int6275 pub fn bpf_program__set_insns( 6276 prog: *mut bpf_program, 6277 new_insns: *mut bpf_insn, 6278 new_insn_cnt: size_t, 6279 ) -> ::std::os::raw::c_int; 6280 } 6281 extern "C" { bpf_program__insn_cnt(prog: *const bpf_program) -> size_t6282 pub fn bpf_program__insn_cnt(prog: *const bpf_program) -> size_t; 6283 } 6284 extern "C" { bpf_program__fd(prog: *const bpf_program) -> ::std::os::raw::c_int6285 pub fn bpf_program__fd(prog: *const bpf_program) -> ::std::os::raw::c_int; 6286 } 6287 extern "C" { bpf_program__pin( prog: *mut bpf_program, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int6288 pub fn bpf_program__pin( 6289 prog: *mut bpf_program, 6290 path: *const ::std::os::raw::c_char, 6291 ) -> ::std::os::raw::c_int; 6292 } 6293 extern "C" { bpf_program__unpin( prog: *mut bpf_program, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int6294 pub fn bpf_program__unpin( 6295 prog: *mut bpf_program, 6296 path: *const ::std::os::raw::c_char, 6297 ) -> ::std::os::raw::c_int; 6298 } 6299 extern "C" { bpf_program__unload(prog: *mut bpf_program)6300 pub fn bpf_program__unload(prog: *mut bpf_program); 6301 } 6302 #[repr(C)] 6303 #[derive(Debug, Copy, Clone)] 6304 pub struct bpf_link { 6305 _unused: [u8; 0], 6306 } 6307 extern "C" { bpf_link__open(path: *const ::std::os::raw::c_char) -> *mut bpf_link6308 pub fn bpf_link__open(path: *const ::std::os::raw::c_char) -> *mut bpf_link; 6309 } 6310 extern "C" { bpf_link__fd(link: *const bpf_link) -> ::std::os::raw::c_int6311 pub fn bpf_link__fd(link: *const bpf_link) -> ::std::os::raw::c_int; 6312 } 6313 extern "C" { bpf_link__pin_path(link: *const bpf_link) -> *const ::std::os::raw::c_char6314 pub fn bpf_link__pin_path(link: *const bpf_link) -> *const ::std::os::raw::c_char; 6315 } 6316 extern "C" { bpf_link__pin( link: *mut bpf_link, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int6317 pub fn bpf_link__pin( 6318 link: *mut bpf_link, 6319 path: *const ::std::os::raw::c_char, 6320 ) -> ::std::os::raw::c_int; 6321 } 6322 extern "C" { bpf_link__unpin(link: *mut bpf_link) -> ::std::os::raw::c_int6323 pub fn bpf_link__unpin(link: *mut bpf_link) -> ::std::os::raw::c_int; 6324 } 6325 extern "C" { bpf_link__update_program( link: *mut bpf_link, prog: *mut bpf_program, ) -> ::std::os::raw::c_int6326 pub fn bpf_link__update_program( 6327 link: *mut bpf_link, 6328 prog: *mut bpf_program, 6329 ) -> ::std::os::raw::c_int; 6330 } 6331 extern "C" { bpf_link__disconnect(link: *mut bpf_link)6332 pub fn bpf_link__disconnect(link: *mut bpf_link); 6333 } 6334 extern "C" { bpf_link__detach(link: *mut bpf_link) -> ::std::os::raw::c_int6335 pub fn bpf_link__detach(link: *mut bpf_link) -> ::std::os::raw::c_int; 6336 } 6337 extern "C" { bpf_link__destroy(link: *mut bpf_link) -> ::std::os::raw::c_int6338 pub fn bpf_link__destroy(link: *mut bpf_link) -> ::std::os::raw::c_int; 6339 } 6340 extern "C" { bpf_program__attach(prog: *const bpf_program) -> *mut bpf_link6341 pub fn bpf_program__attach(prog: *const bpf_program) -> *mut bpf_link; 6342 } 6343 #[repr(C)] 6344 #[derive(Debug, Default, Copy, Clone)] 6345 pub struct bpf_perf_event_opts { 6346 pub sz: size_t, 6347 pub bpf_cookie: __u64, 6348 pub force_ioctl_attach: bool, 6349 pub __bindgen_padding_0: [u8; 7usize], 6350 } 6351 extern "C" { bpf_program__attach_perf_event( prog: *const bpf_program, pfd: ::std::os::raw::c_int, ) -> *mut bpf_link6352 pub fn bpf_program__attach_perf_event( 6353 prog: *const bpf_program, 6354 pfd: ::std::os::raw::c_int, 6355 ) -> *mut bpf_link; 6356 } 6357 extern "C" { bpf_program__attach_perf_event_opts( prog: *const bpf_program, pfd: ::std::os::raw::c_int, opts: *const bpf_perf_event_opts, ) -> *mut bpf_link6358 pub fn bpf_program__attach_perf_event_opts( 6359 prog: *const bpf_program, 6360 pfd: ::std::os::raw::c_int, 6361 opts: *const bpf_perf_event_opts, 6362 ) -> *mut bpf_link; 6363 } 6364 pub const PROBE_ATTACH_MODE_DEFAULT: probe_attach_mode = 0; 6365 pub const PROBE_ATTACH_MODE_LEGACY: probe_attach_mode = 1; 6366 pub const PROBE_ATTACH_MODE_PERF: probe_attach_mode = 2; 6367 pub const PROBE_ATTACH_MODE_LINK: probe_attach_mode = 3; 6368 pub type probe_attach_mode = ::std::os::raw::c_uint; 6369 #[repr(C)] 6370 #[derive(Debug, Copy, Clone)] 6371 pub struct bpf_kprobe_opts { 6372 pub sz: size_t, 6373 pub bpf_cookie: __u64, 6374 pub offset: size_t, 6375 pub retprobe: bool, 6376 pub __bindgen_padding_0: [u8; 3usize], 6377 pub attach_mode: probe_attach_mode, 6378 } 6379 impl Default for bpf_kprobe_opts { default() -> Self6380 fn default() -> Self { 6381 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 6382 unsafe { 6383 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 6384 s.assume_init() 6385 } 6386 } 6387 } 6388 extern "C" { bpf_program__attach_kprobe( prog: *const bpf_program, retprobe: bool, func_name: *const ::std::os::raw::c_char, ) -> *mut bpf_link6389 pub fn bpf_program__attach_kprobe( 6390 prog: *const bpf_program, 6391 retprobe: bool, 6392 func_name: *const ::std::os::raw::c_char, 6393 ) -> *mut bpf_link; 6394 } 6395 extern "C" { bpf_program__attach_kprobe_opts( prog: *const bpf_program, func_name: *const ::std::os::raw::c_char, opts: *const bpf_kprobe_opts, ) -> *mut bpf_link6396 pub fn bpf_program__attach_kprobe_opts( 6397 prog: *const bpf_program, 6398 func_name: *const ::std::os::raw::c_char, 6399 opts: *const bpf_kprobe_opts, 6400 ) -> *mut bpf_link; 6401 } 6402 #[repr(C)] 6403 #[derive(Debug, Copy, Clone)] 6404 pub struct bpf_kprobe_multi_opts { 6405 pub sz: size_t, 6406 pub syms: *mut *const ::std::os::raw::c_char, 6407 pub addrs: *const ::std::os::raw::c_ulong, 6408 pub cookies: *const __u64, 6409 pub cnt: size_t, 6410 pub retprobe: bool, 6411 pub __bindgen_padding_0: [u8; 7usize], 6412 } 6413 impl Default for bpf_kprobe_multi_opts { default() -> Self6414 fn default() -> Self { 6415 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 6416 unsafe { 6417 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 6418 s.assume_init() 6419 } 6420 } 6421 } 6422 extern "C" { bpf_program__attach_kprobe_multi_opts( prog: *const bpf_program, pattern: *const ::std::os::raw::c_char, opts: *const bpf_kprobe_multi_opts, ) -> *mut bpf_link6423 pub fn bpf_program__attach_kprobe_multi_opts( 6424 prog: *const bpf_program, 6425 pattern: *const ::std::os::raw::c_char, 6426 opts: *const bpf_kprobe_multi_opts, 6427 ) -> *mut bpf_link; 6428 } 6429 #[repr(C)] 6430 #[derive(Debug, Copy, Clone)] 6431 pub struct bpf_uprobe_multi_opts { 6432 pub sz: size_t, 6433 pub syms: *mut *const ::std::os::raw::c_char, 6434 pub offsets: *const ::std::os::raw::c_ulong, 6435 pub ref_ctr_offsets: *const ::std::os::raw::c_ulong, 6436 pub cookies: *const __u64, 6437 pub cnt: size_t, 6438 pub retprobe: bool, 6439 pub __bindgen_padding_0: [u8; 7usize], 6440 } 6441 impl Default for bpf_uprobe_multi_opts { default() -> Self6442 fn default() -> Self { 6443 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 6444 unsafe { 6445 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 6446 s.assume_init() 6447 } 6448 } 6449 } 6450 extern "C" { bpf_program__attach_uprobe_multi( prog: *const bpf_program, pid: pid_t, binary_path: *const ::std::os::raw::c_char, func_pattern: *const ::std::os::raw::c_char, opts: *const bpf_uprobe_multi_opts, ) -> *mut bpf_link6451 pub fn bpf_program__attach_uprobe_multi( 6452 prog: *const bpf_program, 6453 pid: pid_t, 6454 binary_path: *const ::std::os::raw::c_char, 6455 func_pattern: *const ::std::os::raw::c_char, 6456 opts: *const bpf_uprobe_multi_opts, 6457 ) -> *mut bpf_link; 6458 } 6459 #[repr(C)] 6460 #[derive(Debug, Default, Copy, Clone)] 6461 pub struct bpf_ksyscall_opts { 6462 pub sz: size_t, 6463 pub bpf_cookie: __u64, 6464 pub retprobe: bool, 6465 pub __bindgen_padding_0: [u8; 7usize], 6466 } 6467 extern "C" { bpf_program__attach_ksyscall( prog: *const bpf_program, syscall_name: *const ::std::os::raw::c_char, opts: *const bpf_ksyscall_opts, ) -> *mut bpf_link6468 pub fn bpf_program__attach_ksyscall( 6469 prog: *const bpf_program, 6470 syscall_name: *const ::std::os::raw::c_char, 6471 opts: *const bpf_ksyscall_opts, 6472 ) -> *mut bpf_link; 6473 } 6474 #[repr(C)] 6475 #[derive(Debug, Copy, Clone)] 6476 pub struct bpf_uprobe_opts { 6477 pub sz: size_t, 6478 pub ref_ctr_offset: size_t, 6479 pub bpf_cookie: __u64, 6480 pub retprobe: bool, 6481 pub __bindgen_padding_0: [u8; 7usize], 6482 pub func_name: *const ::std::os::raw::c_char, 6483 pub attach_mode: probe_attach_mode, 6484 pub __bindgen_padding_1: [u8; 4usize], 6485 } 6486 impl Default for bpf_uprobe_opts { default() -> Self6487 fn default() -> Self { 6488 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 6489 unsafe { 6490 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 6491 s.assume_init() 6492 } 6493 } 6494 } 6495 extern "C" { bpf_program__attach_uprobe( prog: *const bpf_program, retprobe: bool, pid: pid_t, binary_path: *const ::std::os::raw::c_char, func_offset: size_t, ) -> *mut bpf_link6496 pub fn bpf_program__attach_uprobe( 6497 prog: *const bpf_program, 6498 retprobe: bool, 6499 pid: pid_t, 6500 binary_path: *const ::std::os::raw::c_char, 6501 func_offset: size_t, 6502 ) -> *mut bpf_link; 6503 } 6504 extern "C" { bpf_program__attach_uprobe_opts( prog: *const bpf_program, pid: pid_t, binary_path: *const ::std::os::raw::c_char, func_offset: size_t, opts: *const bpf_uprobe_opts, ) -> *mut bpf_link6505 pub fn bpf_program__attach_uprobe_opts( 6506 prog: *const bpf_program, 6507 pid: pid_t, 6508 binary_path: *const ::std::os::raw::c_char, 6509 func_offset: size_t, 6510 opts: *const bpf_uprobe_opts, 6511 ) -> *mut bpf_link; 6512 } 6513 #[repr(C)] 6514 #[derive(Debug, Default, Copy, Clone)] 6515 pub struct bpf_usdt_opts { 6516 pub sz: size_t, 6517 pub usdt_cookie: __u64, 6518 } 6519 extern "C" { bpf_program__attach_usdt( prog: *const bpf_program, pid: pid_t, binary_path: *const ::std::os::raw::c_char, usdt_provider: *const ::std::os::raw::c_char, usdt_name: *const ::std::os::raw::c_char, opts: *const bpf_usdt_opts, ) -> *mut bpf_link6520 pub fn bpf_program__attach_usdt( 6521 prog: *const bpf_program, 6522 pid: pid_t, 6523 binary_path: *const ::std::os::raw::c_char, 6524 usdt_provider: *const ::std::os::raw::c_char, 6525 usdt_name: *const ::std::os::raw::c_char, 6526 opts: *const bpf_usdt_opts, 6527 ) -> *mut bpf_link; 6528 } 6529 #[repr(C)] 6530 #[derive(Debug, Default, Copy, Clone)] 6531 pub struct bpf_tracepoint_opts { 6532 pub sz: size_t, 6533 pub bpf_cookie: __u64, 6534 } 6535 extern "C" { bpf_program__attach_tracepoint( prog: *const bpf_program, tp_category: *const ::std::os::raw::c_char, tp_name: *const ::std::os::raw::c_char, ) -> *mut bpf_link6536 pub fn bpf_program__attach_tracepoint( 6537 prog: *const bpf_program, 6538 tp_category: *const ::std::os::raw::c_char, 6539 tp_name: *const ::std::os::raw::c_char, 6540 ) -> *mut bpf_link; 6541 } 6542 extern "C" { bpf_program__attach_tracepoint_opts( prog: *const bpf_program, tp_category: *const ::std::os::raw::c_char, tp_name: *const ::std::os::raw::c_char, opts: *const bpf_tracepoint_opts, ) -> *mut bpf_link6543 pub fn bpf_program__attach_tracepoint_opts( 6544 prog: *const bpf_program, 6545 tp_category: *const ::std::os::raw::c_char, 6546 tp_name: *const ::std::os::raw::c_char, 6547 opts: *const bpf_tracepoint_opts, 6548 ) -> *mut bpf_link; 6549 } 6550 #[repr(C)] 6551 #[derive(Debug, Default, Copy, Clone)] 6552 pub struct bpf_raw_tracepoint_opts { 6553 pub sz: size_t, 6554 pub cookie: __u64, 6555 } 6556 extern "C" { bpf_program__attach_raw_tracepoint( prog: *const bpf_program, tp_name: *const ::std::os::raw::c_char, ) -> *mut bpf_link6557 pub fn bpf_program__attach_raw_tracepoint( 6558 prog: *const bpf_program, 6559 tp_name: *const ::std::os::raw::c_char, 6560 ) -> *mut bpf_link; 6561 } 6562 extern "C" { bpf_program__attach_raw_tracepoint_opts( prog: *const bpf_program, tp_name: *const ::std::os::raw::c_char, opts: *mut bpf_raw_tracepoint_opts, ) -> *mut bpf_link6563 pub fn bpf_program__attach_raw_tracepoint_opts( 6564 prog: *const bpf_program, 6565 tp_name: *const ::std::os::raw::c_char, 6566 opts: *mut bpf_raw_tracepoint_opts, 6567 ) -> *mut bpf_link; 6568 } 6569 #[repr(C)] 6570 #[derive(Debug, Default, Copy, Clone)] 6571 pub struct bpf_trace_opts { 6572 pub sz: size_t, 6573 pub cookie: __u64, 6574 } 6575 extern "C" { bpf_program__attach_trace(prog: *const bpf_program) -> *mut bpf_link6576 pub fn bpf_program__attach_trace(prog: *const bpf_program) -> *mut bpf_link; 6577 } 6578 extern "C" { bpf_program__attach_trace_opts( prog: *const bpf_program, opts: *const bpf_trace_opts, ) -> *mut bpf_link6579 pub fn bpf_program__attach_trace_opts( 6580 prog: *const bpf_program, 6581 opts: *const bpf_trace_opts, 6582 ) -> *mut bpf_link; 6583 } 6584 extern "C" { bpf_program__attach_lsm(prog: *const bpf_program) -> *mut bpf_link6585 pub fn bpf_program__attach_lsm(prog: *const bpf_program) -> *mut bpf_link; 6586 } 6587 extern "C" { bpf_program__attach_cgroup( prog: *const bpf_program, cgroup_fd: ::std::os::raw::c_int, ) -> *mut bpf_link6588 pub fn bpf_program__attach_cgroup( 6589 prog: *const bpf_program, 6590 cgroup_fd: ::std::os::raw::c_int, 6591 ) -> *mut bpf_link; 6592 } 6593 extern "C" { bpf_program__attach_netns( prog: *const bpf_program, netns_fd: ::std::os::raw::c_int, ) -> *mut bpf_link6594 pub fn bpf_program__attach_netns( 6595 prog: *const bpf_program, 6596 netns_fd: ::std::os::raw::c_int, 6597 ) -> *mut bpf_link; 6598 } 6599 extern "C" { bpf_program__attach_xdp( prog: *const bpf_program, ifindex: ::std::os::raw::c_int, ) -> *mut bpf_link6600 pub fn bpf_program__attach_xdp( 6601 prog: *const bpf_program, 6602 ifindex: ::std::os::raw::c_int, 6603 ) -> *mut bpf_link; 6604 } 6605 extern "C" { bpf_program__attach_freplace( prog: *const bpf_program, target_fd: ::std::os::raw::c_int, attach_func_name: *const ::std::os::raw::c_char, ) -> *mut bpf_link6606 pub fn bpf_program__attach_freplace( 6607 prog: *const bpf_program, 6608 target_fd: ::std::os::raw::c_int, 6609 attach_func_name: *const ::std::os::raw::c_char, 6610 ) -> *mut bpf_link; 6611 } 6612 #[repr(C)] 6613 #[derive(Debug, Default, Copy, Clone)] 6614 pub struct bpf_netfilter_opts { 6615 pub sz: size_t, 6616 pub pf: __u32, 6617 pub hooknum: __u32, 6618 pub priority: __s32, 6619 pub flags: __u32, 6620 } 6621 extern "C" { bpf_program__attach_netfilter( prog: *const bpf_program, opts: *const bpf_netfilter_opts, ) -> *mut bpf_link6622 pub fn bpf_program__attach_netfilter( 6623 prog: *const bpf_program, 6624 opts: *const bpf_netfilter_opts, 6625 ) -> *mut bpf_link; 6626 } 6627 #[repr(C)] 6628 #[derive(Debug, Default, Copy, Clone)] 6629 pub struct bpf_tcx_opts { 6630 pub sz: size_t, 6631 pub flags: __u32, 6632 pub relative_fd: __u32, 6633 pub relative_id: __u32, 6634 pub __bindgen_padding_0: [u8; 4usize], 6635 pub expected_revision: __u64, 6636 } 6637 extern "C" { bpf_program__attach_tcx( prog: *const bpf_program, ifindex: ::std::os::raw::c_int, opts: *const bpf_tcx_opts, ) -> *mut bpf_link6638 pub fn bpf_program__attach_tcx( 6639 prog: *const bpf_program, 6640 ifindex: ::std::os::raw::c_int, 6641 opts: *const bpf_tcx_opts, 6642 ) -> *mut bpf_link; 6643 } 6644 #[repr(C)] 6645 #[derive(Debug, Default, Copy, Clone)] 6646 pub struct bpf_netkit_opts { 6647 pub sz: size_t, 6648 pub flags: __u32, 6649 pub relative_fd: __u32, 6650 pub relative_id: __u32, 6651 pub __bindgen_padding_0: [u8; 4usize], 6652 pub expected_revision: __u64, 6653 } 6654 extern "C" { bpf_program__attach_netkit( prog: *const bpf_program, ifindex: ::std::os::raw::c_int, opts: *const bpf_netkit_opts, ) -> *mut bpf_link6655 pub fn bpf_program__attach_netkit( 6656 prog: *const bpf_program, 6657 ifindex: ::std::os::raw::c_int, 6658 opts: *const bpf_netkit_opts, 6659 ) -> *mut bpf_link; 6660 } 6661 extern "C" { bpf_map__attach_struct_ops(map: *const bpf_map) -> *mut bpf_link6662 pub fn bpf_map__attach_struct_ops(map: *const bpf_map) -> *mut bpf_link; 6663 } 6664 extern "C" { bpf_link__update_map(link: *mut bpf_link, map: *const bpf_map) -> ::std::os::raw::c_int6665 pub fn bpf_link__update_map(link: *mut bpf_link, map: *const bpf_map) -> ::std::os::raw::c_int; 6666 } 6667 #[repr(C)] 6668 #[derive(Debug, Copy, Clone)] 6669 pub struct bpf_iter_attach_opts { 6670 pub sz: size_t, 6671 pub link_info: *mut bpf_iter_link_info, 6672 pub link_info_len: __u32, 6673 pub __bindgen_padding_0: [u8; 4usize], 6674 } 6675 impl Default for bpf_iter_attach_opts { default() -> Self6676 fn default() -> Self { 6677 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 6678 unsafe { 6679 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 6680 s.assume_init() 6681 } 6682 } 6683 } 6684 extern "C" { bpf_program__attach_iter( prog: *const bpf_program, opts: *const bpf_iter_attach_opts, ) -> *mut bpf_link6685 pub fn bpf_program__attach_iter( 6686 prog: *const bpf_program, 6687 opts: *const bpf_iter_attach_opts, 6688 ) -> *mut bpf_link; 6689 } 6690 extern "C" { bpf_program__type(prog: *const bpf_program) -> bpf_prog_type6691 pub fn bpf_program__type(prog: *const bpf_program) -> bpf_prog_type; 6692 } 6693 extern "C" { bpf_program__set_type( prog: *mut bpf_program, type_: bpf_prog_type, ) -> ::std::os::raw::c_int6694 pub fn bpf_program__set_type( 6695 prog: *mut bpf_program, 6696 type_: bpf_prog_type, 6697 ) -> ::std::os::raw::c_int; 6698 } 6699 extern "C" { bpf_program__expected_attach_type(prog: *const bpf_program) -> bpf_attach_type6700 pub fn bpf_program__expected_attach_type(prog: *const bpf_program) -> bpf_attach_type; 6701 } 6702 extern "C" { bpf_program__set_expected_attach_type( prog: *mut bpf_program, type_: bpf_attach_type, ) -> ::std::os::raw::c_int6703 pub fn bpf_program__set_expected_attach_type( 6704 prog: *mut bpf_program, 6705 type_: bpf_attach_type, 6706 ) -> ::std::os::raw::c_int; 6707 } 6708 extern "C" { bpf_program__flags(prog: *const bpf_program) -> __u326709 pub fn bpf_program__flags(prog: *const bpf_program) -> __u32; 6710 } 6711 extern "C" { bpf_program__set_flags(prog: *mut bpf_program, flags: __u32) -> ::std::os::raw::c_int6712 pub fn bpf_program__set_flags(prog: *mut bpf_program, flags: __u32) -> ::std::os::raw::c_int; 6713 } 6714 extern "C" { bpf_program__log_level(prog: *const bpf_program) -> __u326715 pub fn bpf_program__log_level(prog: *const bpf_program) -> __u32; 6716 } 6717 extern "C" { bpf_program__set_log_level( prog: *mut bpf_program, log_level: __u32, ) -> ::std::os::raw::c_int6718 pub fn bpf_program__set_log_level( 6719 prog: *mut bpf_program, 6720 log_level: __u32, 6721 ) -> ::std::os::raw::c_int; 6722 } 6723 extern "C" { bpf_program__log_buf( prog: *const bpf_program, log_size: *mut size_t, ) -> *const ::std::os::raw::c_char6724 pub fn bpf_program__log_buf( 6725 prog: *const bpf_program, 6726 log_size: *mut size_t, 6727 ) -> *const ::std::os::raw::c_char; 6728 } 6729 extern "C" { bpf_program__set_log_buf( prog: *mut bpf_program, log_buf: *mut ::std::os::raw::c_char, log_size: size_t, ) -> ::std::os::raw::c_int6730 pub fn bpf_program__set_log_buf( 6731 prog: *mut bpf_program, 6732 log_buf: *mut ::std::os::raw::c_char, 6733 log_size: size_t, 6734 ) -> ::std::os::raw::c_int; 6735 } 6736 extern "C" { bpf_program__set_attach_target( prog: *mut bpf_program, attach_prog_fd: ::std::os::raw::c_int, attach_func_name: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int6737 pub fn bpf_program__set_attach_target( 6738 prog: *mut bpf_program, 6739 attach_prog_fd: ::std::os::raw::c_int, 6740 attach_func_name: *const ::std::os::raw::c_char, 6741 ) -> ::std::os::raw::c_int; 6742 } 6743 extern "C" { bpf_object__find_map_by_name( obj: *const bpf_object, name: *const ::std::os::raw::c_char, ) -> *mut bpf_map6744 pub fn bpf_object__find_map_by_name( 6745 obj: *const bpf_object, 6746 name: *const ::std::os::raw::c_char, 6747 ) -> *mut bpf_map; 6748 } 6749 extern "C" { bpf_object__find_map_fd_by_name( obj: *const bpf_object, name: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int6750 pub fn bpf_object__find_map_fd_by_name( 6751 obj: *const bpf_object, 6752 name: *const ::std::os::raw::c_char, 6753 ) -> ::std::os::raw::c_int; 6754 } 6755 extern "C" { bpf_object__next_map(obj: *const bpf_object, map: *const bpf_map) -> *mut bpf_map6756 pub fn bpf_object__next_map(obj: *const bpf_object, map: *const bpf_map) -> *mut bpf_map; 6757 } 6758 extern "C" { bpf_object__prev_map(obj: *const bpf_object, map: *const bpf_map) -> *mut bpf_map6759 pub fn bpf_object__prev_map(obj: *const bpf_object, map: *const bpf_map) -> *mut bpf_map; 6760 } 6761 extern "C" { bpf_map__set_autocreate(map: *mut bpf_map, autocreate: bool) -> ::std::os::raw::c_int6762 pub fn bpf_map__set_autocreate(map: *mut bpf_map, autocreate: bool) -> ::std::os::raw::c_int; 6763 } 6764 extern "C" { bpf_map__autocreate(map: *const bpf_map) -> bool6765 pub fn bpf_map__autocreate(map: *const bpf_map) -> bool; 6766 } 6767 extern "C" { bpf_map__fd(map: *const bpf_map) -> ::std::os::raw::c_int6768 pub fn bpf_map__fd(map: *const bpf_map) -> ::std::os::raw::c_int; 6769 } 6770 extern "C" { bpf_map__reuse_fd(map: *mut bpf_map, fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int6771 pub fn bpf_map__reuse_fd(map: *mut bpf_map, fd: ::std::os::raw::c_int) 6772 -> ::std::os::raw::c_int; 6773 } 6774 extern "C" { bpf_map__name(map: *const bpf_map) -> *const ::std::os::raw::c_char6775 pub fn bpf_map__name(map: *const bpf_map) -> *const ::std::os::raw::c_char; 6776 } 6777 extern "C" { bpf_map__type(map: *const bpf_map) -> bpf_map_type6778 pub fn bpf_map__type(map: *const bpf_map) -> bpf_map_type; 6779 } 6780 extern "C" { bpf_map__set_type(map: *mut bpf_map, type_: bpf_map_type) -> ::std::os::raw::c_int6781 pub fn bpf_map__set_type(map: *mut bpf_map, type_: bpf_map_type) -> ::std::os::raw::c_int; 6782 } 6783 extern "C" { bpf_map__max_entries(map: *const bpf_map) -> __u326784 pub fn bpf_map__max_entries(map: *const bpf_map) -> __u32; 6785 } 6786 extern "C" { bpf_map__set_max_entries(map: *mut bpf_map, max_entries: __u32) -> ::std::os::raw::c_int6787 pub fn bpf_map__set_max_entries(map: *mut bpf_map, max_entries: __u32) 6788 -> ::std::os::raw::c_int; 6789 } 6790 extern "C" { bpf_map__map_flags(map: *const bpf_map) -> __u326791 pub fn bpf_map__map_flags(map: *const bpf_map) -> __u32; 6792 } 6793 extern "C" { bpf_map__set_map_flags(map: *mut bpf_map, flags: __u32) -> ::std::os::raw::c_int6794 pub fn bpf_map__set_map_flags(map: *mut bpf_map, flags: __u32) -> ::std::os::raw::c_int; 6795 } 6796 extern "C" { bpf_map__numa_node(map: *const bpf_map) -> __u326797 pub fn bpf_map__numa_node(map: *const bpf_map) -> __u32; 6798 } 6799 extern "C" { bpf_map__set_numa_node(map: *mut bpf_map, numa_node: __u32) -> ::std::os::raw::c_int6800 pub fn bpf_map__set_numa_node(map: *mut bpf_map, numa_node: __u32) -> ::std::os::raw::c_int; 6801 } 6802 extern "C" { bpf_map__key_size(map: *const bpf_map) -> __u326803 pub fn bpf_map__key_size(map: *const bpf_map) -> __u32; 6804 } 6805 extern "C" { bpf_map__set_key_size(map: *mut bpf_map, size: __u32) -> ::std::os::raw::c_int6806 pub fn bpf_map__set_key_size(map: *mut bpf_map, size: __u32) -> ::std::os::raw::c_int; 6807 } 6808 extern "C" { bpf_map__value_size(map: *const bpf_map) -> __u326809 pub fn bpf_map__value_size(map: *const bpf_map) -> __u32; 6810 } 6811 extern "C" { bpf_map__set_value_size(map: *mut bpf_map, size: __u32) -> ::std::os::raw::c_int6812 pub fn bpf_map__set_value_size(map: *mut bpf_map, size: __u32) -> ::std::os::raw::c_int; 6813 } 6814 extern "C" { bpf_map__btf_key_type_id(map: *const bpf_map) -> __u326815 pub fn bpf_map__btf_key_type_id(map: *const bpf_map) -> __u32; 6816 } 6817 extern "C" { bpf_map__btf_value_type_id(map: *const bpf_map) -> __u326818 pub fn bpf_map__btf_value_type_id(map: *const bpf_map) -> __u32; 6819 } 6820 extern "C" { bpf_map__ifindex(map: *const bpf_map) -> __u326821 pub fn bpf_map__ifindex(map: *const bpf_map) -> __u32; 6822 } 6823 extern "C" { bpf_map__set_ifindex(map: *mut bpf_map, ifindex: __u32) -> ::std::os::raw::c_int6824 pub fn bpf_map__set_ifindex(map: *mut bpf_map, ifindex: __u32) -> ::std::os::raw::c_int; 6825 } 6826 extern "C" { bpf_map__map_extra(map: *const bpf_map) -> __u646827 pub fn bpf_map__map_extra(map: *const bpf_map) -> __u64; 6828 } 6829 extern "C" { bpf_map__set_map_extra(map: *mut bpf_map, map_extra: __u64) -> ::std::os::raw::c_int6830 pub fn bpf_map__set_map_extra(map: *mut bpf_map, map_extra: __u64) -> ::std::os::raw::c_int; 6831 } 6832 extern "C" { bpf_map__set_initial_value( map: *mut bpf_map, data: *const ::std::os::raw::c_void, size: size_t, ) -> ::std::os::raw::c_int6833 pub fn bpf_map__set_initial_value( 6834 map: *mut bpf_map, 6835 data: *const ::std::os::raw::c_void, 6836 size: size_t, 6837 ) -> ::std::os::raw::c_int; 6838 } 6839 extern "C" { bpf_map__initial_value( map: *const bpf_map, psize: *mut size_t, ) -> *mut ::std::os::raw::c_void6840 pub fn bpf_map__initial_value( 6841 map: *const bpf_map, 6842 psize: *mut size_t, 6843 ) -> *mut ::std::os::raw::c_void; 6844 } 6845 extern "C" { bpf_map__is_internal(map: *const bpf_map) -> bool6846 pub fn bpf_map__is_internal(map: *const bpf_map) -> bool; 6847 } 6848 extern "C" { bpf_map__set_pin_path( map: *mut bpf_map, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int6849 pub fn bpf_map__set_pin_path( 6850 map: *mut bpf_map, 6851 path: *const ::std::os::raw::c_char, 6852 ) -> ::std::os::raw::c_int; 6853 } 6854 extern "C" { bpf_map__pin_path(map: *const bpf_map) -> *const ::std::os::raw::c_char6855 pub fn bpf_map__pin_path(map: *const bpf_map) -> *const ::std::os::raw::c_char; 6856 } 6857 extern "C" { bpf_map__is_pinned(map: *const bpf_map) -> bool6858 pub fn bpf_map__is_pinned(map: *const bpf_map) -> bool; 6859 } 6860 extern "C" { bpf_map__pin( map: *mut bpf_map, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int6861 pub fn bpf_map__pin( 6862 map: *mut bpf_map, 6863 path: *const ::std::os::raw::c_char, 6864 ) -> ::std::os::raw::c_int; 6865 } 6866 extern "C" { bpf_map__unpin( map: *mut bpf_map, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int6867 pub fn bpf_map__unpin( 6868 map: *mut bpf_map, 6869 path: *const ::std::os::raw::c_char, 6870 ) -> ::std::os::raw::c_int; 6871 } 6872 extern "C" { bpf_map__set_inner_map_fd( map: *mut bpf_map, fd: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int6873 pub fn bpf_map__set_inner_map_fd( 6874 map: *mut bpf_map, 6875 fd: ::std::os::raw::c_int, 6876 ) -> ::std::os::raw::c_int; 6877 } 6878 extern "C" { bpf_map__inner_map(map: *mut bpf_map) -> *mut bpf_map6879 pub fn bpf_map__inner_map(map: *mut bpf_map) -> *mut bpf_map; 6880 } 6881 extern "C" { bpf_map__lookup_elem( map: *const bpf_map, key: *const ::std::os::raw::c_void, key_sz: size_t, value: *mut ::std::os::raw::c_void, value_sz: size_t, flags: __u64, ) -> ::std::os::raw::c_int6882 pub fn bpf_map__lookup_elem( 6883 map: *const bpf_map, 6884 key: *const ::std::os::raw::c_void, 6885 key_sz: size_t, 6886 value: *mut ::std::os::raw::c_void, 6887 value_sz: size_t, 6888 flags: __u64, 6889 ) -> ::std::os::raw::c_int; 6890 } 6891 extern "C" { bpf_map__update_elem( map: *const bpf_map, key: *const ::std::os::raw::c_void, key_sz: size_t, value: *const ::std::os::raw::c_void, value_sz: size_t, flags: __u64, ) -> ::std::os::raw::c_int6892 pub fn bpf_map__update_elem( 6893 map: *const bpf_map, 6894 key: *const ::std::os::raw::c_void, 6895 key_sz: size_t, 6896 value: *const ::std::os::raw::c_void, 6897 value_sz: size_t, 6898 flags: __u64, 6899 ) -> ::std::os::raw::c_int; 6900 } 6901 extern "C" { bpf_map__delete_elem( map: *const bpf_map, key: *const ::std::os::raw::c_void, key_sz: size_t, flags: __u64, ) -> ::std::os::raw::c_int6902 pub fn bpf_map__delete_elem( 6903 map: *const bpf_map, 6904 key: *const ::std::os::raw::c_void, 6905 key_sz: size_t, 6906 flags: __u64, 6907 ) -> ::std::os::raw::c_int; 6908 } 6909 extern "C" { bpf_map__lookup_and_delete_elem( map: *const bpf_map, key: *const ::std::os::raw::c_void, key_sz: size_t, value: *mut ::std::os::raw::c_void, value_sz: size_t, flags: __u64, ) -> ::std::os::raw::c_int6910 pub fn bpf_map__lookup_and_delete_elem( 6911 map: *const bpf_map, 6912 key: *const ::std::os::raw::c_void, 6913 key_sz: size_t, 6914 value: *mut ::std::os::raw::c_void, 6915 value_sz: size_t, 6916 flags: __u64, 6917 ) -> ::std::os::raw::c_int; 6918 } 6919 extern "C" { bpf_map__get_next_key( map: *const bpf_map, cur_key: *const ::std::os::raw::c_void, next_key: *mut ::std::os::raw::c_void, key_sz: size_t, ) -> ::std::os::raw::c_int6920 pub fn bpf_map__get_next_key( 6921 map: *const bpf_map, 6922 cur_key: *const ::std::os::raw::c_void, 6923 next_key: *mut ::std::os::raw::c_void, 6924 key_sz: size_t, 6925 ) -> ::std::os::raw::c_int; 6926 } 6927 #[repr(C)] 6928 #[derive(Debug, Default, Copy, Clone)] 6929 pub struct bpf_xdp_set_link_opts { 6930 pub sz: size_t, 6931 pub old_fd: ::std::os::raw::c_int, 6932 pub __bindgen_padding_0: [u8; 4usize], 6933 } 6934 #[repr(C)] 6935 #[derive(Debug, Default, Copy, Clone)] 6936 pub struct bpf_xdp_attach_opts { 6937 pub sz: size_t, 6938 pub old_prog_fd: ::std::os::raw::c_int, 6939 pub __bindgen_padding_0: [u8; 4usize], 6940 } 6941 #[repr(C)] 6942 #[derive(Debug, Default, Copy, Clone)] 6943 pub struct bpf_xdp_query_opts { 6944 pub sz: size_t, 6945 pub prog_id: __u32, 6946 pub drv_prog_id: __u32, 6947 pub hw_prog_id: __u32, 6948 pub skb_prog_id: __u32, 6949 pub attach_mode: __u8, 6950 pub __bindgen_padding_0: [u8; 7usize], 6951 pub feature_flags: __u64, 6952 pub xdp_zc_max_segs: __u32, 6953 pub __bindgen_padding_1: [u8; 4usize], 6954 } 6955 extern "C" { bpf_xdp_attach( ifindex: ::std::os::raw::c_int, prog_fd: ::std::os::raw::c_int, flags: __u32, opts: *const bpf_xdp_attach_opts, ) -> ::std::os::raw::c_int6956 pub fn bpf_xdp_attach( 6957 ifindex: ::std::os::raw::c_int, 6958 prog_fd: ::std::os::raw::c_int, 6959 flags: __u32, 6960 opts: *const bpf_xdp_attach_opts, 6961 ) -> ::std::os::raw::c_int; 6962 } 6963 extern "C" { bpf_xdp_detach( ifindex: ::std::os::raw::c_int, flags: __u32, opts: *const bpf_xdp_attach_opts, ) -> ::std::os::raw::c_int6964 pub fn bpf_xdp_detach( 6965 ifindex: ::std::os::raw::c_int, 6966 flags: __u32, 6967 opts: *const bpf_xdp_attach_opts, 6968 ) -> ::std::os::raw::c_int; 6969 } 6970 extern "C" { bpf_xdp_query( ifindex: ::std::os::raw::c_int, flags: ::std::os::raw::c_int, opts: *mut bpf_xdp_query_opts, ) -> ::std::os::raw::c_int6971 pub fn bpf_xdp_query( 6972 ifindex: ::std::os::raw::c_int, 6973 flags: ::std::os::raw::c_int, 6974 opts: *mut bpf_xdp_query_opts, 6975 ) -> ::std::os::raw::c_int; 6976 } 6977 extern "C" { bpf_xdp_query_id( ifindex: ::std::os::raw::c_int, flags: ::std::os::raw::c_int, prog_id: *mut __u32, ) -> ::std::os::raw::c_int6978 pub fn bpf_xdp_query_id( 6979 ifindex: ::std::os::raw::c_int, 6980 flags: ::std::os::raw::c_int, 6981 prog_id: *mut __u32, 6982 ) -> ::std::os::raw::c_int; 6983 } 6984 pub const BPF_TC_INGRESS: bpf_tc_attach_point = 1; 6985 pub const BPF_TC_EGRESS: bpf_tc_attach_point = 2; 6986 pub const BPF_TC_CUSTOM: bpf_tc_attach_point = 4; 6987 pub type bpf_tc_attach_point = ::std::os::raw::c_uint; 6988 pub const BPF_TC_F_REPLACE: bpf_tc_flags = 1; 6989 pub type bpf_tc_flags = ::std::os::raw::c_uint; 6990 #[repr(C)] 6991 #[derive(Debug, Copy, Clone)] 6992 pub struct bpf_tc_hook { 6993 pub sz: size_t, 6994 pub ifindex: ::std::os::raw::c_int, 6995 pub attach_point: bpf_tc_attach_point, 6996 pub parent: __u32, 6997 pub __bindgen_padding_0: [u8; 4usize], 6998 } 6999 impl Default for bpf_tc_hook { default() -> Self7000 fn default() -> Self { 7001 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 7002 unsafe { 7003 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 7004 s.assume_init() 7005 } 7006 } 7007 } 7008 #[repr(C)] 7009 #[derive(Debug, Default, Copy, Clone)] 7010 pub struct bpf_tc_opts { 7011 pub sz: size_t, 7012 pub prog_fd: ::std::os::raw::c_int, 7013 pub flags: __u32, 7014 pub prog_id: __u32, 7015 pub handle: __u32, 7016 pub priority: __u32, 7017 pub __bindgen_padding_0: [u8; 4usize], 7018 } 7019 extern "C" { bpf_tc_hook_create(hook: *mut bpf_tc_hook) -> ::std::os::raw::c_int7020 pub fn bpf_tc_hook_create(hook: *mut bpf_tc_hook) -> ::std::os::raw::c_int; 7021 } 7022 extern "C" { bpf_tc_hook_destroy(hook: *mut bpf_tc_hook) -> ::std::os::raw::c_int7023 pub fn bpf_tc_hook_destroy(hook: *mut bpf_tc_hook) -> ::std::os::raw::c_int; 7024 } 7025 extern "C" { bpf_tc_attach(hook: *const bpf_tc_hook, opts: *mut bpf_tc_opts) -> ::std::os::raw::c_int7026 pub fn bpf_tc_attach(hook: *const bpf_tc_hook, opts: *mut bpf_tc_opts) 7027 -> ::std::os::raw::c_int; 7028 } 7029 extern "C" { bpf_tc_detach( hook: *const bpf_tc_hook, opts: *const bpf_tc_opts, ) -> ::std::os::raw::c_int7030 pub fn bpf_tc_detach( 7031 hook: *const bpf_tc_hook, 7032 opts: *const bpf_tc_opts, 7033 ) -> ::std::os::raw::c_int; 7034 } 7035 extern "C" { bpf_tc_query(hook: *const bpf_tc_hook, opts: *mut bpf_tc_opts) -> ::std::os::raw::c_int7036 pub fn bpf_tc_query(hook: *const bpf_tc_hook, opts: *mut bpf_tc_opts) -> ::std::os::raw::c_int; 7037 } 7038 #[repr(C)] 7039 #[derive(Debug, Copy, Clone)] 7040 pub struct ring_buffer { 7041 _unused: [u8; 0], 7042 } 7043 #[repr(C)] 7044 #[derive(Debug, Copy, Clone)] 7045 pub struct ring { 7046 _unused: [u8; 0], 7047 } 7048 #[repr(C)] 7049 #[derive(Debug, Copy, Clone)] 7050 pub struct user_ring_buffer { 7051 _unused: [u8; 0], 7052 } 7053 pub type ring_buffer_sample_fn = ::std::option::Option< 7054 unsafe extern "C" fn( 7055 ctx: *mut ::std::os::raw::c_void, 7056 data: *mut ::std::os::raw::c_void, 7057 size: size_t, 7058 ) -> ::std::os::raw::c_int, 7059 >; 7060 #[repr(C)] 7061 #[derive(Debug, Default, Copy, Clone)] 7062 pub struct ring_buffer_opts { 7063 pub sz: size_t, 7064 } 7065 extern "C" { ring_buffer__new( map_fd: ::std::os::raw::c_int, sample_cb: ring_buffer_sample_fn, ctx: *mut ::std::os::raw::c_void, opts: *const ring_buffer_opts, ) -> *mut ring_buffer7066 pub fn ring_buffer__new( 7067 map_fd: ::std::os::raw::c_int, 7068 sample_cb: ring_buffer_sample_fn, 7069 ctx: *mut ::std::os::raw::c_void, 7070 opts: *const ring_buffer_opts, 7071 ) -> *mut ring_buffer; 7072 } 7073 extern "C" { ring_buffer__free(rb: *mut ring_buffer)7074 pub fn ring_buffer__free(rb: *mut ring_buffer); 7075 } 7076 extern "C" { ring_buffer__add( rb: *mut ring_buffer, map_fd: ::std::os::raw::c_int, sample_cb: ring_buffer_sample_fn, ctx: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int7077 pub fn ring_buffer__add( 7078 rb: *mut ring_buffer, 7079 map_fd: ::std::os::raw::c_int, 7080 sample_cb: ring_buffer_sample_fn, 7081 ctx: *mut ::std::os::raw::c_void, 7082 ) -> ::std::os::raw::c_int; 7083 } 7084 extern "C" { ring_buffer__poll( rb: *mut ring_buffer, timeout_ms: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int7085 pub fn ring_buffer__poll( 7086 rb: *mut ring_buffer, 7087 timeout_ms: ::std::os::raw::c_int, 7088 ) -> ::std::os::raw::c_int; 7089 } 7090 extern "C" { ring_buffer__consume(rb: *mut ring_buffer) -> ::std::os::raw::c_int7091 pub fn ring_buffer__consume(rb: *mut ring_buffer) -> ::std::os::raw::c_int; 7092 } 7093 extern "C" { ring_buffer__epoll_fd(rb: *const ring_buffer) -> ::std::os::raw::c_int7094 pub fn ring_buffer__epoll_fd(rb: *const ring_buffer) -> ::std::os::raw::c_int; 7095 } 7096 extern "C" { ring_buffer__ring(rb: *mut ring_buffer, idx: ::std::os::raw::c_uint) -> *mut ring7097 pub fn ring_buffer__ring(rb: *mut ring_buffer, idx: ::std::os::raw::c_uint) -> *mut ring; 7098 } 7099 #[repr(C)] 7100 #[derive(Debug, Default, Copy, Clone)] 7101 pub struct user_ring_buffer_opts { 7102 pub sz: size_t, 7103 } 7104 extern "C" { user_ring_buffer__new( map_fd: ::std::os::raw::c_int, opts: *const user_ring_buffer_opts, ) -> *mut user_ring_buffer7105 pub fn user_ring_buffer__new( 7106 map_fd: ::std::os::raw::c_int, 7107 opts: *const user_ring_buffer_opts, 7108 ) -> *mut user_ring_buffer; 7109 } 7110 extern "C" { user_ring_buffer__reserve( rb: *mut user_ring_buffer, size: __u32, ) -> *mut ::std::os::raw::c_void7111 pub fn user_ring_buffer__reserve( 7112 rb: *mut user_ring_buffer, 7113 size: __u32, 7114 ) -> *mut ::std::os::raw::c_void; 7115 } 7116 extern "C" { user_ring_buffer__reserve_blocking( rb: *mut user_ring_buffer, size: __u32, timeout_ms: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_void7117 pub fn user_ring_buffer__reserve_blocking( 7118 rb: *mut user_ring_buffer, 7119 size: __u32, 7120 timeout_ms: ::std::os::raw::c_int, 7121 ) -> *mut ::std::os::raw::c_void; 7122 } 7123 extern "C" { user_ring_buffer__submit(rb: *mut user_ring_buffer, sample: *mut ::std::os::raw::c_void)7124 pub fn user_ring_buffer__submit(rb: *mut user_ring_buffer, sample: *mut ::std::os::raw::c_void); 7125 } 7126 extern "C" { user_ring_buffer__discard( rb: *mut user_ring_buffer, sample: *mut ::std::os::raw::c_void, )7127 pub fn user_ring_buffer__discard( 7128 rb: *mut user_ring_buffer, 7129 sample: *mut ::std::os::raw::c_void, 7130 ); 7131 } 7132 extern "C" { user_ring_buffer__free(rb: *mut user_ring_buffer)7133 pub fn user_ring_buffer__free(rb: *mut user_ring_buffer); 7134 } 7135 #[repr(C)] 7136 #[derive(Debug, Copy, Clone)] 7137 pub struct perf_buffer { 7138 _unused: [u8; 0], 7139 } 7140 pub type perf_buffer_sample_fn = ::std::option::Option< 7141 unsafe extern "C" fn( 7142 ctx: *mut ::std::os::raw::c_void, 7143 cpu: ::std::os::raw::c_int, 7144 data: *mut ::std::os::raw::c_void, 7145 size: __u32, 7146 ), 7147 >; 7148 pub type perf_buffer_lost_fn = ::std::option::Option< 7149 unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void, cpu: ::std::os::raw::c_int, cnt: __u64), 7150 >; 7151 #[repr(C)] 7152 #[derive(Debug, Default, Copy, Clone)] 7153 pub struct perf_buffer_opts { 7154 pub sz: size_t, 7155 pub sample_period: __u32, 7156 pub __bindgen_padding_0: [u8; 4usize], 7157 } 7158 extern "C" { perf_buffer__new( map_fd: ::std::os::raw::c_int, page_cnt: size_t, sample_cb: perf_buffer_sample_fn, lost_cb: perf_buffer_lost_fn, ctx: *mut ::std::os::raw::c_void, opts: *const perf_buffer_opts, ) -> *mut perf_buffer7159 pub fn perf_buffer__new( 7160 map_fd: ::std::os::raw::c_int, 7161 page_cnt: size_t, 7162 sample_cb: perf_buffer_sample_fn, 7163 lost_cb: perf_buffer_lost_fn, 7164 ctx: *mut ::std::os::raw::c_void, 7165 opts: *const perf_buffer_opts, 7166 ) -> *mut perf_buffer; 7167 } 7168 pub const LIBBPF_PERF_EVENT_DONE: bpf_perf_event_ret = 0; 7169 pub const LIBBPF_PERF_EVENT_ERROR: bpf_perf_event_ret = -1; 7170 pub const LIBBPF_PERF_EVENT_CONT: bpf_perf_event_ret = -2; 7171 pub type bpf_perf_event_ret = ::std::os::raw::c_int; 7172 pub type perf_buffer_event_fn = ::std::option::Option< 7173 unsafe extern "C" fn( 7174 ctx: *mut ::std::os::raw::c_void, 7175 cpu: ::std::os::raw::c_int, 7176 event: *mut perf_event_header, 7177 ) -> bpf_perf_event_ret, 7178 >; 7179 #[repr(C)] 7180 #[derive(Debug, Copy, Clone)] 7181 pub struct perf_buffer_raw_opts { 7182 pub sz: size_t, 7183 pub cpu_cnt: ::std::os::raw::c_int, 7184 pub __bindgen_padding_0: [u8; 4usize], 7185 pub cpus: *mut ::std::os::raw::c_int, 7186 pub map_keys: *mut ::std::os::raw::c_int, 7187 } 7188 impl Default for perf_buffer_raw_opts { default() -> Self7189 fn default() -> Self { 7190 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 7191 unsafe { 7192 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 7193 s.assume_init() 7194 } 7195 } 7196 } 7197 extern "C" { perf_buffer__new_raw( map_fd: ::std::os::raw::c_int, page_cnt: size_t, attr: *mut perf_event_attr, event_cb: perf_buffer_event_fn, ctx: *mut ::std::os::raw::c_void, opts: *const perf_buffer_raw_opts, ) -> *mut perf_buffer7198 pub fn perf_buffer__new_raw( 7199 map_fd: ::std::os::raw::c_int, 7200 page_cnt: size_t, 7201 attr: *mut perf_event_attr, 7202 event_cb: perf_buffer_event_fn, 7203 ctx: *mut ::std::os::raw::c_void, 7204 opts: *const perf_buffer_raw_opts, 7205 ) -> *mut perf_buffer; 7206 } 7207 extern "C" { perf_buffer__free(pb: *mut perf_buffer)7208 pub fn perf_buffer__free(pb: *mut perf_buffer); 7209 } 7210 extern "C" { perf_buffer__epoll_fd(pb: *const perf_buffer) -> ::std::os::raw::c_int7211 pub fn perf_buffer__epoll_fd(pb: *const perf_buffer) -> ::std::os::raw::c_int; 7212 } 7213 extern "C" { perf_buffer__poll( pb: *mut perf_buffer, timeout_ms: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int7214 pub fn perf_buffer__poll( 7215 pb: *mut perf_buffer, 7216 timeout_ms: ::std::os::raw::c_int, 7217 ) -> ::std::os::raw::c_int; 7218 } 7219 extern "C" { perf_buffer__consume(pb: *mut perf_buffer) -> ::std::os::raw::c_int7220 pub fn perf_buffer__consume(pb: *mut perf_buffer) -> ::std::os::raw::c_int; 7221 } 7222 extern "C" { perf_buffer__consume_buffer( pb: *mut perf_buffer, buf_idx: size_t, ) -> ::std::os::raw::c_int7223 pub fn perf_buffer__consume_buffer( 7224 pb: *mut perf_buffer, 7225 buf_idx: size_t, 7226 ) -> ::std::os::raw::c_int; 7227 } 7228 extern "C" { perf_buffer__buffer_cnt(pb: *const perf_buffer) -> size_t7229 pub fn perf_buffer__buffer_cnt(pb: *const perf_buffer) -> size_t; 7230 } 7231 extern "C" { perf_buffer__buffer_fd(pb: *const perf_buffer, buf_idx: size_t) -> ::std::os::raw::c_int7232 pub fn perf_buffer__buffer_fd(pb: *const perf_buffer, buf_idx: size_t) 7233 -> ::std::os::raw::c_int; 7234 } 7235 extern "C" { perf_buffer__buffer( pb: *mut perf_buffer, buf_idx: ::std::os::raw::c_int, buf: *mut *mut ::std::os::raw::c_void, buf_size: *mut size_t, ) -> ::std::os::raw::c_int7236 pub fn perf_buffer__buffer( 7237 pb: *mut perf_buffer, 7238 buf_idx: ::std::os::raw::c_int, 7239 buf: *mut *mut ::std::os::raw::c_void, 7240 buf_size: *mut size_t, 7241 ) -> ::std::os::raw::c_int; 7242 } 7243 #[repr(C)] 7244 #[derive(Debug, Copy, Clone)] 7245 pub struct bpf_prog_linfo { 7246 _unused: [u8; 0], 7247 } 7248 extern "C" { bpf_prog_linfo__free(prog_linfo: *mut bpf_prog_linfo)7249 pub fn bpf_prog_linfo__free(prog_linfo: *mut bpf_prog_linfo); 7250 } 7251 extern "C" { bpf_prog_linfo__new(info: *const bpf_prog_info) -> *mut bpf_prog_linfo7252 pub fn bpf_prog_linfo__new(info: *const bpf_prog_info) -> *mut bpf_prog_linfo; 7253 } 7254 extern "C" { bpf_prog_linfo__lfind_addr_func( prog_linfo: *const bpf_prog_linfo, addr: __u64, func_idx: __u32, nr_skip: __u32, ) -> *const bpf_line_info7255 pub fn bpf_prog_linfo__lfind_addr_func( 7256 prog_linfo: *const bpf_prog_linfo, 7257 addr: __u64, 7258 func_idx: __u32, 7259 nr_skip: __u32, 7260 ) -> *const bpf_line_info; 7261 } 7262 extern "C" { bpf_prog_linfo__lfind( prog_linfo: *const bpf_prog_linfo, insn_off: __u32, nr_skip: __u32, ) -> *const bpf_line_info7263 pub fn bpf_prog_linfo__lfind( 7264 prog_linfo: *const bpf_prog_linfo, 7265 insn_off: __u32, 7266 nr_skip: __u32, 7267 ) -> *const bpf_line_info; 7268 } 7269 extern "C" { libbpf_probe_bpf_prog_type( prog_type: bpf_prog_type, opts: *const ::std::os::raw::c_void, ) -> ::std::os::raw::c_int7270 pub fn libbpf_probe_bpf_prog_type( 7271 prog_type: bpf_prog_type, 7272 opts: *const ::std::os::raw::c_void, 7273 ) -> ::std::os::raw::c_int; 7274 } 7275 extern "C" { libbpf_probe_bpf_map_type( map_type: bpf_map_type, opts: *const ::std::os::raw::c_void, ) -> ::std::os::raw::c_int7276 pub fn libbpf_probe_bpf_map_type( 7277 map_type: bpf_map_type, 7278 opts: *const ::std::os::raw::c_void, 7279 ) -> ::std::os::raw::c_int; 7280 } 7281 extern "C" { libbpf_probe_bpf_helper( prog_type: bpf_prog_type, helper_id: bpf_func_id, opts: *const ::std::os::raw::c_void, ) -> ::std::os::raw::c_int7282 pub fn libbpf_probe_bpf_helper( 7283 prog_type: bpf_prog_type, 7284 helper_id: bpf_func_id, 7285 opts: *const ::std::os::raw::c_void, 7286 ) -> ::std::os::raw::c_int; 7287 } 7288 extern "C" { libbpf_num_possible_cpus() -> ::std::os::raw::c_int7289 pub fn libbpf_num_possible_cpus() -> ::std::os::raw::c_int; 7290 } 7291 #[repr(C)] 7292 #[derive(Debug, Copy, Clone)] 7293 pub struct bpf_map_skeleton { 7294 pub name: *const ::std::os::raw::c_char, 7295 pub map: *mut *mut bpf_map, 7296 pub mmaped: *mut *mut ::std::os::raw::c_void, 7297 } 7298 impl Default for bpf_map_skeleton { default() -> Self7299 fn default() -> Self { 7300 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 7301 unsafe { 7302 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 7303 s.assume_init() 7304 } 7305 } 7306 } 7307 #[repr(C)] 7308 #[derive(Debug, Copy, Clone)] 7309 pub struct bpf_prog_skeleton { 7310 pub name: *const ::std::os::raw::c_char, 7311 pub prog: *mut *mut bpf_program, 7312 pub link: *mut *mut bpf_link, 7313 } 7314 impl Default for bpf_prog_skeleton { default() -> Self7315 fn default() -> Self { 7316 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 7317 unsafe { 7318 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 7319 s.assume_init() 7320 } 7321 } 7322 } 7323 #[repr(C)] 7324 #[derive(Debug, Copy, Clone)] 7325 pub struct bpf_object_skeleton { 7326 pub sz: size_t, 7327 pub name: *const ::std::os::raw::c_char, 7328 pub data: *const ::std::os::raw::c_void, 7329 pub data_sz: size_t, 7330 pub obj: *mut *mut bpf_object, 7331 pub map_cnt: ::std::os::raw::c_int, 7332 pub map_skel_sz: ::std::os::raw::c_int, 7333 pub maps: *mut bpf_map_skeleton, 7334 pub prog_cnt: ::std::os::raw::c_int, 7335 pub prog_skel_sz: ::std::os::raw::c_int, 7336 pub progs: *mut bpf_prog_skeleton, 7337 } 7338 impl Default for bpf_object_skeleton { default() -> Self7339 fn default() -> Self { 7340 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 7341 unsafe { 7342 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 7343 s.assume_init() 7344 } 7345 } 7346 } 7347 extern "C" { bpf_object__open_skeleton( s: *mut bpf_object_skeleton, opts: *const bpf_object_open_opts, ) -> ::std::os::raw::c_int7348 pub fn bpf_object__open_skeleton( 7349 s: *mut bpf_object_skeleton, 7350 opts: *const bpf_object_open_opts, 7351 ) -> ::std::os::raw::c_int; 7352 } 7353 extern "C" { bpf_object__load_skeleton(s: *mut bpf_object_skeleton) -> ::std::os::raw::c_int7354 pub fn bpf_object__load_skeleton(s: *mut bpf_object_skeleton) -> ::std::os::raw::c_int; 7355 } 7356 extern "C" { bpf_object__attach_skeleton(s: *mut bpf_object_skeleton) -> ::std::os::raw::c_int7357 pub fn bpf_object__attach_skeleton(s: *mut bpf_object_skeleton) -> ::std::os::raw::c_int; 7358 } 7359 extern "C" { bpf_object__detach_skeleton(s: *mut bpf_object_skeleton)7360 pub fn bpf_object__detach_skeleton(s: *mut bpf_object_skeleton); 7361 } 7362 extern "C" { bpf_object__destroy_skeleton(s: *mut bpf_object_skeleton)7363 pub fn bpf_object__destroy_skeleton(s: *mut bpf_object_skeleton); 7364 } 7365 #[repr(C)] 7366 #[derive(Debug, Copy, Clone)] 7367 pub struct bpf_var_skeleton { 7368 pub name: *const ::std::os::raw::c_char, 7369 pub map: *mut *mut bpf_map, 7370 pub addr: *mut *mut ::std::os::raw::c_void, 7371 } 7372 impl Default for bpf_var_skeleton { default() -> Self7373 fn default() -> Self { 7374 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 7375 unsafe { 7376 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 7377 s.assume_init() 7378 } 7379 } 7380 } 7381 #[repr(C)] 7382 #[derive(Debug, Copy, Clone)] 7383 pub struct bpf_object_subskeleton { 7384 pub sz: size_t, 7385 pub obj: *const bpf_object, 7386 pub map_cnt: ::std::os::raw::c_int, 7387 pub map_skel_sz: ::std::os::raw::c_int, 7388 pub maps: *mut bpf_map_skeleton, 7389 pub prog_cnt: ::std::os::raw::c_int, 7390 pub prog_skel_sz: ::std::os::raw::c_int, 7391 pub progs: *mut bpf_prog_skeleton, 7392 pub var_cnt: ::std::os::raw::c_int, 7393 pub var_skel_sz: ::std::os::raw::c_int, 7394 pub vars: *mut bpf_var_skeleton, 7395 } 7396 impl Default for bpf_object_subskeleton { default() -> Self7397 fn default() -> Self { 7398 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 7399 unsafe { 7400 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 7401 s.assume_init() 7402 } 7403 } 7404 } 7405 extern "C" { bpf_object__open_subskeleton(s: *mut bpf_object_subskeleton) -> ::std::os::raw::c_int7406 pub fn bpf_object__open_subskeleton(s: *mut bpf_object_subskeleton) -> ::std::os::raw::c_int; 7407 } 7408 extern "C" { bpf_object__destroy_subskeleton(s: *mut bpf_object_subskeleton)7409 pub fn bpf_object__destroy_subskeleton(s: *mut bpf_object_subskeleton); 7410 } 7411 #[repr(C)] 7412 #[derive(Debug, Copy, Clone)] 7413 pub struct gen_loader_opts { 7414 pub sz: size_t, 7415 pub data: *const ::std::os::raw::c_char, 7416 pub insns: *const ::std::os::raw::c_char, 7417 pub data_sz: __u32, 7418 pub insns_sz: __u32, 7419 } 7420 impl Default for gen_loader_opts { default() -> Self7421 fn default() -> Self { 7422 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 7423 unsafe { 7424 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 7425 s.assume_init() 7426 } 7427 } 7428 } 7429 extern "C" { bpf_object__gen_loader( obj: *mut bpf_object, opts: *mut gen_loader_opts, ) -> ::std::os::raw::c_int7430 pub fn bpf_object__gen_loader( 7431 obj: *mut bpf_object, 7432 opts: *mut gen_loader_opts, 7433 ) -> ::std::os::raw::c_int; 7434 } 7435 #[repr(C)] 7436 #[derive(Debug, Default, Copy, Clone)] 7437 pub struct bpf_linker_opts { 7438 pub sz: size_t, 7439 } 7440 #[repr(C)] 7441 #[derive(Debug, Default, Copy, Clone)] 7442 pub struct bpf_linker_file_opts { 7443 pub sz: size_t, 7444 } 7445 #[repr(C)] 7446 #[derive(Debug, Copy, Clone)] 7447 pub struct bpf_linker { 7448 _unused: [u8; 0], 7449 } 7450 extern "C" { bpf_linker__new( filename: *const ::std::os::raw::c_char, opts: *mut bpf_linker_opts, ) -> *mut bpf_linker7451 pub fn bpf_linker__new( 7452 filename: *const ::std::os::raw::c_char, 7453 opts: *mut bpf_linker_opts, 7454 ) -> *mut bpf_linker; 7455 } 7456 extern "C" { bpf_linker__add_file( linker: *mut bpf_linker, filename: *const ::std::os::raw::c_char, opts: *const bpf_linker_file_opts, ) -> ::std::os::raw::c_int7457 pub fn bpf_linker__add_file( 7458 linker: *mut bpf_linker, 7459 filename: *const ::std::os::raw::c_char, 7460 opts: *const bpf_linker_file_opts, 7461 ) -> ::std::os::raw::c_int; 7462 } 7463 extern "C" { bpf_linker__finalize(linker: *mut bpf_linker) -> ::std::os::raw::c_int7464 pub fn bpf_linker__finalize(linker: *mut bpf_linker) -> ::std::os::raw::c_int; 7465 } 7466 extern "C" { bpf_linker__free(linker: *mut bpf_linker)7467 pub fn bpf_linker__free(linker: *mut bpf_linker); 7468 } 7469 pub type libbpf_prog_setup_fn_t = ::std::option::Option< 7470 unsafe extern "C" fn( 7471 prog: *mut bpf_program, 7472 cookie: ::std::os::raw::c_long, 7473 ) -> ::std::os::raw::c_int, 7474 >; 7475 pub type libbpf_prog_prepare_load_fn_t = ::std::option::Option< 7476 unsafe extern "C" fn( 7477 prog: *mut bpf_program, 7478 opts: *mut bpf_prog_load_opts, 7479 cookie: ::std::os::raw::c_long, 7480 ) -> ::std::os::raw::c_int, 7481 >; 7482 pub type libbpf_prog_attach_fn_t = ::std::option::Option< 7483 unsafe extern "C" fn( 7484 prog: *const bpf_program, 7485 cookie: ::std::os::raw::c_long, 7486 link: *mut *mut bpf_link, 7487 ) -> ::std::os::raw::c_int, 7488 >; 7489 #[repr(C)] 7490 #[derive(Debug, Default, Copy, Clone)] 7491 pub struct libbpf_prog_handler_opts { 7492 pub sz: size_t, 7493 pub cookie: ::std::os::raw::c_long, 7494 pub prog_setup_fn: libbpf_prog_setup_fn_t, 7495 pub prog_prepare_load_fn: libbpf_prog_prepare_load_fn_t, 7496 pub prog_attach_fn: libbpf_prog_attach_fn_t, 7497 } 7498 extern "C" { libbpf_register_prog_handler( sec: *const ::std::os::raw::c_char, prog_type: bpf_prog_type, exp_attach_type: bpf_attach_type, opts: *const libbpf_prog_handler_opts, ) -> ::std::os::raw::c_int7499 pub fn libbpf_register_prog_handler( 7500 sec: *const ::std::os::raw::c_char, 7501 prog_type: bpf_prog_type, 7502 exp_attach_type: bpf_attach_type, 7503 opts: *const libbpf_prog_handler_opts, 7504 ) -> ::std::os::raw::c_int; 7505 } 7506 extern "C" { libbpf_unregister_prog_handler( handler_id: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int7507 pub fn libbpf_unregister_prog_handler( 7508 handler_id: ::std::os::raw::c_int, 7509 ) -> ::std::os::raw::c_int; 7510 } 7511 pub type __builtin_va_list = [__va_list_tag; 1usize]; 7512 #[repr(C)] 7513 #[derive(Debug, Copy, Clone)] 7514 pub struct __va_list_tag { 7515 pub gp_offset: ::std::os::raw::c_uint, 7516 pub fp_offset: ::std::os::raw::c_uint, 7517 pub overflow_arg_area: *mut ::std::os::raw::c_void, 7518 pub reg_save_area: *mut ::std::os::raw::c_void, 7519 } 7520 impl Default for __va_list_tag { default() -> Self7521 fn default() -> Self { 7522 let mut s = ::std::mem::MaybeUninit::<Self>::uninit(); 7523 unsafe { 7524 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); 7525 s.assume_init() 7526 } 7527 } 7528 } 7529