diff --git a/aya-obj/src/generated/btf_internal_bindings.rs b/aya-obj/src/generated/btf_internal_bindings.rs index 4543bab5..12a47904 100644 --- a/aya-obj/src/generated/btf_internal_bindings.rs +++ b/aya-obj/src/generated/btf_internal_bindings.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __u8 = ::core::ffi::c_uchar; pub type __u16 = ::core::ffi::c_ushort; diff --git a/aya-obj/src/generated/linux_bindings_aarch64.rs b/aya-obj/src/generated/linux_bindings_aarch64.rs index 7ce3f17c..1246cc16 100644 --- a/aya-obj/src/generated/linux_bindings_aarch64.rs +++ b/aya-obj/src/generated/linux_bindings_aarch64.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -16,10 +16,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -29,10 +26,21 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -40,12 +48,27 @@ where }; let mask = 1 << bit_index; if val { - *byte |= mask; + byte | mask } else { - *byte &= !mask; + byte & !mask } } #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -64,6 +87,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -79,6 +120,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } } #[repr(C)] #[derive(Default)] @@ -162,6 +219,18 @@ pub const XDP_FLAGS_HW_MODE: u32 = 8; pub const XDP_FLAGS_REPLACE: u32 = 16; pub const XDP_FLAGS_MODES: u32 = 14; pub const XDP_FLAGS_MASK: u32 = 31; +pub const PERF_EVENT_IOC_ENABLE: u32 = 9216; +pub const PERF_EVENT_IOC_DISABLE: u32 = 9217; +pub const PERF_EVENT_IOC_REFRESH: u32 = 9218; +pub const PERF_EVENT_IOC_RESET: u32 = 9219; +pub const PERF_EVENT_IOC_PERIOD: u32 = 1074275332; +pub const PERF_EVENT_IOC_SET_OUTPUT: u32 = 9221; +pub const PERF_EVENT_IOC_SET_FILTER: u32 = 1074275334; +pub const PERF_EVENT_IOC_ID: u32 = 2148017159; +pub const PERF_EVENT_IOC_SET_BPF: u32 = 1074013192; +pub const PERF_EVENT_IOC_PAUSE_OUTPUT: u32 = 1074013193; +pub const PERF_EVENT_IOC_QUERY_BPF: u32 = 3221758986; +pub const PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 = 1074275339; pub const PERF_MAX_STACK_DEPTH: u32 = 127; pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; @@ -207,6 +276,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -218,6 +309,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -1044,6 +1157,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -1293,6 +1428,16 @@ pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { pub ifindex: __u32, pub attach_type: __u32, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_task_fd_type { + BPF_FD_TYPE_RAW_TRACEPOINT = 0, + BPF_FD_TYPE_TRACEPOINT = 1, + BPF_FD_TYPE_KPROBE = 2, + BPF_FD_TYPE_KRETPROBE = 3, + BPF_FD_TYPE_UPROBE = 4, + BPF_FD_TYPE_URETPROBE = 5, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_func_info { @@ -1612,6 +1757,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn disabled_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_disabled_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -1623,6 +1790,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn pinned(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -1634,6 +1823,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn pinned_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_pinned_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclusive(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -1645,6 +1856,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclusive_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclusive_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -1656,6 +1889,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -1667,6 +1922,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_hv(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } } @@ -1678,6 +1955,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_hv_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_hv_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_idle(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } } @@ -1689,6 +1988,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_idle_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_idle_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } } @@ -1700,6 +2021,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } } @@ -1711,6 +2054,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn freq(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } } @@ -1722,6 +2087,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn freq_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_freq_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_stat(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } } @@ -1733,6 +2120,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_stat_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_stat_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn enable_on_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } } @@ -1744,6 +2153,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn enable_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_enable_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn task(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } } @@ -1755,6 +2186,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn task_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_task_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn watermark(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } } @@ -1766,6 +2219,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn watermark_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_watermark_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn precise_ip(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } } @@ -1777,6 +2252,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn precise_ip_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 2u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_precise_ip_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 2u8, + val as u64, + ) + } + } + #[inline] pub fn mmap_data(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } } @@ -1788,6 +2285,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_data_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_data_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sample_id_all(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } } @@ -1799,6 +2318,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sample_id_all_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sample_id_all_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_host(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } } @@ -1810,6 +2351,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_host_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_host_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_guest(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } } @@ -1821,6 +2384,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_guest_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_guest_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } } @@ -1832,6 +2417,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } } @@ -1843,6 +2450,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap2(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } } @@ -1854,6 +2483,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap2_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 23usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap2_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 23usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } } @@ -1865,6 +2516,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn use_clockid(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } } @@ -1876,6 +2549,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn use_clockid_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 25usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_use_clockid_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 25usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn context_switch(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } } @@ -1887,6 +2582,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn context_switch_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_context_switch_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn write_backward(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } } @@ -1898,6 +2615,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn write_backward_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_write_backward_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn namespaces(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } } @@ -1909,6 +2648,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn namespaces_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_namespaces_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn ksymbol(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } } @@ -1920,6 +2681,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn ksymbol_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ksymbol_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn bpf_event(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } } @@ -1931,6 +2714,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn bpf_event_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_bpf_event_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn aux_output(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } } @@ -1942,6 +2747,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn aux_output_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_aux_output_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cgroup(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } } @@ -1953,6 +2780,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn cgroup_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cgroup_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn text_poke(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } } @@ -1964,6 +2813,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn text_poke_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_text_poke_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn build_id(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } } @@ -1975,6 +2846,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn build_id_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_build_id_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_thread(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } } @@ -1986,6 +2879,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_thread_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_thread_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn remove_on_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } } @@ -1997,6 +2912,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn remove_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_remove_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sigtrap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } } @@ -2008,6 +2945,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sigtrap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 37usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sigtrap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 37usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __reserved_1(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } } @@ -2019,6 +2978,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn __reserved_1_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 38usize, + 26u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set___reserved_1_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 38usize, + 26u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( disabled: __u64, inherit: __u64, @@ -2272,6 +3253,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_bit0_is_deprecated(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -2283,6 +3286,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_is_deprecated_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_is_deprecated_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_rdpmc(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -2294,6 +3319,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_rdpmc_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_rdpmc_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -2305,6 +3352,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_zero(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -2316,6 +3385,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_zero_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_zero_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_short(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -2327,6 +3418,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_short_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_short_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_____res(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } } @@ -2338,6 +3451,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_____res_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 58u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_____res_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 58u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( cap_bit0: __u64, cap_bit0_is_deprecated: __u64, diff --git a/aya-obj/src/generated/linux_bindings_armv7.rs b/aya-obj/src/generated/linux_bindings_armv7.rs index 6e36aa98..0889a09e 100644 --- a/aya-obj/src/generated/linux_bindings_armv7.rs +++ b/aya-obj/src/generated/linux_bindings_armv7.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -16,10 +16,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -29,10 +26,21 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -40,12 +48,27 @@ where }; let mask = 1 << bit_index; if val { - *byte |= mask; + byte | mask } else { - *byte &= !mask; + byte & !mask } } #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -64,6 +87,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -79,6 +120,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } } #[repr(C)] #[derive(Default)] @@ -162,6 +219,18 @@ pub const XDP_FLAGS_HW_MODE: u32 = 8; pub const XDP_FLAGS_REPLACE: u32 = 16; pub const XDP_FLAGS_MODES: u32 = 14; pub const XDP_FLAGS_MASK: u32 = 31; +pub const PERF_EVENT_IOC_ENABLE: u32 = 9216; +pub const PERF_EVENT_IOC_DISABLE: u32 = 9217; +pub const PERF_EVENT_IOC_REFRESH: u32 = 9218; +pub const PERF_EVENT_IOC_RESET: u32 = 9219; +pub const PERF_EVENT_IOC_PERIOD: u32 = 1074275332; +pub const PERF_EVENT_IOC_SET_OUTPUT: u32 = 9221; +pub const PERF_EVENT_IOC_SET_FILTER: u32 = 1074013190; +pub const PERF_EVENT_IOC_ID: u32 = 2147755015; +pub const PERF_EVENT_IOC_SET_BPF: u32 = 1074013192; +pub const PERF_EVENT_IOC_PAUSE_OUTPUT: u32 = 1074013193; +pub const PERF_EVENT_IOC_QUERY_BPF: u32 = 3221496842; +pub const PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 = 1074013195; pub const PERF_MAX_STACK_DEPTH: u32 = 127; pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; @@ -207,6 +276,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -218,6 +309,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -1044,6 +1157,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -1293,6 +1428,16 @@ pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { pub ifindex: __u32, pub attach_type: __u32, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_task_fd_type { + BPF_FD_TYPE_RAW_TRACEPOINT = 0, + BPF_FD_TYPE_TRACEPOINT = 1, + BPF_FD_TYPE_KPROBE = 2, + BPF_FD_TYPE_KRETPROBE = 3, + BPF_FD_TYPE_UPROBE = 4, + BPF_FD_TYPE_URETPROBE = 5, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_func_info { @@ -1612,6 +1757,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn disabled_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_disabled_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -1623,6 +1790,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn pinned(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -1634,6 +1823,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn pinned_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_pinned_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclusive(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -1645,6 +1856,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclusive_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclusive_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -1656,6 +1889,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -1667,6 +1922,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_hv(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } } @@ -1678,6 +1955,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_hv_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_hv_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_idle(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } } @@ -1689,6 +1988,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_idle_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_idle_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } } @@ -1700,6 +2021,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } } @@ -1711,6 +2054,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn freq(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } } @@ -1722,6 +2087,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn freq_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_freq_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_stat(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } } @@ -1733,6 +2120,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_stat_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_stat_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn enable_on_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } } @@ -1744,6 +2153,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn enable_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_enable_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn task(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } } @@ -1755,6 +2186,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn task_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_task_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn watermark(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } } @@ -1766,6 +2219,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn watermark_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_watermark_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn precise_ip(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } } @@ -1777,6 +2252,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn precise_ip_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 2u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_precise_ip_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 2u8, + val as u64, + ) + } + } + #[inline] pub fn mmap_data(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } } @@ -1788,6 +2285,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_data_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_data_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sample_id_all(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } } @@ -1799,6 +2318,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sample_id_all_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sample_id_all_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_host(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } } @@ -1810,6 +2351,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_host_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_host_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_guest(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } } @@ -1821,6 +2384,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_guest_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_guest_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } } @@ -1832,6 +2417,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } } @@ -1843,6 +2450,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap2(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } } @@ -1854,6 +2483,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap2_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 23usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap2_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 23usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } } @@ -1865,6 +2516,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn use_clockid(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } } @@ -1876,6 +2549,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn use_clockid_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 25usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_use_clockid_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 25usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn context_switch(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } } @@ -1887,6 +2582,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn context_switch_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_context_switch_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn write_backward(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } } @@ -1898,6 +2615,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn write_backward_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_write_backward_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn namespaces(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } } @@ -1909,6 +2648,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn namespaces_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_namespaces_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn ksymbol(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } } @@ -1920,6 +2681,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn ksymbol_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ksymbol_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn bpf_event(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } } @@ -1931,6 +2714,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn bpf_event_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_bpf_event_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn aux_output(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } } @@ -1942,6 +2747,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn aux_output_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_aux_output_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cgroup(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } } @@ -1953,6 +2780,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn cgroup_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cgroup_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn text_poke(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } } @@ -1964,6 +2813,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn text_poke_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_text_poke_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn build_id(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } } @@ -1975,6 +2846,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn build_id_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_build_id_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_thread(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } } @@ -1986,6 +2879,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_thread_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_thread_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn remove_on_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } } @@ -1997,6 +2912,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn remove_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_remove_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sigtrap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } } @@ -2008,6 +2945,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sigtrap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 37usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sigtrap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 37usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __reserved_1(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } } @@ -2019,6 +2978,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn __reserved_1_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 38usize, + 26u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set___reserved_1_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 38usize, + 26u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( disabled: __u64, inherit: __u64, @@ -2272,6 +3253,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_bit0_is_deprecated(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -2283,6 +3286,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_is_deprecated_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_is_deprecated_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_rdpmc(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -2294,6 +3319,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_rdpmc_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_rdpmc_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -2305,6 +3352,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_zero(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -2316,6 +3385,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_zero_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_zero_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_short(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -2327,6 +3418,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_short_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_short_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_____res(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } } @@ -2338,6 +3451,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_____res_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 58u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_____res_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 58u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( cap_bit0: __u64, cap_bit0_is_deprecated: __u64, diff --git a/aya-obj/src/generated/linux_bindings_mips.rs b/aya-obj/src/generated/linux_bindings_mips.rs new file mode 100644 index 00000000..f6980d8c --- /dev/null +++ b/aya-obj/src/generated/linux_bindings_mips.rs @@ -0,0 +1,3605 @@ +/* automatically generated by rust-bindgen 0.71.1 */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + byte | mask + } else { + byte & !mask + } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } +} +#[repr(C)] +#[derive(Default)] +pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); +impl __IncompleteArrayField { + #[inline] + pub const fn new() -> Self { + __IncompleteArrayField(::core::marker::PhantomData, []) + } + #[inline] + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T + } + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T + } + #[inline] + pub unsafe fn as_slice(&self, len: usize) -> &[T] { + ::core::slice::from_raw_parts(self.as_ptr(), len) + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + } +} +impl ::core::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + fmt.write_str("__IncompleteArrayField") + } +} +pub const SO_ATTACH_BPF: u32 = 50; +pub const SO_DETACH_BPF: u32 = 27; +pub const BPF_LD: u32 = 0; +pub const BPF_LDX: u32 = 1; +pub const BPF_ST: u32 = 2; +pub const BPF_STX: u32 = 3; +pub const BPF_ALU: u32 = 4; +pub const BPF_JMP: u32 = 5; +pub const BPF_W: u32 = 0; +pub const BPF_H: u32 = 8; +pub const BPF_B: u32 = 16; +pub const BPF_K: u32 = 0; +pub const BPF_ALU64: u32 = 7; +pub const BPF_DW: u32 = 24; +pub const BPF_CALL: u32 = 128; +pub const BPF_F_ALLOW_OVERRIDE: u32 = 1; +pub const BPF_F_ALLOW_MULTI: u32 = 2; +pub const BPF_F_REPLACE: u32 = 4; +pub const BPF_F_BEFORE: u32 = 8; +pub const BPF_F_AFTER: u32 = 16; +pub const BPF_F_ID: u32 = 32; +pub const BPF_F_STRICT_ALIGNMENT: u32 = 1; +pub const BPF_F_ANY_ALIGNMENT: u32 = 2; +pub const BPF_F_TEST_RND_HI32: u32 = 4; +pub const BPF_F_TEST_STATE_FREQ: u32 = 8; +pub const BPF_F_SLEEPABLE: u32 = 16; +pub const BPF_F_XDP_HAS_FRAGS: u32 = 32; +pub const BPF_F_XDP_DEV_BOUND_ONLY: u32 = 64; +pub const BPF_F_TEST_REG_INVARIANTS: u32 = 128; +pub const BPF_F_NETFILTER_IP_DEFRAG: u32 = 1; +pub const BPF_PSEUDO_MAP_FD: u32 = 1; +pub const BPF_PSEUDO_MAP_IDX: u32 = 5; +pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; +pub const BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6; +pub const BPF_PSEUDO_BTF_ID: u32 = 3; +pub const BPF_PSEUDO_FUNC: u32 = 4; +pub const BPF_PSEUDO_CALL: u32 = 1; +pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; +pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; +pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; +pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2; +pub const BTF_INT_SIGNED: u32 = 1; +pub const BTF_INT_CHAR: u32 = 2; +pub const BTF_INT_BOOL: u32 = 4; +pub const NLMSG_ALIGNTO: u32 = 4; +pub const XDP_FLAGS_UPDATE_IF_NOEXIST: u32 = 1; +pub const XDP_FLAGS_SKB_MODE: u32 = 2; +pub const XDP_FLAGS_DRV_MODE: u32 = 4; +pub const XDP_FLAGS_HW_MODE: u32 = 8; +pub const XDP_FLAGS_REPLACE: u32 = 16; +pub const XDP_FLAGS_MODES: u32 = 14; +pub const XDP_FLAGS_MASK: u32 = 31; +pub const PERF_EVENT_IOC_ENABLE: u32 = 536880128; +pub const PERF_EVENT_IOC_DISABLE: u32 = 536880129; +pub const PERF_EVENT_IOC_REFRESH: u32 = 536880130; +pub const PERF_EVENT_IOC_RESET: u32 = 536880131; +pub const PERF_EVENT_IOC_PERIOD: u32 = 2148017156; +pub const PERF_EVENT_IOC_SET_OUTPUT: u32 = 536880133; +pub const PERF_EVENT_IOC_SET_FILTER: u32 = 2147755014; +pub const PERF_EVENT_IOC_ID: u32 = 1074013191; +pub const PERF_EVENT_IOC_SET_BPF: u32 = 2147755016; +pub const PERF_EVENT_IOC_PAUSE_OUTPUT: u32 = 2147755017; +pub const PERF_EVENT_IOC_QUERY_BPF: u32 = 3221496842; +pub const PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 = 2147755019; +pub const PERF_MAX_STACK_DEPTH: u32 = 127; +pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; +pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; +pub const PERF_FLAG_FD_OUTPUT: u32 = 2; +pub const PERF_FLAG_PID_CGROUP: u32 = 4; +pub const PERF_FLAG_FD_CLOEXEC: u32 = 8; +pub const TC_H_MAJ_MASK: u32 = 4294901760; +pub const TC_H_MIN_MASK: u32 = 65535; +pub const TC_H_UNSPEC: u32 = 0; +pub const TC_H_ROOT: u32 = 4294967295; +pub const TC_H_INGRESS: u32 = 4294967281; +pub const TC_H_CLSACT: u32 = 4294967281; +pub const TC_H_MIN_PRIORITY: u32 = 65504; +pub const TC_H_MIN_INGRESS: u32 = 65522; +pub const TC_H_MIN_EGRESS: u32 = 65523; +pub const TCA_BPF_FLAG_ACT_DIRECT: u32 = 1; +pub type __u8 = ::core::ffi::c_uchar; +pub type __s16 = ::core::ffi::c_short; +pub type __u16 = ::core::ffi::c_ushort; +pub type __s32 = ::core::ffi::c_int; +pub type __u32 = ::core::ffi::c_uint; +pub type __s64 = ::core::ffi::c_longlong; +pub type __u64 = ::core::ffi::c_ulonglong; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_insn { + pub code: __u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub off: __s16, + pub imm: __s32, +} +impl bpf_insn { + #[inline] + pub fn dst_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) } + } + #[inline] + pub fn set_dst_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn src_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } + } + #[inline] + pub fn set_src_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 4u8, { + let dst_reg: u8 = unsafe { ::core::mem::transmute(dst_reg) }; + dst_reg as u64 + }); + __bindgen_bitfield_unit.set(4usize, 4u8, { + let src_reg: u8 = unsafe { ::core::mem::transmute(src_reg) }; + src_reg as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug)] +pub struct bpf_lpm_trie_key { + pub prefixlen: __u32, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_cgroup_iter_order { + BPF_CGROUP_ITER_ORDER_UNSPEC = 0, + BPF_CGROUP_ITER_SELF_ONLY = 1, + BPF_CGROUP_ITER_DESCENDANTS_PRE = 2, + BPF_CGROUP_ITER_DESCENDANTS_POST = 3, + BPF_CGROUP_ITER_ANCESTORS_UP = 4, +} +impl bpf_cmd { + pub const BPF_PROG_RUN: bpf_cmd = bpf_cmd::BPF_PROG_TEST_RUN; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_cmd { + BPF_MAP_CREATE = 0, + BPF_MAP_LOOKUP_ELEM = 1, + BPF_MAP_UPDATE_ELEM = 2, + BPF_MAP_DELETE_ELEM = 3, + BPF_MAP_GET_NEXT_KEY = 4, + BPF_PROG_LOAD = 5, + BPF_OBJ_PIN = 6, + BPF_OBJ_GET = 7, + BPF_PROG_ATTACH = 8, + BPF_PROG_DETACH = 9, + BPF_PROG_TEST_RUN = 10, + BPF_PROG_GET_NEXT_ID = 11, + BPF_MAP_GET_NEXT_ID = 12, + BPF_PROG_GET_FD_BY_ID = 13, + BPF_MAP_GET_FD_BY_ID = 14, + BPF_OBJ_GET_INFO_BY_FD = 15, + BPF_PROG_QUERY = 16, + BPF_RAW_TRACEPOINT_OPEN = 17, + BPF_BTF_LOAD = 18, + BPF_BTF_GET_FD_BY_ID = 19, + BPF_TASK_FD_QUERY = 20, + BPF_MAP_LOOKUP_AND_DELETE_ELEM = 21, + BPF_MAP_FREEZE = 22, + BPF_BTF_GET_NEXT_ID = 23, + BPF_MAP_LOOKUP_BATCH = 24, + BPF_MAP_LOOKUP_AND_DELETE_BATCH = 25, + BPF_MAP_UPDATE_BATCH = 26, + BPF_MAP_DELETE_BATCH = 27, + BPF_LINK_CREATE = 28, + BPF_LINK_UPDATE = 29, + BPF_LINK_GET_FD_BY_ID = 30, + BPF_LINK_GET_NEXT_ID = 31, + BPF_ENABLE_STATS = 32, + BPF_ITER_CREATE = 33, + BPF_LINK_DETACH = 34, + BPF_PROG_BIND_MAP = 35, + BPF_TOKEN_CREATE = 36, + __MAX_BPF_CMD = 37, +} +impl bpf_map_type { + pub const BPF_MAP_TYPE_CGROUP_STORAGE: bpf_map_type = + bpf_map_type::BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED; +} +impl bpf_map_type { + pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE: bpf_map_type = + bpf_map_type::BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_map_type { + BPF_MAP_TYPE_UNSPEC = 0, + BPF_MAP_TYPE_HASH = 1, + BPF_MAP_TYPE_ARRAY = 2, + BPF_MAP_TYPE_PROG_ARRAY = 3, + BPF_MAP_TYPE_PERF_EVENT_ARRAY = 4, + BPF_MAP_TYPE_PERCPU_HASH = 5, + BPF_MAP_TYPE_PERCPU_ARRAY = 6, + BPF_MAP_TYPE_STACK_TRACE = 7, + BPF_MAP_TYPE_CGROUP_ARRAY = 8, + BPF_MAP_TYPE_LRU_HASH = 9, + BPF_MAP_TYPE_LRU_PERCPU_HASH = 10, + BPF_MAP_TYPE_LPM_TRIE = 11, + BPF_MAP_TYPE_ARRAY_OF_MAPS = 12, + BPF_MAP_TYPE_HASH_OF_MAPS = 13, + BPF_MAP_TYPE_DEVMAP = 14, + BPF_MAP_TYPE_SOCKMAP = 15, + BPF_MAP_TYPE_CPUMAP = 16, + BPF_MAP_TYPE_XSKMAP = 17, + BPF_MAP_TYPE_SOCKHASH = 18, + BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED = 19, + BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 20, + BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED = 21, + BPF_MAP_TYPE_QUEUE = 22, + BPF_MAP_TYPE_STACK = 23, + BPF_MAP_TYPE_SK_STORAGE = 24, + BPF_MAP_TYPE_DEVMAP_HASH = 25, + BPF_MAP_TYPE_STRUCT_OPS = 26, + BPF_MAP_TYPE_RINGBUF = 27, + BPF_MAP_TYPE_INODE_STORAGE = 28, + BPF_MAP_TYPE_TASK_STORAGE = 29, + BPF_MAP_TYPE_BLOOM_FILTER = 30, + BPF_MAP_TYPE_USER_RINGBUF = 31, + BPF_MAP_TYPE_CGRP_STORAGE = 32, + BPF_MAP_TYPE_ARENA = 33, + __MAX_BPF_MAP_TYPE = 34, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_prog_type { + BPF_PROG_TYPE_UNSPEC = 0, + BPF_PROG_TYPE_SOCKET_FILTER = 1, + BPF_PROG_TYPE_KPROBE = 2, + BPF_PROG_TYPE_SCHED_CLS = 3, + BPF_PROG_TYPE_SCHED_ACT = 4, + BPF_PROG_TYPE_TRACEPOINT = 5, + BPF_PROG_TYPE_XDP = 6, + BPF_PROG_TYPE_PERF_EVENT = 7, + BPF_PROG_TYPE_CGROUP_SKB = 8, + BPF_PROG_TYPE_CGROUP_SOCK = 9, + BPF_PROG_TYPE_LWT_IN = 10, + BPF_PROG_TYPE_LWT_OUT = 11, + BPF_PROG_TYPE_LWT_XMIT = 12, + BPF_PROG_TYPE_SOCK_OPS = 13, + BPF_PROG_TYPE_SK_SKB = 14, + BPF_PROG_TYPE_CGROUP_DEVICE = 15, + BPF_PROG_TYPE_SK_MSG = 16, + BPF_PROG_TYPE_RAW_TRACEPOINT = 17, + BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 18, + BPF_PROG_TYPE_LWT_SEG6LOCAL = 19, + BPF_PROG_TYPE_LIRC_MODE2 = 20, + BPF_PROG_TYPE_SK_REUSEPORT = 21, + BPF_PROG_TYPE_FLOW_DISSECTOR = 22, + BPF_PROG_TYPE_CGROUP_SYSCTL = 23, + BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 24, + BPF_PROG_TYPE_CGROUP_SOCKOPT = 25, + BPF_PROG_TYPE_TRACING = 26, + BPF_PROG_TYPE_STRUCT_OPS = 27, + BPF_PROG_TYPE_EXT = 28, + BPF_PROG_TYPE_LSM = 29, + BPF_PROG_TYPE_SK_LOOKUP = 30, + BPF_PROG_TYPE_SYSCALL = 31, + BPF_PROG_TYPE_NETFILTER = 32, + __MAX_BPF_PROG_TYPE = 33, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_attach_type { + BPF_CGROUP_INET_INGRESS = 0, + BPF_CGROUP_INET_EGRESS = 1, + BPF_CGROUP_INET_SOCK_CREATE = 2, + BPF_CGROUP_SOCK_OPS = 3, + BPF_SK_SKB_STREAM_PARSER = 4, + BPF_SK_SKB_STREAM_VERDICT = 5, + BPF_CGROUP_DEVICE = 6, + BPF_SK_MSG_VERDICT = 7, + BPF_CGROUP_INET4_BIND = 8, + BPF_CGROUP_INET6_BIND = 9, + BPF_CGROUP_INET4_CONNECT = 10, + BPF_CGROUP_INET6_CONNECT = 11, + BPF_CGROUP_INET4_POST_BIND = 12, + BPF_CGROUP_INET6_POST_BIND = 13, + BPF_CGROUP_UDP4_SENDMSG = 14, + BPF_CGROUP_UDP6_SENDMSG = 15, + BPF_LIRC_MODE2 = 16, + BPF_FLOW_DISSECTOR = 17, + BPF_CGROUP_SYSCTL = 18, + BPF_CGROUP_UDP4_RECVMSG = 19, + BPF_CGROUP_UDP6_RECVMSG = 20, + BPF_CGROUP_GETSOCKOPT = 21, + BPF_CGROUP_SETSOCKOPT = 22, + BPF_TRACE_RAW_TP = 23, + BPF_TRACE_FENTRY = 24, + BPF_TRACE_FEXIT = 25, + BPF_MODIFY_RETURN = 26, + BPF_LSM_MAC = 27, + BPF_TRACE_ITER = 28, + BPF_CGROUP_INET4_GETPEERNAME = 29, + BPF_CGROUP_INET6_GETPEERNAME = 30, + BPF_CGROUP_INET4_GETSOCKNAME = 31, + BPF_CGROUP_INET6_GETSOCKNAME = 32, + BPF_XDP_DEVMAP = 33, + BPF_CGROUP_INET_SOCK_RELEASE = 34, + BPF_XDP_CPUMAP = 35, + BPF_SK_LOOKUP = 36, + BPF_XDP = 37, + BPF_SK_SKB_VERDICT = 38, + BPF_SK_REUSEPORT_SELECT = 39, + BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 40, + BPF_PERF_EVENT = 41, + BPF_TRACE_KPROBE_MULTI = 42, + BPF_LSM_CGROUP = 43, + BPF_STRUCT_OPS = 44, + BPF_NETFILTER = 45, + BPF_TCX_INGRESS = 46, + BPF_TCX_EGRESS = 47, + BPF_TRACE_UPROBE_MULTI = 48, + BPF_CGROUP_UNIX_CONNECT = 49, + BPF_CGROUP_UNIX_SENDMSG = 50, + BPF_CGROUP_UNIX_RECVMSG = 51, + BPF_CGROUP_UNIX_GETPEERNAME = 52, + BPF_CGROUP_UNIX_GETSOCKNAME = 53, + BPF_NETKIT_PRIMARY = 54, + BPF_NETKIT_PEER = 55, + __MAX_BPF_ATTACH_TYPE = 56, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_link_type { + BPF_LINK_TYPE_UNSPEC = 0, + BPF_LINK_TYPE_RAW_TRACEPOINT = 1, + BPF_LINK_TYPE_TRACING = 2, + BPF_LINK_TYPE_CGROUP = 3, + BPF_LINK_TYPE_ITER = 4, + BPF_LINK_TYPE_NETNS = 5, + BPF_LINK_TYPE_XDP = 6, + BPF_LINK_TYPE_PERF_EVENT = 7, + BPF_LINK_TYPE_KPROBE_MULTI = 8, + BPF_LINK_TYPE_STRUCT_OPS = 9, + BPF_LINK_TYPE_NETFILTER = 10, + BPF_LINK_TYPE_TCX = 11, + BPF_LINK_TYPE_UPROBE_MULTI = 12, + BPF_LINK_TYPE_NETKIT = 13, + __MAX_BPF_LINK_TYPE = 14, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_perf_event_type { + BPF_PERF_EVENT_UNSPEC = 0, + BPF_PERF_EVENT_UPROBE = 1, + BPF_PERF_EVENT_URETPROBE = 2, + BPF_PERF_EVENT_KPROBE = 3, + BPF_PERF_EVENT_KRETPROBE = 4, + BPF_PERF_EVENT_TRACEPOINT = 5, + BPF_PERF_EVENT_EVENT = 6, +} +pub const BPF_F_KPROBE_MULTI_RETURN: _bindgen_ty_2 = 1; +pub type _bindgen_ty_2 = ::core::ffi::c_uint; +pub const BPF_F_UPROBE_MULTI_RETURN: _bindgen_ty_3 = 1; +pub type _bindgen_ty_3 = ::core::ffi::c_uint; +pub const BPF_ANY: _bindgen_ty_4 = 0; +pub const BPF_NOEXIST: _bindgen_ty_4 = 1; +pub const BPF_EXIST: _bindgen_ty_4 = 2; +pub const BPF_F_LOCK: _bindgen_ty_4 = 4; +pub type _bindgen_ty_4 = ::core::ffi::c_uint; +pub const BPF_F_NO_PREALLOC: _bindgen_ty_5 = 1; +pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_5 = 2; +pub const BPF_F_NUMA_NODE: _bindgen_ty_5 = 4; +pub const BPF_F_RDONLY: _bindgen_ty_5 = 8; +pub const BPF_F_WRONLY: _bindgen_ty_5 = 16; +pub const BPF_F_STACK_BUILD_ID: _bindgen_ty_5 = 32; +pub const BPF_F_ZERO_SEED: _bindgen_ty_5 = 64; +pub const BPF_F_RDONLY_PROG: _bindgen_ty_5 = 128; +pub const BPF_F_WRONLY_PROG: _bindgen_ty_5 = 256; +pub const BPF_F_CLONE: _bindgen_ty_5 = 512; +pub const BPF_F_MMAPABLE: _bindgen_ty_5 = 1024; +pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_5 = 2048; +pub const BPF_F_INNER_MAP: _bindgen_ty_5 = 4096; +pub const BPF_F_LINK: _bindgen_ty_5 = 8192; +pub const BPF_F_PATH_FD: _bindgen_ty_5 = 16384; +pub const BPF_F_VTYPE_BTF_OBJ_FD: _bindgen_ty_5 = 32768; +pub const BPF_F_TOKEN_FD: _bindgen_ty_5 = 65536; +pub const BPF_F_SEGV_ON_FAULT: _bindgen_ty_5 = 131072; +pub const BPF_F_NO_USER_CONV: _bindgen_ty_5 = 262144; +pub type _bindgen_ty_5 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_stats_type { + BPF_STATS_RUN_TIME = 0, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_2, + pub batch: bpf_attr__bindgen_ty_3, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_4, + pub __bindgen_anon_4: bpf_attr__bindgen_ty_5, + pub __bindgen_anon_5: bpf_attr__bindgen_ty_6, + pub test: bpf_attr__bindgen_ty_7, + pub __bindgen_anon_6: bpf_attr__bindgen_ty_8, + pub info: bpf_attr__bindgen_ty_9, + pub query: bpf_attr__bindgen_ty_10, + pub raw_tracepoint: bpf_attr__bindgen_ty_11, + pub __bindgen_anon_7: bpf_attr__bindgen_ty_12, + pub task_fd_query: bpf_attr__bindgen_ty_13, + pub link_create: bpf_attr__bindgen_ty_14, + pub link_update: bpf_attr__bindgen_ty_15, + pub link_detach: bpf_attr__bindgen_ty_16, + pub enable_stats: bpf_attr__bindgen_ty_17, + pub iter_create: bpf_attr__bindgen_ty_18, + pub prog_bind_map: bpf_attr__bindgen_ty_19, + pub token_create: bpf_attr__bindgen_ty_20, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_1 { + pub map_type: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub inner_map_fd: __u32, + pub numa_node: __u32, + pub map_name: [::core::ffi::c_char; 16usize], + pub map_ifindex: __u32, + pub btf_fd: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub map_extra: __u64, + pub value_type_btf_obj_fd: __s32, + pub map_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_2 { + pub map_fd: __u32, + pub key: __u64, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_2__bindgen_ty_1, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 { + pub value: __u64, + pub next_key: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_3 { + pub in_batch: __u64, + pub out_batch: __u64, + pub keys: __u64, + pub values: __u64, + pub count: __u32, + pub map_fd: __u32, + pub elem_flags: __u64, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_4 { + pub prog_type: __u32, + pub insn_cnt: __u32, + pub insns: __u64, + pub license: __u64, + pub log_level: __u32, + pub log_size: __u32, + pub log_buf: __u64, + pub kern_version: __u32, + pub prog_flags: __u32, + pub prog_name: [::core::ffi::c_char; 16usize], + pub prog_ifindex: __u32, + pub expected_attach_type: __u32, + pub prog_btf_fd: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub func_info_cnt: __u32, + pub line_info_rec_size: __u32, + pub line_info: __u64, + pub line_info_cnt: __u32, + pub attach_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_4__bindgen_ty_1, + pub core_relo_cnt: __u32, + pub fd_array: __u64, + pub core_relos: __u64, + pub core_relo_rec_size: __u32, + pub log_true_size: __u32, + pub prog_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 { + pub attach_prog_fd: __u32, + pub attach_btf_obj_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_5 { + pub pathname: __u64, + pub bpf_fd: __u32, + pub file_flags: __u32, + pub path_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_6__bindgen_ty_1, + pub attach_bpf_fd: __u32, + pub attach_type: __u32, + pub attach_flags: __u32, + pub replace_bpf_fd: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_6__bindgen_ty_2, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_2 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_7 { + pub prog_fd: __u32, + pub retval: __u32, + pub data_size_in: __u32, + pub data_size_out: __u32, + pub data_in: __u64, + pub data_out: __u64, + pub repeat: __u32, + pub duration: __u32, + pub ctx_size_in: __u32, + pub ctx_size_out: __u32, + pub ctx_in: __u64, + pub ctx_out: __u64, + pub flags: __u32, + pub cpu: __u32, + pub batch_size: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_8__bindgen_ty_1, + pub next_id: __u32, + pub open_flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 { + pub start_id: __u32, + pub prog_id: __u32, + pub map_id: __u32, + pub btf_id: __u32, + pub link_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_9 { + pub bpf_fd: __u32, + pub info_len: __u32, + pub info: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_10 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_10__bindgen_ty_1, + pub attach_type: __u32, + pub query_flags: __u32, + pub attach_flags: __u32, + pub prog_ids: __u64, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_10__bindgen_ty_2, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub prog_attach_flags: __u64, + pub link_ids: __u64, + pub link_attach_flags: __u64, + pub revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_2 { + pub prog_cnt: __u32, + pub count: __u32, +} +impl bpf_attr__bindgen_ty_10 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_11 { + pub name: __u64, + pub prog_fd: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_attr__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_12 { + pub btf: __u64, + pub btf_log_buf: __u64, + pub btf_size: __u32, + pub btf_log_size: __u32, + pub btf_log_level: __u32, + pub btf_log_true_size: __u32, + pub btf_flags: __u32, + pub btf_token_fd: __s32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_13 { + pub pid: __u32, + pub fd: __u32, + pub flags: __u32, + pub buf_len: __u32, + pub buf: __u64, + pub prog_id: __u32, + pub fd_type: __u32, + pub probe_offset: __u64, + pub probe_addr: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2, + pub attach_type: __u32, + pub flags: __u32, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_14__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 { + pub prog_fd: __u32, + pub map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3 { + pub target_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1, + pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2, + pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3, + pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4, + pub netfilter: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5, + pub tcx: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6, + pub uprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7, + pub netkit: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 { + pub iter_info: __u64, + pub iter_info_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 { + pub bpf_cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 { + pub flags: __u32, + pub cnt: __u32, + pub syms: __u64, + pub addrs: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 { + pub target_btf_id: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub cnt: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_15 { + pub link_fd: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_15__bindgen_ty_1, + pub flags: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_15__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_1 { + pub new_prog_fd: __u32, + pub new_map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_2 { + pub old_prog_fd: __u32, + pub old_map_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_16 { + pub link_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_17 { + pub type_: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_18 { + pub link_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_19 { + pub prog_fd: __u32, + pub map_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_20 { + pub flags: __u32, + pub bpffs_fd: __u32, +} +pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_6 = 1; +pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_6 = 2; +pub type _bindgen_ty_6 = ::core::ffi::c_uint; +pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_7 = 15; +pub type _bindgen_ty_7 = ::core::ffi::c_uint; +pub const BPF_F_PSEUDO_HDR: _bindgen_ty_8 = 16; +pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_8 = 32; +pub const BPF_F_MARK_ENFORCE: _bindgen_ty_8 = 64; +pub type _bindgen_ty_8 = ::core::ffi::c_uint; +pub const BPF_F_INGRESS: _bindgen_ty_9 = 1; +pub type _bindgen_ty_9 = ::core::ffi::c_uint; +pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_10 = 1; +pub type _bindgen_ty_10 = ::core::ffi::c_uint; +pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_11 = 255; +pub const BPF_F_USER_STACK: _bindgen_ty_11 = 256; +pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_11 = 512; +pub const BPF_F_REUSE_STACKID: _bindgen_ty_11 = 1024; +pub const BPF_F_USER_BUILD_ID: _bindgen_ty_11 = 2048; +pub type _bindgen_ty_11 = ::core::ffi::c_uint; +pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_12 = 2; +pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_12 = 4; +pub const BPF_F_SEQ_NUMBER: _bindgen_ty_12 = 8; +pub const BPF_F_NO_TUNNEL_KEY: _bindgen_ty_12 = 16; +pub type _bindgen_ty_12 = ::core::ffi::c_uint; +pub const BPF_F_TUNINFO_FLAGS: _bindgen_ty_13 = 16; +pub type _bindgen_ty_13 = ::core::ffi::c_uint; +pub const BPF_F_INDEX_MASK: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CURRENT_CPU: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CTXLEN_MASK: _bindgen_ty_14 = 4503595332403200; +pub type _bindgen_ty_14 = ::core::ffi::c_ulonglong; +pub const BPF_F_CURRENT_NETNS: _bindgen_ty_15 = -1; +pub type _bindgen_ty_15 = ::core::ffi::c_int; +pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_17 = 1; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_17 = 2; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_17 = 4; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_GRE: _bindgen_ty_17 = 8; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_UDP: _bindgen_ty_17 = 16; +pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_17 = 32; +pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_17 = 64; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_17 = 128; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_17 = 256; +pub type _bindgen_ty_17 = ::core::ffi::c_uint; +pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_19 = 1; +pub type _bindgen_ty_19 = ::core::ffi::c_uint; +pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_21 = 1; +pub type _bindgen_ty_21 = ::core::ffi::c_uint; +pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_24 = 2147483648; +pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_24 = 1073741824; +pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_24 = 8; +pub type _bindgen_ty_24 = ::core::ffi::c_uint; +pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_26 = 1; +pub type _bindgen_ty_26 = ::core::ffi::c_uint; +pub const BPF_F_BROADCAST: _bindgen_ty_27 = 8; +pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_27 = 16; +pub type _bindgen_ty_27 = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_devmap_val { + pub ifindex: __u32, + pub bpf_prog: bpf_devmap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_devmap_val__bindgen_ty_1 { + pub fd: ::core::ffi::c_int, + pub id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_cpumap_val { + pub qsize: __u32, + pub bpf_prog: bpf_cpumap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_cpumap_val__bindgen_ty_1 { + pub fd: ::core::ffi::c_int, + pub id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_prog_info { + pub type_: __u32, + pub id: __u32, + pub tag: [__u8; 8usize], + pub jited_prog_len: __u32, + pub xlated_prog_len: __u32, + pub jited_prog_insns: __u64, + pub xlated_prog_insns: __u64, + pub load_time: __u64, + pub created_by_uid: __u32, + pub nr_map_ids: __u32, + pub map_ids: __u64, + pub name: [::core::ffi::c_char; 16usize], + pub ifindex: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub nr_jited_ksyms: __u32, + pub nr_jited_func_lens: __u32, + pub jited_ksyms: __u64, + pub jited_func_lens: __u64, + pub btf_id: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub nr_func_info: __u32, + pub nr_line_info: __u32, + pub line_info: __u64, + pub jited_line_info: __u64, + pub nr_jited_line_info: __u32, + pub line_info_rec_size: __u32, + pub jited_line_info_rec_size: __u32, + pub nr_prog_tags: __u32, + pub prog_tags: __u64, + pub run_time_ns: __u64, + pub run_cnt: __u64, + pub recursion_misses: __u64, + pub verified_insns: __u32, + pub attach_btf_obj_id: __u32, + pub attach_btf_id: __u32, +} +impl bpf_prog_info { + #[inline] + pub fn gpl_compatible(&self) -> __u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_gpl_compatible(&mut self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let gpl_compatible: u32 = unsafe { ::core::mem::transmute(gpl_compatible) }; + gpl_compatible as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_map_info { + pub type_: __u32, + pub id: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub name: [::core::ffi::c_char; 16usize], + pub ifindex: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub btf_id: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_id: __u32, + pub map_extra: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_btf_info { + pub btf: __u64, + pub btf_size: __u32, + pub id: __u32, + pub name: __u64, + pub name_len: __u32, + pub kernel_btf: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info { + pub type_: __u32, + pub id: __u32, + pub prog_id: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1 { + pub raw_tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_1, + pub tracing: bpf_link_info__bindgen_ty_1__bindgen_ty_2, + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_3, + pub iter: bpf_link_info__bindgen_ty_1__bindgen_ty_4, + pub netns: bpf_link_info__bindgen_ty_1__bindgen_ty_5, + pub xdp: bpf_link_info__bindgen_ty_1__bindgen_ty_6, + pub struct_ops: bpf_link_info__bindgen_ty_1__bindgen_ty_7, + pub netfilter: bpf_link_info__bindgen_ty_1__bindgen_ty_8, + pub kprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_9, + pub uprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_10, + pub perf_event: bpf_link_info__bindgen_ty_1__bindgen_ty_11, + pub tcx: bpf_link_info__bindgen_ty_1__bindgen_ty_12, + pub netkit: bpf_link_info__bindgen_ty_1__bindgen_ty_13, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_1 { + pub tp_name: __u64, + pub tp_name_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_2 { + pub attach_type: __u32, + pub target_obj_id: __u32, + pub target_btf_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_3 { + pub cgroup_id: __u64, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4 { + pub target_name: __u64, + pub target_name_len: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, + pub __bindgen_anon_2: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { + pub map: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 { + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1, + pub task: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 { + pub cgroup_id: __u64, + pub order: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 { + pub tid: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 { + pub netns_ino: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 { + pub ifindex: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_7 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_8 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_9 { + pub addrs: __u64, + pub count: __u32, + pub flags: __u32, + pub missed: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_10 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub path_size: __u32, + pub count: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 { + pub uprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1, + pub kprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2, + pub tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3, + pub event: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 { + pub file_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 { + pub func_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub addr: __u64, + pub missed: __u64, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + pub tp_name: __u64, + pub name_len: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + pub config: __u64, + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_12 { + pub ifindex: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { + pub ifindex: __u32, + pub attach_type: __u32, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_task_fd_type { + BPF_FD_TYPE_RAW_TRACEPOINT = 0, + BPF_FD_TYPE_TRACEPOINT = 1, + BPF_FD_TYPE_KPROBE = 2, + BPF_FD_TYPE_KRETPROBE = 3, + BPF_FD_TYPE_UPROBE = 4, + BPF_FD_TYPE_URETPROBE = 5, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_func_info { + pub insn_off: __u32, + pub type_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_line_info { + pub insn_off: __u32, + pub file_name_off: __u32, + pub line_off: __u32, + pub line_col: __u32, +} +pub const BPF_F_TIMER_ABS: _bindgen_ty_41 = 1; +pub const BPF_F_TIMER_CPU_PIN: _bindgen_ty_41 = 2; +pub type _bindgen_ty_41 = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_header { + pub magic: __u16, + pub version: __u8, + pub flags: __u8, + pub hdr_len: __u32, + pub type_off: __u32, + pub type_len: __u32, + pub str_off: __u32, + pub str_len: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct btf_type { + pub name_off: __u32, + pub info: __u32, + pub __bindgen_anon_1: btf_type__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union btf_type__bindgen_ty_1 { + pub size: __u32, + pub type_: __u32, +} +pub const BTF_KIND_UNKN: _bindgen_ty_42 = 0; +pub const BTF_KIND_INT: _bindgen_ty_42 = 1; +pub const BTF_KIND_PTR: _bindgen_ty_42 = 2; +pub const BTF_KIND_ARRAY: _bindgen_ty_42 = 3; +pub const BTF_KIND_STRUCT: _bindgen_ty_42 = 4; +pub const BTF_KIND_UNION: _bindgen_ty_42 = 5; +pub const BTF_KIND_ENUM: _bindgen_ty_42 = 6; +pub const BTF_KIND_FWD: _bindgen_ty_42 = 7; +pub const BTF_KIND_TYPEDEF: _bindgen_ty_42 = 8; +pub const BTF_KIND_VOLATILE: _bindgen_ty_42 = 9; +pub const BTF_KIND_CONST: _bindgen_ty_42 = 10; +pub const BTF_KIND_RESTRICT: _bindgen_ty_42 = 11; +pub const BTF_KIND_FUNC: _bindgen_ty_42 = 12; +pub const BTF_KIND_FUNC_PROTO: _bindgen_ty_42 = 13; +pub const BTF_KIND_VAR: _bindgen_ty_42 = 14; +pub const BTF_KIND_DATASEC: _bindgen_ty_42 = 15; +pub const BTF_KIND_FLOAT: _bindgen_ty_42 = 16; +pub const BTF_KIND_DECL_TAG: _bindgen_ty_42 = 17; +pub const BTF_KIND_TYPE_TAG: _bindgen_ty_42 = 18; +pub const BTF_KIND_ENUM64: _bindgen_ty_42 = 19; +pub const NR_BTF_KINDS: _bindgen_ty_42 = 20; +pub const BTF_KIND_MAX: _bindgen_ty_42 = 19; +pub type _bindgen_ty_42 = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_enum { + pub name_off: __u32, + pub val: __s32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_array { + pub type_: __u32, + pub index_type: __u32, + pub nelems: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_member { + pub name_off: __u32, + pub type_: __u32, + pub offset: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_param { + pub name_off: __u32, + pub type_: __u32, +} +pub const BTF_VAR_STATIC: _bindgen_ty_43 = 0; +pub const BTF_VAR_GLOBAL_ALLOCATED: _bindgen_ty_43 = 1; +pub const BTF_VAR_GLOBAL_EXTERN: _bindgen_ty_43 = 2; +pub type _bindgen_ty_43 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum btf_func_linkage { + BTF_FUNC_STATIC = 0, + BTF_FUNC_GLOBAL = 1, + BTF_FUNC_EXTERN = 2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_var { + pub linkage: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_var_secinfo { + pub type_: __u32, + pub offset: __u32, + pub size: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_decl_tag { + pub component_idx: __s32, +} +pub const IFLA_XDP_UNSPEC: _bindgen_ty_92 = 0; +pub const IFLA_XDP_FD: _bindgen_ty_92 = 1; +pub const IFLA_XDP_ATTACHED: _bindgen_ty_92 = 2; +pub const IFLA_XDP_FLAGS: _bindgen_ty_92 = 3; +pub const IFLA_XDP_PROG_ID: _bindgen_ty_92 = 4; +pub const IFLA_XDP_DRV_PROG_ID: _bindgen_ty_92 = 5; +pub const IFLA_XDP_SKB_PROG_ID: _bindgen_ty_92 = 6; +pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_92 = 7; +pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_92 = 8; +pub const __IFLA_XDP_MAX: _bindgen_ty_92 = 9; +pub type _bindgen_ty_92 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum nf_inet_hooks { + NF_INET_PRE_ROUTING = 0, + NF_INET_LOCAL_IN = 1, + NF_INET_FORWARD = 2, + NF_INET_LOCAL_OUT = 3, + NF_INET_POST_ROUTING = 4, + NF_INET_NUMHOOKS = 5, +} +pub const NFPROTO_UNSPEC: _bindgen_ty_99 = 0; +pub const NFPROTO_INET: _bindgen_ty_99 = 1; +pub const NFPROTO_IPV4: _bindgen_ty_99 = 2; +pub const NFPROTO_ARP: _bindgen_ty_99 = 3; +pub const NFPROTO_NETDEV: _bindgen_ty_99 = 5; +pub const NFPROTO_BRIDGE: _bindgen_ty_99 = 7; +pub const NFPROTO_IPV6: _bindgen_ty_99 = 10; +pub const NFPROTO_DECNET: _bindgen_ty_99 = 12; +pub const NFPROTO_NUMPROTO: _bindgen_ty_99 = 13; +pub type _bindgen_ty_99 = ::core::ffi::c_uint; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_type_id { + PERF_TYPE_HARDWARE = 0, + PERF_TYPE_SOFTWARE = 1, + PERF_TYPE_TRACEPOINT = 2, + PERF_TYPE_HW_CACHE = 3, + PERF_TYPE_RAW = 4, + PERF_TYPE_BREAKPOINT = 5, + PERF_TYPE_MAX = 6, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_id { + PERF_COUNT_HW_CPU_CYCLES = 0, + PERF_COUNT_HW_INSTRUCTIONS = 1, + PERF_COUNT_HW_CACHE_REFERENCES = 2, + PERF_COUNT_HW_CACHE_MISSES = 3, + PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 4, + PERF_COUNT_HW_BRANCH_MISSES = 5, + PERF_COUNT_HW_BUS_CYCLES = 6, + PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 7, + PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 8, + PERF_COUNT_HW_REF_CPU_CYCLES = 9, + PERF_COUNT_HW_MAX = 10, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_cache_id { + PERF_COUNT_HW_CACHE_L1D = 0, + PERF_COUNT_HW_CACHE_L1I = 1, + PERF_COUNT_HW_CACHE_LL = 2, + PERF_COUNT_HW_CACHE_DTLB = 3, + PERF_COUNT_HW_CACHE_ITLB = 4, + PERF_COUNT_HW_CACHE_BPU = 5, + PERF_COUNT_HW_CACHE_NODE = 6, + PERF_COUNT_HW_CACHE_MAX = 7, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_cache_op_id { + PERF_COUNT_HW_CACHE_OP_READ = 0, + PERF_COUNT_HW_CACHE_OP_WRITE = 1, + PERF_COUNT_HW_CACHE_OP_PREFETCH = 2, + PERF_COUNT_HW_CACHE_OP_MAX = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_hw_cache_op_result_id { + PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0, + PERF_COUNT_HW_CACHE_RESULT_MISS = 1, + PERF_COUNT_HW_CACHE_RESULT_MAX = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_sw_ids { + PERF_COUNT_SW_CPU_CLOCK = 0, + PERF_COUNT_SW_TASK_CLOCK = 1, + PERF_COUNT_SW_PAGE_FAULTS = 2, + PERF_COUNT_SW_CONTEXT_SWITCHES = 3, + PERF_COUNT_SW_CPU_MIGRATIONS = 4, + PERF_COUNT_SW_PAGE_FAULTS_MIN = 5, + PERF_COUNT_SW_PAGE_FAULTS_MAJ = 6, + PERF_COUNT_SW_ALIGNMENT_FAULTS = 7, + PERF_COUNT_SW_EMULATION_FAULTS = 8, + PERF_COUNT_SW_DUMMY = 9, + PERF_COUNT_SW_BPF_OUTPUT = 10, + PERF_COUNT_SW_CGROUP_SWITCHES = 11, + PERF_COUNT_SW_MAX = 12, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_event_sample_format { + PERF_SAMPLE_IP = 1, + PERF_SAMPLE_TID = 2, + PERF_SAMPLE_TIME = 4, + PERF_SAMPLE_ADDR = 8, + PERF_SAMPLE_READ = 16, + PERF_SAMPLE_CALLCHAIN = 32, + PERF_SAMPLE_ID = 64, + PERF_SAMPLE_CPU = 128, + PERF_SAMPLE_PERIOD = 256, + PERF_SAMPLE_STREAM_ID = 512, + PERF_SAMPLE_RAW = 1024, + PERF_SAMPLE_BRANCH_STACK = 2048, + PERF_SAMPLE_REGS_USER = 4096, + PERF_SAMPLE_STACK_USER = 8192, + PERF_SAMPLE_WEIGHT = 16384, + PERF_SAMPLE_DATA_SRC = 32768, + PERF_SAMPLE_IDENTIFIER = 65536, + PERF_SAMPLE_TRANSACTION = 131072, + PERF_SAMPLE_REGS_INTR = 262144, + PERF_SAMPLE_PHYS_ADDR = 524288, + PERF_SAMPLE_AUX = 1048576, + PERF_SAMPLE_CGROUP = 2097152, + PERF_SAMPLE_DATA_PAGE_SIZE = 4194304, + PERF_SAMPLE_CODE_PAGE_SIZE = 8388608, + PERF_SAMPLE_WEIGHT_STRUCT = 16777216, + PERF_SAMPLE_MAX = 33554432, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct perf_event_attr { + pub type_: __u32, + pub size: __u32, + pub config: __u64, + pub __bindgen_anon_1: perf_event_attr__bindgen_ty_1, + pub sample_type: __u64, + pub read_format: __u64, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, + pub __bindgen_anon_2: perf_event_attr__bindgen_ty_2, + pub bp_type: __u32, + pub __bindgen_anon_3: perf_event_attr__bindgen_ty_3, + pub __bindgen_anon_4: perf_event_attr__bindgen_ty_4, + pub branch_sample_type: __u64, + pub sample_regs_user: __u64, + pub sample_stack_user: __u32, + pub clockid: __s32, + pub sample_regs_intr: __u64, + pub aux_watermark: __u32, + pub sample_max_stack: __u16, + pub __reserved_2: __u16, + pub aux_sample_size: __u32, + pub __reserved_3: __u32, + pub sig_data: __u64, + pub config3: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_1 { + pub sample_period: __u64, + pub sample_freq: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_2 { + pub wakeup_events: __u32, + pub wakeup_watermark: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_3 { + pub bp_addr: __u64, + pub kprobe_func: __u64, + pub uprobe_path: __u64, + pub config1: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_attr__bindgen_ty_4 { + pub bp_len: __u64, + pub kprobe_addr: __u64, + pub probe_offset: __u64, + pub config2: __u64, +} +impl perf_event_attr { + #[inline] + pub fn disabled(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_disabled(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn disabled_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_disabled_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn inherit(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_inherit(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn inherit_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn pinned(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_pinned(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn pinned_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_pinned_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclusive(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclusive(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclusive_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclusive_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_user(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_user(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_kernel(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_kernel(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_hv(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_hv(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_hv_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_hv_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_idle(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_idle(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_idle_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_idle_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mmap(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } + } + #[inline] + pub fn set_mmap(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mmap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn comm(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } + } + #[inline] + pub fn set_comm(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn comm_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn freq(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } + } + #[inline] + pub fn set_freq(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn freq_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_freq_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn inherit_stat(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } + } + #[inline] + pub fn set_inherit_stat(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn inherit_stat_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_stat_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn enable_on_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + } + #[inline] + pub fn set_enable_on_exec(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn enable_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_enable_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn task(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } + } + #[inline] + pub fn set_task(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn task_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_task_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn watermark(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } + } + #[inline] + pub fn set_watermark(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn watermark_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_watermark_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn precise_ip(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } + } + #[inline] + pub fn set_precise_ip(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(15usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn precise_ip_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 2u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_precise_ip_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn mmap_data(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } + } + #[inline] + pub fn set_mmap_data(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mmap_data_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_data_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sample_id_all(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } + } + #[inline] + pub fn set_sample_id_all(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sample_id_all_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sample_id_all_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_host(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_host(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_host_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_host_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_guest(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_guest(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(20usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_guest_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_guest_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_callchain_kernel(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_callchain_kernel(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(21usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_callchain_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn exclude_callchain_user(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } + } + #[inline] + pub fn set_exclude_callchain_user(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(22usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn exclude_callchain_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mmap2(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } + } + #[inline] + pub fn set_mmap2(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(23usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mmap2_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 23usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap2_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 23usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn comm_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } + } + #[inline] + pub fn set_comm_exec(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(24usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn comm_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn use_clockid(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } + } + #[inline] + pub fn set_use_clockid(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(25usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn use_clockid_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 25usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_use_clockid_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 25usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn context_switch(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } + } + #[inline] + pub fn set_context_switch(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(26usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn context_switch_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_context_switch_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn write_backward(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } + } + #[inline] + pub fn set_write_backward(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(27usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn write_backward_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_write_backward_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn namespaces(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } + } + #[inline] + pub fn set_namespaces(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(28usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn namespaces_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_namespaces_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn ksymbol(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } + } + #[inline] + pub fn set_ksymbol(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(29usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn ksymbol_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ksymbol_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn bpf_event(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } + } + #[inline] + pub fn set_bpf_event(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(30usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn bpf_event_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_bpf_event_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn aux_output(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } + } + #[inline] + pub fn set_aux_output(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(31usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn aux_output_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_aux_output_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cgroup(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } + } + #[inline] + pub fn set_cgroup(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(32usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cgroup_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cgroup_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn text_poke(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } + } + #[inline] + pub fn set_text_poke(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(33usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn text_poke_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_text_poke_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn build_id(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } + } + #[inline] + pub fn set_build_id(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(34usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn build_id_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_build_id_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn inherit_thread(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } + } + #[inline] + pub fn set_inherit_thread(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(35usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn inherit_thread_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_thread_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn remove_on_exec(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } + } + #[inline] + pub fn set_remove_on_exec(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(36usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn remove_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_remove_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn sigtrap(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } + } + #[inline] + pub fn set_sigtrap(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(37usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn sigtrap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 37usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sigtrap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 37usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn __reserved_1(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } + } + #[inline] + pub fn set___reserved_1(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(38usize, 26u8, val as u64) + } + } + #[inline] + pub unsafe fn __reserved_1_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 38usize, + 26u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set___reserved_1_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 38usize, + 26u8, + val as u64, + ) + } + } + #[inline] + pub fn 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]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let disabled: u64 = unsafe { ::core::mem::transmute(disabled) }; + disabled as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let inherit: u64 = unsafe { ::core::mem::transmute(inherit) }; + inherit as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let pinned: u64 = unsafe { ::core::mem::transmute(pinned) }; + pinned as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let exclusive: u64 = unsafe { ::core::mem::transmute(exclusive) }; + exclusive as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let exclude_user: u64 = unsafe { ::core::mem::transmute(exclude_user) }; + exclude_user as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let exclude_kernel: u64 = unsafe { ::core::mem::transmute(exclude_kernel) }; + exclude_kernel as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let exclude_hv: u64 = unsafe { ::core::mem::transmute(exclude_hv) }; + exclude_hv as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let exclude_idle: u64 = unsafe { ::core::mem::transmute(exclude_idle) }; + exclude_idle as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let mmap: u64 = unsafe { ::core::mem::transmute(mmap) }; + mmap as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let comm: u64 = unsafe { ::core::mem::transmute(comm) }; + comm as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let freq: u64 = unsafe { ::core::mem::transmute(freq) }; + freq as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let inherit_stat: u64 = unsafe { ::core::mem::transmute(inherit_stat) }; + inherit_stat as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let enable_on_exec: u64 = unsafe { ::core::mem::transmute(enable_on_exec) }; + enable_on_exec as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let task: u64 = unsafe { ::core::mem::transmute(task) }; + task as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let watermark: u64 = unsafe { ::core::mem::transmute(watermark) }; + watermark as u64 + }); + __bindgen_bitfield_unit.set(15usize, 2u8, { + let precise_ip: u64 = unsafe { ::core::mem::transmute(precise_ip) }; + precise_ip as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let mmap_data: u64 = unsafe { ::core::mem::transmute(mmap_data) }; + mmap_data as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let sample_id_all: u64 = unsafe { ::core::mem::transmute(sample_id_all) }; + sample_id_all as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let exclude_host: u64 = unsafe { ::core::mem::transmute(exclude_host) }; + exclude_host as u64 + }); + __bindgen_bitfield_unit.set(20usize, 1u8, { + let exclude_guest: u64 = unsafe { ::core::mem::transmute(exclude_guest) }; + exclude_guest as u64 + }); + __bindgen_bitfield_unit.set(21usize, 1u8, { + let exclude_callchain_kernel: u64 = + unsafe { ::core::mem::transmute(exclude_callchain_kernel) }; + exclude_callchain_kernel as u64 + }); + __bindgen_bitfield_unit.set(22usize, 1u8, { + let exclude_callchain_user: u64 = + unsafe { ::core::mem::transmute(exclude_callchain_user) }; + exclude_callchain_user as u64 + }); + __bindgen_bitfield_unit.set(23usize, 1u8, { + let mmap2: u64 = unsafe { ::core::mem::transmute(mmap2) }; + mmap2 as u64 + }); + __bindgen_bitfield_unit.set(24usize, 1u8, { + let comm_exec: u64 = unsafe { ::core::mem::transmute(comm_exec) }; + comm_exec as u64 + }); + __bindgen_bitfield_unit.set(25usize, 1u8, { + let use_clockid: u64 = unsafe { ::core::mem::transmute(use_clockid) }; + use_clockid as u64 + }); + __bindgen_bitfield_unit.set(26usize, 1u8, { + let context_switch: u64 = unsafe { ::core::mem::transmute(context_switch) }; + context_switch as u64 + }); + __bindgen_bitfield_unit.set(27usize, 1u8, { + let write_backward: u64 = unsafe { ::core::mem::transmute(write_backward) }; + write_backward as u64 + }); + __bindgen_bitfield_unit.set(28usize, 1u8, { + let namespaces: u64 = unsafe { ::core::mem::transmute(namespaces) }; + namespaces as u64 + }); + __bindgen_bitfield_unit.set(29usize, 1u8, { + let ksymbol: u64 = unsafe { ::core::mem::transmute(ksymbol) }; + ksymbol as u64 + }); + __bindgen_bitfield_unit.set(30usize, 1u8, { + let bpf_event: u64 = unsafe { ::core::mem::transmute(bpf_event) }; + bpf_event as u64 + }); + __bindgen_bitfield_unit.set(31usize, 1u8, { + let aux_output: u64 = unsafe { ::core::mem::transmute(aux_output) }; + aux_output as u64 + }); + __bindgen_bitfield_unit.set(32usize, 1u8, { + let cgroup: u64 = unsafe { ::core::mem::transmute(cgroup) }; + cgroup as u64 + }); + __bindgen_bitfield_unit.set(33usize, 1u8, { + let text_poke: u64 = unsafe { ::core::mem::transmute(text_poke) }; + text_poke as u64 + }); + __bindgen_bitfield_unit.set(34usize, 1u8, { + let build_id: u64 = unsafe { ::core::mem::transmute(build_id) }; + build_id as u64 + }); + __bindgen_bitfield_unit.set(35usize, 1u8, { + let inherit_thread: u64 = unsafe { ::core::mem::transmute(inherit_thread) }; + inherit_thread as u64 + }); + __bindgen_bitfield_unit.set(36usize, 1u8, { + let remove_on_exec: u64 = unsafe { ::core::mem::transmute(remove_on_exec) }; + remove_on_exec as u64 + }); + __bindgen_bitfield_unit.set(37usize, 1u8, { + let sigtrap: u64 = unsafe { ::core::mem::transmute(sigtrap) }; + sigtrap as u64 + }); + __bindgen_bitfield_unit.set(38usize, 26u8, { + let __reserved_1: u64 = unsafe { ::core::mem::transmute(__reserved_1) }; + __reserved_1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct perf_event_mmap_page { + pub version: __u32, + pub compat_version: __u32, + pub lock: __u32, + pub index: __u32, + pub offset: __s64, + pub time_enabled: __u64, + pub time_running: __u64, + pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1, + pub pmc_width: __u16, + pub time_shift: __u16, + pub time_mult: __u32, + pub time_offset: __u64, + pub time_zero: __u64, + pub size: __u32, + pub __reserved_1: __u32, + pub time_cycles: __u64, + pub time_mask: __u64, + pub __reserved: [__u8; 928usize], + pub data_head: __u64, + pub data_tail: __u64, + pub data_offset: __u64, + pub data_size: __u64, + pub aux_head: __u64, + pub aux_tail: __u64, + pub aux_offset: __u64, + pub aux_size: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union perf_event_mmap_page__bindgen_ty_1 { + pub capabilities: __u64, + pub __bindgen_anon_1: perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u64; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn cap_bit0(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_bit0(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_bit0_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_bit0_is_deprecated(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_bit0_is_deprecated(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_bit0_is_deprecated_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_is_deprecated_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_rdpmc(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_rdpmc(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_rdpmc_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_rdpmc_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_time(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_time(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_time_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_time_zero(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_time_zero(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_time_zero_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_zero_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_user_time_short(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } + } + #[inline] + pub fn set_cap_user_time_short(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_user_time_short_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_short_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn cap_____res(&self) -> __u64 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } + } + #[inline] + pub fn set_cap_____res(&mut self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + self._bitfield_1.set(6usize, 58u8, val as u64) + } + } + #[inline] + pub unsafe fn cap_____res_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 58u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_____res_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 58u8, + val as u64, + ) + } + } + #[inline] + pub fn 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]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let cap_bit0: u64 = unsafe { ::core::mem::transmute(cap_bit0) }; + cap_bit0 as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let cap_bit0_is_deprecated: u64 = + unsafe { ::core::mem::transmute(cap_bit0_is_deprecated) }; + cap_bit0_is_deprecated as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let cap_user_rdpmc: u64 = unsafe { ::core::mem::transmute(cap_user_rdpmc) }; + cap_user_rdpmc as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let cap_user_time: u64 = unsafe { ::core::mem::transmute(cap_user_time) }; + cap_user_time as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let cap_user_time_zero: u64 = unsafe { ::core::mem::transmute(cap_user_time_zero) }; + cap_user_time_zero as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let cap_user_time_short: u64 = unsafe { ::core::mem::transmute(cap_user_time_short) }; + cap_user_time_short as u64 + }); + __bindgen_bitfield_unit.set(6usize, 58u8, { + let cap_____res: u64 = unsafe { ::core::mem::transmute(cap_____res) }; + cap_____res as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct perf_event_header { + pub type_: __u32, + pub misc: __u16, + pub size: __u16, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum perf_event_type { + PERF_RECORD_MMAP = 1, + PERF_RECORD_LOST = 2, + PERF_RECORD_COMM = 3, + PERF_RECORD_EXIT = 4, + PERF_RECORD_THROTTLE = 5, + PERF_RECORD_UNTHROTTLE = 6, + PERF_RECORD_FORK = 7, + PERF_RECORD_READ = 8, + PERF_RECORD_SAMPLE = 9, + PERF_RECORD_MMAP2 = 10, + PERF_RECORD_AUX = 11, + PERF_RECORD_ITRACE_START = 12, + PERF_RECORD_LOST_SAMPLES = 13, + PERF_RECORD_SWITCH = 14, + PERF_RECORD_SWITCH_CPU_WIDE = 15, + PERF_RECORD_NAMESPACES = 16, + PERF_RECORD_KSYMBOL = 17, + PERF_RECORD_BPF_EVENT = 18, + PERF_RECORD_CGROUP = 19, + PERF_RECORD_TEXT_POKE = 20, + PERF_RECORD_AUX_OUTPUT_HW_ID = 21, + PERF_RECORD_MAX = 22, +} +pub const TCA_BPF_UNSPEC: _bindgen_ty_154 = 0; +pub const TCA_BPF_ACT: _bindgen_ty_154 = 1; +pub const TCA_BPF_POLICE: _bindgen_ty_154 = 2; +pub const TCA_BPF_CLASSID: _bindgen_ty_154 = 3; +pub const TCA_BPF_OPS_LEN: _bindgen_ty_154 = 4; +pub const TCA_BPF_OPS: _bindgen_ty_154 = 5; +pub const TCA_BPF_FD: _bindgen_ty_154 = 6; +pub const TCA_BPF_NAME: _bindgen_ty_154 = 7; +pub const TCA_BPF_FLAGS: _bindgen_ty_154 = 8; +pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_154 = 9; +pub const TCA_BPF_TAG: _bindgen_ty_154 = 10; +pub const TCA_BPF_ID: _bindgen_ty_154 = 11; +pub const __TCA_BPF_MAX: _bindgen_ty_154 = 12; +pub type _bindgen_ty_154 = ::core::ffi::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ifinfomsg { + pub ifi_family: ::core::ffi::c_uchar, + pub __ifi_pad: ::core::ffi::c_uchar, + pub ifi_type: ::core::ffi::c_ushort, + pub ifi_index: ::core::ffi::c_int, + pub ifi_flags: ::core::ffi::c_uint, + pub ifi_change: ::core::ffi::c_uint, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcmsg { + pub tcm_family: ::core::ffi::c_uchar, + pub tcm__pad1: ::core::ffi::c_uchar, + pub tcm__pad2: ::core::ffi::c_ushort, + pub tcm_ifindex: ::core::ffi::c_int, + pub tcm_handle: __u32, + pub tcm_parent: __u32, + pub tcm_info: __u32, +} +pub const TCA_UNSPEC: _bindgen_ty_172 = 0; +pub const TCA_KIND: _bindgen_ty_172 = 1; +pub const TCA_OPTIONS: _bindgen_ty_172 = 2; +pub const TCA_STATS: _bindgen_ty_172 = 3; +pub const TCA_XSTATS: _bindgen_ty_172 = 4; +pub const TCA_RATE: _bindgen_ty_172 = 5; +pub const TCA_FCNT: _bindgen_ty_172 = 6; +pub const TCA_STATS2: _bindgen_ty_172 = 7; +pub const TCA_STAB: _bindgen_ty_172 = 8; +pub const TCA_PAD: _bindgen_ty_172 = 9; +pub const TCA_DUMP_INVISIBLE: _bindgen_ty_172 = 10; +pub const TCA_CHAIN: _bindgen_ty_172 = 11; +pub const TCA_HW_OFFLOAD: _bindgen_ty_172 = 12; +pub const TCA_INGRESS_BLOCK: _bindgen_ty_172 = 13; +pub const TCA_EGRESS_BLOCK: _bindgen_ty_172 = 14; +pub const __TCA_MAX: _bindgen_ty_172 = 15; +pub type _bindgen_ty_172 = ::core::ffi::c_uint; +pub const AYA_PERF_EVENT_IOC_ENABLE: ::core::ffi::c_int = 536880128; +pub const AYA_PERF_EVENT_IOC_DISABLE: ::core::ffi::c_int = 536880129; +pub const AYA_PERF_EVENT_IOC_SET_BPF: ::core::ffi::c_int = -2147212280; diff --git a/aya-obj/src/generated/linux_bindings_powerpc64.rs b/aya-obj/src/generated/linux_bindings_powerpc64.rs index 947cc0ba..94c0aea7 100644 --- a/aya-obj/src/generated/linux_bindings_powerpc64.rs +++ b/aya-obj/src/generated/linux_bindings_powerpc64.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -16,10 +16,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -29,10 +26,21 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -40,12 +48,27 @@ where }; let mask = 1 << bit_index; if val { - *byte |= mask; + byte | mask } else { - *byte &= !mask; + byte & !mask } } #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -64,6 +87,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -79,6 +120,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } } #[repr(C)] #[derive(Default)] @@ -162,6 +219,18 @@ pub const XDP_FLAGS_HW_MODE: u32 = 8; pub const XDP_FLAGS_REPLACE: u32 = 16; pub const XDP_FLAGS_MODES: u32 = 14; pub const XDP_FLAGS_MASK: u32 = 31; +pub const PERF_EVENT_IOC_ENABLE: u32 = 536880128; +pub const PERF_EVENT_IOC_DISABLE: u32 = 536880129; +pub const PERF_EVENT_IOC_REFRESH: u32 = 536880130; +pub const PERF_EVENT_IOC_RESET: u32 = 536880131; +pub const PERF_EVENT_IOC_PERIOD: u32 = 2148017156; +pub const PERF_EVENT_IOC_SET_OUTPUT: u32 = 536880133; +pub const PERF_EVENT_IOC_SET_FILTER: u32 = 2148017158; +pub const PERF_EVENT_IOC_ID: u32 = 1074275335; +pub const PERF_EVENT_IOC_SET_BPF: u32 = 2147755016; +pub const PERF_EVENT_IOC_PAUSE_OUTPUT: u32 = 2147755017; +pub const PERF_EVENT_IOC_QUERY_BPF: u32 = 3221758986; +pub const PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 = 2148017163; pub const PERF_MAX_STACK_DEPTH: u32 = 127; pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; @@ -207,6 +276,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -218,6 +309,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -1044,6 +1157,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -1293,6 +1428,16 @@ pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { pub ifindex: __u32, pub attach_type: __u32, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_task_fd_type { + BPF_FD_TYPE_RAW_TRACEPOINT = 0, + BPF_FD_TYPE_TRACEPOINT = 1, + BPF_FD_TYPE_KPROBE = 2, + BPF_FD_TYPE_KRETPROBE = 3, + BPF_FD_TYPE_UPROBE = 4, + BPF_FD_TYPE_URETPROBE = 5, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_func_info { @@ -1612,6 +1757,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn disabled_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_disabled_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -1623,6 +1790,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn pinned(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -1634,6 +1823,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn pinned_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_pinned_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclusive(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -1645,6 +1856,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclusive_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclusive_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -1656,6 +1889,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -1667,6 +1922,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_hv(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } } @@ -1678,6 +1955,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_hv_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_hv_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_idle(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } } @@ -1689,6 +1988,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_idle_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_idle_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } } @@ -1700,6 +2021,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } } @@ -1711,6 +2054,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn freq(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } } @@ -1722,6 +2087,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn freq_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_freq_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_stat(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } } @@ -1733,6 +2120,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_stat_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_stat_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn enable_on_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } } @@ -1744,6 +2153,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn enable_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_enable_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn task(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } } @@ -1755,6 +2186,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn task_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_task_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn watermark(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } } @@ -1766,6 +2219,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn watermark_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_watermark_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn precise_ip(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } } @@ -1777,6 +2252,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn precise_ip_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 2u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_precise_ip_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 2u8, + val as u64, + ) + } + } + #[inline] pub fn mmap_data(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } } @@ -1788,6 +2285,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_data_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_data_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sample_id_all(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } } @@ -1799,6 +2318,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sample_id_all_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sample_id_all_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_host(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } } @@ -1810,6 +2351,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_host_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_host_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_guest(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } } @@ -1821,6 +2384,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_guest_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_guest_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } } @@ -1832,6 +2417,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } } @@ -1843,6 +2450,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap2(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } } @@ -1854,6 +2483,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap2_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 23usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap2_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 23usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } } @@ -1865,6 +2516,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn use_clockid(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } } @@ -1876,6 +2549,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn use_clockid_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 25usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_use_clockid_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 25usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn context_switch(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } } @@ -1887,6 +2582,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn context_switch_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_context_switch_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn write_backward(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } } @@ -1898,6 +2615,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn write_backward_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_write_backward_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn namespaces(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } } @@ -1909,6 +2648,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn namespaces_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_namespaces_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn ksymbol(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } } @@ -1920,6 +2681,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn ksymbol_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ksymbol_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn bpf_event(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } } @@ -1931,6 +2714,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn bpf_event_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_bpf_event_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn aux_output(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } } @@ -1942,6 +2747,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn aux_output_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_aux_output_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cgroup(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } } @@ -1953,6 +2780,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn cgroup_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cgroup_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn text_poke(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } } @@ -1964,6 +2813,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn text_poke_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_text_poke_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn build_id(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } } @@ -1975,6 +2846,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn build_id_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_build_id_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_thread(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } } @@ -1986,6 +2879,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_thread_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_thread_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn remove_on_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } } @@ -1997,6 +2912,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn remove_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_remove_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sigtrap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } } @@ -2008,6 +2945,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sigtrap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 37usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sigtrap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 37usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __reserved_1(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } } @@ -2019,6 +2978,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn __reserved_1_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 38usize, + 26u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set___reserved_1_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 38usize, + 26u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( disabled: __u64, inherit: __u64, @@ -2272,6 +3253,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_bit0_is_deprecated(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -2283,6 +3286,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_is_deprecated_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_is_deprecated_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_rdpmc(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -2294,6 +3319,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_rdpmc_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_rdpmc_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -2305,6 +3352,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_zero(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -2316,6 +3385,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_zero_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_zero_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_short(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -2327,6 +3418,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_short_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_short_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_____res(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } } @@ -2338,6 +3451,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_____res_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 58u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_____res_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 58u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( cap_bit0: __u64, cap_bit0_is_deprecated: __u64, diff --git a/aya-obj/src/generated/linux_bindings_riscv64.rs b/aya-obj/src/generated/linux_bindings_riscv64.rs index 7ce3f17c..1246cc16 100644 --- a/aya-obj/src/generated/linux_bindings_riscv64.rs +++ b/aya-obj/src/generated/linux_bindings_riscv64.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -16,10 +16,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -29,10 +26,21 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -40,12 +48,27 @@ where }; let mask = 1 << bit_index; if val { - *byte |= mask; + byte | mask } else { - *byte &= !mask; + byte & !mask } } #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -64,6 +87,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -79,6 +120,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } } #[repr(C)] #[derive(Default)] @@ -162,6 +219,18 @@ pub const XDP_FLAGS_HW_MODE: u32 = 8; pub const XDP_FLAGS_REPLACE: u32 = 16; pub const XDP_FLAGS_MODES: u32 = 14; pub const XDP_FLAGS_MASK: u32 = 31; +pub const PERF_EVENT_IOC_ENABLE: u32 = 9216; +pub const PERF_EVENT_IOC_DISABLE: u32 = 9217; +pub const PERF_EVENT_IOC_REFRESH: u32 = 9218; +pub const PERF_EVENT_IOC_RESET: u32 = 9219; +pub const PERF_EVENT_IOC_PERIOD: u32 = 1074275332; +pub const PERF_EVENT_IOC_SET_OUTPUT: u32 = 9221; +pub const PERF_EVENT_IOC_SET_FILTER: u32 = 1074275334; +pub const PERF_EVENT_IOC_ID: u32 = 2148017159; +pub const PERF_EVENT_IOC_SET_BPF: u32 = 1074013192; +pub const PERF_EVENT_IOC_PAUSE_OUTPUT: u32 = 1074013193; +pub const PERF_EVENT_IOC_QUERY_BPF: u32 = 3221758986; +pub const PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 = 1074275339; pub const PERF_MAX_STACK_DEPTH: u32 = 127; pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; @@ -207,6 +276,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -218,6 +309,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -1044,6 +1157,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -1293,6 +1428,16 @@ pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { pub ifindex: __u32, pub attach_type: __u32, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_task_fd_type { + BPF_FD_TYPE_RAW_TRACEPOINT = 0, + BPF_FD_TYPE_TRACEPOINT = 1, + BPF_FD_TYPE_KPROBE = 2, + BPF_FD_TYPE_KRETPROBE = 3, + BPF_FD_TYPE_UPROBE = 4, + BPF_FD_TYPE_URETPROBE = 5, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_func_info { @@ -1612,6 +1757,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn disabled_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_disabled_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -1623,6 +1790,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn pinned(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -1634,6 +1823,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn pinned_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_pinned_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclusive(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -1645,6 +1856,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclusive_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclusive_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -1656,6 +1889,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -1667,6 +1922,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_hv(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } } @@ -1678,6 +1955,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_hv_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_hv_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_idle(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } } @@ -1689,6 +1988,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_idle_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_idle_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } } @@ -1700,6 +2021,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } } @@ -1711,6 +2054,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn freq(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } } @@ -1722,6 +2087,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn freq_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_freq_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_stat(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } } @@ -1733,6 +2120,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_stat_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_stat_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn enable_on_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } } @@ -1744,6 +2153,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn enable_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_enable_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn task(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } } @@ -1755,6 +2186,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn task_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_task_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn watermark(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } } @@ -1766,6 +2219,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn watermark_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_watermark_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn precise_ip(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } } @@ -1777,6 +2252,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn precise_ip_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 2u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_precise_ip_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 2u8, + val as u64, + ) + } + } + #[inline] pub fn mmap_data(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } } @@ -1788,6 +2285,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_data_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_data_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sample_id_all(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } } @@ -1799,6 +2318,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sample_id_all_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sample_id_all_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_host(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } } @@ -1810,6 +2351,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_host_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_host_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_guest(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } } @@ -1821,6 +2384,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_guest_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_guest_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } } @@ -1832,6 +2417,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } } @@ -1843,6 +2450,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap2(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } } @@ -1854,6 +2483,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap2_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 23usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap2_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 23usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } } @@ -1865,6 +2516,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn use_clockid(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } } @@ -1876,6 +2549,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn use_clockid_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 25usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_use_clockid_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 25usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn context_switch(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } } @@ -1887,6 +2582,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn context_switch_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_context_switch_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn write_backward(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } } @@ -1898,6 +2615,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn write_backward_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_write_backward_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn namespaces(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } } @@ -1909,6 +2648,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn namespaces_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_namespaces_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn ksymbol(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } } @@ -1920,6 +2681,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn ksymbol_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ksymbol_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn bpf_event(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } } @@ -1931,6 +2714,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn bpf_event_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_bpf_event_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn aux_output(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } } @@ -1942,6 +2747,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn aux_output_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_aux_output_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cgroup(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } } @@ -1953,6 +2780,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn cgroup_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cgroup_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn text_poke(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } } @@ -1964,6 +2813,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn text_poke_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_text_poke_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn build_id(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } } @@ -1975,6 +2846,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn build_id_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_build_id_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_thread(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } } @@ -1986,6 +2879,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_thread_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_thread_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn remove_on_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } } @@ -1997,6 +2912,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn remove_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_remove_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sigtrap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } } @@ -2008,6 +2945,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sigtrap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 37usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sigtrap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 37usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __reserved_1(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } } @@ -2019,6 +2978,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn __reserved_1_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 38usize, + 26u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set___reserved_1_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 38usize, + 26u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( disabled: __u64, inherit: __u64, @@ -2272,6 +3253,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_bit0_is_deprecated(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -2283,6 +3286,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_is_deprecated_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_is_deprecated_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_rdpmc(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -2294,6 +3319,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_rdpmc_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_rdpmc_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -2305,6 +3352,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_zero(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -2316,6 +3385,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_zero_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_zero_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_short(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -2327,6 +3418,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_short_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_short_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_____res(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } } @@ -2338,6 +3451,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_____res_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 58u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_____res_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 58u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( cap_bit0: __u64, cap_bit0_is_deprecated: __u64, diff --git a/aya-obj/src/generated/linux_bindings_s390x.rs b/aya-obj/src/generated/linux_bindings_s390x.rs index 7ce3f17c..1246cc16 100644 --- a/aya-obj/src/generated/linux_bindings_s390x.rs +++ b/aya-obj/src/generated/linux_bindings_s390x.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -16,10 +16,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -29,10 +26,21 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -40,12 +48,27 @@ where }; let mask = 1 << bit_index; if val { - *byte |= mask; + byte | mask } else { - *byte &= !mask; + byte & !mask } } #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -64,6 +87,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -79,6 +120,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } } #[repr(C)] #[derive(Default)] @@ -162,6 +219,18 @@ pub const XDP_FLAGS_HW_MODE: u32 = 8; pub const XDP_FLAGS_REPLACE: u32 = 16; pub const XDP_FLAGS_MODES: u32 = 14; pub const XDP_FLAGS_MASK: u32 = 31; +pub const PERF_EVENT_IOC_ENABLE: u32 = 9216; +pub const PERF_EVENT_IOC_DISABLE: u32 = 9217; +pub const PERF_EVENT_IOC_REFRESH: u32 = 9218; +pub const PERF_EVENT_IOC_RESET: u32 = 9219; +pub const PERF_EVENT_IOC_PERIOD: u32 = 1074275332; +pub const PERF_EVENT_IOC_SET_OUTPUT: u32 = 9221; +pub const PERF_EVENT_IOC_SET_FILTER: u32 = 1074275334; +pub const PERF_EVENT_IOC_ID: u32 = 2148017159; +pub const PERF_EVENT_IOC_SET_BPF: u32 = 1074013192; +pub const PERF_EVENT_IOC_PAUSE_OUTPUT: u32 = 1074013193; +pub const PERF_EVENT_IOC_QUERY_BPF: u32 = 3221758986; +pub const PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 = 1074275339; pub const PERF_MAX_STACK_DEPTH: u32 = 127; pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; @@ -207,6 +276,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -218,6 +309,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -1044,6 +1157,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -1293,6 +1428,16 @@ pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { pub ifindex: __u32, pub attach_type: __u32, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_task_fd_type { + BPF_FD_TYPE_RAW_TRACEPOINT = 0, + BPF_FD_TYPE_TRACEPOINT = 1, + BPF_FD_TYPE_KPROBE = 2, + BPF_FD_TYPE_KRETPROBE = 3, + BPF_FD_TYPE_UPROBE = 4, + BPF_FD_TYPE_URETPROBE = 5, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_func_info { @@ -1612,6 +1757,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn disabled_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_disabled_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -1623,6 +1790,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn pinned(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -1634,6 +1823,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn pinned_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_pinned_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclusive(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -1645,6 +1856,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclusive_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclusive_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -1656,6 +1889,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -1667,6 +1922,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_hv(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } } @@ -1678,6 +1955,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_hv_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_hv_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_idle(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } } @@ -1689,6 +1988,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_idle_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_idle_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } } @@ -1700,6 +2021,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } } @@ -1711,6 +2054,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn freq(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } } @@ -1722,6 +2087,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn freq_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_freq_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_stat(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } } @@ -1733,6 +2120,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_stat_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_stat_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn enable_on_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } } @@ -1744,6 +2153,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn enable_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_enable_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn task(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } } @@ -1755,6 +2186,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn task_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_task_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn watermark(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } } @@ -1766,6 +2219,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn watermark_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_watermark_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn precise_ip(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } } @@ -1777,6 +2252,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn precise_ip_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 2u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_precise_ip_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 2u8, + val as u64, + ) + } + } + #[inline] pub fn mmap_data(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } } @@ -1788,6 +2285,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_data_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_data_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sample_id_all(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } } @@ -1799,6 +2318,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sample_id_all_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sample_id_all_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_host(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } } @@ -1810,6 +2351,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_host_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_host_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_guest(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } } @@ -1821,6 +2384,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_guest_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_guest_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } } @@ -1832,6 +2417,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } } @@ -1843,6 +2450,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap2(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } } @@ -1854,6 +2483,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap2_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 23usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap2_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 23usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } } @@ -1865,6 +2516,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn use_clockid(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } } @@ -1876,6 +2549,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn use_clockid_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 25usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_use_clockid_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 25usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn context_switch(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } } @@ -1887,6 +2582,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn context_switch_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_context_switch_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn write_backward(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } } @@ -1898,6 +2615,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn write_backward_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_write_backward_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn namespaces(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } } @@ -1909,6 +2648,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn namespaces_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_namespaces_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn ksymbol(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } } @@ -1920,6 +2681,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn ksymbol_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ksymbol_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn bpf_event(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } } @@ -1931,6 +2714,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn bpf_event_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_bpf_event_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn aux_output(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } } @@ -1942,6 +2747,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn aux_output_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_aux_output_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cgroup(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } } @@ -1953,6 +2780,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn cgroup_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cgroup_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn text_poke(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } } @@ -1964,6 +2813,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn text_poke_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_text_poke_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn build_id(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } } @@ -1975,6 +2846,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn build_id_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_build_id_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_thread(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } } @@ -1986,6 +2879,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_thread_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_thread_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn remove_on_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } } @@ -1997,6 +2912,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn remove_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_remove_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sigtrap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } } @@ -2008,6 +2945,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sigtrap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 37usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sigtrap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 37usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __reserved_1(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } } @@ -2019,6 +2978,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn __reserved_1_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 38usize, + 26u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set___reserved_1_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 38usize, + 26u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( disabled: __u64, inherit: __u64, @@ -2272,6 +3253,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_bit0_is_deprecated(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -2283,6 +3286,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_is_deprecated_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_is_deprecated_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_rdpmc(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -2294,6 +3319,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_rdpmc_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_rdpmc_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -2305,6 +3352,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_zero(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -2316,6 +3385,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_zero_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_zero_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_short(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -2327,6 +3418,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_short_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_short_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_____res(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } } @@ -2338,6 +3451,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_____res_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 58u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_____res_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 58u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( cap_bit0: __u64, cap_bit0_is_deprecated: __u64, diff --git a/aya-obj/src/generated/linux_bindings_x86_64.rs b/aya-obj/src/generated/linux_bindings_x86_64.rs index 7ce3f17c..1246cc16 100644 --- a/aya-obj/src/generated/linux_bindings_x86_64.rs +++ b/aya-obj/src/generated/linux_bindings_x86_64.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -16,10 +16,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -29,10 +26,21 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -40,12 +48,27 @@ where }; let mask = 1 << bit_index; if val { - *byte |= mask; + byte | mask } else { - *byte &= !mask; + byte & !mask } } #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -64,6 +87,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -79,6 +120,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } } #[repr(C)] #[derive(Default)] @@ -162,6 +219,18 @@ pub const XDP_FLAGS_HW_MODE: u32 = 8; pub const XDP_FLAGS_REPLACE: u32 = 16; pub const XDP_FLAGS_MODES: u32 = 14; pub const XDP_FLAGS_MASK: u32 = 31; +pub const PERF_EVENT_IOC_ENABLE: u32 = 9216; +pub const PERF_EVENT_IOC_DISABLE: u32 = 9217; +pub const PERF_EVENT_IOC_REFRESH: u32 = 9218; +pub const PERF_EVENT_IOC_RESET: u32 = 9219; +pub const PERF_EVENT_IOC_PERIOD: u32 = 1074275332; +pub const PERF_EVENT_IOC_SET_OUTPUT: u32 = 9221; +pub const PERF_EVENT_IOC_SET_FILTER: u32 = 1074275334; +pub const PERF_EVENT_IOC_ID: u32 = 2148017159; +pub const PERF_EVENT_IOC_SET_BPF: u32 = 1074013192; +pub const PERF_EVENT_IOC_PAUSE_OUTPUT: u32 = 1074013193; +pub const PERF_EVENT_IOC_QUERY_BPF: u32 = 3221758986; +pub const PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 = 1074275339; pub const PERF_MAX_STACK_DEPTH: u32 = 127; pub const PERF_MAX_CONTEXTS_PER_STACK: u32 = 8; pub const PERF_FLAG_FD_NO_GROUP: u32 = 1; @@ -207,6 +276,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -218,6 +309,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -1044,6 +1157,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -1293,6 +1428,16 @@ pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { pub ifindex: __u32, pub attach_type: __u32, } +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum bpf_task_fd_type { + BPF_FD_TYPE_RAW_TRACEPOINT = 0, + BPF_FD_TYPE_TRACEPOINT = 1, + BPF_FD_TYPE_KPROBE = 2, + BPF_FD_TYPE_KRETPROBE = 3, + BPF_FD_TYPE_UPROBE = 4, + BPF_FD_TYPE_URETPROBE = 5, +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bpf_func_info { @@ -1612,6 +1757,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn disabled_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_disabled_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -1623,6 +1790,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn pinned(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -1634,6 +1823,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn pinned_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_pinned_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclusive(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -1645,6 +1856,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclusive_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclusive_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -1656,6 +1889,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -1667,6 +1922,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_hv(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } } @@ -1678,6 +1955,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_hv_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_hv_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_idle(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } } @@ -1689,6 +1988,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_idle_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_idle_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } } @@ -1700,6 +2021,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } } @@ -1711,6 +2054,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn freq(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } } @@ -1722,6 +2087,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn freq_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_freq_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_stat(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } } @@ -1733,6 +2120,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_stat_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_stat_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn enable_on_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } } @@ -1744,6 +2153,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn enable_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_enable_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn task(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } } @@ -1755,6 +2186,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn task_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_task_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn watermark(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } } @@ -1766,6 +2219,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn watermark_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_watermark_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn precise_ip(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 2u8) as u64) } } @@ -1777,6 +2252,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn precise_ip_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 2u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_precise_ip_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 2u8, + val as u64, + ) + } + } + #[inline] pub fn mmap_data(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } } @@ -1788,6 +2285,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap_data_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap_data_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sample_id_all(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } } @@ -1799,6 +2318,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sample_id_all_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sample_id_all_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_host(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } } @@ -1810,6 +2351,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_host_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_host_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_guest(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } } @@ -1821,6 +2384,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_guest_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_guest_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_kernel(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } } @@ -1832,6 +2417,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_kernel_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 21usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_kernel_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 21usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn exclude_callchain_user(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } } @@ -1843,6 +2450,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn exclude_callchain_user_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_exclude_callchain_user_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn mmap2(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } } @@ -1854,6 +2483,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn mmap2_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 23usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_mmap2_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 23usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn comm_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } } @@ -1865,6 +2516,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn comm_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 24usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_comm_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 24usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn use_clockid(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } } @@ -1876,6 +2549,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn use_clockid_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 25usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_use_clockid_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 25usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn context_switch(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } } @@ -1887,6 +2582,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn context_switch_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 26usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_context_switch_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 26usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn write_backward(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } } @@ -1898,6 +2615,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn write_backward_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 27usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_write_backward_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 27usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn namespaces(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } } @@ -1909,6 +2648,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn namespaces_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 28usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_namespaces_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 28usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn ksymbol(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } } @@ -1920,6 +2681,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn ksymbol_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ksymbol_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn bpf_event(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } } @@ -1931,6 +2714,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn bpf_event_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_bpf_event_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn aux_output(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } } @@ -1942,6 +2747,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn aux_output_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_aux_output_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cgroup(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } } @@ -1953,6 +2780,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn cgroup_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cgroup_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn text_poke(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } } @@ -1964,6 +2813,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn text_poke_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_text_poke_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn build_id(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } } @@ -1975,6 +2846,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn build_id_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_build_id_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn inherit_thread(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } } @@ -1986,6 +2879,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn inherit_thread_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_inherit_thread_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn remove_on_exec(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } } @@ -1997,6 +2912,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn remove_on_exec_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_remove_on_exec_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn sigtrap(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } } @@ -2008,6 +2945,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn sigtrap_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 37usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_sigtrap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 37usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __reserved_1(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } } @@ -2019,6 +2978,28 @@ impl perf_event_attr { } } #[inline] + pub unsafe fn __reserved_1_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 38usize, + 26u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set___reserved_1_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 38usize, + 26u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( disabled: __u64, inherit: __u64, @@ -2272,6 +3253,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_bit0_is_deprecated(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } } @@ -2283,6 +3286,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_bit0_is_deprecated_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_bit0_is_deprecated_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_rdpmc(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } } @@ -2294,6 +3319,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_rdpmc_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_rdpmc_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } } @@ -2305,6 +3352,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_zero(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } } @@ -2316,6 +3385,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_zero_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_zero_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_user_time_short(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } } @@ -2327,6 +3418,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_user_time_short_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_user_time_short_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn cap_____res(&self) -> __u64 { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } } @@ -2338,6 +3451,28 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] + pub unsafe fn cap_____res_raw(this: *const Self) -> __u64 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 58u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_cap_____res_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 58u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( cap_bit0: __u64, cap_bit0_is_deprecated: __u64, diff --git a/ebpf/aya-ebpf-bindings/src/aarch64/bindings.rs b/ebpf/aya-ebpf-bindings/src/aarch64/bindings.rs index 629fa460..67371fe2 100644 --- a/ebpf/aya-ebpf-bindings/src/aarch64/bindings.rs +++ b/ebpf/aya-ebpf-bindings/src/aarch64/bindings.rs @@ -14,10 +14,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -27,10 +24,21 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -38,12 +46,27 @@ where }; let mask = 1 << bit_index; if val { - *byte |= mask; + byte | mask } else { - *byte &= !mask; + byte & !mask } } #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -62,6 +85,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -77,6 +118,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } } #[repr(C)] #[derive(Default)] @@ -211,6 +268,9 @@ pub const TC_ACT_REDIRECT: u32 = 7; pub const TC_ACT_TRAP: u32 = 8; pub const TC_ACT_VALUE_MAX: u32 = 8; pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455; +pub const TC_ACT_JUMP: u32 = 268435456; +pub const TC_ACT_GOTO_CHAIN: u32 = 536870912; +pub const TC_ACT_EXT_OPCODE_MAX: u32 = 536870912; pub const SOL_SOCKET: u32 = 1; pub const SO_DEBUG: u32 = 1; pub const SO_REUSEADDR: u32 = 2; @@ -434,6 +494,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -445,6 +527,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -1957,6 +2061,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/ebpf/aya-ebpf-bindings/src/armv7/bindings.rs b/ebpf/aya-ebpf-bindings/src/armv7/bindings.rs index 9bbde90a..73442cae 100644 --- a/ebpf/aya-ebpf-bindings/src/armv7/bindings.rs +++ b/ebpf/aya-ebpf-bindings/src/armv7/bindings.rs @@ -14,10 +14,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -27,10 +24,21 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -38,12 +46,27 @@ where }; let mask = 1 << bit_index; if val { - *byte |= mask; + byte | mask } else { - *byte &= !mask; + byte & !mask } } #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -62,6 +85,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -77,6 +118,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } } #[repr(C)] #[derive(Default)] @@ -211,6 +268,9 @@ pub const TC_ACT_REDIRECT: u32 = 7; pub const TC_ACT_TRAP: u32 = 8; pub const TC_ACT_VALUE_MAX: u32 = 8; pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455; +pub const TC_ACT_JUMP: u32 = 268435456; +pub const TC_ACT_GOTO_CHAIN: u32 = 536870912; +pub const TC_ACT_EXT_OPCODE_MAX: u32 = 536870912; pub const SOL_SOCKET: u32 = 1; pub const SO_DEBUG: u32 = 1; pub const SO_REUSEADDR: u32 = 2; @@ -280,6 +340,11 @@ pub const SO_TIMESTAMPING_NEW: u32 = 65; pub const SO_RCVTIMEO_NEW: u32 = 66; pub const SO_SNDTIMEO_NEW: u32 = 67; pub const SO_DETACH_REUSEPORT_BPF: u32 = 68; +pub const SO_TIMESTAMP: u32 = 29; +pub const SO_TIMESTAMPNS: u32 = 35; +pub const SO_TIMESTAMPING: u32 = 37; +pub const SO_RCVTIMEO: u32 = 20; +pub const SO_SNDTIMEO: u32 = 21; pub type __u8 = ::aya_ebpf_cty::c_uchar; pub type __s16 = ::aya_ebpf_cty::c_short; pub type __u16 = ::aya_ebpf_cty::c_ushort; @@ -424,6 +489,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -435,6 +522,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -1956,6 +2065,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/ebpf/aya-ebpf-bindings/src/mips/bindings.rs b/ebpf/aya-ebpf-bindings/src/mips/bindings.rs new file mode 100644 index 00000000..50d136bd --- /dev/null +++ b/ebpf/aya-ebpf-bindings/src/mips/bindings.rs @@ -0,0 +1,2904 @@ +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + byte | mask + } else { + byte & !mask + } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } +} +#[repr(C)] +#[derive(Default)] +pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); +impl __IncompleteArrayField { + #[inline] + pub const fn new() -> Self { + __IncompleteArrayField(::core::marker::PhantomData, []) + } + #[inline] + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T + } + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T + } + #[inline] + pub unsafe fn as_slice(&self, len: usize) -> &[T] { + ::core::slice::from_raw_parts(self.as_ptr(), len) + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + } +} +impl ::core::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + fmt.write_str("__IncompleteArrayField") + } +} +pub const BPF_LD: u32 = 0; +pub const BPF_LDX: u32 = 1; +pub const BPF_ST: u32 = 2; +pub const BPF_STX: u32 = 3; +pub const BPF_ALU: u32 = 4; +pub const BPF_JMP: u32 = 5; +pub const BPF_RET: u32 = 6; +pub const BPF_MISC: u32 = 7; +pub const BPF_W: u32 = 0; +pub const BPF_H: u32 = 8; +pub const BPF_B: u32 = 16; +pub const BPF_IMM: u32 = 0; +pub const BPF_ABS: u32 = 32; +pub const BPF_IND: u32 = 64; +pub const BPF_MEM: u32 = 96; +pub const BPF_LEN: u32 = 128; +pub const BPF_MSH: u32 = 160; +pub const BPF_ADD: u32 = 0; +pub const BPF_SUB: u32 = 16; +pub const BPF_MUL: u32 = 32; +pub const BPF_DIV: u32 = 48; +pub const BPF_OR: u32 = 64; +pub const BPF_AND: u32 = 80; +pub const BPF_LSH: u32 = 96; +pub const BPF_RSH: u32 = 112; +pub const BPF_NEG: u32 = 128; +pub const BPF_MOD: u32 = 144; +pub const BPF_XOR: u32 = 160; +pub const BPF_JA: u32 = 0; +pub const BPF_JEQ: u32 = 16; +pub const BPF_JGT: u32 = 32; +pub const BPF_JGE: u32 = 48; +pub const BPF_JSET: u32 = 64; +pub const BPF_K: u32 = 0; +pub const BPF_X: u32 = 8; +pub const BPF_MAXINSNS: u32 = 4096; +pub const BPF_JMP32: u32 = 6; +pub const BPF_ALU64: u32 = 7; +pub const BPF_DW: u32 = 24; +pub const BPF_MEMSX: u32 = 128; +pub const BPF_ATOMIC: u32 = 192; +pub const BPF_XADD: u32 = 192; +pub const BPF_MOV: u32 = 176; +pub const BPF_ARSH: u32 = 192; +pub const BPF_END: u32 = 208; +pub const BPF_TO_LE: u32 = 0; +pub const BPF_TO_BE: u32 = 8; +pub const BPF_FROM_LE: u32 = 0; +pub const BPF_FROM_BE: u32 = 8; +pub const BPF_JNE: u32 = 80; +pub const BPF_JLT: u32 = 160; +pub const BPF_JLE: u32 = 176; +pub const BPF_JSGT: u32 = 96; +pub const BPF_JSGE: u32 = 112; +pub const BPF_JSLT: u32 = 192; +pub const BPF_JSLE: u32 = 208; +pub const BPF_JCOND: u32 = 224; +pub const BPF_CALL: u32 = 128; +pub const BPF_EXIT: u32 = 144; +pub const BPF_FETCH: u32 = 1; +pub const BPF_XCHG: u32 = 225; +pub const BPF_CMPXCHG: u32 = 241; +pub const BPF_F_ALLOW_OVERRIDE: u32 = 1; +pub const BPF_F_ALLOW_MULTI: u32 = 2; +pub const BPF_F_REPLACE: u32 = 4; +pub const BPF_F_BEFORE: u32 = 8; +pub const BPF_F_AFTER: u32 = 16; +pub const BPF_F_ID: u32 = 32; +pub const BPF_F_STRICT_ALIGNMENT: u32 = 1; +pub const BPF_F_ANY_ALIGNMENT: u32 = 2; +pub const BPF_F_TEST_RND_HI32: u32 = 4; +pub const BPF_F_TEST_STATE_FREQ: u32 = 8; +pub const BPF_F_SLEEPABLE: u32 = 16; +pub const BPF_F_XDP_HAS_FRAGS: u32 = 32; +pub const BPF_F_XDP_DEV_BOUND_ONLY: u32 = 64; +pub const BPF_F_TEST_REG_INVARIANTS: u32 = 128; +pub const BPF_F_NETFILTER_IP_DEFRAG: u32 = 1; +pub const BPF_PSEUDO_MAP_FD: u32 = 1; +pub const BPF_PSEUDO_MAP_IDX: u32 = 5; +pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; +pub const BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6; +pub const BPF_PSEUDO_BTF_ID: u32 = 3; +pub const BPF_PSEUDO_FUNC: u32 = 4; +pub const BPF_PSEUDO_CALL: u32 = 1; +pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; +pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; +pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; +pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2; +pub const BPF_BUILD_ID_SIZE: u32 = 20; +pub const BPF_OBJ_NAME_LEN: u32 = 16; +pub const BPF_TAG_SIZE: u32 = 8; +pub const TC_ACT_UNSPEC: i32 = -1; +pub const TC_ACT_OK: u32 = 0; +pub const TC_ACT_RECLASSIFY: u32 = 1; +pub const TC_ACT_SHOT: u32 = 2; +pub const TC_ACT_PIPE: u32 = 3; +pub const TC_ACT_STOLEN: u32 = 4; +pub const TC_ACT_QUEUED: u32 = 5; +pub const TC_ACT_REPEAT: u32 = 6; +pub const TC_ACT_REDIRECT: u32 = 7; +pub const TC_ACT_TRAP: u32 = 8; +pub const TC_ACT_VALUE_MAX: u32 = 8; +pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455; +pub const TC_ACT_JUMP: u32 = 268435456; +pub const TC_ACT_GOTO_CHAIN: u32 = 536870912; +pub const TC_ACT_EXT_OPCODE_MAX: u32 = 536870912; +pub const SOL_SOCKET: u32 = 65535; +pub const SO_DEBUG: u32 = 1; +pub const SO_REUSEADDR: u32 = 4; +pub const SO_KEEPALIVE: u32 = 8; +pub const SO_DONTROUTE: u32 = 16; +pub const SO_BROADCAST: u32 = 32; +pub const SO_LINGER: u32 = 128; +pub const SO_OOBINLINE: u32 = 256; +pub const SO_REUSEPORT: u32 = 512; +pub const SO_TYPE: u32 = 4104; +pub const SO_STYLE: u32 = 4104; +pub const SO_ERROR: u32 = 4103; +pub const SO_SNDBUF: u32 = 4097; +pub const SO_RCVBUF: u32 = 4098; +pub const SO_SNDLOWAT: u32 = 4099; +pub const SO_RCVLOWAT: u32 = 4100; +pub const SO_SNDTIMEO_OLD: u32 = 4101; +pub const SO_RCVTIMEO_OLD: u32 = 4102; +pub const SO_ACCEPTCONN: u32 = 4105; +pub const SO_PROTOCOL: u32 = 4136; +pub const SO_DOMAIN: u32 = 4137; +pub const SO_NO_CHECK: u32 = 11; +pub const SO_PRIORITY: u32 = 12; +pub const SO_BSDCOMPAT: u32 = 14; +pub const SO_PASSCRED: u32 = 17; +pub const SO_PEERCRED: u32 = 18; +pub const SO_SECURITY_AUTHENTICATION: u32 = 22; +pub const SO_SECURITY_ENCRYPTION_TRANSPORT: u32 = 23; +pub const SO_SECURITY_ENCRYPTION_NETWORK: u32 = 24; +pub const SO_BINDTODEVICE: u32 = 25; +pub const SO_ATTACH_FILTER: u32 = 26; +pub const SO_DETACH_FILTER: u32 = 27; +pub const SO_GET_FILTER: u32 = 26; +pub const SO_PEERNAME: u32 = 28; +pub const SO_PEERSEC: u32 = 30; +pub const SO_SNDBUFFORCE: u32 = 31; +pub const SO_RCVBUFFORCE: u32 = 33; +pub const SO_PASSSEC: u32 = 34; +pub const SO_MARK: u32 = 36; +pub const SO_RXQ_OVFL: u32 = 40; +pub const SO_WIFI_STATUS: u32 = 41; +pub const SO_PEEK_OFF: u32 = 42; +pub const SO_NOFCS: u32 = 43; +pub const SO_LOCK_FILTER: u32 = 44; +pub const SO_SELECT_ERR_QUEUE: u32 = 45; +pub const SO_BUSY_POLL: u32 = 46; +pub const SO_MAX_PACING_RATE: u32 = 47; +pub const SO_BPF_EXTENSIONS: u32 = 48; +pub const SO_INCOMING_CPU: u32 = 49; +pub const SO_ATTACH_BPF: u32 = 50; +pub const SO_DETACH_BPF: u32 = 27; +pub const SO_ATTACH_REUSEPORT_CBPF: u32 = 51; +pub const SO_ATTACH_REUSEPORT_EBPF: u32 = 52; +pub const SO_CNX_ADVICE: u32 = 53; +pub const SO_MEMINFO: u32 = 55; +pub const SO_INCOMING_NAPI_ID: u32 = 56; +pub const SO_COOKIE: u32 = 57; +pub const SO_PEERGROUPS: u32 = 59; +pub const SO_ZEROCOPY: u32 = 60; +pub const SO_TXTIME: u32 = 61; +pub const SO_BINDTOIFINDEX: u32 = 62; +pub const SO_TIMESTAMP_OLD: u32 = 29; +pub const SO_TIMESTAMPNS_OLD: u32 = 35; +pub const SO_TIMESTAMPING_OLD: u32 = 37; +pub const SO_TIMESTAMP_NEW: u32 = 63; +pub const SO_TIMESTAMPNS_NEW: u32 = 64; +pub const SO_TIMESTAMPING_NEW: u32 = 65; +pub const SO_RCVTIMEO_NEW: u32 = 66; +pub const SO_SNDTIMEO_NEW: u32 = 67; +pub const SO_DETACH_REUSEPORT_BPF: u32 = 68; +pub const SO_TIMESTAMP: u32 = 29; +pub const SO_TIMESTAMPNS: u32 = 35; +pub const SO_TIMESTAMPING: u32 = 37; +pub const SO_RCVTIMEO: u32 = 4102; +pub const SO_SNDTIMEO: u32 = 4101; +pub type __u8 = ::aya_ebpf_cty::c_uchar; +pub type __s16 = ::aya_ebpf_cty::c_short; +pub type __u16 = ::aya_ebpf_cty::c_ushort; +pub type __s32 = ::aya_ebpf_cty::c_int; +pub type __u32 = ::aya_ebpf_cty::c_uint; +pub type __s64 = ::aya_ebpf_cty::c_longlong; +pub type __u64 = ::aya_ebpf_cty::c_ulonglong; +pub type __be16 = __u16; +pub type __be32 = __u32; +pub type __wsum = __u32; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_perf_event_data { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct linux_binprm { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcphdr { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct seq_file { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp6_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp_timewait_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tcp_request_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct udp6_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct unix_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct task_struct { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cgroup { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct path { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct inode { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct socket { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct file { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct mptcp_sock { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct iphdr { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ipv6hdr { + _unused: [u8; 0], +} +pub mod bpf_cond_pseudo_jmp { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MAY_GOTO: Type = 0; +} +pub const BPF_REG_0: _bindgen_ty_1 = 0; +pub const BPF_REG_1: _bindgen_ty_1 = 1; +pub const BPF_REG_2: _bindgen_ty_1 = 2; +pub const BPF_REG_3: _bindgen_ty_1 = 3; +pub const BPF_REG_4: _bindgen_ty_1 = 4; +pub const BPF_REG_5: _bindgen_ty_1 = 5; +pub const BPF_REG_6: _bindgen_ty_1 = 6; +pub const BPF_REG_7: _bindgen_ty_1 = 7; +pub const BPF_REG_8: _bindgen_ty_1 = 8; +pub const BPF_REG_9: _bindgen_ty_1 = 9; +pub const BPF_REG_10: _bindgen_ty_1 = 10; +pub const __MAX_BPF_REG: _bindgen_ty_1 = 11; +pub type _bindgen_ty_1 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_insn { + pub code: __u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub off: __s16, + pub imm: __s32, +} +impl bpf_insn { + #[inline] + pub fn dst_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) } + } + #[inline] + pub fn set_dst_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn src_reg(&self) -> __u8 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } + } + #[inline] + pub fn set_src_reg(&mut self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(4usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 4u8, { + let dst_reg: u8 = unsafe { ::core::mem::transmute(dst_reg) }; + dst_reg as u64 + }); + __bindgen_bitfield_unit.set(4usize, 4u8, { + let src_reg: u8 = unsafe { ::core::mem::transmute(src_reg) }; + src_reg as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug)] +pub struct bpf_lpm_trie_key { + pub prefixlen: __u32, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_lpm_trie_key_hdr { + pub prefixlen: __u32, +} +#[repr(C)] +pub struct bpf_lpm_trie_key_u8 { + pub __bindgen_anon_1: bpf_lpm_trie_key_u8__bindgen_ty_1, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_lpm_trie_key_u8__bindgen_ty_1 { + pub hdr: bpf_lpm_trie_key_hdr, + pub prefixlen: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_cgroup_storage_key { + pub cgroup_inode_id: __u64, + pub attach_type: __u32, +} +pub mod bpf_cgroup_iter_order { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_CGROUP_ITER_ORDER_UNSPEC: Type = 0; + pub const BPF_CGROUP_ITER_SELF_ONLY: Type = 1; + pub const BPF_CGROUP_ITER_DESCENDANTS_PRE: Type = 2; + pub const BPF_CGROUP_ITER_DESCENDANTS_POST: Type = 3; + pub const BPF_CGROUP_ITER_ANCESTORS_UP: Type = 4; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_iter_link_info { + pub map: bpf_iter_link_info__bindgen_ty_1, + pub cgroup: bpf_iter_link_info__bindgen_ty_2, + pub task: bpf_iter_link_info__bindgen_ty_3, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_1 { + pub map_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_2 { + pub order: bpf_cgroup_iter_order::Type, + pub cgroup_fd: __u32, + pub cgroup_id: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_3 { + pub tid: __u32, + pub pid: __u32, + pub pid_fd: __u32, +} +pub mod bpf_cmd { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MAP_CREATE: Type = 0; + pub const BPF_MAP_LOOKUP_ELEM: Type = 1; + pub const BPF_MAP_UPDATE_ELEM: Type = 2; + pub const BPF_MAP_DELETE_ELEM: Type = 3; + pub const BPF_MAP_GET_NEXT_KEY: Type = 4; + pub const BPF_PROG_LOAD: Type = 5; + pub const BPF_OBJ_PIN: Type = 6; + pub const BPF_OBJ_GET: Type = 7; + pub const BPF_PROG_ATTACH: Type = 8; + pub const BPF_PROG_DETACH: Type = 9; + pub const BPF_PROG_TEST_RUN: Type = 10; + pub const BPF_PROG_RUN: Type = 10; + pub const BPF_PROG_GET_NEXT_ID: Type = 11; + pub const BPF_MAP_GET_NEXT_ID: Type = 12; + pub const BPF_PROG_GET_FD_BY_ID: Type = 13; + pub const BPF_MAP_GET_FD_BY_ID: Type = 14; + pub const BPF_OBJ_GET_INFO_BY_FD: Type = 15; + pub const BPF_PROG_QUERY: Type = 16; + pub const BPF_RAW_TRACEPOINT_OPEN: Type = 17; + pub const BPF_BTF_LOAD: Type = 18; + pub const BPF_BTF_GET_FD_BY_ID: Type = 19; + pub const BPF_TASK_FD_QUERY: Type = 20; + pub const BPF_MAP_LOOKUP_AND_DELETE_ELEM: Type = 21; + pub const BPF_MAP_FREEZE: Type = 22; + pub const BPF_BTF_GET_NEXT_ID: Type = 23; + pub const BPF_MAP_LOOKUP_BATCH: Type = 24; + pub const BPF_MAP_LOOKUP_AND_DELETE_BATCH: Type = 25; + pub const BPF_MAP_UPDATE_BATCH: Type = 26; + pub const BPF_MAP_DELETE_BATCH: Type = 27; + pub const BPF_LINK_CREATE: Type = 28; + pub const BPF_LINK_UPDATE: Type = 29; + pub const BPF_LINK_GET_FD_BY_ID: Type = 30; + pub const BPF_LINK_GET_NEXT_ID: Type = 31; + pub const BPF_ENABLE_STATS: Type = 32; + pub const BPF_ITER_CREATE: Type = 33; + pub const BPF_LINK_DETACH: Type = 34; + pub const BPF_PROG_BIND_MAP: Type = 35; + pub const BPF_TOKEN_CREATE: Type = 36; + pub const __MAX_BPF_CMD: Type = 37; +} +pub mod bpf_map_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MAP_TYPE_UNSPEC: Type = 0; + pub const BPF_MAP_TYPE_HASH: Type = 1; + pub const BPF_MAP_TYPE_ARRAY: Type = 2; + pub const BPF_MAP_TYPE_PROG_ARRAY: Type = 3; + pub const BPF_MAP_TYPE_PERF_EVENT_ARRAY: Type = 4; + pub const BPF_MAP_TYPE_PERCPU_HASH: Type = 5; + pub const BPF_MAP_TYPE_PERCPU_ARRAY: Type = 6; + pub const BPF_MAP_TYPE_STACK_TRACE: Type = 7; + pub const BPF_MAP_TYPE_CGROUP_ARRAY: Type = 8; + pub const BPF_MAP_TYPE_LRU_HASH: Type = 9; + pub const BPF_MAP_TYPE_LRU_PERCPU_HASH: Type = 10; + pub const BPF_MAP_TYPE_LPM_TRIE: Type = 11; + pub const BPF_MAP_TYPE_ARRAY_OF_MAPS: Type = 12; + pub const BPF_MAP_TYPE_HASH_OF_MAPS: Type = 13; + pub const BPF_MAP_TYPE_DEVMAP: Type = 14; + pub const BPF_MAP_TYPE_SOCKMAP: Type = 15; + pub const BPF_MAP_TYPE_CPUMAP: Type = 16; + pub const BPF_MAP_TYPE_XSKMAP: Type = 17; + pub const BPF_MAP_TYPE_SOCKHASH: Type = 18; + pub const BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED: Type = 19; + pub const BPF_MAP_TYPE_CGROUP_STORAGE: Type = 19; + pub const BPF_MAP_TYPE_REUSEPORT_SOCKARRAY: Type = 20; + pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE_DEPRECATED: Type = 21; + pub const BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE: Type = 21; + pub const BPF_MAP_TYPE_QUEUE: Type = 22; + pub const BPF_MAP_TYPE_STACK: Type = 23; + pub const BPF_MAP_TYPE_SK_STORAGE: Type = 24; + pub const BPF_MAP_TYPE_DEVMAP_HASH: Type = 25; + pub const BPF_MAP_TYPE_STRUCT_OPS: Type = 26; + pub const BPF_MAP_TYPE_RINGBUF: Type = 27; + pub const BPF_MAP_TYPE_INODE_STORAGE: Type = 28; + pub const BPF_MAP_TYPE_TASK_STORAGE: Type = 29; + pub const BPF_MAP_TYPE_BLOOM_FILTER: Type = 30; + pub const BPF_MAP_TYPE_USER_RINGBUF: Type = 31; + pub const BPF_MAP_TYPE_CGRP_STORAGE: Type = 32; + pub const BPF_MAP_TYPE_ARENA: Type = 33; + pub const __MAX_BPF_MAP_TYPE: Type = 34; +} +pub mod bpf_prog_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_PROG_TYPE_UNSPEC: Type = 0; + pub const BPF_PROG_TYPE_SOCKET_FILTER: Type = 1; + pub const BPF_PROG_TYPE_KPROBE: Type = 2; + pub const BPF_PROG_TYPE_SCHED_CLS: Type = 3; + pub const BPF_PROG_TYPE_SCHED_ACT: Type = 4; + pub const BPF_PROG_TYPE_TRACEPOINT: Type = 5; + pub const BPF_PROG_TYPE_XDP: Type = 6; + pub const BPF_PROG_TYPE_PERF_EVENT: Type = 7; + pub const BPF_PROG_TYPE_CGROUP_SKB: Type = 8; + pub const BPF_PROG_TYPE_CGROUP_SOCK: Type = 9; + pub const BPF_PROG_TYPE_LWT_IN: Type = 10; + pub const BPF_PROG_TYPE_LWT_OUT: Type = 11; + pub const BPF_PROG_TYPE_LWT_XMIT: Type = 12; + pub const BPF_PROG_TYPE_SOCK_OPS: Type = 13; + pub const BPF_PROG_TYPE_SK_SKB: Type = 14; + pub const BPF_PROG_TYPE_CGROUP_DEVICE: Type = 15; + pub const BPF_PROG_TYPE_SK_MSG: Type = 16; + pub const BPF_PROG_TYPE_RAW_TRACEPOINT: Type = 17; + pub const BPF_PROG_TYPE_CGROUP_SOCK_ADDR: Type = 18; + pub const BPF_PROG_TYPE_LWT_SEG6LOCAL: Type = 19; + pub const BPF_PROG_TYPE_LIRC_MODE2: Type = 20; + pub const BPF_PROG_TYPE_SK_REUSEPORT: Type = 21; + pub const BPF_PROG_TYPE_FLOW_DISSECTOR: Type = 22; + pub const BPF_PROG_TYPE_CGROUP_SYSCTL: Type = 23; + pub const BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE: Type = 24; + pub const BPF_PROG_TYPE_CGROUP_SOCKOPT: Type = 25; + pub const BPF_PROG_TYPE_TRACING: Type = 26; + pub const BPF_PROG_TYPE_STRUCT_OPS: Type = 27; + pub const BPF_PROG_TYPE_EXT: Type = 28; + pub const BPF_PROG_TYPE_LSM: Type = 29; + pub const BPF_PROG_TYPE_SK_LOOKUP: Type = 30; + pub const BPF_PROG_TYPE_SYSCALL: Type = 31; + pub const BPF_PROG_TYPE_NETFILTER: Type = 32; + pub const __MAX_BPF_PROG_TYPE: Type = 33; +} +pub mod bpf_attach_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_CGROUP_INET_INGRESS: Type = 0; + pub const BPF_CGROUP_INET_EGRESS: Type = 1; + pub const BPF_CGROUP_INET_SOCK_CREATE: Type = 2; + pub const BPF_CGROUP_SOCK_OPS: Type = 3; + pub const BPF_SK_SKB_STREAM_PARSER: Type = 4; + pub const BPF_SK_SKB_STREAM_VERDICT: Type = 5; + pub const BPF_CGROUP_DEVICE: Type = 6; + pub const BPF_SK_MSG_VERDICT: Type = 7; + pub const BPF_CGROUP_INET4_BIND: Type = 8; + pub const BPF_CGROUP_INET6_BIND: Type = 9; + pub const BPF_CGROUP_INET4_CONNECT: Type = 10; + pub const BPF_CGROUP_INET6_CONNECT: Type = 11; + pub const BPF_CGROUP_INET4_POST_BIND: Type = 12; + pub const BPF_CGROUP_INET6_POST_BIND: Type = 13; + pub const BPF_CGROUP_UDP4_SENDMSG: Type = 14; + pub const BPF_CGROUP_UDP6_SENDMSG: Type = 15; + pub const BPF_LIRC_MODE2: Type = 16; + pub const BPF_FLOW_DISSECTOR: Type = 17; + pub const BPF_CGROUP_SYSCTL: Type = 18; + pub const BPF_CGROUP_UDP4_RECVMSG: Type = 19; + pub const BPF_CGROUP_UDP6_RECVMSG: Type = 20; + pub const BPF_CGROUP_GETSOCKOPT: Type = 21; + pub const BPF_CGROUP_SETSOCKOPT: Type = 22; + pub const BPF_TRACE_RAW_TP: Type = 23; + pub const BPF_TRACE_FENTRY: Type = 24; + pub const BPF_TRACE_FEXIT: Type = 25; + pub const BPF_MODIFY_RETURN: Type = 26; + pub const BPF_LSM_MAC: Type = 27; + pub const BPF_TRACE_ITER: Type = 28; + pub const BPF_CGROUP_INET4_GETPEERNAME: Type = 29; + pub const BPF_CGROUP_INET6_GETPEERNAME: Type = 30; + pub const BPF_CGROUP_INET4_GETSOCKNAME: Type = 31; + pub const BPF_CGROUP_INET6_GETSOCKNAME: Type = 32; + pub const BPF_XDP_DEVMAP: Type = 33; + pub const BPF_CGROUP_INET_SOCK_RELEASE: Type = 34; + pub const BPF_XDP_CPUMAP: Type = 35; + pub const BPF_SK_LOOKUP: Type = 36; + pub const BPF_XDP: Type = 37; + pub const BPF_SK_SKB_VERDICT: Type = 38; + pub const BPF_SK_REUSEPORT_SELECT: Type = 39; + pub const BPF_SK_REUSEPORT_SELECT_OR_MIGRATE: Type = 40; + pub const BPF_PERF_EVENT: Type = 41; + pub const BPF_TRACE_KPROBE_MULTI: Type = 42; + pub const BPF_LSM_CGROUP: Type = 43; + pub const BPF_STRUCT_OPS: Type = 44; + pub const BPF_NETFILTER: Type = 45; + pub const BPF_TCX_INGRESS: Type = 46; + pub const BPF_TCX_EGRESS: Type = 47; + pub const BPF_TRACE_UPROBE_MULTI: Type = 48; + pub const BPF_CGROUP_UNIX_CONNECT: Type = 49; + pub const BPF_CGROUP_UNIX_SENDMSG: Type = 50; + pub const BPF_CGROUP_UNIX_RECVMSG: Type = 51; + pub const BPF_CGROUP_UNIX_GETPEERNAME: Type = 52; + pub const BPF_CGROUP_UNIX_GETSOCKNAME: Type = 53; + pub const BPF_NETKIT_PRIMARY: Type = 54; + pub const BPF_NETKIT_PEER: Type = 55; + pub const __MAX_BPF_ATTACH_TYPE: Type = 56; +} +pub mod bpf_link_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_LINK_TYPE_UNSPEC: Type = 0; + pub const BPF_LINK_TYPE_RAW_TRACEPOINT: Type = 1; + pub const BPF_LINK_TYPE_TRACING: Type = 2; + pub const BPF_LINK_TYPE_CGROUP: Type = 3; + pub const BPF_LINK_TYPE_ITER: Type = 4; + pub const BPF_LINK_TYPE_NETNS: Type = 5; + pub const BPF_LINK_TYPE_XDP: Type = 6; + pub const BPF_LINK_TYPE_PERF_EVENT: Type = 7; + pub const BPF_LINK_TYPE_KPROBE_MULTI: Type = 8; + pub const BPF_LINK_TYPE_STRUCT_OPS: Type = 9; + pub const BPF_LINK_TYPE_NETFILTER: Type = 10; + pub const BPF_LINK_TYPE_TCX: Type = 11; + pub const BPF_LINK_TYPE_UPROBE_MULTI: Type = 12; + pub const BPF_LINK_TYPE_NETKIT: Type = 13; + pub const __MAX_BPF_LINK_TYPE: Type = 14; +} +pub mod bpf_perf_event_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_PERF_EVENT_UNSPEC: Type = 0; + pub const BPF_PERF_EVENT_UPROBE: Type = 1; + pub const BPF_PERF_EVENT_URETPROBE: Type = 2; + pub const BPF_PERF_EVENT_KPROBE: Type = 3; + pub const BPF_PERF_EVENT_KRETPROBE: Type = 4; + pub const BPF_PERF_EVENT_TRACEPOINT: Type = 5; + pub const BPF_PERF_EVENT_EVENT: Type = 6; +} +pub const BPF_F_KPROBE_MULTI_RETURN: _bindgen_ty_2 = 1; +pub type _bindgen_ty_2 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_UPROBE_MULTI_RETURN: _bindgen_ty_3 = 1; +pub type _bindgen_ty_3 = ::aya_ebpf_cty::c_uint; +pub mod bpf_addr_space_cast { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_ADDR_SPACE_CAST: Type = 1; +} +pub const BPF_ANY: _bindgen_ty_4 = 0; +pub const BPF_NOEXIST: _bindgen_ty_4 = 1; +pub const BPF_EXIST: _bindgen_ty_4 = 2; +pub const BPF_F_LOCK: _bindgen_ty_4 = 4; +pub type _bindgen_ty_4 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_NO_PREALLOC: _bindgen_ty_5 = 1; +pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_5 = 2; +pub const BPF_F_NUMA_NODE: _bindgen_ty_5 = 4; +pub const BPF_F_RDONLY: _bindgen_ty_5 = 8; +pub const BPF_F_WRONLY: _bindgen_ty_5 = 16; +pub const BPF_F_STACK_BUILD_ID: _bindgen_ty_5 = 32; +pub const BPF_F_ZERO_SEED: _bindgen_ty_5 = 64; +pub const BPF_F_RDONLY_PROG: _bindgen_ty_5 = 128; +pub const BPF_F_WRONLY_PROG: _bindgen_ty_5 = 256; +pub const BPF_F_CLONE: _bindgen_ty_5 = 512; +pub const BPF_F_MMAPABLE: _bindgen_ty_5 = 1024; +pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_5 = 2048; +pub const BPF_F_INNER_MAP: _bindgen_ty_5 = 4096; +pub const BPF_F_LINK: _bindgen_ty_5 = 8192; +pub const BPF_F_PATH_FD: _bindgen_ty_5 = 16384; +pub const BPF_F_VTYPE_BTF_OBJ_FD: _bindgen_ty_5 = 32768; +pub const BPF_F_TOKEN_FD: _bindgen_ty_5 = 65536; +pub const BPF_F_SEGV_ON_FAULT: _bindgen_ty_5 = 131072; +pub const BPF_F_NO_USER_CONV: _bindgen_ty_5 = 262144; +pub type _bindgen_ty_5 = ::aya_ebpf_cty::c_uint; +pub mod bpf_stats_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_STATS_RUN_TIME: Type = 0; +} +pub mod bpf_stack_build_id_status { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_STACK_BUILD_ID_EMPTY: Type = 0; + pub const BPF_STACK_BUILD_ID_VALID: Type = 1; + pub const BPF_STACK_BUILD_ID_IP: Type = 2; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_stack_build_id { + pub status: __s32, + pub build_id: [::aya_ebpf_cty::c_uchar; 20usize], + pub __bindgen_anon_1: bpf_stack_build_id__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_stack_build_id__bindgen_ty_1 { + pub offset: __u64, + pub ip: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_2, + pub batch: bpf_attr__bindgen_ty_3, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_4, + pub __bindgen_anon_4: bpf_attr__bindgen_ty_5, + pub __bindgen_anon_5: bpf_attr__bindgen_ty_6, + pub test: bpf_attr__bindgen_ty_7, + pub __bindgen_anon_6: bpf_attr__bindgen_ty_8, + pub info: bpf_attr__bindgen_ty_9, + pub query: bpf_attr__bindgen_ty_10, + pub raw_tracepoint: bpf_attr__bindgen_ty_11, + pub __bindgen_anon_7: bpf_attr__bindgen_ty_12, + pub task_fd_query: bpf_attr__bindgen_ty_13, + pub link_create: bpf_attr__bindgen_ty_14, + pub link_update: bpf_attr__bindgen_ty_15, + pub link_detach: bpf_attr__bindgen_ty_16, + pub enable_stats: bpf_attr__bindgen_ty_17, + pub iter_create: bpf_attr__bindgen_ty_18, + pub prog_bind_map: bpf_attr__bindgen_ty_19, + pub token_create: bpf_attr__bindgen_ty_20, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_1 { + pub map_type: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub inner_map_fd: __u32, + pub numa_node: __u32, + pub map_name: [::aya_ebpf_cty::c_char; 16usize], + pub map_ifindex: __u32, + pub btf_fd: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub map_extra: __u64, + pub value_type_btf_obj_fd: __s32, + pub map_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_2 { + pub map_fd: __u32, + pub key: __u64, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_2__bindgen_ty_1, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 { + pub value: __u64, + pub next_key: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_3 { + pub in_batch: __u64, + pub out_batch: __u64, + pub keys: __u64, + pub values: __u64, + pub count: __u32, + pub map_fd: __u32, + pub elem_flags: __u64, + pub flags: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_4 { + pub prog_type: __u32, + pub insn_cnt: __u32, + pub insns: __u64, + pub license: __u64, + pub log_level: __u32, + pub log_size: __u32, + pub log_buf: __u64, + pub kern_version: __u32, + pub prog_flags: __u32, + pub prog_name: [::aya_ebpf_cty::c_char; 16usize], + pub prog_ifindex: __u32, + pub expected_attach_type: __u32, + pub prog_btf_fd: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub func_info_cnt: __u32, + pub line_info_rec_size: __u32, + pub line_info: __u64, + pub line_info_cnt: __u32, + pub attach_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_4__bindgen_ty_1, + pub core_relo_cnt: __u32, + pub fd_array: __u64, + pub core_relos: __u64, + pub core_relo_rec_size: __u32, + pub log_true_size: __u32, + pub prog_token_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 { + pub attach_prog_fd: __u32, + pub attach_btf_obj_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_5 { + pub pathname: __u64, + pub bpf_fd: __u32, + pub file_flags: __u32, + pub path_fd: __s32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_6__bindgen_ty_1, + pub attach_bpf_fd: __u32, + pub attach_type: __u32, + pub attach_flags: __u32, + pub replace_bpf_fd: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_6__bindgen_ty_2, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_6__bindgen_ty_2 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_7 { + pub prog_fd: __u32, + pub retval: __u32, + pub data_size_in: __u32, + pub data_size_out: __u32, + pub data_in: __u64, + pub data_out: __u64, + pub repeat: __u32, + pub duration: __u32, + pub ctx_size_in: __u32, + pub ctx_size_out: __u32, + pub ctx_in: __u64, + pub ctx_out: __u64, + pub flags: __u32, + pub cpu: __u32, + pub batch_size: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_8__bindgen_ty_1, + pub next_id: __u32, + pub open_flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 { + pub start_id: __u32, + pub prog_id: __u32, + pub map_id: __u32, + pub btf_id: __u32, + pub link_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_9 { + pub bpf_fd: __u32, + pub info_len: __u32, + pub info: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_10 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_10__bindgen_ty_1, + pub attach_type: __u32, + pub query_flags: __u32, + pub attach_flags: __u32, + pub prog_ids: __u64, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_10__bindgen_ty_2, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub prog_attach_flags: __u64, + pub link_ids: __u64, + pub link_attach_flags: __u64, + pub revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_10__bindgen_ty_2 { + pub prog_cnt: __u32, + pub count: __u32, +} +impl bpf_attr__bindgen_ty_10 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_11 { + pub name: __u64, + pub prog_fd: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_attr__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_12 { + pub btf: __u64, + pub btf_log_buf: __u64, + pub btf_size: __u32, + pub btf_log_size: __u32, + pub btf_log_level: __u32, + pub btf_log_true_size: __u32, + pub btf_flags: __u32, + pub btf_token_fd: __s32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_13 { + pub pid: __u32, + pub fd: __u32, + pub flags: __u32, + pub buf_len: __u32, + pub buf: __u64, + pub prog_id: __u32, + pub fd_type: __u32, + pub probe_offset: __u64, + pub probe_addr: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2, + pub attach_type: __u32, + pub flags: __u32, + pub __bindgen_anon_3: bpf_attr__bindgen_ty_14__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 { + pub prog_fd: __u32, + pub map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3 { + pub target_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1, + pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2, + pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3, + pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4, + pub netfilter: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5, + pub tcx: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6, + pub uprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7, + pub netkit: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_1 { + pub iter_info: __u64, + pub iter_info_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_2 { + pub bpf_cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_3 { + pub flags: __u32, + pub cnt: __u32, + pub syms: __u64, + pub addrs: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_4 { + pub target_btf_id: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_5 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_6__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_7 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub cnt: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8 { + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1, + pub expected_revision: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_3__bindgen_ty_8__bindgen_ty_1 { + pub relative_fd: __u32, + pub relative_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_15 { + pub link_fd: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_15__bindgen_ty_1, + pub flags: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_15__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_1 { + pub new_prog_fd: __u32, + pub new_map_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_15__bindgen_ty_2 { + pub old_prog_fd: __u32, + pub old_map_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_16 { + pub link_fd: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_17 { + pub type_: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_18 { + pub link_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_19 { + pub prog_fd: __u32, + pub map_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_20 { + pub flags: __u32, + pub bpffs_fd: __u32, +} +pub mod bpf_func_id { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_FUNC_unspec: Type = 0; + pub const BPF_FUNC_map_lookup_elem: Type = 1; + pub const BPF_FUNC_map_update_elem: Type = 2; + pub const BPF_FUNC_map_delete_elem: Type = 3; + pub const BPF_FUNC_probe_read: Type = 4; + pub const BPF_FUNC_ktime_get_ns: Type = 5; + pub const BPF_FUNC_trace_printk: Type = 6; + pub const BPF_FUNC_get_prandom_u32: Type = 7; + pub const BPF_FUNC_get_smp_processor_id: Type = 8; + pub const BPF_FUNC_skb_store_bytes: Type = 9; + pub const BPF_FUNC_l3_csum_replace: Type = 10; + pub const BPF_FUNC_l4_csum_replace: Type = 11; + pub const BPF_FUNC_tail_call: Type = 12; + pub const BPF_FUNC_clone_redirect: Type = 13; + pub const BPF_FUNC_get_current_pid_tgid: Type = 14; + pub const BPF_FUNC_get_current_uid_gid: Type = 15; + pub const BPF_FUNC_get_current_comm: Type = 16; + pub const BPF_FUNC_get_cgroup_classid: Type = 17; + pub const BPF_FUNC_skb_vlan_push: Type = 18; + pub const BPF_FUNC_skb_vlan_pop: Type = 19; + pub const BPF_FUNC_skb_get_tunnel_key: Type = 20; + pub const BPF_FUNC_skb_set_tunnel_key: Type = 21; + pub const BPF_FUNC_perf_event_read: Type = 22; + pub const BPF_FUNC_redirect: Type = 23; + pub const BPF_FUNC_get_route_realm: Type = 24; + pub const BPF_FUNC_perf_event_output: Type = 25; + pub const BPF_FUNC_skb_load_bytes: Type = 26; + pub const BPF_FUNC_get_stackid: Type = 27; + pub const BPF_FUNC_csum_diff: Type = 28; + pub const BPF_FUNC_skb_get_tunnel_opt: Type = 29; + pub const BPF_FUNC_skb_set_tunnel_opt: Type = 30; + pub const BPF_FUNC_skb_change_proto: Type = 31; + pub const BPF_FUNC_skb_change_type: Type = 32; + pub const BPF_FUNC_skb_under_cgroup: Type = 33; + pub const BPF_FUNC_get_hash_recalc: Type = 34; + pub const BPF_FUNC_get_current_task: Type = 35; + pub const BPF_FUNC_probe_write_user: Type = 36; + pub const BPF_FUNC_current_task_under_cgroup: Type = 37; + pub const BPF_FUNC_skb_change_tail: Type = 38; + pub const BPF_FUNC_skb_pull_data: Type = 39; + pub const BPF_FUNC_csum_update: Type = 40; + pub const BPF_FUNC_set_hash_invalid: Type = 41; + pub const BPF_FUNC_get_numa_node_id: Type = 42; + pub const BPF_FUNC_skb_change_head: Type = 43; + pub const BPF_FUNC_xdp_adjust_head: Type = 44; + pub const BPF_FUNC_probe_read_str: Type = 45; + pub const BPF_FUNC_get_socket_cookie: Type = 46; + pub const BPF_FUNC_get_socket_uid: Type = 47; + pub const BPF_FUNC_set_hash: Type = 48; + pub const BPF_FUNC_setsockopt: Type = 49; + pub const BPF_FUNC_skb_adjust_room: Type = 50; + pub const BPF_FUNC_redirect_map: Type = 51; + pub const BPF_FUNC_sk_redirect_map: Type = 52; + pub const BPF_FUNC_sock_map_update: Type = 53; + pub const BPF_FUNC_xdp_adjust_meta: Type = 54; + pub const BPF_FUNC_perf_event_read_value: Type = 55; + pub const BPF_FUNC_perf_prog_read_value: Type = 56; + pub const BPF_FUNC_getsockopt: Type = 57; + pub const BPF_FUNC_override_return: Type = 58; + pub const BPF_FUNC_sock_ops_cb_flags_set: Type = 59; + pub const BPF_FUNC_msg_redirect_map: Type = 60; + pub const BPF_FUNC_msg_apply_bytes: Type = 61; + pub const BPF_FUNC_msg_cork_bytes: Type = 62; + pub const BPF_FUNC_msg_pull_data: Type = 63; + pub const BPF_FUNC_bind: Type = 64; + pub const BPF_FUNC_xdp_adjust_tail: Type = 65; + pub const BPF_FUNC_skb_get_xfrm_state: Type = 66; + pub const BPF_FUNC_get_stack: Type = 67; + pub const BPF_FUNC_skb_load_bytes_relative: Type = 68; + pub const BPF_FUNC_fib_lookup: Type = 69; + pub const BPF_FUNC_sock_hash_update: Type = 70; + pub const BPF_FUNC_msg_redirect_hash: Type = 71; + pub const BPF_FUNC_sk_redirect_hash: Type = 72; + pub const BPF_FUNC_lwt_push_encap: Type = 73; + pub const BPF_FUNC_lwt_seg6_store_bytes: Type = 74; + pub const BPF_FUNC_lwt_seg6_adjust_srh: Type = 75; + pub const BPF_FUNC_lwt_seg6_action: Type = 76; + pub const BPF_FUNC_rc_repeat: Type = 77; + pub const BPF_FUNC_rc_keydown: Type = 78; + pub const BPF_FUNC_skb_cgroup_id: Type = 79; + pub const BPF_FUNC_get_current_cgroup_id: Type = 80; + pub const BPF_FUNC_get_local_storage: Type = 81; + pub const BPF_FUNC_sk_select_reuseport: Type = 82; + pub const BPF_FUNC_skb_ancestor_cgroup_id: Type = 83; + pub const BPF_FUNC_sk_lookup_tcp: Type = 84; + pub const BPF_FUNC_sk_lookup_udp: Type = 85; + pub const BPF_FUNC_sk_release: Type = 86; + pub const BPF_FUNC_map_push_elem: Type = 87; + pub const BPF_FUNC_map_pop_elem: Type = 88; + pub const BPF_FUNC_map_peek_elem: Type = 89; + pub const BPF_FUNC_msg_push_data: Type = 90; + pub const BPF_FUNC_msg_pop_data: Type = 91; + pub const BPF_FUNC_rc_pointer_rel: Type = 92; + pub const BPF_FUNC_spin_lock: Type = 93; + pub const BPF_FUNC_spin_unlock: Type = 94; + pub const BPF_FUNC_sk_fullsock: Type = 95; + pub const BPF_FUNC_tcp_sock: Type = 96; + pub const BPF_FUNC_skb_ecn_set_ce: Type = 97; + pub const BPF_FUNC_get_listener_sock: Type = 98; + pub const BPF_FUNC_skc_lookup_tcp: Type = 99; + pub const BPF_FUNC_tcp_check_syncookie: Type = 100; + pub const BPF_FUNC_sysctl_get_name: Type = 101; + pub const BPF_FUNC_sysctl_get_current_value: Type = 102; + pub const BPF_FUNC_sysctl_get_new_value: Type = 103; + pub const BPF_FUNC_sysctl_set_new_value: Type = 104; + pub const BPF_FUNC_strtol: Type = 105; + pub const BPF_FUNC_strtoul: Type = 106; + pub const BPF_FUNC_sk_storage_get: Type = 107; + pub const BPF_FUNC_sk_storage_delete: Type = 108; + pub const BPF_FUNC_send_signal: Type = 109; + pub const BPF_FUNC_tcp_gen_syncookie: Type = 110; + pub const BPF_FUNC_skb_output: Type = 111; + pub const BPF_FUNC_probe_read_user: Type = 112; + pub const BPF_FUNC_probe_read_kernel: Type = 113; + pub const BPF_FUNC_probe_read_user_str: Type = 114; + pub const BPF_FUNC_probe_read_kernel_str: Type = 115; + pub const BPF_FUNC_tcp_send_ack: Type = 116; + pub const BPF_FUNC_send_signal_thread: Type = 117; + pub const BPF_FUNC_jiffies64: Type = 118; + pub const BPF_FUNC_read_branch_records: Type = 119; + pub const BPF_FUNC_get_ns_current_pid_tgid: Type = 120; + pub const BPF_FUNC_xdp_output: Type = 121; + pub const BPF_FUNC_get_netns_cookie: Type = 122; + pub const BPF_FUNC_get_current_ancestor_cgroup_id: Type = 123; + pub const BPF_FUNC_sk_assign: Type = 124; + pub const BPF_FUNC_ktime_get_boot_ns: Type = 125; + pub const BPF_FUNC_seq_printf: Type = 126; + pub const BPF_FUNC_seq_write: Type = 127; + pub const BPF_FUNC_sk_cgroup_id: Type = 128; + pub const BPF_FUNC_sk_ancestor_cgroup_id: Type = 129; + pub const BPF_FUNC_ringbuf_output: Type = 130; + pub const BPF_FUNC_ringbuf_reserve: Type = 131; + pub const BPF_FUNC_ringbuf_submit: Type = 132; + pub const BPF_FUNC_ringbuf_discard: Type = 133; + pub const BPF_FUNC_ringbuf_query: Type = 134; + pub const BPF_FUNC_csum_level: Type = 135; + pub const BPF_FUNC_skc_to_tcp6_sock: Type = 136; + pub const BPF_FUNC_skc_to_tcp_sock: Type = 137; + pub const BPF_FUNC_skc_to_tcp_timewait_sock: Type = 138; + pub const BPF_FUNC_skc_to_tcp_request_sock: Type = 139; + pub const BPF_FUNC_skc_to_udp6_sock: Type = 140; + pub const BPF_FUNC_get_task_stack: Type = 141; + pub const BPF_FUNC_load_hdr_opt: Type = 142; + pub const BPF_FUNC_store_hdr_opt: Type = 143; + pub const BPF_FUNC_reserve_hdr_opt: Type = 144; + pub const BPF_FUNC_inode_storage_get: Type = 145; + pub const BPF_FUNC_inode_storage_delete: Type = 146; + pub const BPF_FUNC_d_path: Type = 147; + pub const BPF_FUNC_copy_from_user: Type = 148; + pub const BPF_FUNC_snprintf_btf: Type = 149; + pub const BPF_FUNC_seq_printf_btf: Type = 150; + pub const BPF_FUNC_skb_cgroup_classid: Type = 151; + pub const BPF_FUNC_redirect_neigh: Type = 152; + pub const BPF_FUNC_per_cpu_ptr: Type = 153; + pub const BPF_FUNC_this_cpu_ptr: Type = 154; + pub const BPF_FUNC_redirect_peer: Type = 155; + pub const BPF_FUNC_task_storage_get: Type = 156; + pub const BPF_FUNC_task_storage_delete: Type = 157; + pub const BPF_FUNC_get_current_task_btf: Type = 158; + pub const BPF_FUNC_bprm_opts_set: Type = 159; + pub const BPF_FUNC_ktime_get_coarse_ns: Type = 160; + pub const BPF_FUNC_ima_inode_hash: Type = 161; + pub const BPF_FUNC_sock_from_file: Type = 162; + pub const BPF_FUNC_check_mtu: Type = 163; + pub const BPF_FUNC_for_each_map_elem: Type = 164; + pub const BPF_FUNC_snprintf: Type = 165; + pub const BPF_FUNC_sys_bpf: Type = 166; + pub const BPF_FUNC_btf_find_by_name_kind: Type = 167; + pub const BPF_FUNC_sys_close: Type = 168; + pub const BPF_FUNC_timer_init: Type = 169; + pub const BPF_FUNC_timer_set_callback: Type = 170; + pub const BPF_FUNC_timer_start: Type = 171; + pub const BPF_FUNC_timer_cancel: Type = 172; + pub const BPF_FUNC_get_func_ip: Type = 173; + pub const BPF_FUNC_get_attach_cookie: Type = 174; + pub const BPF_FUNC_task_pt_regs: Type = 175; + pub const BPF_FUNC_get_branch_snapshot: Type = 176; + pub const BPF_FUNC_trace_vprintk: Type = 177; + pub const BPF_FUNC_skc_to_unix_sock: Type = 178; + pub const BPF_FUNC_kallsyms_lookup_name: Type = 179; + pub const BPF_FUNC_find_vma: Type = 180; + pub const BPF_FUNC_loop: Type = 181; + pub const BPF_FUNC_strncmp: Type = 182; + pub const BPF_FUNC_get_func_arg: Type = 183; + pub const BPF_FUNC_get_func_ret: Type = 184; + pub const BPF_FUNC_get_func_arg_cnt: Type = 185; + pub const BPF_FUNC_get_retval: Type = 186; + pub const BPF_FUNC_set_retval: Type = 187; + pub const BPF_FUNC_xdp_get_buff_len: Type = 188; + pub const BPF_FUNC_xdp_load_bytes: Type = 189; + pub const BPF_FUNC_xdp_store_bytes: Type = 190; + pub const BPF_FUNC_copy_from_user_task: Type = 191; + pub const BPF_FUNC_skb_set_tstamp: Type = 192; + pub const BPF_FUNC_ima_file_hash: Type = 193; + pub const BPF_FUNC_kptr_xchg: Type = 194; + pub const BPF_FUNC_map_lookup_percpu_elem: Type = 195; + pub const BPF_FUNC_skc_to_mptcp_sock: Type = 196; + pub const BPF_FUNC_dynptr_from_mem: Type = 197; + pub const BPF_FUNC_ringbuf_reserve_dynptr: Type = 198; + pub const BPF_FUNC_ringbuf_submit_dynptr: Type = 199; + pub const BPF_FUNC_ringbuf_discard_dynptr: Type = 200; + pub const BPF_FUNC_dynptr_read: Type = 201; + pub const BPF_FUNC_dynptr_write: Type = 202; + pub const BPF_FUNC_dynptr_data: Type = 203; + pub const BPF_FUNC_tcp_raw_gen_syncookie_ipv4: Type = 204; + pub const BPF_FUNC_tcp_raw_gen_syncookie_ipv6: Type = 205; + pub const BPF_FUNC_tcp_raw_check_syncookie_ipv4: Type = 206; + pub const BPF_FUNC_tcp_raw_check_syncookie_ipv6: Type = 207; + pub const BPF_FUNC_ktime_get_tai_ns: Type = 208; + pub const BPF_FUNC_user_ringbuf_drain: Type = 209; + pub const BPF_FUNC_cgrp_storage_get: Type = 210; + pub const BPF_FUNC_cgrp_storage_delete: Type = 211; + pub const __BPF_FUNC_MAX_ID: Type = 212; +} +pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_6 = 1; +pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_6 = 2; +pub type _bindgen_ty_6 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_7 = 15; +pub type _bindgen_ty_7 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_PSEUDO_HDR: _bindgen_ty_8 = 16; +pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_8 = 32; +pub const BPF_F_MARK_ENFORCE: _bindgen_ty_8 = 64; +pub type _bindgen_ty_8 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_INGRESS: _bindgen_ty_9 = 1; +pub type _bindgen_ty_9 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_10 = 1; +pub type _bindgen_ty_10 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_11 = 255; +pub const BPF_F_USER_STACK: _bindgen_ty_11 = 256; +pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_11 = 512; +pub const BPF_F_REUSE_STACKID: _bindgen_ty_11 = 1024; +pub const BPF_F_USER_BUILD_ID: _bindgen_ty_11 = 2048; +pub type _bindgen_ty_11 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_12 = 2; +pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_12 = 4; +pub const BPF_F_SEQ_NUMBER: _bindgen_ty_12 = 8; +pub const BPF_F_NO_TUNNEL_KEY: _bindgen_ty_12 = 16; +pub type _bindgen_ty_12 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_TUNINFO_FLAGS: _bindgen_ty_13 = 16; +pub type _bindgen_ty_13 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_INDEX_MASK: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CURRENT_CPU: _bindgen_ty_14 = 4294967295; +pub const BPF_F_CTXLEN_MASK: _bindgen_ty_14 = 4503595332403200; +pub type _bindgen_ty_14 = ::aya_ebpf_cty::c_ulonglong; +pub const BPF_F_CURRENT_NETNS: _bindgen_ty_15 = -1; +pub type _bindgen_ty_15 = ::aya_ebpf_cty::c_int; +pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_16 = 0; +pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_16 = 1; +pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_16 = 2; +pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_16 = 3; +pub type _bindgen_ty_16 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_17 = 1; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_17 = 2; +pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_17 = 4; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_GRE: _bindgen_ty_17 = 8; +pub const BPF_F_ADJ_ROOM_ENCAP_L4_UDP: _bindgen_ty_17 = 16; +pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_17 = 32; +pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_17 = 64; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV4: _bindgen_ty_17 = 128; +pub const BPF_F_ADJ_ROOM_DECAP_L3_IPV6: _bindgen_ty_17 = 256; +pub type _bindgen_ty_17 = ::aya_ebpf_cty::c_uint; +pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_18 = 255; +pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_18 = 56; +pub type _bindgen_ty_18 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_19 = 1; +pub type _bindgen_ty_19 = ::aya_ebpf_cty::c_uint; +pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_20 = 1; +pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_20 = 1; +pub type _bindgen_ty_20 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_21 = 1; +pub type _bindgen_ty_21 = ::aya_ebpf_cty::c_uint; +pub const BPF_RB_NO_WAKEUP: _bindgen_ty_22 = 1; +pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_22 = 2; +pub type _bindgen_ty_22 = ::aya_ebpf_cty::c_uint; +pub const BPF_RB_AVAIL_DATA: _bindgen_ty_23 = 0; +pub const BPF_RB_RING_SIZE: _bindgen_ty_23 = 1; +pub const BPF_RB_CONS_POS: _bindgen_ty_23 = 2; +pub const BPF_RB_PROD_POS: _bindgen_ty_23 = 3; +pub type _bindgen_ty_23 = ::aya_ebpf_cty::c_uint; +pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_24 = 2147483648; +pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_24 = 1073741824; +pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_24 = 8; +pub type _bindgen_ty_24 = ::aya_ebpf_cty::c_uint; +pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_25 = 1; +pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_25 = 2; +pub type _bindgen_ty_25 = ::aya_ebpf_cty::c_uint; +pub mod bpf_adj_room_mode { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_ADJ_ROOM_NET: Type = 0; + pub const BPF_ADJ_ROOM_MAC: Type = 1; +} +pub mod bpf_hdr_start_off { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_HDR_START_MAC: Type = 0; + pub const BPF_HDR_START_NET: Type = 1; +} +pub mod bpf_lwt_encap_mode { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_LWT_ENCAP_SEG6: Type = 0; + pub const BPF_LWT_ENCAP_SEG6_INLINE: Type = 1; + pub const BPF_LWT_ENCAP_IP: Type = 2; +} +pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_26 = 1; +pub type _bindgen_ty_26 = ::aya_ebpf_cty::c_uint; +pub const BPF_F_BROADCAST: _bindgen_ty_27 = 8; +pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_27 = 16; +pub type _bindgen_ty_27 = ::aya_ebpf_cty::c_uint; +pub mod _bindgen_ty_28 { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_SKB_TSTAMP_UNSPEC: Type = 0; + pub const BPF_SKB_TSTAMP_DELIVERY_MONO: Type = 1; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct __sk_buff { + pub len: __u32, + pub pkt_type: __u32, + pub mark: __u32, + pub queue_mapping: __u32, + pub protocol: __u32, + pub vlan_present: __u32, + pub vlan_tci: __u32, + pub vlan_proto: __u32, + pub priority: __u32, + pub ingress_ifindex: __u32, + pub ifindex: __u32, + pub tc_index: __u32, + pub cb: [__u32; 5usize], + pub hash: __u32, + pub tc_classid: __u32, + pub data: __u32, + pub data_end: __u32, + pub napi_id: __u32, + pub family: __u32, + pub remote_ip4: __u32, + pub local_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub local_ip6: [__u32; 4usize], + pub remote_port: __u32, + pub local_port: __u32, + pub data_meta: __u32, + pub __bindgen_anon_1: __sk_buff__bindgen_ty_1, + pub tstamp: __u64, + pub wire_len: __u32, + pub gso_segs: __u32, + pub __bindgen_anon_2: __sk_buff__bindgen_ty_2, + pub gso_size: __u32, + pub tstamp_type: __u8, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub hwtstamp: __u64, +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union __sk_buff__bindgen_ty_1 { + pub flow_keys: *mut bpf_flow_keys, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl __sk_buff__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union __sk_buff__bindgen_ty_2 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl __sk_buff__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl __sk_buff { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_tunnel_key { + pub tunnel_id: __u32, + pub __bindgen_anon_1: bpf_tunnel_key__bindgen_ty_1, + pub tunnel_tos: __u8, + pub tunnel_ttl: __u8, + pub __bindgen_anon_2: bpf_tunnel_key__bindgen_ty_2, + pub tunnel_label: __u32, + pub __bindgen_anon_3: bpf_tunnel_key__bindgen_ty_3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_1 { + pub remote_ipv4: __u32, + pub remote_ipv6: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_2 { + pub tunnel_ext: __u16, + pub tunnel_flags: __be16, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_3 { + pub local_ipv4: __u32, + pub local_ipv6: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_xfrm_state { + pub reqid: __u32, + pub spi: __u32, + pub family: __u16, + pub ext: __u16, + pub __bindgen_anon_1: bpf_xfrm_state__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_xfrm_state__bindgen_ty_1 { + pub remote_ipv4: __u32, + pub remote_ipv6: [__u32; 4usize], +} +pub mod bpf_ret_code { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_OK: Type = 0; + pub const BPF_DROP: Type = 2; + pub const BPF_REDIRECT: Type = 7; + pub const BPF_LWT_REROUTE: Type = 128; + pub const BPF_FLOW_DISSECTOR_CONTINUE: Type = 129; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sock { + pub bound_dev_if: __u32, + pub family: __u32, + pub type_: __u32, + pub protocol: __u32, + pub mark: __u32, + pub priority: __u32, + pub src_ip4: __u32, + pub src_ip6: [__u32; 4usize], + pub src_port: __u32, + pub dst_port: __be16, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub dst_ip4: __u32, + pub dst_ip6: [__u32; 4usize], + pub state: __u32, + pub rx_queue_mapping: __s32, +} +impl bpf_sock { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_tcp_sock { + pub snd_cwnd: __u32, + pub srtt_us: __u32, + pub rtt_min: __u32, + pub snd_ssthresh: __u32, + pub rcv_nxt: __u32, + pub snd_nxt: __u32, + pub snd_una: __u32, + pub mss_cache: __u32, + pub ecn_flags: __u32, + pub rate_delivered: __u32, + pub rate_interval_us: __u32, + pub packets_out: __u32, + pub retrans_out: __u32, + pub total_retrans: __u32, + pub segs_in: __u32, + pub data_segs_in: __u32, + pub segs_out: __u32, + pub data_segs_out: __u32, + pub lost_out: __u32, + pub sacked_out: __u32, + pub bytes_received: __u64, + pub bytes_acked: __u64, + pub dsack_dups: __u32, + pub delivered: __u32, + pub delivered_ce: __u32, + pub icsk_retransmits: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sock_tuple { + pub __bindgen_anon_1: bpf_sock_tuple__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_tuple__bindgen_ty_1 { + pub ipv4: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1, + pub ipv6: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 { + pub saddr: __be32, + pub daddr: __be32, + pub sport: __be16, + pub dport: __be16, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { + pub saddr: [__be32; 4usize], + pub daddr: [__be32; 4usize], + pub sport: __be16, + pub dport: __be16, +} +pub mod tcx_action_base { + pub type Type = ::aya_ebpf_cty::c_int; + pub const TCX_NEXT: Type = -1; + pub const TCX_PASS: Type = 0; + pub const TCX_DROP: Type = 2; + pub const TCX_REDIRECT: Type = 7; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_xdp_sock { + pub queue_id: __u32, +} +pub mod xdp_action { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const XDP_ABORTED: Type = 0; + pub const XDP_DROP: Type = 1; + pub const XDP_PASS: Type = 2; + pub const XDP_TX: Type = 3; + pub const XDP_REDIRECT: Type = 4; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xdp_md { + pub data: __u32, + pub data_end: __u32, + pub data_meta: __u32, + pub ingress_ifindex: __u32, + pub rx_queue_index: __u32, + pub egress_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_devmap_val { + pub ifindex: __u32, + pub bpf_prog: bpf_devmap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_devmap_val__bindgen_ty_1 { + pub fd: ::aya_ebpf_cty::c_int, + pub id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_cpumap_val { + pub qsize: __u32, + pub bpf_prog: bpf_cpumap_val__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_cpumap_val__bindgen_ty_1 { + pub fd: ::aya_ebpf_cty::c_int, + pub id: __u32, +} +pub mod sk_action { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const SK_DROP: Type = 0; + pub const SK_PASS: Type = 1; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sk_msg_md { + pub __bindgen_anon_1: sk_msg_md__bindgen_ty_1, + pub __bindgen_anon_2: sk_msg_md__bindgen_ty_2, + pub family: __u32, + pub remote_ip4: __u32, + pub local_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub local_ip6: [__u32; 4usize], + pub remote_port: __u32, + pub local_port: __u32, + pub size: __u32, + pub __bindgen_anon_3: sk_msg_md__bindgen_ty_3, +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union sk_msg_md__bindgen_ty_1 { + pub data: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_msg_md__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union sk_msg_md__bindgen_ty_2 { + pub data_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_msg_md__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union sk_msg_md__bindgen_ty_3 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_msg_md__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sk_reuseport_md { + pub __bindgen_anon_1: sk_reuseport_md__bindgen_ty_1, + pub __bindgen_anon_2: sk_reuseport_md__bindgen_ty_2, + pub len: __u32, + pub eth_protocol: __u32, + pub ip_protocol: __u32, + pub bind_inany: __u32, + pub hash: __u32, + pub __bindgen_anon_3: sk_reuseport_md__bindgen_ty_3, + pub __bindgen_anon_4: sk_reuseport_md__bindgen_ty_4, +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_1 { + pub data: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_2 { + pub data_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_3 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union sk_reuseport_md__bindgen_ty_4 { + pub migrating_sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl sk_reuseport_md__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_prog_info { + pub type_: __u32, + pub id: __u32, + pub tag: [__u8; 8usize], + pub jited_prog_len: __u32, + pub xlated_prog_len: __u32, + pub jited_prog_insns: __u64, + pub xlated_prog_insns: __u64, + pub load_time: __u64, + pub created_by_uid: __u32, + pub nr_map_ids: __u32, + pub map_ids: __u64, + pub name: [::aya_ebpf_cty::c_char; 16usize], + pub ifindex: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub nr_jited_ksyms: __u32, + pub nr_jited_func_lens: __u32, + pub jited_ksyms: __u64, + pub jited_func_lens: __u64, + pub btf_id: __u32, + pub func_info_rec_size: __u32, + pub func_info: __u64, + pub nr_func_info: __u32, + pub nr_line_info: __u32, + pub line_info: __u64, + pub jited_line_info: __u64, + pub nr_jited_line_info: __u32, + pub line_info_rec_size: __u32, + pub jited_line_info_rec_size: __u32, + pub nr_prog_tags: __u32, + pub prog_tags: __u64, + pub run_time_ns: __u64, + pub run_cnt: __u64, + pub recursion_misses: __u64, + pub verified_insns: __u32, + pub attach_btf_obj_id: __u32, + pub attach_btf_id: __u32, +} +impl bpf_prog_info { + #[inline] + pub fn gpl_compatible(&self) -> __u32 { + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_gpl_compatible(&mut self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let gpl_compatible: u32 = unsafe { ::core::mem::transmute(gpl_compatible) }; + gpl_compatible as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_map_info { + pub type_: __u32, + pub id: __u32, + pub key_size: __u32, + pub value_size: __u32, + pub max_entries: __u32, + pub map_flags: __u32, + pub name: [::aya_ebpf_cty::c_char; 16usize], + pub ifindex: __u32, + pub btf_vmlinux_value_type_id: __u32, + pub netns_dev: __u64, + pub netns_ino: __u64, + pub btf_id: __u32, + pub btf_key_type_id: __u32, + pub btf_value_type_id: __u32, + pub btf_vmlinux_id: __u32, + pub map_extra: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_btf_info { + pub btf: __u64, + pub btf_size: __u32, + pub id: __u32, + pub name: __u64, + pub name_len: __u32, + pub kernel_btf: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info { + pub type_: __u32, + pub id: __u32, + pub prog_id: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1 { + pub raw_tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_1, + pub tracing: bpf_link_info__bindgen_ty_1__bindgen_ty_2, + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_3, + pub iter: bpf_link_info__bindgen_ty_1__bindgen_ty_4, + pub netns: bpf_link_info__bindgen_ty_1__bindgen_ty_5, + pub xdp: bpf_link_info__bindgen_ty_1__bindgen_ty_6, + pub struct_ops: bpf_link_info__bindgen_ty_1__bindgen_ty_7, + pub netfilter: bpf_link_info__bindgen_ty_1__bindgen_ty_8, + pub kprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_9, + pub uprobe_multi: bpf_link_info__bindgen_ty_1__bindgen_ty_10, + pub perf_event: bpf_link_info__bindgen_ty_1__bindgen_ty_11, + pub tcx: bpf_link_info__bindgen_ty_1__bindgen_ty_12, + pub netkit: bpf_link_info__bindgen_ty_1__bindgen_ty_13, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_1 { + pub tp_name: __u64, + pub tp_name_len: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_2 { + pub attach_type: __u32, + pub target_obj_id: __u32, + pub target_btf_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_3 { + pub cgroup_id: __u64, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4 { + pub target_name: __u64, + pub target_name_len: __u32, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1, + pub __bindgen_anon_2: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { + pub map: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2 { + pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1, + pub task: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_1 { + pub cgroup_id: __u64, + pub order: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_2__bindgen_ty_2 { + pub tid: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 { + pub netns_ino: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 { + pub ifindex: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_7 { + pub map_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_8 { + pub pf: __u32, + pub hooknum: __u32, + pub priority: __s32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_9 { + pub addrs: __u64, + pub count: __u32, + pub flags: __u32, + pub missed: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_10 { + pub path: __u64, + pub offsets: __u64, + pub ref_ctr_offsets: __u64, + pub cookies: __u64, + pub path_size: __u32, + pub count: __u32, + pub flags: __u32, + pub pid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1 { + pub uprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1, + pub kprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2, + pub tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3, + pub event: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_1 { + pub file_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2 { + pub func_name: __u64, + pub name_len: __u32, + pub offset: __u32, + pub addr: __u64, + pub missed: __u64, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + pub tp_name: __u64, + pub name_len: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + pub config: __u64, + pub type_: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub cookie: __u64, +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_11 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_12 { + pub ifindex: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_13 { + pub ifindex: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sock_addr { + pub user_family: __u32, + pub user_ip4: __u32, + pub user_ip6: [__u32; 4usize], + pub user_port: __u32, + pub family: __u32, + pub type_: __u32, + pub protocol: __u32, + pub msg_src_ip4: __u32, + pub msg_src_ip6: [__u32; 4usize], + pub __bindgen_anon_1: bpf_sock_addr__bindgen_ty_1, +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union bpf_sock_addr__bindgen_ty_1 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_addr__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sock_ops { + pub op: __u32, + pub __bindgen_anon_1: bpf_sock_ops__bindgen_ty_1, + pub family: __u32, + pub remote_ip4: __u32, + pub local_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub local_ip6: [__u32; 4usize], + pub remote_port: __u32, + pub local_port: __u32, + pub is_fullsock: __u32, + pub snd_cwnd: __u32, + pub srtt_us: __u32, + pub bpf_sock_ops_cb_flags: __u32, + pub state: __u32, + pub rtt_min: __u32, + pub snd_ssthresh: __u32, + pub rcv_nxt: __u32, + pub snd_nxt: __u32, + pub snd_una: __u32, + pub mss_cache: __u32, + pub ecn_flags: __u32, + pub rate_delivered: __u32, + pub rate_interval_us: __u32, + pub packets_out: __u32, + pub retrans_out: __u32, + pub total_retrans: __u32, + pub segs_in: __u32, + pub data_segs_in: __u32, + pub segs_out: __u32, + pub data_segs_out: __u32, + pub lost_out: __u32, + pub sacked_out: __u32, + pub sk_txhash: __u32, + pub bytes_received: __u64, + pub bytes_acked: __u64, + pub __bindgen_anon_2: bpf_sock_ops__bindgen_ty_2, + pub __bindgen_anon_3: bpf_sock_ops__bindgen_ty_3, + pub __bindgen_anon_4: bpf_sock_ops__bindgen_ty_4, + pub skb_len: __u32, + pub skb_tcp_flags: __u32, + pub skb_hwtstamp: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_1 { + pub args: [__u32; 4usize], + pub reply: __u32, + pub replylong: [__u32; 4usize], +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_2 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_ops__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_3 { + pub skb_data: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_ops__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union bpf_sock_ops__bindgen_ty_4 { + pub skb_data_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sock_ops__bindgen_ty_4 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +pub const BPF_SOCK_OPS_RTO_CB_FLAG: _bindgen_ty_29 = 1; +pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: _bindgen_ty_29 = 2; +pub const BPF_SOCK_OPS_STATE_CB_FLAG: _bindgen_ty_29 = 4; +pub const BPF_SOCK_OPS_RTT_CB_FLAG: _bindgen_ty_29 = 8; +pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_29 = 16; +pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_29 = 32; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_29 = 64; +pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_29 = 127; +pub type _bindgen_ty_29 = ::aya_ebpf_cty::c_uint; +pub const BPF_SOCK_OPS_VOID: _bindgen_ty_30 = 0; +pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_30 = 1; +pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_30 = 2; +pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_30 = 3; +pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_30 = 4; +pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_30 = 5; +pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_30 = 6; +pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_30 = 7; +pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_30 = 8; +pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_30 = 9; +pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_30 = 10; +pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_30 = 11; +pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_30 = 12; +pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_30 = 13; +pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_30 = 14; +pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_30 = 15; +pub type _bindgen_ty_30 = ::aya_ebpf_cty::c_uint; +pub const BPF_TCP_ESTABLISHED: _bindgen_ty_31 = 1; +pub const BPF_TCP_SYN_SENT: _bindgen_ty_31 = 2; +pub const BPF_TCP_SYN_RECV: _bindgen_ty_31 = 3; +pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_31 = 4; +pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_31 = 5; +pub const BPF_TCP_TIME_WAIT: _bindgen_ty_31 = 6; +pub const BPF_TCP_CLOSE: _bindgen_ty_31 = 7; +pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_31 = 8; +pub const BPF_TCP_LAST_ACK: _bindgen_ty_31 = 9; +pub const BPF_TCP_LISTEN: _bindgen_ty_31 = 10; +pub const BPF_TCP_CLOSING: _bindgen_ty_31 = 11; +pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_31 = 12; +pub const BPF_TCP_BOUND_INACTIVE: _bindgen_ty_31 = 13; +pub const BPF_TCP_MAX_STATES: _bindgen_ty_31 = 14; +pub type _bindgen_ty_31 = ::aya_ebpf_cty::c_uint; +pub mod _bindgen_ty_33 { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_LOAD_HDR_OPT_TCP_SYN: Type = 1; +} +pub mod _bindgen_ty_34 { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: Type = 1; + pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: Type = 2; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_perf_event_value { + pub counter: __u64, + pub enabled: __u64, + pub running: __u64, +} +pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_35 = 1; +pub const BPF_DEVCG_ACC_READ: _bindgen_ty_35 = 2; +pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_35 = 4; +pub type _bindgen_ty_35 = ::aya_ebpf_cty::c_uint; +pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_36 = 1; +pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_36 = 2; +pub type _bindgen_ty_36 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_cgroup_dev_ctx { + pub access_type: __u32, + pub major: __u32, + pub minor: __u32, +} +#[repr(C)] +#[derive(Debug)] +pub struct bpf_raw_tracepoint_args { + pub args: __IncompleteArrayField<__u64>, +} +pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_37 = 1; +pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_37 = 2; +pub const BPF_FIB_LOOKUP_SKIP_NEIGH: _bindgen_ty_37 = 4; +pub const BPF_FIB_LOOKUP_TBID: _bindgen_ty_37 = 8; +pub const BPF_FIB_LOOKUP_SRC: _bindgen_ty_37 = 16; +pub type _bindgen_ty_37 = ::aya_ebpf_cty::c_uint; +pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_38 = 0; +pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_38 = 1; +pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_38 = 2; +pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_38 = 3; +pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_38 = 4; +pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_38 = 5; +pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_38 = 6; +pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_38 = 7; +pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_38 = 8; +pub const BPF_FIB_LKUP_RET_NO_SRC_ADDR: _bindgen_ty_38 = 9; +pub type _bindgen_ty_38 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_fib_lookup { + pub family: __u8, + pub l4_protocol: __u8, + pub sport: __be16, + pub dport: __be16, + pub __bindgen_anon_1: bpf_fib_lookup__bindgen_ty_1, + pub ifindex: __u32, + pub __bindgen_anon_2: bpf_fib_lookup__bindgen_ty_2, + pub __bindgen_anon_3: bpf_fib_lookup__bindgen_ty_3, + pub __bindgen_anon_4: bpf_fib_lookup__bindgen_ty_4, + pub __bindgen_anon_5: bpf_fib_lookup__bindgen_ty_5, + pub smac: [__u8; 6usize], + pub dmac: [__u8; 6usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_1 { + pub tot_len: __u16, + pub mtu_result: __u16, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_2 { + pub tos: __u8, + pub flowinfo: __be32, + pub rt_metric: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_3 { + pub ipv4_src: __be32, + pub ipv6_src: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_4 { + pub ipv4_dst: __be32, + pub ipv6_dst: [__u32; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_fib_lookup__bindgen_ty_5 { + pub __bindgen_anon_1: bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1, + pub tbid: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_fib_lookup__bindgen_ty_5__bindgen_ty_1 { + pub h_vlan_proto: __be16, + pub h_vlan_TCI: __be16, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_redir_neigh { + pub nh_family: __u32, + pub __bindgen_anon_1: bpf_redir_neigh__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_redir_neigh__bindgen_ty_1 { + pub ipv4_nh: __be32, + pub ipv6_nh: [__u32; 4usize], +} +pub mod bpf_check_mtu_flags { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MTU_CHK_SEGS: Type = 1; +} +pub mod bpf_check_mtu_ret { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_MTU_CHK_RET_SUCCESS: Type = 0; + pub const BPF_MTU_CHK_RET_FRAG_NEEDED: Type = 1; + pub const BPF_MTU_CHK_RET_SEGS_TOOBIG: Type = 2; +} +pub mod bpf_task_fd_type { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_FD_TYPE_RAW_TRACEPOINT: Type = 0; + pub const BPF_FD_TYPE_TRACEPOINT: Type = 1; + pub const BPF_FD_TYPE_KPROBE: Type = 2; + pub const BPF_FD_TYPE_KRETPROBE: Type = 3; + pub const BPF_FD_TYPE_UPROBE: Type = 4; + pub const BPF_FD_TYPE_URETPROBE: Type = 5; +} +pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_39 = 1; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_39 = 2; +pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_39 = 4; +pub type _bindgen_ty_39 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_flow_keys { + pub nhoff: __u16, + pub thoff: __u16, + pub addr_proto: __u16, + pub is_frag: __u8, + pub is_first_frag: __u8, + pub is_encap: __u8, + pub ip_proto: __u8, + pub n_proto: __be16, + pub sport: __be16, + pub dport: __be16, + pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1, + pub flags: __u32, + pub flow_label: __be32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_flow_keys__bindgen_ty_1 { + pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1__bindgen_ty_1, + pub __bindgen_anon_2: bpf_flow_keys__bindgen_ty_1__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 { + pub ipv4_src: __be32, + pub ipv4_dst: __be32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 { + pub ipv6_src: [__u32; 4usize], + pub ipv6_dst: [__u32; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_func_info { + pub insn_off: __u32, + pub type_id: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_line_info { + pub insn_off: __u32, + pub file_name_off: __u32, + pub line_off: __u32, + pub line_col: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_spin_lock { + pub val: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_timer { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_dynptr { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_list_head { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_list_node { + pub __opaque: [__u64; 3usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_rb_root { + pub __opaque: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_rb_node { + pub __opaque: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_refcount { + pub __opaque: [__u32; 1usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_sysctl { + pub write: __u32, + pub file_pos: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sockopt { + pub __bindgen_anon_1: bpf_sockopt__bindgen_ty_1, + pub __bindgen_anon_2: bpf_sockopt__bindgen_ty_2, + pub __bindgen_anon_3: bpf_sockopt__bindgen_ty_3, + pub level: __s32, + pub optname: __s32, + pub optlen: __s32, + pub retval: __s32, +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_1 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sockopt__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_2 { + pub optval: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sockopt__bindgen_ty_2 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_3 { + pub optval_end: *mut ::aya_ebpf_cty::c_void, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sockopt__bindgen_ty_3 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_pidns_info { + pub pid: __u32, + pub tgid: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_sk_lookup { + pub __bindgen_anon_1: bpf_sk_lookup__bindgen_ty_1, + pub family: __u32, + pub protocol: __u32, + pub remote_ip4: __u32, + pub remote_ip6: [__u32; 4usize], + pub remote_port: __be16, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, + pub local_ip4: __u32, + pub local_ip6: [__u32; 4usize], + pub local_port: __u32, + pub ingress_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_sk_lookup__bindgen_ty_1 { + pub __bindgen_anon_1: bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1, + pub cookie: __u64, +} +#[repr(C)] +#[repr(align(8))] +#[derive(Copy, Clone)] +pub union bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 { + pub sk: *mut bpf_sock, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +impl bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +impl bpf_sk_lookup { + #[inline] + pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btf_ptr { + pub ptr: *mut ::aya_ebpf_cty::c_void, + pub type_id: __u32, + pub flags: __u32, +} +pub mod bpf_core_relo_kind { + pub type Type = ::aya_ebpf_cty::c_uint; + pub const BPF_CORE_FIELD_BYTE_OFFSET: Type = 0; + pub const BPF_CORE_FIELD_BYTE_SIZE: Type = 1; + pub const BPF_CORE_FIELD_EXISTS: Type = 2; + pub const BPF_CORE_FIELD_SIGNED: Type = 3; + pub const BPF_CORE_FIELD_LSHIFT_U64: Type = 4; + pub const BPF_CORE_FIELD_RSHIFT_U64: Type = 5; + pub const BPF_CORE_TYPE_ID_LOCAL: Type = 6; + pub const BPF_CORE_TYPE_ID_TARGET: Type = 7; + pub const BPF_CORE_TYPE_EXISTS: Type = 8; + pub const BPF_CORE_TYPE_SIZE: Type = 9; + pub const BPF_CORE_ENUMVAL_EXISTS: Type = 10; + pub const BPF_CORE_ENUMVAL_VALUE: Type = 11; + pub const BPF_CORE_TYPE_MATCHES: Type = 12; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_core_relo { + pub insn_off: __u32, + pub type_id: __u32, + pub access_str_off: __u32, + pub kind: bpf_core_relo_kind::Type, +} +pub const BPF_F_TIMER_ABS: _bindgen_ty_41 = 1; +pub const BPF_F_TIMER_CPU_PIN: _bindgen_ty_41 = 2; +pub type _bindgen_ty_41 = ::aya_ebpf_cty::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bpf_iter_num { + pub __opaque: [__u64; 1usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pt_regs { + pub regs: [__u64; 32usize], + pub lo: __u64, + pub hi: __u64, + pub cp0_epc: __u64, + pub cp0_badvaddr: __u64, + pub cp0_status: __u64, + pub cp0_cause: __u64, +} +pub type sa_family_t = ::aya_ebpf_cty::c_ushort; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sockaddr { + pub sa_family: sa_family_t, + pub sa_data: [::aya_ebpf_cty::c_char; 14usize], +} diff --git a/ebpf/aya-ebpf-bindings/src/mips/helpers.rs b/ebpf/aya-ebpf-bindings/src/mips/helpers.rs new file mode 100644 index 00000000..8aba5810 --- /dev/null +++ b/ebpf/aya-ebpf-bindings/src/mips/helpers.rs @@ -0,0 +1,2148 @@ +use super::bindings::*; +pub unsafe fn bpf_map_lookup_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(1usize); + fun(map, key) +} +pub unsafe fn bpf_map_update_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(2usize); + fun(map, key, value, flags) +} +pub unsafe fn bpf_map_delete_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(3usize); + fun(map, key) +} +pub unsafe fn bpf_probe_read( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(4usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_ktime_get_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(5usize); + fun() +} +pub unsafe fn bpf_get_prandom_u32() -> __u32 { + let fun: unsafe extern "C" fn() -> __u32 = ::core::mem::transmute(7usize); + fun() +} +pub unsafe fn bpf_get_smp_processor_id() -> __u32 { + let fun: unsafe extern "C" fn() -> __u32 = ::core::mem::transmute(8usize); + fun() +} +pub unsafe fn bpf_skb_store_bytes( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(9usize); + fun(skb, offset, from, len, flags) +} +pub unsafe fn bpf_l3_csum_replace( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(10usize); + fun(skb, offset, from, to, size) +} +pub unsafe fn bpf_l4_csum_replace( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: __u64, + to: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(11usize); + fun(skb, offset, from, to, flags) +} +pub unsafe fn bpf_tail_call( + ctx: *mut ::aya_ebpf_cty::c_void, + prog_array_map: *mut ::aya_ebpf_cty::c_void, + index: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + prog_array_map: *mut ::aya_ebpf_cty::c_void, + index: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(12usize); + fun(ctx, prog_array_map, index) +} +pub unsafe fn bpf_clone_redirect( + skb: *mut __sk_buff, + ifindex: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + ifindex: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(13usize); + fun(skb, ifindex, flags) +} +pub unsafe fn bpf_get_current_pid_tgid() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(14usize); + fun() +} +pub unsafe fn bpf_get_current_uid_gid() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(15usize); + fun() +} +pub unsafe fn bpf_get_current_comm( + buf: *mut ::aya_ebpf_cty::c_void, + size_of_buf: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + buf: *mut ::aya_ebpf_cty::c_void, + size_of_buf: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(16usize); + fun(buf, size_of_buf) +} +pub unsafe fn bpf_get_cgroup_classid(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(17usize); + fun(skb) +} +pub unsafe fn bpf_skb_vlan_push( + skb: *mut __sk_buff, + vlan_proto: __be16, + vlan_tci: __u16, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + vlan_proto: __be16, + vlan_tci: __u16, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(18usize); + fun(skb, vlan_proto, vlan_tci) +} +pub unsafe fn bpf_skb_vlan_pop(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(19usize); + fun(skb) +} +pub unsafe fn bpf_skb_get_tunnel_key( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(20usize); + fun(skb, key, size, flags) +} +pub unsafe fn bpf_skb_set_tunnel_key( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + key: *mut bpf_tunnel_key, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(21usize); + fun(skb, key, size, flags) +} +pub unsafe fn bpf_perf_event_read(map: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 { + let fun: unsafe extern "C" fn(map: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 = + ::core::mem::transmute(22usize); + fun(map, flags) +} +pub unsafe fn bpf_redirect(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(23usize); + fun(ifindex, flags) +} +pub unsafe fn bpf_get_route_realm(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(24usize); + fun(skb) +} +pub unsafe fn bpf_perf_event_output( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(25usize); + fun(ctx, map, flags, data, size) +} +pub unsafe fn bpf_skb_load_bytes( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(26usize); + fun(skb, offset, to, len) +} +pub unsafe fn bpf_get_stackid( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(27usize); + fun(ctx, map, flags) +} +pub unsafe fn bpf_csum_diff( + from: *mut __be32, + from_size: __u32, + to: *mut __be32, + to_size: __u32, + seed: __wsum, +) -> __s64 { + let fun: unsafe extern "C" fn( + from: *mut __be32, + from_size: __u32, + to: *mut __be32, + to_size: __u32, + seed: __wsum, + ) -> __s64 = ::core::mem::transmute(28usize); + fun(from, from_size, to, to_size, seed) +} +pub unsafe fn bpf_skb_get_tunnel_opt( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(29usize); + fun(skb, opt, size) +} +pub unsafe fn bpf_skb_set_tunnel_opt( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + opt: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(30usize); + fun(skb, opt, size) +} +pub unsafe fn bpf_skb_change_proto( + skb: *mut __sk_buff, + proto: __be16, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + proto: __be16, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(31usize); + fun(skb, proto, flags) +} +pub unsafe fn bpf_skb_change_type(skb: *mut __sk_buff, type_: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, type_: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(32usize); + fun(skb, type_) +} +pub unsafe fn bpf_skb_under_cgroup( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(33usize); + fun(skb, map, index) +} +pub unsafe fn bpf_get_hash_recalc(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(34usize); + fun(skb) +} +pub unsafe fn bpf_get_current_task() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(35usize); + fun() +} +pub unsafe fn bpf_probe_write_user( + dst: *mut ::aya_ebpf_cty::c_void, + src: *const ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + src: *const ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(36usize); + fun(dst, src, len) +} +pub unsafe fn bpf_current_task_under_cgroup( + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + index: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(37usize); + fun(map, index) +} +pub unsafe fn bpf_skb_change_tail( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(38usize); + fun(skb, len, flags) +} +pub unsafe fn bpf_skb_pull_data(skb: *mut __sk_buff, len: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, len: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(39usize); + fun(skb, len) +} +pub unsafe fn bpf_csum_update(skb: *mut __sk_buff, csum: __wsum) -> __s64 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, csum: __wsum) -> __s64 = + ::core::mem::transmute(40usize); + fun(skb, csum) +} +pub unsafe fn bpf_set_hash_invalid(skb: *mut __sk_buff) { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) = ::core::mem::transmute(41usize); + fun(skb) +} +pub unsafe fn bpf_get_numa_node_id() -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn() -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(42usize); + fun() +} +pub unsafe fn bpf_skb_change_head( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(43usize); + fun(skb, len, flags) +} +pub unsafe fn bpf_xdp_adjust_head( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(44usize); + fun(xdp_md, delta) +} +pub unsafe fn bpf_probe_read_str( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(45usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_get_socket_cookie(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(46usize); + fun(ctx) +} +pub unsafe fn bpf_get_socket_uid(skb: *mut __sk_buff) -> __u32 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u32 = ::core::mem::transmute(47usize); + fun(skb) +} +pub unsafe fn bpf_set_hash(skb: *mut __sk_buff, hash: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, hash: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(48usize); + fun(skb, hash) +} +pub unsafe fn bpf_setsockopt( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(49usize); + fun(bpf_socket, level, optname, optval, optlen) +} +pub unsafe fn bpf_skb_adjust_room( + skb: *mut __sk_buff, + len_diff: __s32, + mode: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + len_diff: __s32, + mode: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(50usize); + fun(skb, len_diff, mode, flags) +} +pub unsafe fn bpf_redirect_map( + map: *mut ::aya_ebpf_cty::c_void, + key: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(51usize); + fun(map, key, flags) +} +pub unsafe fn bpf_sk_redirect_map( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(52usize); + fun(skb, map, key, flags) +} +pub unsafe fn bpf_sock_map_update( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(53usize); + fun(skops, map, key, flags) +} +pub unsafe fn bpf_xdp_adjust_meta( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(54usize); + fun(xdp_md, delta) +} +pub unsafe fn bpf_perf_event_read_value( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + buf: *mut bpf_perf_event_value, + buf_size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + buf: *mut bpf_perf_event_value, + buf_size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(55usize); + fun(map, flags, buf, buf_size) +} +pub unsafe fn bpf_perf_prog_read_value( + ctx: *mut bpf_perf_event_data, + buf: *mut bpf_perf_event_value, + buf_size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_perf_event_data, + buf: *mut bpf_perf_event_value, + buf_size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(56usize); + fun(ctx, buf, buf_size) +} +pub unsafe fn bpf_getsockopt( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + bpf_socket: *mut ::aya_ebpf_cty::c_void, + level: ::aya_ebpf_cty::c_int, + optname: ::aya_ebpf_cty::c_int, + optval: *mut ::aya_ebpf_cty::c_void, + optlen: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(57usize); + fun(bpf_socket, level, optname, optval, optlen) +} +pub unsafe fn bpf_override_return(regs: *mut pt_regs, rc: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(regs: *mut pt_regs, rc: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(58usize); + fun(regs, rc) +} +pub unsafe fn bpf_sock_ops_cb_flags_set( + bpf_sock: *mut bpf_sock_ops, + argval: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + bpf_sock: *mut bpf_sock_ops, + argval: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(59usize); + fun(bpf_sock, argval) +} +pub unsafe fn bpf_msg_redirect_map( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(60usize); + fun(msg, map, key, flags) +} +pub unsafe fn bpf_msg_apply_bytes(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(61usize); + fun(msg, bytes) +} +pub unsafe fn bpf_msg_cork_bytes(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(msg: *mut sk_msg_md, bytes: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(62usize); + fun(msg, bytes) +} +pub unsafe fn bpf_msg_pull_data( + msg: *mut sk_msg_md, + start: __u32, + end: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + start: __u32, + end: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(63usize); + fun(msg, start, end, flags) +} +pub unsafe fn bpf_bind( + ctx: *mut bpf_sock_addr, + addr: *mut sockaddr, + addr_len: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sock_addr, + addr: *mut sockaddr, + addr_len: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(64usize); + fun(ctx, addr, addr_len) +} +pub unsafe fn bpf_xdp_adjust_tail( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + delta: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(65usize); + fun(xdp_md, delta) +} +pub unsafe fn bpf_skb_get_xfrm_state( + skb: *mut __sk_buff, + index: __u32, + xfrm_state: *mut bpf_xfrm_state, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + index: __u32, + xfrm_state: *mut bpf_xfrm_state, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(66usize); + fun(skb, index, xfrm_state, size, flags) +} +pub unsafe fn bpf_get_stack( + ctx: *mut ::aya_ebpf_cty::c_void, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(67usize); + fun(ctx, buf, size, flags) +} +pub unsafe fn bpf_skb_load_bytes_relative( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, + start_header: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *const ::aya_ebpf_cty::c_void, + offset: __u32, + to: *mut ::aya_ebpf_cty::c_void, + len: __u32, + start_header: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(68usize); + fun(skb, offset, to, len, start_header) +} +pub unsafe fn bpf_fib_lookup( + ctx: *mut ::aya_ebpf_cty::c_void, + params: *mut bpf_fib_lookup, + plen: ::aya_ebpf_cty::c_int, + flags: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + params: *mut bpf_fib_lookup, + plen: ::aya_ebpf_cty::c_int, + flags: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(69usize); + fun(ctx, params, plen, flags) +} +pub unsafe fn bpf_sock_hash_update( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(70usize); + fun(skops, map, key, flags) +} +pub unsafe fn bpf_msg_redirect_hash( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(71usize); + fun(msg, map, key, flags) +} +pub unsafe fn bpf_sk_redirect_hash( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(72usize); + fun(skb, map, key, flags) +} +pub unsafe fn bpf_lwt_push_encap( + skb: *mut __sk_buff, + type_: __u32, + hdr: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + type_: __u32, + hdr: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(73usize); + fun(skb, type_, hdr, len) +} +pub unsafe fn bpf_lwt_seg6_store_bytes( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(74usize); + fun(skb, offset, from, len) +} +pub unsafe fn bpf_lwt_seg6_adjust_srh( + skb: *mut __sk_buff, + offset: __u32, + delta: __s32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + offset: __u32, + delta: __s32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(75usize); + fun(skb, offset, delta) +} +pub unsafe fn bpf_lwt_seg6_action( + skb: *mut __sk_buff, + action: __u32, + param: *mut ::aya_ebpf_cty::c_void, + param_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + action: __u32, + param: *mut ::aya_ebpf_cty::c_void, + param_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(76usize); + fun(skb, action, param, param_len) +} +pub unsafe fn bpf_rc_repeat(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(77usize); + fun(ctx) +} +pub unsafe fn bpf_rc_keydown( + ctx: *mut ::aya_ebpf_cty::c_void, + protocol: __u32, + scancode: __u64, + toggle: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + protocol: __u32, + scancode: __u64, + toggle: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(78usize); + fun(ctx, protocol, scancode, toggle) +} +pub unsafe fn bpf_skb_cgroup_id(skb: *mut __sk_buff) -> __u64 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u64 = ::core::mem::transmute(79usize); + fun(skb) +} +pub unsafe fn bpf_get_current_cgroup_id() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(80usize); + fun() +} +pub unsafe fn bpf_get_local_storage( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(81usize); + fun(map, flags) +} +pub unsafe fn bpf_sk_select_reuseport( + reuse: *mut sk_reuseport_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + reuse: *mut sk_reuseport_md, + map: *mut ::aya_ebpf_cty::c_void, + key: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(82usize); + fun(reuse, map, key, flags) +} +pub unsafe fn bpf_skb_ancestor_cgroup_id( + skb: *mut __sk_buff, + ancestor_level: ::aya_ebpf_cty::c_int, +) -> __u64 { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + ancestor_level: ::aya_ebpf_cty::c_int, + ) -> __u64 = ::core::mem::transmute(83usize); + fun(skb, ancestor_level) +} +pub unsafe fn bpf_sk_lookup_tcp( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, +) -> *mut bpf_sock { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, + ) -> *mut bpf_sock = ::core::mem::transmute(84usize); + fun(ctx, tuple, tuple_size, netns, flags) +} +pub unsafe fn bpf_sk_lookup_udp( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, +) -> *mut bpf_sock { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, + ) -> *mut bpf_sock = ::core::mem::transmute(85usize); + fun(ctx, tuple, tuple_size, netns, flags) +} +pub unsafe fn bpf_sk_release(sock: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(sock: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(86usize); + fun(sock) +} +pub unsafe fn bpf_map_push_elem( + map: *mut ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + value: *const ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(87usize); + fun(map, value, flags) +} +pub unsafe fn bpf_map_pop_elem( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(88usize); + fun(map, value) +} +pub unsafe fn bpf_map_peek_elem( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(89usize); + fun(map, value) +} +pub unsafe fn bpf_msg_push_data( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(90usize); + fun(msg, start, len, flags) +} +pub unsafe fn bpf_msg_pop_data( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + msg: *mut sk_msg_md, + start: __u32, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(91usize); + fun(msg, start, len, flags) +} +pub unsafe fn bpf_rc_pointer_rel( + ctx: *mut ::aya_ebpf_cty::c_void, + rel_x: __s32, + rel_y: __s32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + rel_x: __s32, + rel_y: __s32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(92usize); + fun(ctx, rel_x, rel_y) +} +pub unsafe fn bpf_spin_lock(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(93usize); + fun(lock) +} +pub unsafe fn bpf_spin_unlock(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(lock: *mut bpf_spin_lock) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(94usize); + fun(lock) +} +pub unsafe fn bpf_sk_fullsock(sk: *mut bpf_sock) -> *mut bpf_sock { + let fun: unsafe extern "C" fn(sk: *mut bpf_sock) -> *mut bpf_sock = + ::core::mem::transmute(95usize); + fun(sk) +} +pub unsafe fn bpf_tcp_sock(sk: *mut bpf_sock) -> *mut bpf_tcp_sock { + let fun: unsafe extern "C" fn(sk: *mut bpf_sock) -> *mut bpf_tcp_sock = + ::core::mem::transmute(96usize); + fun(sk) +} +pub unsafe fn bpf_skb_ecn_set_ce(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(97usize); + fun(skb) +} +pub unsafe fn bpf_get_listener_sock(sk: *mut bpf_sock) -> *mut bpf_sock { + let fun: unsafe extern "C" fn(sk: *mut bpf_sock) -> *mut bpf_sock = + ::core::mem::transmute(98usize); + fun(sk) +} +pub unsafe fn bpf_skc_lookup_tcp( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, +) -> *mut bpf_sock { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + tuple: *mut bpf_sock_tuple, + tuple_size: __u32, + netns: __u64, + flags: __u64, + ) -> *mut bpf_sock = ::core::mem::transmute(99usize); + fun(ctx, tuple, tuple_size, netns, flags) +} +pub unsafe fn bpf_tcp_check_syncookie( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(100usize); + fun(sk, iph, iph_len, th, th_len) +} +pub unsafe fn bpf_sysctl_get_name( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(101usize); + fun(ctx, buf, buf_len, flags) +} +pub unsafe fn bpf_sysctl_get_current_value( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(102usize); + fun(ctx, buf, buf_len) +} +pub unsafe fn bpf_sysctl_get_new_value( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *mut ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(103usize); + fun(ctx, buf, buf_len) +} +pub unsafe fn bpf_sysctl_set_new_value( + ctx: *mut bpf_sysctl, + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_sysctl, + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(104usize); + fun(ctx, buf, buf_len) +} +pub unsafe fn bpf_strtol( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_long, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_long, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(105usize); + fun(buf, buf_len, flags, res) +} +pub unsafe fn bpf_strtoul( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_ulong, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + buf: *const ::aya_ebpf_cty::c_char, + buf_len: ::aya_ebpf_cty::c_ulong, + flags: __u64, + res: *mut ::aya_ebpf_cty::c_ulong, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(106usize); + fun(buf, buf_len, flags, res) +} +pub unsafe fn bpf_sk_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(107usize); + fun(map, sk, value, flags) +} +pub unsafe fn bpf_sk_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(108usize); + fun(map, sk) +} +pub unsafe fn bpf_send_signal(sig: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(sig: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(109usize); + fun(sig) +} +pub unsafe fn bpf_tcp_gen_syncookie( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, +) -> __s64 { + let fun: unsafe extern "C" fn( + sk: *mut ::aya_ebpf_cty::c_void, + iph: *mut ::aya_ebpf_cty::c_void, + iph_len: __u32, + th: *mut tcphdr, + th_len: __u32, + ) -> __s64 = ::core::mem::transmute(110usize); + fun(sk, iph, iph_len, th, th_len) +} +pub unsafe fn bpf_skb_output( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(111usize); + fun(ctx, map, flags, data, size) +} +pub unsafe fn bpf_probe_read_user( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(112usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_probe_read_kernel( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(113usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_probe_read_user_str( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(114usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_probe_read_kernel_str( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + unsafe_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(115usize); + fun(dst, size, unsafe_ptr) +} +pub unsafe fn bpf_tcp_send_ack( + tp: *mut ::aya_ebpf_cty::c_void, + rcv_nxt: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + tp: *mut ::aya_ebpf_cty::c_void, + rcv_nxt: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(116usize); + fun(tp, rcv_nxt) +} +pub unsafe fn bpf_send_signal_thread(sig: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(sig: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(117usize); + fun(sig) +} +pub unsafe fn bpf_jiffies64() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(118usize); + fun() +} +pub unsafe fn bpf_read_branch_records( + ctx: *mut bpf_perf_event_data, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut bpf_perf_event_data, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(119usize); + fun(ctx, buf, size, flags) +} +pub unsafe fn bpf_get_ns_current_pid_tgid( + dev: __u64, + ino: __u64, + nsdata: *mut bpf_pidns_info, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dev: __u64, + ino: __u64, + nsdata: *mut bpf_pidns_info, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(120usize); + fun(dev, ino, nsdata, size) +} +pub unsafe fn bpf_xdp_output( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(121usize); + fun(ctx, map, flags, data, size) +} +pub unsafe fn bpf_get_netns_cookie(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(122usize); + fun(ctx) +} +pub unsafe fn bpf_get_current_ancestor_cgroup_id(ancestor_level: ::aya_ebpf_cty::c_int) -> __u64 { + let fun: unsafe extern "C" fn(ancestor_level: ::aya_ebpf_cty::c_int) -> __u64 = + ::core::mem::transmute(123usize); + fun(ancestor_level) +} +pub unsafe fn bpf_sk_assign( + ctx: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + sk: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(124usize); + fun(ctx, sk, flags) +} +pub unsafe fn bpf_ktime_get_boot_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(125usize); + fun() +} +pub unsafe fn bpf_seq_printf( + m: *mut seq_file, + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + m: *mut seq_file, + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(126usize); + fun(m, fmt, fmt_size, data, data_len) +} +pub unsafe fn bpf_seq_write( + m: *mut seq_file, + data: *const ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + m: *mut seq_file, + data: *const ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(127usize); + fun(m, data, len) +} +pub unsafe fn bpf_sk_cgroup_id(sk: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(128usize); + fun(sk) +} +pub unsafe fn bpf_sk_ancestor_cgroup_id( + sk: *mut ::aya_ebpf_cty::c_void, + ancestor_level: ::aya_ebpf_cty::c_int, +) -> __u64 { + let fun: unsafe extern "C" fn( + sk: *mut ::aya_ebpf_cty::c_void, + ancestor_level: ::aya_ebpf_cty::c_int, + ) -> __u64 = ::core::mem::transmute(129usize); + fun(sk, ancestor_level) +} +pub unsafe fn bpf_ringbuf_output( + ringbuf: *mut ::aya_ebpf_cty::c_void, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ringbuf: *mut ::aya_ebpf_cty::c_void, + data: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(130usize); + fun(ringbuf, data, size, flags) +} +pub unsafe fn bpf_ringbuf_reserve( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u64, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(131usize); + fun(ringbuf, size, flags) +} +pub unsafe fn bpf_ringbuf_submit(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) { + let fun: unsafe extern "C" fn(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) = + ::core::mem::transmute(132usize); + fun(data, flags) +} +pub unsafe fn bpf_ringbuf_discard(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) { + let fun: unsafe extern "C" fn(data: *mut ::aya_ebpf_cty::c_void, flags: __u64) = + ::core::mem::transmute(133usize); + fun(data, flags) +} +pub unsafe fn bpf_ringbuf_query(ringbuf: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 { + let fun: unsafe extern "C" fn(ringbuf: *mut ::aya_ebpf_cty::c_void, flags: __u64) -> __u64 = + ::core::mem::transmute(134usize); + fun(ringbuf, flags) +} +pub unsafe fn bpf_csum_level(skb: *mut __sk_buff, level: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff, level: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(135usize); + fun(skb, level) +} +pub unsafe fn bpf_skc_to_tcp6_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp6_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp6_sock = + ::core::mem::transmute(136usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_tcp_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_sock = + ::core::mem::transmute(137usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_tcp_timewait_sock( + sk: *mut ::aya_ebpf_cty::c_void, +) -> *mut tcp_timewait_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_timewait_sock = + ::core::mem::transmute(138usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_tcp_request_sock( + sk: *mut ::aya_ebpf_cty::c_void, +) -> *mut tcp_request_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut tcp_request_sock = + ::core::mem::transmute(139usize); + fun(sk) +} +pub unsafe fn bpf_skc_to_udp6_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut udp6_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut udp6_sock = + ::core::mem::transmute(140usize); + fun(sk) +} +pub unsafe fn bpf_get_task_stack( + task: *mut task_struct, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + task: *mut task_struct, + buf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(141usize); + fun(task, buf, size, flags) +} +pub unsafe fn bpf_load_hdr_opt( + skops: *mut bpf_sock_ops, + searchby_res: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + searchby_res: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(142usize); + fun(skops, searchby_res, len, flags) +} +pub unsafe fn bpf_store_hdr_opt( + skops: *mut bpf_sock_ops, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + from: *const ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(143usize); + fun(skops, from, len, flags) +} +pub unsafe fn bpf_reserve_hdr_opt( + skops: *mut bpf_sock_ops, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skops: *mut bpf_sock_ops, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(144usize); + fun(skops, len, flags) +} +pub unsafe fn bpf_inode_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(145usize); + fun(map, inode, value, flags) +} +pub unsafe fn bpf_inode_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_int { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + inode: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_int = ::core::mem::transmute(146usize); + fun(map, inode) +} +pub unsafe fn bpf_d_path( + path: *mut path, + buf: *mut ::aya_ebpf_cty::c_char, + sz: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + path: *mut path, + buf: *mut ::aya_ebpf_cty::c_char, + sz: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(147usize); + fun(path, buf, sz) +} +pub unsafe fn bpf_copy_from_user( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(148usize); + fun(dst, size, user_ptr) +} +pub unsafe fn bpf_snprintf_btf( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + ptr: *mut btf_ptr, + btf_ptr_size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + ptr: *mut btf_ptr, + btf_ptr_size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(149usize); + fun(str_, str_size, ptr, btf_ptr_size, flags) +} +pub unsafe fn bpf_seq_printf_btf( + m: *mut seq_file, + ptr: *mut btf_ptr, + ptr_size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + m: *mut seq_file, + ptr: *mut btf_ptr, + ptr_size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(150usize); + fun(m, ptr, ptr_size, flags) +} +pub unsafe fn bpf_skb_cgroup_classid(skb: *mut __sk_buff) -> __u64 { + let fun: unsafe extern "C" fn(skb: *mut __sk_buff) -> __u64 = ::core::mem::transmute(151usize); + fun(skb) +} +pub unsafe fn bpf_redirect_neigh( + ifindex: __u32, + params: *mut bpf_redir_neigh, + plen: ::aya_ebpf_cty::c_int, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ifindex: __u32, + params: *mut bpf_redir_neigh, + plen: ::aya_ebpf_cty::c_int, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(152usize); + fun(ifindex, params, plen, flags) +} +pub unsafe fn bpf_per_cpu_ptr( + percpu_ptr: *const ::aya_ebpf_cty::c_void, + cpu: __u32, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + percpu_ptr: *const ::aya_ebpf_cty::c_void, + cpu: __u32, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(153usize); + fun(percpu_ptr, cpu) +} +pub unsafe fn bpf_this_cpu_ptr( + percpu_ptr: *const ::aya_ebpf_cty::c_void, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + percpu_ptr: *const ::aya_ebpf_cty::c_void, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(154usize); + fun(percpu_ptr) +} +pub unsafe fn bpf_redirect_peer(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ifindex: __u32, flags: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(155usize); + fun(ifindex, flags) +} +pub unsafe fn bpf_task_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(156usize); + fun(map, task, value, flags) +} +pub unsafe fn bpf_task_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + task: *mut task_struct, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(157usize); + fun(map, task) +} +pub unsafe fn bpf_get_current_task_btf() -> *mut task_struct { + let fun: unsafe extern "C" fn() -> *mut task_struct = ::core::mem::transmute(158usize); + fun() +} +pub unsafe fn bpf_bprm_opts_set(bprm: *mut linux_binprm, flags: __u64) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(bprm: *mut linux_binprm, flags: __u64) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(159usize); + fun(bprm, flags) +} +pub unsafe fn bpf_ktime_get_coarse_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(160usize); + fun() +} +pub unsafe fn bpf_ima_inode_hash( + inode: *mut inode, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + inode: *mut inode, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(161usize); + fun(inode, dst, size) +} +pub unsafe fn bpf_sock_from_file(file: *mut file) -> *mut socket { + let fun: unsafe extern "C" fn(file: *mut file) -> *mut socket = + ::core::mem::transmute(162usize); + fun(file) +} +pub unsafe fn bpf_check_mtu( + ctx: *mut ::aya_ebpf_cty::c_void, + ifindex: __u32, + mtu_len: *mut __u32, + len_diff: __s32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + ifindex: __u32, + mtu_len: *mut __u32, + len_diff: __s32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(163usize); + fun(ctx, ifindex, mtu_len, len_diff, flags) +} +pub unsafe fn bpf_for_each_map_elem( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(164usize); + fun(map, callback_fn, callback_ctx, flags) +} +pub unsafe fn bpf_snprintf( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + fmt: *const ::aya_ebpf_cty::c_char, + data: *mut __u64, + data_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + str_: *mut ::aya_ebpf_cty::c_char, + str_size: __u32, + fmt: *const ::aya_ebpf_cty::c_char, + data: *mut __u64, + data_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(165usize); + fun(str_, str_size, fmt, data, data_len) +} +pub unsafe fn bpf_sys_bpf( + cmd: __u32, + attr: *mut ::aya_ebpf_cty::c_void, + attr_size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + cmd: __u32, + attr: *mut ::aya_ebpf_cty::c_void, + attr_size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(166usize); + fun(cmd, attr, attr_size) +} +pub unsafe fn bpf_btf_find_by_name_kind( + name: *mut ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + kind: __u32, + flags: ::aya_ebpf_cty::c_int, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + name: *mut ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + kind: __u32, + flags: ::aya_ebpf_cty::c_int, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(167usize); + fun(name, name_sz, kind, flags) +} +pub unsafe fn bpf_sys_close(fd: __u32) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(fd: __u32) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(168usize); + fun(fd) +} +pub unsafe fn bpf_timer_init( + timer: *mut bpf_timer, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + timer: *mut bpf_timer, + map: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(169usize); + fun(timer, map, flags) +} +pub unsafe fn bpf_timer_set_callback( + timer: *mut bpf_timer, + callback_fn: *mut ::aya_ebpf_cty::c_void, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + timer: *mut bpf_timer, + callback_fn: *mut ::aya_ebpf_cty::c_void, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(170usize); + fun(timer, callback_fn) +} +pub unsafe fn bpf_timer_start( + timer: *mut bpf_timer, + nsecs: __u64, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + timer: *mut bpf_timer, + nsecs: __u64, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(171usize); + fun(timer, nsecs, flags) +} +pub unsafe fn bpf_timer_cancel(timer: *mut bpf_timer) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(timer: *mut bpf_timer) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(172usize); + fun(timer) +} +pub unsafe fn bpf_get_func_ip(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(173usize); + fun(ctx) +} +pub unsafe fn bpf_get_attach_cookie(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> __u64 = + ::core::mem::transmute(174usize); + fun(ctx) +} +pub unsafe fn bpf_task_pt_regs(task: *mut task_struct) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(task: *mut task_struct) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(175usize); + fun(task) +} +pub unsafe fn bpf_get_branch_snapshot( + entries: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + entries: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(176usize); + fun(entries, size, flags) +} +pub unsafe fn bpf_trace_vprintk( + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + fmt: *const ::aya_ebpf_cty::c_char, + fmt_size: __u32, + data: *const ::aya_ebpf_cty::c_void, + data_len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(177usize); + fun(fmt, fmt_size, data, data_len) +} +pub unsafe fn bpf_skc_to_unix_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut unix_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut unix_sock = + ::core::mem::transmute(178usize); + fun(sk) +} +pub unsafe fn bpf_kallsyms_lookup_name( + name: *const ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + flags: ::aya_ebpf_cty::c_int, + res: *mut __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + name: *const ::aya_ebpf_cty::c_char, + name_sz: ::aya_ebpf_cty::c_int, + flags: ::aya_ebpf_cty::c_int, + res: *mut __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(179usize); + fun(name, name_sz, flags, res) +} +pub unsafe fn bpf_find_vma( + task: *mut task_struct, + addr: __u64, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + task: *mut task_struct, + addr: __u64, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(180usize); + fun(task, addr, callback_fn, callback_ctx, flags) +} +pub unsafe fn bpf_loop( + nr_loops: __u32, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + nr_loops: __u32, + callback_fn: *mut ::aya_ebpf_cty::c_void, + callback_ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(181usize); + fun(nr_loops, callback_fn, callback_ctx, flags) +} +pub unsafe fn bpf_strncmp( + s1: *const ::aya_ebpf_cty::c_char, + s1_sz: __u32, + s2: *const ::aya_ebpf_cty::c_char, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + s1: *const ::aya_ebpf_cty::c_char, + s1_sz: __u32, + s2: *const ::aya_ebpf_cty::c_char, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(182usize); + fun(s1, s1_sz, s2) +} +pub unsafe fn bpf_get_func_arg( + ctx: *mut ::aya_ebpf_cty::c_void, + n: __u32, + value: *mut __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + n: __u32, + value: *mut __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(183usize); + fun(ctx, n, value) +} +pub unsafe fn bpf_get_func_ret( + ctx: *mut ::aya_ebpf_cty::c_void, + value: *mut __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ctx: *mut ::aya_ebpf_cty::c_void, + value: *mut __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(184usize); + fun(ctx, value) +} +pub unsafe fn bpf_get_func_arg_cnt(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(ctx: *mut ::aya_ebpf_cty::c_void) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(185usize); + fun(ctx) +} +pub unsafe fn bpf_get_retval() -> ::aya_ebpf_cty::c_int { + let fun: unsafe extern "C" fn() -> ::aya_ebpf_cty::c_int = ::core::mem::transmute(186usize); + fun() +} +pub unsafe fn bpf_set_retval(retval: ::aya_ebpf_cty::c_int) -> ::aya_ebpf_cty::c_int { + let fun: unsafe extern "C" fn(retval: ::aya_ebpf_cty::c_int) -> ::aya_ebpf_cty::c_int = + ::core::mem::transmute(187usize); + fun(retval) +} +pub unsafe fn bpf_xdp_get_buff_len(xdp_md: *mut xdp_md) -> __u64 { + let fun: unsafe extern "C" fn(xdp_md: *mut xdp_md) -> __u64 = ::core::mem::transmute(188usize); + fun(xdp_md) +} +pub unsafe fn bpf_xdp_load_bytes( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(189usize); + fun(xdp_md, offset, buf, len) +} +pub unsafe fn bpf_xdp_store_bytes( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + xdp_md: *mut xdp_md, + offset: __u32, + buf: *mut ::aya_ebpf_cty::c_void, + len: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(190usize); + fun(xdp_md, offset, buf, len) +} +pub unsafe fn bpf_copy_from_user_task( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, + tsk: *mut task_struct, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + user_ptr: *const ::aya_ebpf_cty::c_void, + tsk: *mut task_struct, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(191usize); + fun(dst, size, user_ptr, tsk, flags) +} +pub unsafe fn bpf_skb_set_tstamp( + skb: *mut __sk_buff, + tstamp: __u64, + tstamp_type: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + skb: *mut __sk_buff, + tstamp: __u64, + tstamp_type: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(192usize); + fun(skb, tstamp, tstamp_type) +} +pub unsafe fn bpf_ima_file_hash( + file: *mut file, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + file: *mut file, + dst: *mut ::aya_ebpf_cty::c_void, + size: __u32, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(193usize); + fun(file, dst, size) +} +pub unsafe fn bpf_kptr_xchg( + map_value: *mut ::aya_ebpf_cty::c_void, + ptr: *mut ::aya_ebpf_cty::c_void, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map_value: *mut ::aya_ebpf_cty::c_void, + ptr: *mut ::aya_ebpf_cty::c_void, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(194usize); + fun(map_value, ptr) +} +pub unsafe fn bpf_map_lookup_percpu_elem( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + cpu: __u32, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + key: *const ::aya_ebpf_cty::c_void, + cpu: __u32, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(195usize); + fun(map, key, cpu) +} +pub unsafe fn bpf_skc_to_mptcp_sock(sk: *mut ::aya_ebpf_cty::c_void) -> *mut mptcp_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_ebpf_cty::c_void) -> *mut mptcp_sock = + ::core::mem::transmute(196usize); + fun(sk) +} +pub unsafe fn bpf_dynptr_from_mem( + data: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + data: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(197usize); + fun(data, size, flags, ptr) +} +pub unsafe fn bpf_ringbuf_reserve_dynptr( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + ringbuf: *mut ::aya_ebpf_cty::c_void, + size: __u32, + flags: __u64, + ptr: *mut bpf_dynptr, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(198usize); + fun(ringbuf, size, flags, ptr) +} +pub unsafe fn bpf_ringbuf_submit_dynptr(ptr: *mut bpf_dynptr, flags: __u64) { + let fun: unsafe extern "C" fn(ptr: *mut bpf_dynptr, flags: __u64) = + ::core::mem::transmute(199usize); + fun(ptr, flags) +} +pub unsafe fn bpf_ringbuf_discard_dynptr(ptr: *mut bpf_dynptr, flags: __u64) { + let fun: unsafe extern "C" fn(ptr: *mut bpf_dynptr, flags: __u64) = + ::core::mem::transmute(200usize); + fun(ptr, flags) +} +pub unsafe fn bpf_dynptr_read( + dst: *mut ::aya_ebpf_cty::c_void, + len: __u32, + src: *const bpf_dynptr, + offset: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *mut ::aya_ebpf_cty::c_void, + len: __u32, + src: *const bpf_dynptr, + offset: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(201usize); + fun(dst, len, src, offset, flags) +} +pub unsafe fn bpf_dynptr_write( + dst: *const bpf_dynptr, + offset: __u32, + src: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + dst: *const bpf_dynptr, + offset: __u32, + src: *mut ::aya_ebpf_cty::c_void, + len: __u32, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(202usize); + fun(dst, offset, src, len, flags) +} +pub unsafe fn bpf_dynptr_data( + ptr: *const bpf_dynptr, + offset: __u32, + len: __u32, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + ptr: *const bpf_dynptr, + offset: __u32, + len: __u32, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(203usize); + fun(ptr, offset, len) +} +pub unsafe fn bpf_tcp_raw_gen_syncookie_ipv4( + iph: *mut iphdr, + th: *mut tcphdr, + th_len: __u32, +) -> __s64 { + let fun: unsafe extern "C" fn(iph: *mut iphdr, th: *mut tcphdr, th_len: __u32) -> __s64 = + ::core::mem::transmute(204usize); + fun(iph, th, th_len) +} +pub unsafe fn bpf_tcp_raw_gen_syncookie_ipv6( + iph: *mut ipv6hdr, + th: *mut tcphdr, + th_len: __u32, +) -> __s64 { + let fun: unsafe extern "C" fn(iph: *mut ipv6hdr, th: *mut tcphdr, th_len: __u32) -> __s64 = + ::core::mem::transmute(205usize); + fun(iph, th, th_len) +} +pub unsafe fn bpf_tcp_raw_check_syncookie_ipv4( + iph: *mut iphdr, + th: *mut tcphdr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(iph: *mut iphdr, th: *mut tcphdr) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(206usize); + fun(iph, th) +} +pub unsafe fn bpf_tcp_raw_check_syncookie_ipv6( + iph: *mut ipv6hdr, + th: *mut tcphdr, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn(iph: *mut ipv6hdr, th: *mut tcphdr) -> ::aya_ebpf_cty::c_long = + ::core::mem::transmute(207usize); + fun(iph, th) +} +pub unsafe fn bpf_ktime_get_tai_ns() -> __u64 { + let fun: unsafe extern "C" fn() -> __u64 = ::core::mem::transmute(208usize); + fun() +} +pub unsafe fn bpf_user_ringbuf_drain( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + callback_fn: *mut ::aya_ebpf_cty::c_void, + ctx: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(209usize); + fun(map, callback_fn, ctx, flags) +} +pub unsafe fn bpf_cgrp_storage_get( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, +) -> *mut ::aya_ebpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, + value: *mut ::aya_ebpf_cty::c_void, + flags: __u64, + ) -> *mut ::aya_ebpf_cty::c_void = ::core::mem::transmute(210usize); + fun(map, cgroup, value, flags) +} +pub unsafe fn bpf_cgrp_storage_delete( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, +) -> ::aya_ebpf_cty::c_long { + let fun: unsafe extern "C" fn( + map: *mut ::aya_ebpf_cty::c_void, + cgroup: *mut cgroup, + ) -> ::aya_ebpf_cty::c_long = ::core::mem::transmute(211usize); + fun(map, cgroup) +} diff --git a/ebpf/aya-ebpf-bindings/src/powerpc64/bindings.rs b/ebpf/aya-ebpf-bindings/src/powerpc64/bindings.rs index 5895d8ef..304be261 100644 --- a/ebpf/aya-ebpf-bindings/src/powerpc64/bindings.rs +++ b/ebpf/aya-ebpf-bindings/src/powerpc64/bindings.rs @@ -14,10 +14,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -27,10 +24,21 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -38,12 +46,27 @@ where }; let mask = 1 << bit_index; if val { - *byte |= mask; + byte | mask } else { - *byte &= !mask; + byte & !mask } } #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -62,6 +85,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -77,6 +118,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } } #[repr(C)] #[derive(Default)] @@ -211,6 +268,9 @@ pub const TC_ACT_REDIRECT: u32 = 7; pub const TC_ACT_TRAP: u32 = 8; pub const TC_ACT_VALUE_MAX: u32 = 8; pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455; +pub const TC_ACT_JUMP: u32 = 268435456; +pub const TC_ACT_GOTO_CHAIN: u32 = 536870912; +pub const TC_ACT_EXT_OPCODE_MAX: u32 = 536870912; pub const SO_RCVLOWAT: u32 = 16; pub const SO_SNDLOWAT: u32 = 17; pub const SO_RCVTIMEO_OLD: u32 = 18; @@ -429,6 +489,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -440,6 +522,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -1952,6 +2056,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/ebpf/aya-ebpf-bindings/src/riscv64/bindings.rs b/ebpf/aya-ebpf-bindings/src/riscv64/bindings.rs index f06086e4..3af9a9e8 100644 --- a/ebpf/aya-ebpf-bindings/src/riscv64/bindings.rs +++ b/ebpf/aya-ebpf-bindings/src/riscv64/bindings.rs @@ -14,10 +14,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -27,10 +24,21 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -38,12 +46,27 @@ where }; let mask = 1 << bit_index; if val { - *byte |= mask; + byte | mask } else { - *byte &= !mask; + byte & !mask } } #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -62,6 +85,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -77,6 +118,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } } #[repr(C)] #[derive(Default)] @@ -211,6 +268,9 @@ pub const TC_ACT_REDIRECT: u32 = 7; pub const TC_ACT_TRAP: u32 = 8; pub const TC_ACT_VALUE_MAX: u32 = 8; pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455; +pub const TC_ACT_JUMP: u32 = 268435456; +pub const TC_ACT_GOTO_CHAIN: u32 = 536870912; +pub const TC_ACT_EXT_OPCODE_MAX: u32 = 536870912; pub const SOL_SOCKET: u32 = 1; pub const SO_DEBUG: u32 = 1; pub const SO_REUSEADDR: u32 = 2; @@ -434,6 +494,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -445,6 +527,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -1957,6 +2061,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/ebpf/aya-ebpf-bindings/src/s390x/bindings.rs b/ebpf/aya-ebpf-bindings/src/s390x/bindings.rs index 3ef80055..b53a7227 100644 --- a/ebpf/aya-ebpf-bindings/src/s390x/bindings.rs +++ b/ebpf/aya-ebpf-bindings/src/s390x/bindings.rs @@ -14,10 +14,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -27,10 +24,21 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -38,12 +46,27 @@ where }; let mask = 1 << bit_index; if val { - *byte |= mask; + byte | mask } else { - *byte &= !mask; + byte & !mask } } #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -62,6 +85,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -77,6 +118,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } } #[repr(C)] #[derive(Default)] @@ -211,6 +268,9 @@ pub const TC_ACT_REDIRECT: u32 = 7; pub const TC_ACT_TRAP: u32 = 8; pub const TC_ACT_VALUE_MAX: u32 = 8; pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455; +pub const TC_ACT_JUMP: u32 = 268435456; +pub const TC_ACT_GOTO_CHAIN: u32 = 536870912; +pub const TC_ACT_EXT_OPCODE_MAX: u32 = 536870912; pub const SOL_SOCKET: u32 = 1; pub const SO_DEBUG: u32 = 1; pub const SO_REUSEADDR: u32 = 2; @@ -434,6 +494,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -445,6 +527,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -1957,6 +2061,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2805,6 +2931,28 @@ impl per_cr_bits { } } #[inline] + pub unsafe fn em_branching_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_em_branching_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn em_instruction_fetch(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u32) } } @@ -2816,6 +2964,28 @@ impl per_cr_bits { } } #[inline] + pub unsafe fn em_instruction_fetch_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 33usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_em_instruction_fetch_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 33usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn em_storage_alteration(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u32) } } @@ -2827,6 +2997,28 @@ impl per_cr_bits { } } #[inline] + pub unsafe fn em_storage_alteration_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 34usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_em_storage_alteration_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 34usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn em_gpr_alt_unused(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u32) } } @@ -2838,6 +3030,28 @@ impl per_cr_bits { } } #[inline] + pub unsafe fn em_gpr_alt_unused_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 35usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_em_gpr_alt_unused_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 35usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn em_store_real_address(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u32) } } @@ -2849,6 +3063,28 @@ impl per_cr_bits { } } #[inline] + pub unsafe fn em_store_real_address_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 36usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_em_store_real_address_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 36usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn branch_addr_ctl(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(40usize, 1u8) as u32) } } @@ -2860,6 +3096,28 @@ impl per_cr_bits { } } #[inline] + pub unsafe fn branch_addr_ctl_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 40usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_branch_addr_ctl_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 40usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn storage_alt_space_ctl(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(42usize, 1u8) as u32) } } @@ -2871,6 +3129,28 @@ impl per_cr_bits { } } #[inline] + pub unsafe fn storage_alt_space_ctl_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 42usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_storage_alt_space_ctl_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 42usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( em_branching: ::aya_ebpf_cty::c_uint, em_instruction_fetch: ::aya_ebpf_cty::c_uint, @@ -2945,6 +3225,28 @@ impl per_lowcore_bits { } } #[inline] + pub unsafe fn perc_branching_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_perc_branching_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn perc_instruction_fetch(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2956,6 +3258,28 @@ impl per_lowcore_bits { } } #[inline] + pub unsafe fn perc_instruction_fetch_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_perc_instruction_fetch_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn perc_storage_alteration(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2967,6 +3291,28 @@ impl per_lowcore_bits { } } #[inline] + pub unsafe fn perc_storage_alteration_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_perc_storage_alteration_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn perc_gpr_alt_unused(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2978,6 +3324,28 @@ impl per_lowcore_bits { } } #[inline] + pub unsafe fn perc_gpr_alt_unused_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_perc_gpr_alt_unused_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn perc_store_real_address(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2989,6 +3357,28 @@ impl per_lowcore_bits { } } #[inline] + pub unsafe fn perc_store_real_address_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_perc_store_real_address_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn atmid_psw_bit_31(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } } @@ -3000,6 +3390,28 @@ impl per_lowcore_bits { } } #[inline] + pub unsafe fn atmid_psw_bit_31_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_atmid_psw_bit_31_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn atmid_validity_bit(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } } @@ -3011,6 +3423,28 @@ impl per_lowcore_bits { } } #[inline] + pub unsafe fn atmid_validity_bit_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_atmid_validity_bit_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn atmid_psw_bit_32(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } } @@ -3022,6 +3456,28 @@ impl per_lowcore_bits { } } #[inline] + pub unsafe fn atmid_psw_bit_32_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_atmid_psw_bit_32_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn atmid_psw_bit_5(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } } @@ -3033,6 +3489,28 @@ impl per_lowcore_bits { } } #[inline] + pub unsafe fn atmid_psw_bit_5_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_atmid_psw_bit_5_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn atmid_psw_bit_16(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } } @@ -3044,6 +3522,28 @@ impl per_lowcore_bits { } } #[inline] + pub unsafe fn atmid_psw_bit_16_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 12usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_atmid_psw_bit_16_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 12usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn atmid_psw_bit_17(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } } @@ -3055,6 +3555,28 @@ impl per_lowcore_bits { } } #[inline] + pub unsafe fn atmid_psw_bit_17_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 13usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_atmid_psw_bit_17_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 13usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn si(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 2u8) as u32) } } @@ -3066,6 +3588,28 @@ impl per_lowcore_bits { } } #[inline] + pub unsafe fn si_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_si_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 2u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( perc_branching: ::aya_ebpf_cty::c_uint, perc_instruction_fetch: ::aya_ebpf_cty::c_uint, @@ -3146,6 +3690,28 @@ impl per_lowcore_bits { } } #[inline] + pub unsafe fn access_id_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_2), + 4usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_access_id_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_2), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_2( access_id: ::aya_ebpf_cty::c_uint, ) -> __BindgenBitfieldUnit<[u8; 1usize]> { @@ -3192,6 +3758,28 @@ impl per_struct { } } #[inline] + pub unsafe fn single_step_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_single_step_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn instruction_fetch(&self) -> ::aya_ebpf_cty::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -3203,6 +3791,28 @@ impl per_struct { } } #[inline] + pub unsafe fn instruction_fetch_raw(this: *const Self) -> ::aya_ebpf_cty::c_uint { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_instruction_fetch_raw(this: *mut Self, val: ::aya_ebpf_cty::c_uint) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( single_step: ::aya_ebpf_cty::c_uint, instruction_fetch: ::aya_ebpf_cty::c_uint, diff --git a/ebpf/aya-ebpf-bindings/src/x86_64/bindings.rs b/ebpf/aya-ebpf-bindings/src/x86_64/bindings.rs index 2c7ad659..914eea1d 100644 --- a/ebpf/aya-ebpf-bindings/src/x86_64/bindings.rs +++ b/ebpf/aya-ebpf-bindings/src/x86_64/bindings.rs @@ -14,10 +14,7 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -27,10 +24,21 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -38,12 +46,27 @@ where }; let mask = 1 << bit_index; if val { - *byte |= mask; + byte | mask } else { - *byte &= !mask; + byte & !mask } } #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -62,6 +85,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); @@ -77,6 +118,22 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } } #[repr(C)] #[derive(Default)] @@ -211,6 +268,9 @@ pub const TC_ACT_REDIRECT: u32 = 7; pub const TC_ACT_TRAP: u32 = 8; pub const TC_ACT_VALUE_MAX: u32 = 8; pub const TC_ACT_EXT_VAL_MASK: u32 = 268435455; +pub const TC_ACT_JUMP: u32 = 268435456; +pub const TC_ACT_GOTO_CHAIN: u32 = 536870912; +pub const TC_ACT_EXT_OPCODE_MAX: u32 = 536870912; pub const SOL_SOCKET: u32 = 1; pub const SO_DEBUG: u32 = 1; pub const SO_REUSEADDR: u32 = 2; @@ -429,6 +489,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn dst_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_dst_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn src_reg(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -440,6 +522,28 @@ impl bpf_insn { } } #[inline] + pub unsafe fn src_reg_raw(this: *const Self) -> __u8 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 4u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_src_reg_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 4u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -1952,6 +2056,28 @@ impl bpf_prog_info { } } #[inline] + pub unsafe fn gpl_compatible_raw(this: *const Self) -> __u32 { + unsafe { + ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::core::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_gpl_compatible_raw(this: *mut Self, val: __u32) { + unsafe { + let val: u32 = ::core::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::core::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/xtask/public-api/aya-ebpf-bindings.txt b/xtask/public-api/aya-ebpf-bindings.txt index d9259502..616fcd24 100644 --- a/xtask/public-api/aya-ebpf-bindings.txt +++ b/xtask/public-api/aya-ebpf-bindings.txt @@ -2264,6 +2264,10 @@ pub fn aya_ebpf_bindings::bindings::sk_reuseport_md__bindgen_ty_4::from(t: T) -> impl aya_ebpf_bindings::bindings::__BindgenBitfieldUnit where Storage: core::convert::AsRef<[u8]> + core::convert::AsMut<[u8]> pub fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::get(&self, bit_offset: usize, bit_width: u8) -> u64 pub fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::get_bit(&self, index: usize) -> bool +pub unsafe fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 +pub unsafe fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::raw_get_bit(this: *const Self, index: usize) -> bool +pub unsafe fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) +pub unsafe fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::raw_set_bit(this: *mut Self, index: usize, val: bool) pub fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::set(&mut self, bit_offset: usize, bit_width: u8, val: u64) pub fn aya_ebpf_bindings::bindings::__BindgenBitfieldUnit::set_bit(&mut self, index: usize, val: bool) impl aya_ebpf_bindings::bindings::__BindgenBitfieldUnit @@ -3841,10 +3845,14 @@ pub aya_ebpf_bindings::bindings::bpf_insn::imm: aya_ebpf_bindings::bindings::__s pub aya_ebpf_bindings::bindings::bpf_insn::off: aya_ebpf_bindings::bindings::__s16 impl aya_ebpf_bindings::bindings::bpf_insn pub fn aya_ebpf_bindings::bindings::bpf_insn::dst_reg(&self) -> aya_ebpf_bindings::bindings::__u8 +pub unsafe fn aya_ebpf_bindings::bindings::bpf_insn::dst_reg_raw(this: *const Self) -> aya_ebpf_bindings::bindings::__u8 pub fn aya_ebpf_bindings::bindings::bpf_insn::new_bitfield_1(dst_reg: aya_ebpf_bindings::bindings::__u8, src_reg: aya_ebpf_bindings::bindings::__u8) -> aya_ebpf_bindings::bindings::__BindgenBitfieldUnit<[u8; 1]> pub fn aya_ebpf_bindings::bindings::bpf_insn::set_dst_reg(&mut self, val: aya_ebpf_bindings::bindings::__u8) +pub unsafe fn aya_ebpf_bindings::bindings::bpf_insn::set_dst_reg_raw(this: *mut Self, val: aya_ebpf_bindings::bindings::__u8) pub fn aya_ebpf_bindings::bindings::bpf_insn::set_src_reg(&mut self, val: aya_ebpf_bindings::bindings::__u8) +pub unsafe fn aya_ebpf_bindings::bindings::bpf_insn::set_src_reg_raw(this: *mut Self, val: aya_ebpf_bindings::bindings::__u8) pub fn aya_ebpf_bindings::bindings::bpf_insn::src_reg(&self) -> aya_ebpf_bindings::bindings::__u8 +pub unsafe fn aya_ebpf_bindings::bindings::bpf_insn::src_reg_raw(this: *const Self) -> aya_ebpf_bindings::bindings::__u8 impl core::clone::Clone for aya_ebpf_bindings::bindings::bpf_insn pub fn aya_ebpf_bindings::bindings::bpf_insn::clone(&self) -> aya_ebpf_bindings::bindings::bpf_insn impl core::fmt::Debug for aya_ebpf_bindings::bindings::bpf_insn @@ -5100,8 +5108,10 @@ pub aya_ebpf_bindings::bindings::bpf_prog_info::xlated_prog_insns: aya_ebpf_bind pub aya_ebpf_bindings::bindings::bpf_prog_info::xlated_prog_len: aya_ebpf_bindings::bindings::__u32 impl aya_ebpf_bindings::bindings::bpf_prog_info pub fn aya_ebpf_bindings::bindings::bpf_prog_info::gpl_compatible(&self) -> aya_ebpf_bindings::bindings::__u32 +pub unsafe fn aya_ebpf_bindings::bindings::bpf_prog_info::gpl_compatible_raw(this: *const Self) -> aya_ebpf_bindings::bindings::__u32 pub fn aya_ebpf_bindings::bindings::bpf_prog_info::new_bitfield_1(gpl_compatible: aya_ebpf_bindings::bindings::__u32) -> aya_ebpf_bindings::bindings::__BindgenBitfieldUnit<[u8; 4]> pub fn aya_ebpf_bindings::bindings::bpf_prog_info::set_gpl_compatible(&mut self, val: aya_ebpf_bindings::bindings::__u32) +pub unsafe fn aya_ebpf_bindings::bindings::bpf_prog_info::set_gpl_compatible_raw(this: *mut Self, val: aya_ebpf_bindings::bindings::__u32) impl core::clone::Clone for aya_ebpf_bindings::bindings::bpf_prog_info pub fn aya_ebpf_bindings::bindings::bpf_prog_info::clone(&self) -> aya_ebpf_bindings::bindings::bpf_prog_info impl core::fmt::Debug for aya_ebpf_bindings::bindings::bpf_prog_info @@ -6976,7 +6986,10 @@ pub const aya_ebpf_bindings::bindings::SO_TXTIME: u32 pub const aya_ebpf_bindings::bindings::SO_TYPE: u32 pub const aya_ebpf_bindings::bindings::SO_WIFI_STATUS: u32 pub const aya_ebpf_bindings::bindings::SO_ZEROCOPY: u32 +pub const aya_ebpf_bindings::bindings::TC_ACT_EXT_OPCODE_MAX: u32 pub const aya_ebpf_bindings::bindings::TC_ACT_EXT_VAL_MASK: i32 +pub const aya_ebpf_bindings::bindings::TC_ACT_GOTO_CHAIN: u32 +pub const aya_ebpf_bindings::bindings::TC_ACT_JUMP: u32 pub const aya_ebpf_bindings::bindings::TC_ACT_OK: i32 pub const aya_ebpf_bindings::bindings::TC_ACT_PIPE: i32 pub const aya_ebpf_bindings::bindings::TC_ACT_QUEUED: i32 diff --git a/xtask/public-api/aya-obj.txt b/xtask/public-api/aya-obj.txt index 374c56a6..b8c00f94 100644 --- a/xtask/public-api/aya-obj.txt +++ b/xtask/public-api/aya-obj.txt @@ -1925,6 +1925,52 @@ impl core::clone::CloneToUninit for aya_obj::generated::bpf_stats_type where pub unsafe fn aya_obj::generated::bpf_stats_type::clone_to_uninit(&self, dst: *mut u8) impl core::convert::From for aya_obj::generated::bpf_stats_type pub fn aya_obj::generated::bpf_stats_type::from(t: T) -> T +#[repr(u32)] pub enum aya_obj::generated::bpf_task_fd_type +pub aya_obj::generated::bpf_task_fd_type::BPF_FD_TYPE_KPROBE = 2 +pub aya_obj::generated::bpf_task_fd_type::BPF_FD_TYPE_KRETPROBE = 3 +pub aya_obj::generated::bpf_task_fd_type::BPF_FD_TYPE_RAW_TRACEPOINT = 0 +pub aya_obj::generated::bpf_task_fd_type::BPF_FD_TYPE_TRACEPOINT = 1 +pub aya_obj::generated::bpf_task_fd_type::BPF_FD_TYPE_UPROBE = 4 +pub aya_obj::generated::bpf_task_fd_type::BPF_FD_TYPE_URETPROBE = 5 +impl core::clone::Clone for aya_obj::generated::bpf_task_fd_type +pub fn aya_obj::generated::bpf_task_fd_type::clone(&self) -> aya_obj::generated::bpf_task_fd_type +impl core::cmp::Eq for aya_obj::generated::bpf_task_fd_type +impl core::cmp::PartialEq for aya_obj::generated::bpf_task_fd_type +pub fn aya_obj::generated::bpf_task_fd_type::eq(&self, other: &aya_obj::generated::bpf_task_fd_type) -> bool +impl core::fmt::Debug for aya_obj::generated::bpf_task_fd_type +pub fn aya_obj::generated::bpf_task_fd_type::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result +impl core::hash::Hash for aya_obj::generated::bpf_task_fd_type +pub fn aya_obj::generated::bpf_task_fd_type::hash<__H: core::hash::Hasher>(&self, state: &mut __H) +impl core::marker::Copy for aya_obj::generated::bpf_task_fd_type +impl core::marker::StructuralPartialEq for aya_obj::generated::bpf_task_fd_type +impl core::marker::Freeze for aya_obj::generated::bpf_task_fd_type +impl core::marker::Send for aya_obj::generated::bpf_task_fd_type +impl core::marker::Sync for aya_obj::generated::bpf_task_fd_type +impl core::marker::Unpin for aya_obj::generated::bpf_task_fd_type +impl core::panic::unwind_safe::RefUnwindSafe for aya_obj::generated::bpf_task_fd_type +impl core::panic::unwind_safe::UnwindSafe for aya_obj::generated::bpf_task_fd_type +impl core::convert::Into for aya_obj::generated::bpf_task_fd_type where U: core::convert::From +pub fn aya_obj::generated::bpf_task_fd_type::into(self) -> U +impl core::convert::TryFrom for aya_obj::generated::bpf_task_fd_type where U: core::convert::Into +pub type aya_obj::generated::bpf_task_fd_type::Error = core::convert::Infallible +pub fn aya_obj::generated::bpf_task_fd_type::try_from(value: U) -> core::result::Result>::Error> +impl core::convert::TryInto for aya_obj::generated::bpf_task_fd_type where U: core::convert::TryFrom +pub type aya_obj::generated::bpf_task_fd_type::Error = >::Error +pub fn aya_obj::generated::bpf_task_fd_type::try_into(self) -> core::result::Result>::Error> +impl alloc::borrow::ToOwned for aya_obj::generated::bpf_task_fd_type where T: core::clone::Clone +pub type aya_obj::generated::bpf_task_fd_type::Owned = T +pub fn aya_obj::generated::bpf_task_fd_type::clone_into(&self, target: &mut T) +pub fn aya_obj::generated::bpf_task_fd_type::to_owned(&self) -> T +impl core::any::Any for aya_obj::generated::bpf_task_fd_type where T: 'static + ?core::marker::Sized +pub fn aya_obj::generated::bpf_task_fd_type::type_id(&self) -> core::any::TypeId +impl core::borrow::Borrow for aya_obj::generated::bpf_task_fd_type where T: ?core::marker::Sized +pub fn aya_obj::generated::bpf_task_fd_type::borrow(&self) -> &T +impl core::borrow::BorrowMut for aya_obj::generated::bpf_task_fd_type where T: ?core::marker::Sized +pub fn aya_obj::generated::bpf_task_fd_type::borrow_mut(&mut self) -> &mut T +impl core::clone::CloneToUninit for aya_obj::generated::bpf_task_fd_type where T: core::clone::Clone +pub unsafe fn aya_obj::generated::bpf_task_fd_type::clone_to_uninit(&self, dst: *mut u8) +impl core::convert::From for aya_obj::generated::bpf_task_fd_type +pub fn aya_obj::generated::bpf_task_fd_type::from(t: T) -> T #[repr(u32)] pub enum aya_obj::generated::btf_func_linkage pub aya_obj::generated::btf_func_linkage::BTF_FUNC_EXTERN = 2 pub aya_obj::generated::btf_func_linkage::BTF_FUNC_GLOBAL = 1 @@ -3394,6 +3440,10 @@ pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1::from(t: T) -> T impl aya_obj::generated::__BindgenBitfieldUnit where Storage: core::convert::AsRef<[u8]> + core::convert::AsMut<[u8]> pub fn aya_obj::generated::__BindgenBitfieldUnit::get(&self, bit_offset: usize, bit_width: u8) -> u64 pub fn aya_obj::generated::__BindgenBitfieldUnit::get_bit(&self, index: usize) -> bool +pub unsafe fn aya_obj::generated::__BindgenBitfieldUnit::raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 +pub unsafe fn aya_obj::generated::__BindgenBitfieldUnit::raw_get_bit(this: *const Self, index: usize) -> bool +pub unsafe fn aya_obj::generated::__BindgenBitfieldUnit::raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) +pub unsafe fn aya_obj::generated::__BindgenBitfieldUnit::raw_set_bit(this: *mut Self, index: usize, val: bool) pub fn aya_obj::generated::__BindgenBitfieldUnit::set(&mut self, bit_offset: usize, bit_width: u8, val: u64) pub fn aya_obj::generated::__BindgenBitfieldUnit::set_bit(&mut self, index: usize, val: bool) impl aya_obj::generated::__BindgenBitfieldUnit @@ -4768,10 +4818,14 @@ pub aya_obj::generated::bpf_insn::imm: aya_obj::generated::__s32 pub aya_obj::generated::bpf_insn::off: aya_obj::generated::__s16 impl aya_obj::generated::bpf_insn pub fn aya_obj::generated::bpf_insn::dst_reg(&self) -> aya_obj::generated::__u8 +pub unsafe fn aya_obj::generated::bpf_insn::dst_reg_raw(this: *const Self) -> aya_obj::generated::__u8 pub fn aya_obj::generated::bpf_insn::new_bitfield_1(dst_reg: aya_obj::generated::__u8, src_reg: aya_obj::generated::__u8) -> aya_obj::generated::__BindgenBitfieldUnit<[u8; 1]> pub fn aya_obj::generated::bpf_insn::set_dst_reg(&mut self, val: aya_obj::generated::__u8) +pub unsafe fn aya_obj::generated::bpf_insn::set_dst_reg_raw(this: *mut Self, val: aya_obj::generated::__u8) pub fn aya_obj::generated::bpf_insn::set_src_reg(&mut self, val: aya_obj::generated::__u8) +pub unsafe fn aya_obj::generated::bpf_insn::set_src_reg_raw(this: *mut Self, val: aya_obj::generated::__u8) pub fn aya_obj::generated::bpf_insn::src_reg(&self) -> aya_obj::generated::__u8 +pub unsafe fn aya_obj::generated::bpf_insn::src_reg_raw(this: *const Self) -> aya_obj::generated::__u8 impl core::clone::Clone for aya_obj::generated::bpf_insn pub fn aya_obj::generated::bpf_insn::clone(&self) -> aya_obj::generated::bpf_insn impl core::fmt::Debug for aya_obj::generated::bpf_insn @@ -5745,8 +5799,10 @@ pub aya_obj::generated::bpf_prog_info::xlated_prog_insns: aya_obj::generated::__ pub aya_obj::generated::bpf_prog_info::xlated_prog_len: aya_obj::generated::__u32 impl aya_obj::generated::bpf_prog_info pub fn aya_obj::generated::bpf_prog_info::gpl_compatible(&self) -> aya_obj::generated::__u32 +pub unsafe fn aya_obj::generated::bpf_prog_info::gpl_compatible_raw(this: *const Self) -> aya_obj::generated::__u32 pub fn aya_obj::generated::bpf_prog_info::new_bitfield_1(gpl_compatible: aya_obj::generated::__u32) -> aya_obj::generated::__BindgenBitfieldUnit<[u8; 4]> pub fn aya_obj::generated::bpf_prog_info::set_gpl_compatible(&mut self, val: aya_obj::generated::__u32) +pub unsafe fn aya_obj::generated::bpf_prog_info::set_gpl_compatible_raw(this: *mut Self, val: aya_obj::generated::__u32) impl core::clone::Clone for aya_obj::generated::bpf_prog_info pub fn aya_obj::generated::bpf_prog_info::clone(&self) -> aya_obj::generated::bpf_prog_info impl core::fmt::Debug for aya_obj::generated::bpf_prog_info @@ -6221,82 +6277,158 @@ pub aya_obj::generated::perf_event_attr::size: aya_obj::generated::__u32 pub aya_obj::generated::perf_event_attr::type_: aya_obj::generated::__u32 impl aya_obj::generated::perf_event_attr pub fn aya_obj::generated::perf_event_attr::__reserved_1(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::__reserved_1_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::aux_output(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::aux_output_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::bpf_event(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::bpf_event_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::build_id(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::build_id_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::cgroup(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::cgroup_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::comm(&self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::comm_exec(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::comm_exec_raw(this: *const Self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::comm_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::context_switch(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::context_switch_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::disabled(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::disabled_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::enable_on_exec(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::enable_on_exec_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclude_callchain_kernel(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclude_callchain_kernel_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclude_callchain_user(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclude_callchain_user_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclude_guest(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclude_guest_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclude_host(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclude_host_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclude_hv(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclude_hv_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclude_idle(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclude_idle_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclude_kernel(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclude_kernel_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclude_user(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclude_user_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::exclusive(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::exclusive_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::freq(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::freq_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::inherit(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::inherit_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::inherit_stat(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::inherit_stat_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::inherit_thread(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::inherit_thread_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::ksymbol(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::ksymbol_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::mmap(&self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::mmap2(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::mmap2_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::mmap_data(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::mmap_data_raw(this: *const Self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::mmap_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::namespaces(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::namespaces_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::new_bitfield_1(disabled: aya_obj::generated::__u64, inherit: aya_obj::generated::__u64, pinned: aya_obj::generated::__u64, exclusive: aya_obj::generated::__u64, exclude_user: aya_obj::generated::__u64, exclude_kernel: aya_obj::generated::__u64, exclude_hv: aya_obj::generated::__u64, exclude_idle: aya_obj::generated::__u64, mmap: aya_obj::generated::__u64, comm: aya_obj::generated::__u64, freq: aya_obj::generated::__u64, inherit_stat: aya_obj::generated::__u64, enable_on_exec: aya_obj::generated::__u64, task: aya_obj::generated::__u64, watermark: aya_obj::generated::__u64, precise_ip: aya_obj::generated::__u64, mmap_data: aya_obj::generated::__u64, sample_id_all: aya_obj::generated::__u64, exclude_host: aya_obj::generated::__u64, exclude_guest: aya_obj::generated::__u64, exclude_callchain_kernel: aya_obj::generated::__u64, exclude_callchain_user: aya_obj::generated::__u64, mmap2: aya_obj::generated::__u64, comm_exec: aya_obj::generated::__u64, use_clockid: aya_obj::generated::__u64, context_switch: aya_obj::generated::__u64, write_backward: aya_obj::generated::__u64, namespaces: aya_obj::generated::__u64, ksymbol: aya_obj::generated::__u64, bpf_event: aya_obj::generated::__u64, aux_output: aya_obj::generated::__u64, cgroup: aya_obj::generated::__u64, text_poke: aya_obj::generated::__u64, build_id: aya_obj::generated::__u64, inherit_thread: aya_obj::generated::__u64, remove_on_exec: aya_obj::generated::__u64, sigtrap: aya_obj::generated::__u64, __reserved_1: aya_obj::generated::__u64) -> aya_obj::generated::__BindgenBitfieldUnit<[u8; 8]> pub fn aya_obj::generated::perf_event_attr::pinned(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::pinned_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::precise_ip(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::precise_ip_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::remove_on_exec(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::remove_on_exec_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::sample_id_all(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::sample_id_all_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::set___reserved_1(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set___reserved_1_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_aux_output(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_aux_output_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_bpf_event(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_bpf_event_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_build_id(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_build_id_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_cgroup(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_cgroup_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_comm(&mut self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_comm_exec(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_comm_exec_raw(this: *mut Self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_comm_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_context_switch(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_context_switch_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_disabled(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_disabled_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_enable_on_exec(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_enable_on_exec_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclude_callchain_kernel(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclude_callchain_kernel_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclude_callchain_user(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclude_callchain_user_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclude_guest(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclude_guest_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclude_host(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclude_host_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclude_hv(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclude_hv_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclude_idle(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclude_idle_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclude_kernel(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclude_kernel_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclude_user(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclude_user_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_exclusive(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_exclusive_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_freq(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_freq_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_inherit(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_inherit_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_inherit_stat(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_inherit_stat_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_inherit_thread(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_inherit_thread_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_ksymbol(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_ksymbol_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_mmap(&mut self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_mmap2(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_mmap2_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_mmap_data(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_mmap_data_raw(this: *mut Self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_mmap_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_namespaces(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_namespaces_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_pinned(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_pinned_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_precise_ip(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_precise_ip_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_remove_on_exec(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_remove_on_exec_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_sample_id_all(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_sample_id_all_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_sigtrap(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_sigtrap_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_task(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_task_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_text_poke(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_text_poke_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_use_clockid(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_use_clockid_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_watermark(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_watermark_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::set_write_backward(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_attr::set_write_backward_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_attr::sigtrap(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::sigtrap_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::task(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::task_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::text_poke(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::text_poke_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::use_clockid(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::use_clockid_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::watermark(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::watermark_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_attr::write_backward(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_attr::write_backward_raw(this: *const Self) -> aya_obj::generated::__u64 impl core::clone::Clone for aya_obj::generated::perf_event_attr pub fn aya_obj::generated::perf_event_attr::clone(&self) -> aya_obj::generated::perf_event_attr impl core::marker::Copy for aya_obj::generated::perf_event_attr @@ -6428,20 +6560,34 @@ pub aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::_bitfi pub aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::_bitfield_align_1: [u64; 0] impl aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_____res(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_____res_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_bit0(&self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_bit0_is_deprecated(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_bit0_is_deprecated_raw(this: *const Self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_bit0_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_user_rdpmc(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_user_rdpmc_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_user_time(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_user_time_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_user_time_short(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_user_time_short_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_user_time_zero(&self) -> aya_obj::generated::__u64 +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::cap_user_time_zero_raw(this: *const Self) -> aya_obj::generated::__u64 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::new_bitfield_1(cap_bit0: aya_obj::generated::__u64, cap_bit0_is_deprecated: aya_obj::generated::__u64, cap_user_rdpmc: aya_obj::generated::__u64, cap_user_time: aya_obj::generated::__u64, cap_user_time_zero: aya_obj::generated::__u64, cap_user_time_short: aya_obj::generated::__u64, cap_____res: aya_obj::generated::__u64) -> aya_obj::generated::__BindgenBitfieldUnit<[u8; 8]> pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_____res(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_____res_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_bit0(&mut self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_bit0_is_deprecated(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_bit0_is_deprecated_raw(this: *mut Self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_bit0_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_user_rdpmc(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_user_rdpmc_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_user_time(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_user_time_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_user_time_short(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_user_time_short_raw(this: *mut Self, val: aya_obj::generated::__u64) pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_user_time_zero(&mut self, val: aya_obj::generated::__u64) +pub unsafe fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::set_cap_user_time_zero_raw(this: *mut Self, val: aya_obj::generated::__u64) impl core::clone::Clone for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 pub fn aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1::clone(&self) -> aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 impl core::fmt::Debug for aya_obj::generated::perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 @@ -6671,6 +6817,18 @@ pub const aya_obj::generated::NFPROTO_NUMPROTO: aya_obj::generated::_bindgen_ty_ pub const aya_obj::generated::NFPROTO_UNSPEC: aya_obj::generated::_bindgen_ty_99 pub const aya_obj::generated::NLMSG_ALIGNTO: u32 pub const aya_obj::generated::NR_BTF_KINDS: aya_obj::generated::_bindgen_ty_42 +pub const aya_obj::generated::PERF_EVENT_IOC_DISABLE: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_ENABLE: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_ID: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_MODIFY_ATTRIBUTES: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_PAUSE_OUTPUT: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_PERIOD: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_QUERY_BPF: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_REFRESH: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_RESET: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_SET_BPF: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_SET_FILTER: u32 +pub const aya_obj::generated::PERF_EVENT_IOC_SET_OUTPUT: u32 pub const aya_obj::generated::PERF_FLAG_FD_CLOEXEC: u32 pub const aya_obj::generated::PERF_FLAG_FD_NO_GROUP: u32 pub const aya_obj::generated::PERF_FLAG_FD_OUTPUT: u32