diff --git a/aya/src/generated/linux_bindings_aarch64.rs b/aya/src/generated/linux_bindings_aarch64.rs index ace0f73e..a86e49f8 100644 --- a/aya/src/generated/linux_bindings_aarch64.rs +++ b/aya/src/generated/linux_bindings_aarch64.rs @@ -259,6 +259,7 @@ pub enum bpf_map_type { BPF_MAP_TYPE_RINGBUF = 27, BPF_MAP_TYPE_INODE_STORAGE = 28, BPF_MAP_TYPE_TASK_STORAGE = 29, + BPF_MAP_TYPE_BLOOM_FILTER = 30, } #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -382,6 +383,7 @@ pub struct bpf_attr__bindgen_ty_1 { pub btf_key_type_id: __u32, pub btf_value_type_id: __u32, pub btf_vmlinux_value_type_id: __u32, + pub map_extra: __u64, } #[repr(C)] #[derive(Copy, Clone)] @@ -648,6 +650,7 @@ pub struct bpf_prog_info { pub run_time_ns: __u64, pub run_cnt: __u64, pub recursion_misses: __u64, + pub verified_insns: __u32, } impl bpf_prog_info { #[inline] @@ -713,7 +716,7 @@ pub const BTF_KIND_FUNC_PROTO: ::std::os::raw::c_uint = 13; pub const BTF_KIND_VAR: ::std::os::raw::c_uint = 14; pub const BTF_KIND_DATASEC: ::std::os::raw::c_uint = 15; pub const BTF_KIND_FLOAT: ::std::os::raw::c_uint = 16; -pub const BTF_KIND_TAG: ::std::os::raw::c_uint = 17; +pub const BTF_KIND_DECL_TAG: ::std::os::raw::c_uint = 17; pub const NR_BTF_KINDS: ::std::os::raw::c_uint = 18; pub const BTF_KIND_MAX: ::std::os::raw::c_uint = 17; pub type _bindgen_ty_37 = ::std::os::raw::c_uint; @@ -822,8 +825,7 @@ pub enum perf_sw_ids { 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, + PERF_COUNT_SW_MAX = 11, } #[repr(u64)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -848,12 +850,7 @@ pub enum perf_event_sample_format { 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, + PERF_SAMPLE_MAX = 1048576, __PERF_SAMPLE_CALLCHAIN_EARLY = 9223372036854775808, } #[repr(C)] @@ -879,9 +876,6 @@ pub struct perf_event_attr { 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, } #[repr(C)] #[derive(Copy, Clone)] @@ -1254,80 +1248,14 @@ impl perf_event_attr { } } #[inline] - pub fn cgroup(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } - } - #[inline] - pub fn set_cgroup(&mut self, val: __u64) { - unsafe { - let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(32usize, 1u8, val as u64) - } - } - #[inline] - pub fn text_poke(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } - } - #[inline] - pub fn set_text_poke(&mut self, val: __u64) { - unsafe { - let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(33usize, 1u8, val as u64) - } - } - #[inline] - pub fn build_id(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } - } - #[inline] - pub fn set_build_id(&mut self, val: __u64) { - unsafe { - let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(34usize, 1u8, val as u64) - } - } - #[inline] - pub fn inherit_thread(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } - } - #[inline] - pub fn set_inherit_thread(&mut self, val: __u64) { - unsafe { - let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(35usize, 1u8, val as u64) - } - } - #[inline] - pub fn remove_on_exec(&self) -> __u64 { - unsafe { ::std::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 = ::std::mem::transmute(val); - self._bitfield_1.set(36usize, 1u8, val as u64) - } - } - #[inline] - pub fn sigtrap(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } - } - #[inline] - pub fn set_sigtrap(&mut self, val: __u64) { - unsafe { - let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(37usize, 1u8, val as u64) - } - } - #[inline] pub fn __reserved_1(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } + unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 32u8) as u64) } } #[inline] pub fn set___reserved_1(&mut self, val: __u64) { unsafe { let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(38usize, 26u8, val as u64) + self._bitfield_1.set(32usize, 32u8, val as u64) } } #[inline] @@ -1363,12 +1291,6 @@ impl perf_event_attr { 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(); @@ -1498,31 +1420,7 @@ impl perf_event_attr { let aux_output: u64 = unsafe { ::std::mem::transmute(aux_output) }; aux_output as u64 }); - __bindgen_bitfield_unit.set(32usize, 1u8, { - let cgroup: u64 = unsafe { ::std::mem::transmute(cgroup) }; - cgroup as u64 - }); - __bindgen_bitfield_unit.set(33usize, 1u8, { - let text_poke: u64 = unsafe { ::std::mem::transmute(text_poke) }; - text_poke as u64 - }); - __bindgen_bitfield_unit.set(34usize, 1u8, { - let build_id: u64 = unsafe { ::std::mem::transmute(build_id) }; - build_id as u64 - }); - __bindgen_bitfield_unit.set(35usize, 1u8, { - let inherit_thread: u64 = unsafe { ::std::mem::transmute(inherit_thread) }; - inherit_thread as u64 - }); - __bindgen_bitfield_unit.set(36usize, 1u8, { - let remove_on_exec: u64 = unsafe { ::std::mem::transmute(remove_on_exec) }; - remove_on_exec as u64 - }); - __bindgen_bitfield_unit.set(37usize, 1u8, { - let sigtrap: u64 = unsafe { ::std::mem::transmute(sigtrap) }; - sigtrap as u64 - }); - __bindgen_bitfield_unit.set(38usize, 26u8, { + __bindgen_bitfield_unit.set(32usize, 32u8, { let __reserved_1: u64 = unsafe { ::std::mem::transmute(__reserved_1) }; __reserved_1 as u64 }); @@ -1546,10 +1444,7 @@ pub struct perf_event_mmap_page { 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 __reserved: [__u8; 948usize], pub data_head: __u64, pub data_tail: __u64, pub data_offset: __u64, @@ -1629,25 +1524,14 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] - pub fn cap_user_time_short(&self) -> __u64 { - unsafe { ::std::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 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] pub fn cap_____res(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 59u8) as u64) } } #[inline] pub fn set_cap_____res(&mut self, val: __u64) { unsafe { let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(6usize, 58u8, val as u64) + self._bitfield_1.set(5usize, 59u8, val as u64) } } #[inline] @@ -1657,7 +1541,6 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { 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(); @@ -1682,11 +1565,7 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { let cap_user_time_zero: u64 = unsafe { ::std::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 { ::std::mem::transmute(cap_user_time_short) }; - cap_user_time_short as u64 - }); - __bindgen_bitfield_unit.set(6usize, 58u8, { + __bindgen_bitfield_unit.set(5usize, 59u8, { let cap_____res: u64 = unsafe { ::std::mem::transmute(cap_____res) }; cap_____res as u64 }); @@ -1721,9 +1600,7 @@ pub enum perf_event_type { PERF_RECORD_NAMESPACES = 16, PERF_RECORD_KSYMBOL = 17, PERF_RECORD_BPF_EVENT = 18, - PERF_RECORD_CGROUP = 19, - PERF_RECORD_TEXT_POKE = 20, - PERF_RECORD_MAX = 21, + PERF_RECORD_MAX = 19, } pub const IFLA_XDP_UNSPEC: _bindgen_ty_81 = _bindgen_ty_81::IFLA_XDP_UNSPEC; pub const IFLA_XDP_FD: _bindgen_ty_81 = _bindgen_ty_81::IFLA_XDP_FD; @@ -1770,26 +1647,25 @@ pub struct tcmsg { pub tcm_parent: __u32, pub tcm_info: __u32, } -pub const TCA_UNSPEC: _bindgen_ty_95 = _bindgen_ty_95::TCA_UNSPEC; -pub const TCA_KIND: _bindgen_ty_95 = _bindgen_ty_95::TCA_KIND; -pub const TCA_OPTIONS: _bindgen_ty_95 = _bindgen_ty_95::TCA_OPTIONS; -pub const TCA_STATS: _bindgen_ty_95 = _bindgen_ty_95::TCA_STATS; -pub const TCA_XSTATS: _bindgen_ty_95 = _bindgen_ty_95::TCA_XSTATS; -pub const TCA_RATE: _bindgen_ty_95 = _bindgen_ty_95::TCA_RATE; -pub const TCA_FCNT: _bindgen_ty_95 = _bindgen_ty_95::TCA_FCNT; -pub const TCA_STATS2: _bindgen_ty_95 = _bindgen_ty_95::TCA_STATS2; -pub const TCA_STAB: _bindgen_ty_95 = _bindgen_ty_95::TCA_STAB; -pub const TCA_PAD: _bindgen_ty_95 = _bindgen_ty_95::TCA_PAD; -pub const TCA_DUMP_INVISIBLE: _bindgen_ty_95 = _bindgen_ty_95::TCA_DUMP_INVISIBLE; -pub const TCA_CHAIN: _bindgen_ty_95 = _bindgen_ty_95::TCA_CHAIN; -pub const TCA_HW_OFFLOAD: _bindgen_ty_95 = _bindgen_ty_95::TCA_HW_OFFLOAD; -pub const TCA_INGRESS_BLOCK: _bindgen_ty_95 = _bindgen_ty_95::TCA_INGRESS_BLOCK; -pub const TCA_EGRESS_BLOCK: _bindgen_ty_95 = _bindgen_ty_95::TCA_EGRESS_BLOCK; -pub const TCA_DUMP_FLAGS: _bindgen_ty_95 = _bindgen_ty_95::TCA_DUMP_FLAGS; -pub const __TCA_MAX: _bindgen_ty_95 = _bindgen_ty_95::__TCA_MAX; +pub const TCA_UNSPEC: _bindgen_ty_93 = _bindgen_ty_93::TCA_UNSPEC; +pub const TCA_KIND: _bindgen_ty_93 = _bindgen_ty_93::TCA_KIND; +pub const TCA_OPTIONS: _bindgen_ty_93 = _bindgen_ty_93::TCA_OPTIONS; +pub const TCA_STATS: _bindgen_ty_93 = _bindgen_ty_93::TCA_STATS; +pub const TCA_XSTATS: _bindgen_ty_93 = _bindgen_ty_93::TCA_XSTATS; +pub const TCA_RATE: _bindgen_ty_93 = _bindgen_ty_93::TCA_RATE; +pub const TCA_FCNT: _bindgen_ty_93 = _bindgen_ty_93::TCA_FCNT; +pub const TCA_STATS2: _bindgen_ty_93 = _bindgen_ty_93::TCA_STATS2; +pub const TCA_STAB: _bindgen_ty_93 = _bindgen_ty_93::TCA_STAB; +pub const TCA_PAD: _bindgen_ty_93 = _bindgen_ty_93::TCA_PAD; +pub const TCA_DUMP_INVISIBLE: _bindgen_ty_93 = _bindgen_ty_93::TCA_DUMP_INVISIBLE; +pub const TCA_CHAIN: _bindgen_ty_93 = _bindgen_ty_93::TCA_CHAIN; +pub const TCA_HW_OFFLOAD: _bindgen_ty_93 = _bindgen_ty_93::TCA_HW_OFFLOAD; +pub const TCA_INGRESS_BLOCK: _bindgen_ty_93 = _bindgen_ty_93::TCA_INGRESS_BLOCK; +pub const TCA_EGRESS_BLOCK: _bindgen_ty_93 = _bindgen_ty_93::TCA_EGRESS_BLOCK; +pub const __TCA_MAX: _bindgen_ty_93 = _bindgen_ty_93::__TCA_MAX; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum _bindgen_ty_95 { +pub enum _bindgen_ty_93 { TCA_UNSPEC = 0, TCA_KIND = 1, TCA_OPTIONS = 2, @@ -1805,25 +1681,24 @@ pub enum _bindgen_ty_95 { TCA_HW_OFFLOAD = 12, TCA_INGRESS_BLOCK = 13, TCA_EGRESS_BLOCK = 14, - TCA_DUMP_FLAGS = 15, - __TCA_MAX = 16, -} -pub const TCA_BPF_UNSPEC: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_UNSPEC; -pub const TCA_BPF_ACT: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_ACT; -pub const TCA_BPF_POLICE: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_POLICE; -pub const TCA_BPF_CLASSID: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_CLASSID; -pub const TCA_BPF_OPS_LEN: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_OPS_LEN; -pub const TCA_BPF_OPS: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_OPS; -pub const TCA_BPF_FD: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FD; -pub const TCA_BPF_NAME: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_NAME; -pub const TCA_BPF_FLAGS: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FLAGS; -pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FLAGS_GEN; -pub const TCA_BPF_TAG: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_TAG; -pub const TCA_BPF_ID: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_ID; -pub const __TCA_BPF_MAX: _bindgen_ty_151 = _bindgen_ty_151::__TCA_BPF_MAX; + __TCA_MAX = 15, +} +pub const TCA_BPF_UNSPEC: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_UNSPEC; +pub const TCA_BPF_ACT: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_ACT; +pub const TCA_BPF_POLICE: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_POLICE; +pub const TCA_BPF_CLASSID: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_CLASSID; +pub const TCA_BPF_OPS_LEN: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_OPS_LEN; +pub const TCA_BPF_OPS: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_OPS; +pub const TCA_BPF_FD: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_FD; +pub const TCA_BPF_NAME: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_NAME; +pub const TCA_BPF_FLAGS: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_FLAGS; +pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_FLAGS_GEN; +pub const TCA_BPF_TAG: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_TAG; +pub const TCA_BPF_ID: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_ID; +pub const __TCA_BPF_MAX: _bindgen_ty_149 = _bindgen_ty_149::__TCA_BPF_MAX; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum _bindgen_ty_151 { +pub enum _bindgen_ty_149 { TCA_BPF_UNSPEC = 0, TCA_BPF_ACT = 1, TCA_BPF_POLICE = 2, diff --git a/aya/src/generated/linux_bindings_armv7.rs b/aya/src/generated/linux_bindings_armv7.rs index ace0f73e..a86e49f8 100644 --- a/aya/src/generated/linux_bindings_armv7.rs +++ b/aya/src/generated/linux_bindings_armv7.rs @@ -259,6 +259,7 @@ pub enum bpf_map_type { BPF_MAP_TYPE_RINGBUF = 27, BPF_MAP_TYPE_INODE_STORAGE = 28, BPF_MAP_TYPE_TASK_STORAGE = 29, + BPF_MAP_TYPE_BLOOM_FILTER = 30, } #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -382,6 +383,7 @@ pub struct bpf_attr__bindgen_ty_1 { pub btf_key_type_id: __u32, pub btf_value_type_id: __u32, pub btf_vmlinux_value_type_id: __u32, + pub map_extra: __u64, } #[repr(C)] #[derive(Copy, Clone)] @@ -648,6 +650,7 @@ pub struct bpf_prog_info { pub run_time_ns: __u64, pub run_cnt: __u64, pub recursion_misses: __u64, + pub verified_insns: __u32, } impl bpf_prog_info { #[inline] @@ -713,7 +716,7 @@ pub const BTF_KIND_FUNC_PROTO: ::std::os::raw::c_uint = 13; pub const BTF_KIND_VAR: ::std::os::raw::c_uint = 14; pub const BTF_KIND_DATASEC: ::std::os::raw::c_uint = 15; pub const BTF_KIND_FLOAT: ::std::os::raw::c_uint = 16; -pub const BTF_KIND_TAG: ::std::os::raw::c_uint = 17; +pub const BTF_KIND_DECL_TAG: ::std::os::raw::c_uint = 17; pub const NR_BTF_KINDS: ::std::os::raw::c_uint = 18; pub const BTF_KIND_MAX: ::std::os::raw::c_uint = 17; pub type _bindgen_ty_37 = ::std::os::raw::c_uint; @@ -822,8 +825,7 @@ pub enum perf_sw_ids { 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, + PERF_COUNT_SW_MAX = 11, } #[repr(u64)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -848,12 +850,7 @@ pub enum perf_event_sample_format { 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, + PERF_SAMPLE_MAX = 1048576, __PERF_SAMPLE_CALLCHAIN_EARLY = 9223372036854775808, } #[repr(C)] @@ -879,9 +876,6 @@ pub struct perf_event_attr { 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, } #[repr(C)] #[derive(Copy, Clone)] @@ -1254,80 +1248,14 @@ impl perf_event_attr { } } #[inline] - pub fn cgroup(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } - } - #[inline] - pub fn set_cgroup(&mut self, val: __u64) { - unsafe { - let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(32usize, 1u8, val as u64) - } - } - #[inline] - pub fn text_poke(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } - } - #[inline] - pub fn set_text_poke(&mut self, val: __u64) { - unsafe { - let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(33usize, 1u8, val as u64) - } - } - #[inline] - pub fn build_id(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } - } - #[inline] - pub fn set_build_id(&mut self, val: __u64) { - unsafe { - let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(34usize, 1u8, val as u64) - } - } - #[inline] - pub fn inherit_thread(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } - } - #[inline] - pub fn set_inherit_thread(&mut self, val: __u64) { - unsafe { - let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(35usize, 1u8, val as u64) - } - } - #[inline] - pub fn remove_on_exec(&self) -> __u64 { - unsafe { ::std::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 = ::std::mem::transmute(val); - self._bitfield_1.set(36usize, 1u8, val as u64) - } - } - #[inline] - pub fn sigtrap(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } - } - #[inline] - pub fn set_sigtrap(&mut self, val: __u64) { - unsafe { - let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(37usize, 1u8, val as u64) - } - } - #[inline] pub fn __reserved_1(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } + unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 32u8) as u64) } } #[inline] pub fn set___reserved_1(&mut self, val: __u64) { unsafe { let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(38usize, 26u8, val as u64) + self._bitfield_1.set(32usize, 32u8, val as u64) } } #[inline] @@ -1363,12 +1291,6 @@ impl perf_event_attr { 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(); @@ -1498,31 +1420,7 @@ impl perf_event_attr { let aux_output: u64 = unsafe { ::std::mem::transmute(aux_output) }; aux_output as u64 }); - __bindgen_bitfield_unit.set(32usize, 1u8, { - let cgroup: u64 = unsafe { ::std::mem::transmute(cgroup) }; - cgroup as u64 - }); - __bindgen_bitfield_unit.set(33usize, 1u8, { - let text_poke: u64 = unsafe { ::std::mem::transmute(text_poke) }; - text_poke as u64 - }); - __bindgen_bitfield_unit.set(34usize, 1u8, { - let build_id: u64 = unsafe { ::std::mem::transmute(build_id) }; - build_id as u64 - }); - __bindgen_bitfield_unit.set(35usize, 1u8, { - let inherit_thread: u64 = unsafe { ::std::mem::transmute(inherit_thread) }; - inherit_thread as u64 - }); - __bindgen_bitfield_unit.set(36usize, 1u8, { - let remove_on_exec: u64 = unsafe { ::std::mem::transmute(remove_on_exec) }; - remove_on_exec as u64 - }); - __bindgen_bitfield_unit.set(37usize, 1u8, { - let sigtrap: u64 = unsafe { ::std::mem::transmute(sigtrap) }; - sigtrap as u64 - }); - __bindgen_bitfield_unit.set(38usize, 26u8, { + __bindgen_bitfield_unit.set(32usize, 32u8, { let __reserved_1: u64 = unsafe { ::std::mem::transmute(__reserved_1) }; __reserved_1 as u64 }); @@ -1546,10 +1444,7 @@ pub struct perf_event_mmap_page { 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 __reserved: [__u8; 948usize], pub data_head: __u64, pub data_tail: __u64, pub data_offset: __u64, @@ -1629,25 +1524,14 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] - pub fn cap_user_time_short(&self) -> __u64 { - unsafe { ::std::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 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] pub fn cap_____res(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 59u8) as u64) } } #[inline] pub fn set_cap_____res(&mut self, val: __u64) { unsafe { let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(6usize, 58u8, val as u64) + self._bitfield_1.set(5usize, 59u8, val as u64) } } #[inline] @@ -1657,7 +1541,6 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { 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(); @@ -1682,11 +1565,7 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { let cap_user_time_zero: u64 = unsafe { ::std::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 { ::std::mem::transmute(cap_user_time_short) }; - cap_user_time_short as u64 - }); - __bindgen_bitfield_unit.set(6usize, 58u8, { + __bindgen_bitfield_unit.set(5usize, 59u8, { let cap_____res: u64 = unsafe { ::std::mem::transmute(cap_____res) }; cap_____res as u64 }); @@ -1721,9 +1600,7 @@ pub enum perf_event_type { PERF_RECORD_NAMESPACES = 16, PERF_RECORD_KSYMBOL = 17, PERF_RECORD_BPF_EVENT = 18, - PERF_RECORD_CGROUP = 19, - PERF_RECORD_TEXT_POKE = 20, - PERF_RECORD_MAX = 21, + PERF_RECORD_MAX = 19, } pub const IFLA_XDP_UNSPEC: _bindgen_ty_81 = _bindgen_ty_81::IFLA_XDP_UNSPEC; pub const IFLA_XDP_FD: _bindgen_ty_81 = _bindgen_ty_81::IFLA_XDP_FD; @@ -1770,26 +1647,25 @@ pub struct tcmsg { pub tcm_parent: __u32, pub tcm_info: __u32, } -pub const TCA_UNSPEC: _bindgen_ty_95 = _bindgen_ty_95::TCA_UNSPEC; -pub const TCA_KIND: _bindgen_ty_95 = _bindgen_ty_95::TCA_KIND; -pub const TCA_OPTIONS: _bindgen_ty_95 = _bindgen_ty_95::TCA_OPTIONS; -pub const TCA_STATS: _bindgen_ty_95 = _bindgen_ty_95::TCA_STATS; -pub const TCA_XSTATS: _bindgen_ty_95 = _bindgen_ty_95::TCA_XSTATS; -pub const TCA_RATE: _bindgen_ty_95 = _bindgen_ty_95::TCA_RATE; -pub const TCA_FCNT: _bindgen_ty_95 = _bindgen_ty_95::TCA_FCNT; -pub const TCA_STATS2: _bindgen_ty_95 = _bindgen_ty_95::TCA_STATS2; -pub const TCA_STAB: _bindgen_ty_95 = _bindgen_ty_95::TCA_STAB; -pub const TCA_PAD: _bindgen_ty_95 = _bindgen_ty_95::TCA_PAD; -pub const TCA_DUMP_INVISIBLE: _bindgen_ty_95 = _bindgen_ty_95::TCA_DUMP_INVISIBLE; -pub const TCA_CHAIN: _bindgen_ty_95 = _bindgen_ty_95::TCA_CHAIN; -pub const TCA_HW_OFFLOAD: _bindgen_ty_95 = _bindgen_ty_95::TCA_HW_OFFLOAD; -pub const TCA_INGRESS_BLOCK: _bindgen_ty_95 = _bindgen_ty_95::TCA_INGRESS_BLOCK; -pub const TCA_EGRESS_BLOCK: _bindgen_ty_95 = _bindgen_ty_95::TCA_EGRESS_BLOCK; -pub const TCA_DUMP_FLAGS: _bindgen_ty_95 = _bindgen_ty_95::TCA_DUMP_FLAGS; -pub const __TCA_MAX: _bindgen_ty_95 = _bindgen_ty_95::__TCA_MAX; +pub const TCA_UNSPEC: _bindgen_ty_93 = _bindgen_ty_93::TCA_UNSPEC; +pub const TCA_KIND: _bindgen_ty_93 = _bindgen_ty_93::TCA_KIND; +pub const TCA_OPTIONS: _bindgen_ty_93 = _bindgen_ty_93::TCA_OPTIONS; +pub const TCA_STATS: _bindgen_ty_93 = _bindgen_ty_93::TCA_STATS; +pub const TCA_XSTATS: _bindgen_ty_93 = _bindgen_ty_93::TCA_XSTATS; +pub const TCA_RATE: _bindgen_ty_93 = _bindgen_ty_93::TCA_RATE; +pub const TCA_FCNT: _bindgen_ty_93 = _bindgen_ty_93::TCA_FCNT; +pub const TCA_STATS2: _bindgen_ty_93 = _bindgen_ty_93::TCA_STATS2; +pub const TCA_STAB: _bindgen_ty_93 = _bindgen_ty_93::TCA_STAB; +pub const TCA_PAD: _bindgen_ty_93 = _bindgen_ty_93::TCA_PAD; +pub const TCA_DUMP_INVISIBLE: _bindgen_ty_93 = _bindgen_ty_93::TCA_DUMP_INVISIBLE; +pub const TCA_CHAIN: _bindgen_ty_93 = _bindgen_ty_93::TCA_CHAIN; +pub const TCA_HW_OFFLOAD: _bindgen_ty_93 = _bindgen_ty_93::TCA_HW_OFFLOAD; +pub const TCA_INGRESS_BLOCK: _bindgen_ty_93 = _bindgen_ty_93::TCA_INGRESS_BLOCK; +pub const TCA_EGRESS_BLOCK: _bindgen_ty_93 = _bindgen_ty_93::TCA_EGRESS_BLOCK; +pub const __TCA_MAX: _bindgen_ty_93 = _bindgen_ty_93::__TCA_MAX; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum _bindgen_ty_95 { +pub enum _bindgen_ty_93 { TCA_UNSPEC = 0, TCA_KIND = 1, TCA_OPTIONS = 2, @@ -1805,25 +1681,24 @@ pub enum _bindgen_ty_95 { TCA_HW_OFFLOAD = 12, TCA_INGRESS_BLOCK = 13, TCA_EGRESS_BLOCK = 14, - TCA_DUMP_FLAGS = 15, - __TCA_MAX = 16, -} -pub const TCA_BPF_UNSPEC: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_UNSPEC; -pub const TCA_BPF_ACT: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_ACT; -pub const TCA_BPF_POLICE: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_POLICE; -pub const TCA_BPF_CLASSID: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_CLASSID; -pub const TCA_BPF_OPS_LEN: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_OPS_LEN; -pub const TCA_BPF_OPS: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_OPS; -pub const TCA_BPF_FD: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FD; -pub const TCA_BPF_NAME: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_NAME; -pub const TCA_BPF_FLAGS: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FLAGS; -pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FLAGS_GEN; -pub const TCA_BPF_TAG: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_TAG; -pub const TCA_BPF_ID: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_ID; -pub const __TCA_BPF_MAX: _bindgen_ty_151 = _bindgen_ty_151::__TCA_BPF_MAX; + __TCA_MAX = 15, +} +pub const TCA_BPF_UNSPEC: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_UNSPEC; +pub const TCA_BPF_ACT: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_ACT; +pub const TCA_BPF_POLICE: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_POLICE; +pub const TCA_BPF_CLASSID: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_CLASSID; +pub const TCA_BPF_OPS_LEN: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_OPS_LEN; +pub const TCA_BPF_OPS: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_OPS; +pub const TCA_BPF_FD: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_FD; +pub const TCA_BPF_NAME: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_NAME; +pub const TCA_BPF_FLAGS: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_FLAGS; +pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_FLAGS_GEN; +pub const TCA_BPF_TAG: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_TAG; +pub const TCA_BPF_ID: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_ID; +pub const __TCA_BPF_MAX: _bindgen_ty_149 = _bindgen_ty_149::__TCA_BPF_MAX; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum _bindgen_ty_151 { +pub enum _bindgen_ty_149 { TCA_BPF_UNSPEC = 0, TCA_BPF_ACT = 1, TCA_BPF_POLICE = 2, diff --git a/aya/src/generated/linux_bindings_x86_64.rs b/aya/src/generated/linux_bindings_x86_64.rs index ace0f73e..a86e49f8 100644 --- a/aya/src/generated/linux_bindings_x86_64.rs +++ b/aya/src/generated/linux_bindings_x86_64.rs @@ -259,6 +259,7 @@ pub enum bpf_map_type { BPF_MAP_TYPE_RINGBUF = 27, BPF_MAP_TYPE_INODE_STORAGE = 28, BPF_MAP_TYPE_TASK_STORAGE = 29, + BPF_MAP_TYPE_BLOOM_FILTER = 30, } #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -382,6 +383,7 @@ pub struct bpf_attr__bindgen_ty_1 { pub btf_key_type_id: __u32, pub btf_value_type_id: __u32, pub btf_vmlinux_value_type_id: __u32, + pub map_extra: __u64, } #[repr(C)] #[derive(Copy, Clone)] @@ -648,6 +650,7 @@ pub struct bpf_prog_info { pub run_time_ns: __u64, pub run_cnt: __u64, pub recursion_misses: __u64, + pub verified_insns: __u32, } impl bpf_prog_info { #[inline] @@ -713,7 +716,7 @@ pub const BTF_KIND_FUNC_PROTO: ::std::os::raw::c_uint = 13; pub const BTF_KIND_VAR: ::std::os::raw::c_uint = 14; pub const BTF_KIND_DATASEC: ::std::os::raw::c_uint = 15; pub const BTF_KIND_FLOAT: ::std::os::raw::c_uint = 16; -pub const BTF_KIND_TAG: ::std::os::raw::c_uint = 17; +pub const BTF_KIND_DECL_TAG: ::std::os::raw::c_uint = 17; pub const NR_BTF_KINDS: ::std::os::raw::c_uint = 18; pub const BTF_KIND_MAX: ::std::os::raw::c_uint = 17; pub type _bindgen_ty_37 = ::std::os::raw::c_uint; @@ -822,8 +825,7 @@ pub enum perf_sw_ids { 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, + PERF_COUNT_SW_MAX = 11, } #[repr(u64)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -848,12 +850,7 @@ pub enum perf_event_sample_format { 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, + PERF_SAMPLE_MAX = 1048576, __PERF_SAMPLE_CALLCHAIN_EARLY = 9223372036854775808, } #[repr(C)] @@ -879,9 +876,6 @@ pub struct perf_event_attr { 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, } #[repr(C)] #[derive(Copy, Clone)] @@ -1254,80 +1248,14 @@ impl perf_event_attr { } } #[inline] - pub fn cgroup(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } - } - #[inline] - pub fn set_cgroup(&mut self, val: __u64) { - unsafe { - let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(32usize, 1u8, val as u64) - } - } - #[inline] - pub fn text_poke(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } - } - #[inline] - pub fn set_text_poke(&mut self, val: __u64) { - unsafe { - let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(33usize, 1u8, val as u64) - } - } - #[inline] - pub fn build_id(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } - } - #[inline] - pub fn set_build_id(&mut self, val: __u64) { - unsafe { - let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(34usize, 1u8, val as u64) - } - } - #[inline] - pub fn inherit_thread(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } - } - #[inline] - pub fn set_inherit_thread(&mut self, val: __u64) { - unsafe { - let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(35usize, 1u8, val as u64) - } - } - #[inline] - pub fn remove_on_exec(&self) -> __u64 { - unsafe { ::std::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 = ::std::mem::transmute(val); - self._bitfield_1.set(36usize, 1u8, val as u64) - } - } - #[inline] - pub fn sigtrap(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } - } - #[inline] - pub fn set_sigtrap(&mut self, val: __u64) { - unsafe { - let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(37usize, 1u8, val as u64) - } - } - #[inline] pub fn __reserved_1(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) } + unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 32u8) as u64) } } #[inline] pub fn set___reserved_1(&mut self, val: __u64) { unsafe { let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(38usize, 26u8, val as u64) + self._bitfield_1.set(32usize, 32u8, val as u64) } } #[inline] @@ -1363,12 +1291,6 @@ impl perf_event_attr { 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(); @@ -1498,31 +1420,7 @@ impl perf_event_attr { let aux_output: u64 = unsafe { ::std::mem::transmute(aux_output) }; aux_output as u64 }); - __bindgen_bitfield_unit.set(32usize, 1u8, { - let cgroup: u64 = unsafe { ::std::mem::transmute(cgroup) }; - cgroup as u64 - }); - __bindgen_bitfield_unit.set(33usize, 1u8, { - let text_poke: u64 = unsafe { ::std::mem::transmute(text_poke) }; - text_poke as u64 - }); - __bindgen_bitfield_unit.set(34usize, 1u8, { - let build_id: u64 = unsafe { ::std::mem::transmute(build_id) }; - build_id as u64 - }); - __bindgen_bitfield_unit.set(35usize, 1u8, { - let inherit_thread: u64 = unsafe { ::std::mem::transmute(inherit_thread) }; - inherit_thread as u64 - }); - __bindgen_bitfield_unit.set(36usize, 1u8, { - let remove_on_exec: u64 = unsafe { ::std::mem::transmute(remove_on_exec) }; - remove_on_exec as u64 - }); - __bindgen_bitfield_unit.set(37usize, 1u8, { - let sigtrap: u64 = unsafe { ::std::mem::transmute(sigtrap) }; - sigtrap as u64 - }); - __bindgen_bitfield_unit.set(38usize, 26u8, { + __bindgen_bitfield_unit.set(32usize, 32u8, { let __reserved_1: u64 = unsafe { ::std::mem::transmute(__reserved_1) }; __reserved_1 as u64 }); @@ -1546,10 +1444,7 @@ pub struct perf_event_mmap_page { 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 __reserved: [__u8; 948usize], pub data_head: __u64, pub data_tail: __u64, pub data_offset: __u64, @@ -1629,25 +1524,14 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { } } #[inline] - pub fn cap_user_time_short(&self) -> __u64 { - unsafe { ::std::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 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] pub fn cap_____res(&self) -> __u64 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) } + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 59u8) as u64) } } #[inline] pub fn set_cap_____res(&mut self, val: __u64) { unsafe { let val: u64 = ::std::mem::transmute(val); - self._bitfield_1.set(6usize, 58u8, val as u64) + self._bitfield_1.set(5usize, 59u8, val as u64) } } #[inline] @@ -1657,7 +1541,6 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { 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(); @@ -1682,11 +1565,7 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 { let cap_user_time_zero: u64 = unsafe { ::std::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 { ::std::mem::transmute(cap_user_time_short) }; - cap_user_time_short as u64 - }); - __bindgen_bitfield_unit.set(6usize, 58u8, { + __bindgen_bitfield_unit.set(5usize, 59u8, { let cap_____res: u64 = unsafe { ::std::mem::transmute(cap_____res) }; cap_____res as u64 }); @@ -1721,9 +1600,7 @@ pub enum perf_event_type { PERF_RECORD_NAMESPACES = 16, PERF_RECORD_KSYMBOL = 17, PERF_RECORD_BPF_EVENT = 18, - PERF_RECORD_CGROUP = 19, - PERF_RECORD_TEXT_POKE = 20, - PERF_RECORD_MAX = 21, + PERF_RECORD_MAX = 19, } pub const IFLA_XDP_UNSPEC: _bindgen_ty_81 = _bindgen_ty_81::IFLA_XDP_UNSPEC; pub const IFLA_XDP_FD: _bindgen_ty_81 = _bindgen_ty_81::IFLA_XDP_FD; @@ -1770,26 +1647,25 @@ pub struct tcmsg { pub tcm_parent: __u32, pub tcm_info: __u32, } -pub const TCA_UNSPEC: _bindgen_ty_95 = _bindgen_ty_95::TCA_UNSPEC; -pub const TCA_KIND: _bindgen_ty_95 = _bindgen_ty_95::TCA_KIND; -pub const TCA_OPTIONS: _bindgen_ty_95 = _bindgen_ty_95::TCA_OPTIONS; -pub const TCA_STATS: _bindgen_ty_95 = _bindgen_ty_95::TCA_STATS; -pub const TCA_XSTATS: _bindgen_ty_95 = _bindgen_ty_95::TCA_XSTATS; -pub const TCA_RATE: _bindgen_ty_95 = _bindgen_ty_95::TCA_RATE; -pub const TCA_FCNT: _bindgen_ty_95 = _bindgen_ty_95::TCA_FCNT; -pub const TCA_STATS2: _bindgen_ty_95 = _bindgen_ty_95::TCA_STATS2; -pub const TCA_STAB: _bindgen_ty_95 = _bindgen_ty_95::TCA_STAB; -pub const TCA_PAD: _bindgen_ty_95 = _bindgen_ty_95::TCA_PAD; -pub const TCA_DUMP_INVISIBLE: _bindgen_ty_95 = _bindgen_ty_95::TCA_DUMP_INVISIBLE; -pub const TCA_CHAIN: _bindgen_ty_95 = _bindgen_ty_95::TCA_CHAIN; -pub const TCA_HW_OFFLOAD: _bindgen_ty_95 = _bindgen_ty_95::TCA_HW_OFFLOAD; -pub const TCA_INGRESS_BLOCK: _bindgen_ty_95 = _bindgen_ty_95::TCA_INGRESS_BLOCK; -pub const TCA_EGRESS_BLOCK: _bindgen_ty_95 = _bindgen_ty_95::TCA_EGRESS_BLOCK; -pub const TCA_DUMP_FLAGS: _bindgen_ty_95 = _bindgen_ty_95::TCA_DUMP_FLAGS; -pub const __TCA_MAX: _bindgen_ty_95 = _bindgen_ty_95::__TCA_MAX; +pub const TCA_UNSPEC: _bindgen_ty_93 = _bindgen_ty_93::TCA_UNSPEC; +pub const TCA_KIND: _bindgen_ty_93 = _bindgen_ty_93::TCA_KIND; +pub const TCA_OPTIONS: _bindgen_ty_93 = _bindgen_ty_93::TCA_OPTIONS; +pub const TCA_STATS: _bindgen_ty_93 = _bindgen_ty_93::TCA_STATS; +pub const TCA_XSTATS: _bindgen_ty_93 = _bindgen_ty_93::TCA_XSTATS; +pub const TCA_RATE: _bindgen_ty_93 = _bindgen_ty_93::TCA_RATE; +pub const TCA_FCNT: _bindgen_ty_93 = _bindgen_ty_93::TCA_FCNT; +pub const TCA_STATS2: _bindgen_ty_93 = _bindgen_ty_93::TCA_STATS2; +pub const TCA_STAB: _bindgen_ty_93 = _bindgen_ty_93::TCA_STAB; +pub const TCA_PAD: _bindgen_ty_93 = _bindgen_ty_93::TCA_PAD; +pub const TCA_DUMP_INVISIBLE: _bindgen_ty_93 = _bindgen_ty_93::TCA_DUMP_INVISIBLE; +pub const TCA_CHAIN: _bindgen_ty_93 = _bindgen_ty_93::TCA_CHAIN; +pub const TCA_HW_OFFLOAD: _bindgen_ty_93 = _bindgen_ty_93::TCA_HW_OFFLOAD; +pub const TCA_INGRESS_BLOCK: _bindgen_ty_93 = _bindgen_ty_93::TCA_INGRESS_BLOCK; +pub const TCA_EGRESS_BLOCK: _bindgen_ty_93 = _bindgen_ty_93::TCA_EGRESS_BLOCK; +pub const __TCA_MAX: _bindgen_ty_93 = _bindgen_ty_93::__TCA_MAX; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum _bindgen_ty_95 { +pub enum _bindgen_ty_93 { TCA_UNSPEC = 0, TCA_KIND = 1, TCA_OPTIONS = 2, @@ -1805,25 +1681,24 @@ pub enum _bindgen_ty_95 { TCA_HW_OFFLOAD = 12, TCA_INGRESS_BLOCK = 13, TCA_EGRESS_BLOCK = 14, - TCA_DUMP_FLAGS = 15, - __TCA_MAX = 16, -} -pub const TCA_BPF_UNSPEC: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_UNSPEC; -pub const TCA_BPF_ACT: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_ACT; -pub const TCA_BPF_POLICE: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_POLICE; -pub const TCA_BPF_CLASSID: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_CLASSID; -pub const TCA_BPF_OPS_LEN: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_OPS_LEN; -pub const TCA_BPF_OPS: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_OPS; -pub const TCA_BPF_FD: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FD; -pub const TCA_BPF_NAME: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_NAME; -pub const TCA_BPF_FLAGS: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FLAGS; -pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_FLAGS_GEN; -pub const TCA_BPF_TAG: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_TAG; -pub const TCA_BPF_ID: _bindgen_ty_151 = _bindgen_ty_151::TCA_BPF_ID; -pub const __TCA_BPF_MAX: _bindgen_ty_151 = _bindgen_ty_151::__TCA_BPF_MAX; + __TCA_MAX = 15, +} +pub const TCA_BPF_UNSPEC: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_UNSPEC; +pub const TCA_BPF_ACT: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_ACT; +pub const TCA_BPF_POLICE: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_POLICE; +pub const TCA_BPF_CLASSID: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_CLASSID; +pub const TCA_BPF_OPS_LEN: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_OPS_LEN; +pub const TCA_BPF_OPS: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_OPS; +pub const TCA_BPF_FD: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_FD; +pub const TCA_BPF_NAME: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_NAME; +pub const TCA_BPF_FLAGS: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_FLAGS; +pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_FLAGS_GEN; +pub const TCA_BPF_TAG: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_TAG; +pub const TCA_BPF_ID: _bindgen_ty_149 = _bindgen_ty_149::TCA_BPF_ID; +pub const __TCA_BPF_MAX: _bindgen_ty_149 = _bindgen_ty_149::__TCA_BPF_MAX; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum _bindgen_ty_151 { +pub enum _bindgen_ty_149 { TCA_BPF_UNSPEC = 0, TCA_BPF_ACT = 1, TCA_BPF_POLICE = 2, diff --git a/bpf/aya-bpf-bindings/src/aarch64/bindings.rs b/bpf/aya-bpf-bindings/src/aarch64/bindings.rs index c57d6a1e..fc1f25e3 100644 --- a/bpf/aya-bpf-bindings/src/aarch64/bindings.rs +++ b/bpf/aya-bpf-bindings/src/aarch64/bindings.rs @@ -228,9 +228,6 @@ 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_PREFER_BUSY_POLL: u32 = 69; -pub const SO_BUSY_POLL_BUDGET: u32 = 70; -pub const SO_NETNS_COOKIE: u32 = 71; pub const SO_TIMESTAMP: u32 = 29; pub const SO_TIMESTAMPNS: u32 = 35; pub const SO_TIMESTAMPING: u32 = 37; @@ -302,6 +299,7 @@ pub mod bpf_map_type { 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_ANY: ::aya_bpf_cty::c_uint = 0; pub const BPF_NOEXIST: ::aya_bpf_cty::c_uint = 1; @@ -745,6 +743,16 @@ pub struct bpf_map_info { pub btf_id: __u32, pub btf_key_type_id: __u32, pub btf_value_type_id: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub map_extra: __u64, +} +impl bpf_map_info { + #[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(Copy, Clone)] @@ -1076,28 +1084,11 @@ pub struct btf_ptr { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct pt_regs { - pub r15: ::aya_bpf_cty::c_ulong, - pub r14: ::aya_bpf_cty::c_ulong, - pub r13: ::aya_bpf_cty::c_ulong, - pub r12: ::aya_bpf_cty::c_ulong, - pub rbp: ::aya_bpf_cty::c_ulong, - pub rbx: ::aya_bpf_cty::c_ulong, - pub r11: ::aya_bpf_cty::c_ulong, - pub r10: ::aya_bpf_cty::c_ulong, - pub r9: ::aya_bpf_cty::c_ulong, - pub r8: ::aya_bpf_cty::c_ulong, - pub rax: ::aya_bpf_cty::c_ulong, - pub rcx: ::aya_bpf_cty::c_ulong, - pub rdx: ::aya_bpf_cty::c_ulong, - pub rsi: ::aya_bpf_cty::c_ulong, - pub rdi: ::aya_bpf_cty::c_ulong, - pub orig_rax: ::aya_bpf_cty::c_ulong, - pub rip: ::aya_bpf_cty::c_ulong, - pub cs: ::aya_bpf_cty::c_ulong, - pub eflags: ::aya_bpf_cty::c_ulong, - pub rsp: ::aya_bpf_cty::c_ulong, - pub ss: ::aya_bpf_cty::c_ulong, +pub struct user_pt_regs { + pub regs: [__u64; 31usize], + pub sp: __u64, + pub pc: __u64, + pub pstate: __u64, } pub type sa_family_t = ::aya_bpf_cty::c_ushort; #[repr(C)] @@ -1118,6 +1109,11 @@ pub struct linux_binprm { } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct pt_regs { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct tcphdr { _unused: [u8; 0], } @@ -1153,6 +1149,11 @@ pub struct udp6_sock { } #[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], } diff --git a/bpf/aya-bpf-bindings/src/aarch64/getters.rs b/bpf/aya-bpf-bindings/src/aarch64/getters.rs index fa62dbce..e3f26626 100644 --- a/bpf/aya-bpf-bindings/src/aarch64/getters.rs +++ b/bpf/aya-bpf-bindings/src/aarch64/getters.rs @@ -590,6 +590,9 @@ impl bpf_map_info { pub fn btf_value_type_id(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.btf_value_type_id) }.ok() } + pub fn map_extra(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.map_extra) }.ok() + } } impl bpf_sock_addr { pub fn user_family(&self) -> Option<__u32> { @@ -1061,69 +1064,18 @@ impl btf_ptr { unsafe { crate::bpf_probe_read(&self.flags) }.ok() } } -impl pt_regs { - pub fn r15(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.r15) }.ok() - } - pub fn r14(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.r14) }.ok() - } - pub fn r13(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.r13) }.ok() - } - pub fn r12(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.r12) }.ok() - } - pub fn rbp(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rbp) }.ok() - } - pub fn rbx(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rbx) }.ok() - } - pub fn r11(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.r11) }.ok() - } - pub fn r10(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.r10) }.ok() - } - pub fn r9(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.r9) }.ok() - } - pub fn r8(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.r8) }.ok() - } - pub fn rax(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rax) }.ok() - } - pub fn rcx(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rcx) }.ok() - } - pub fn rdx(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rdx) }.ok() - } - pub fn rsi(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rsi) }.ok() - } - pub fn rdi(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rdi) }.ok() - } - pub fn orig_rax(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.orig_rax) }.ok() - } - pub fn rip(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rip) }.ok() - } - pub fn cs(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.cs) }.ok() +impl user_pt_regs { + pub fn regs(&self) -> Option<[__u64; 31usize]> { + unsafe { crate::bpf_probe_read(&self.regs) }.ok() } - pub fn eflags(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.eflags) }.ok() + pub fn sp(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.sp) }.ok() } - pub fn rsp(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rsp) }.ok() + pub fn pc(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.pc) }.ok() } - pub fn ss(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.ss) }.ok() + pub fn pstate(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.pstate) }.ok() } } impl sockaddr { @@ -1136,6 +1088,7 @@ impl sockaddr { } impl bpf_perf_event_data {} impl linux_binprm {} +impl pt_regs {} impl tcphdr {} impl seq_file {} impl tcp6_sock {} @@ -1143,6 +1096,7 @@ impl tcp_sock {} impl tcp_timewait_sock {} impl tcp_request_sock {} impl udp6_sock {} +impl unix_sock {} impl task_struct {} impl path {} impl inode {} diff --git a/bpf/aya-bpf-bindings/src/aarch64/helpers.rs b/bpf/aya-bpf-bindings/src/aarch64/helpers.rs index f8cb0f24..57b1a4c4 100644 --- a/bpf/aya-bpf-bindings/src/aarch64/helpers.rs +++ b/bpf/aya-bpf-bindings/src/aarch64/helpers.rs @@ -1790,3 +1790,22 @@ pub unsafe fn bpf_trace_vprintk( ) -> ::aya_bpf_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_bpf_cty::c_void) -> *mut unix_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_bpf_cty::c_void) -> *mut unix_sock = + ::core::mem::transmute(178usize); + fun(sk) +} +pub unsafe fn bpf_kallsyms_lookup_name( + name: *const ::aya_bpf_cty::c_char, + name_sz: ::aya_bpf_cty::c_int, + flags: ::aya_bpf_cty::c_int, + res: *mut __u64, +) -> ::aya_bpf_cty::c_long { + let fun: unsafe extern "C" fn( + name: *const ::aya_bpf_cty::c_char, + name_sz: ::aya_bpf_cty::c_int, + flags: ::aya_bpf_cty::c_int, + res: *mut __u64, + ) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(179usize); + fun(name, name_sz, flags, res) +} diff --git a/bpf/aya-bpf-bindings/src/armv7/bindings.rs b/bpf/aya-bpf-bindings/src/armv7/bindings.rs index c57d6a1e..1ac01794 100644 --- a/bpf/aya-bpf-bindings/src/armv7/bindings.rs +++ b/bpf/aya-bpf-bindings/src/armv7/bindings.rs @@ -228,14 +228,6 @@ 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_PREFER_BUSY_POLL: u32 = 69; -pub const SO_BUSY_POLL_BUDGET: u32 = 70; -pub const SO_NETNS_COOKIE: u32 = 71; -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 const TC_ACT_UNSPEC: i32 = -1; pub const TC_ACT_OK: u32 = 0; pub const TC_ACT_RECLASSIFY: u32 = 1; @@ -302,6 +294,7 @@ pub mod bpf_map_type { 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_ANY: ::aya_bpf_cty::c_uint = 0; pub const BPF_NOEXIST: ::aya_bpf_cty::c_uint = 1; @@ -345,10 +338,10 @@ pub const BPF_F_ZERO_CSUM_TX: ::aya_bpf_cty::c_uint = 2; pub const BPF_F_DONT_FRAGMENT: ::aya_bpf_cty::c_uint = 4; pub const BPF_F_SEQ_NUMBER: ::aya_bpf_cty::c_uint = 8; pub type _bindgen_ty_10 = ::aya_bpf_cty::c_uint; -pub const BPF_F_INDEX_MASK: ::aya_bpf_cty::c_ulong = 4294967295; -pub const BPF_F_CURRENT_CPU: ::aya_bpf_cty::c_ulong = 4294967295; -pub const BPF_F_CTXLEN_MASK: ::aya_bpf_cty::c_ulong = 4503595332403200; -pub type _bindgen_ty_11 = ::aya_bpf_cty::c_ulong; +pub const BPF_F_INDEX_MASK: ::aya_bpf_cty::c_ulonglong = 4294967295; +pub const BPF_F_CURRENT_CPU: ::aya_bpf_cty::c_ulonglong = 4294967295; +pub const BPF_F_CTXLEN_MASK: ::aya_bpf_cty::c_ulonglong = 4503595332403200; +pub type _bindgen_ty_11 = ::aya_bpf_cty::c_ulonglong; pub const BPF_F_CURRENT_NETNS: ::aya_bpf_cty::c_int = -1; pub type _bindgen_ty_12 = ::aya_bpf_cty::c_int; pub const BPF_CSUM_LEVEL_QUERY: ::aya_bpf_cty::c_uint = 0; @@ -439,6 +432,7 @@ pub struct __sk_buff { 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, @@ -453,6 +447,7 @@ impl __sk_buff__bindgen_ty_1 { } } #[repr(C)] +#[repr(align(8))] #[derive(Copy, Clone)] pub union __sk_buff__bindgen_ty_2 { pub sk: *mut bpf_sock, @@ -618,6 +613,7 @@ pub struct sk_msg_md { 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_bpf_cty::c_void, @@ -632,6 +628,7 @@ impl sk_msg_md__bindgen_ty_1 { } } #[repr(C)] +#[repr(align(8))] #[derive(Copy, Clone)] pub union sk_msg_md__bindgen_ty_2 { pub data_end: *mut ::aya_bpf_cty::c_void, @@ -646,6 +643,7 @@ impl sk_msg_md__bindgen_ty_2 { } } #[repr(C)] +#[repr(align(8))] #[derive(Copy, Clone)] pub union sk_msg_md__bindgen_ty_3 { pub sk: *mut bpf_sock, @@ -673,6 +671,7 @@ pub struct sk_reuseport_md { 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_bpf_cty::c_void, @@ -687,6 +686,7 @@ impl sk_reuseport_md__bindgen_ty_1 { } } #[repr(C)] +#[repr(align(8))] #[derive(Copy, Clone)] pub union sk_reuseport_md__bindgen_ty_2 { pub data_end: *mut ::aya_bpf_cty::c_void, @@ -701,6 +701,7 @@ impl sk_reuseport_md__bindgen_ty_2 { } } #[repr(C)] +#[repr(align(8))] #[derive(Copy, Clone)] pub union sk_reuseport_md__bindgen_ty_3 { pub sk: *mut bpf_sock, @@ -715,6 +716,7 @@ impl sk_reuseport_md__bindgen_ty_3 { } } #[repr(C)] +#[repr(align(8))] #[derive(Copy, Clone)] pub union sk_reuseport_md__bindgen_ty_4 { pub migrating_sk: *mut bpf_sock, @@ -745,6 +747,16 @@ pub struct bpf_map_info { pub btf_id: __u32, pub btf_key_type_id: __u32, pub btf_value_type_id: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub map_extra: __u64, +} +impl bpf_map_info { + #[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(Copy, Clone)] @@ -761,6 +773,7 @@ pub struct bpf_sock_addr { 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, @@ -826,6 +839,7 @@ pub union bpf_sock_ops__bindgen_ty_1 { 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, @@ -840,6 +854,7 @@ impl bpf_sock_ops__bindgen_ty_2 { } } #[repr(C)] +#[repr(align(8))] #[derive(Copy, Clone)] pub union bpf_sock_ops__bindgen_ty_3 { pub skb_data: *mut ::aya_bpf_cty::c_void, @@ -854,6 +869,7 @@ impl bpf_sock_ops__bindgen_ty_3 { } } #[repr(C)] +#[repr(align(8))] #[derive(Copy, Clone)] pub union bpf_sock_ops__bindgen_ty_4 { pub skb_data_end: *mut ::aya_bpf_cty::c_void, @@ -1077,27 +1093,7 @@ pub struct btf_ptr { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pt_regs { - pub r15: ::aya_bpf_cty::c_ulong, - pub r14: ::aya_bpf_cty::c_ulong, - pub r13: ::aya_bpf_cty::c_ulong, - pub r12: ::aya_bpf_cty::c_ulong, - pub rbp: ::aya_bpf_cty::c_ulong, - pub rbx: ::aya_bpf_cty::c_ulong, - pub r11: ::aya_bpf_cty::c_ulong, - pub r10: ::aya_bpf_cty::c_ulong, - pub r9: ::aya_bpf_cty::c_ulong, - pub r8: ::aya_bpf_cty::c_ulong, - pub rax: ::aya_bpf_cty::c_ulong, - pub rcx: ::aya_bpf_cty::c_ulong, - pub rdx: ::aya_bpf_cty::c_ulong, - pub rsi: ::aya_bpf_cty::c_ulong, - pub rdi: ::aya_bpf_cty::c_ulong, - pub orig_rax: ::aya_bpf_cty::c_ulong, - pub rip: ::aya_bpf_cty::c_ulong, - pub cs: ::aya_bpf_cty::c_ulong, - pub eflags: ::aya_bpf_cty::c_ulong, - pub rsp: ::aya_bpf_cty::c_ulong, - pub ss: ::aya_bpf_cty::c_ulong, + pub uregs: [::aya_bpf_cty::c_long; 18usize], } pub type sa_family_t = ::aya_bpf_cty::c_ushort; #[repr(C)] @@ -1153,6 +1149,11 @@ pub struct udp6_sock { } #[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], } diff --git a/bpf/aya-bpf-bindings/src/armv7/getters.rs b/bpf/aya-bpf-bindings/src/armv7/getters.rs index fa62dbce..ca7f1c89 100644 --- a/bpf/aya-bpf-bindings/src/armv7/getters.rs +++ b/bpf/aya-bpf-bindings/src/armv7/getters.rs @@ -590,6 +590,9 @@ impl bpf_map_info { pub fn btf_value_type_id(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.btf_value_type_id) }.ok() } + pub fn map_extra(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.map_extra) }.ok() + } } impl bpf_sock_addr { pub fn user_family(&self) -> Option<__u32> { @@ -1062,68 +1065,8 @@ impl btf_ptr { } } impl pt_regs { - pub fn r15(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.r15) }.ok() - } - pub fn r14(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.r14) }.ok() - } - pub fn r13(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.r13) }.ok() - } - pub fn r12(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.r12) }.ok() - } - pub fn rbp(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rbp) }.ok() - } - pub fn rbx(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rbx) }.ok() - } - pub fn r11(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.r11) }.ok() - } - pub fn r10(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.r10) }.ok() - } - pub fn r9(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.r9) }.ok() - } - pub fn r8(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.r8) }.ok() - } - pub fn rax(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rax) }.ok() - } - pub fn rcx(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rcx) }.ok() - } - pub fn rdx(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rdx) }.ok() - } - pub fn rsi(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rsi) }.ok() - } - pub fn rdi(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rdi) }.ok() - } - pub fn orig_rax(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.orig_rax) }.ok() - } - pub fn rip(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rip) }.ok() - } - pub fn cs(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.cs) }.ok() - } - pub fn eflags(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.eflags) }.ok() - } - pub fn rsp(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.rsp) }.ok() - } - pub fn ss(&self) -> Option<::aya_bpf_cty::c_ulong> { - unsafe { crate::bpf_probe_read(&self.ss) }.ok() + pub fn uregs(&self) -> Option<[::aya_bpf_cty::c_long; 18usize]> { + unsafe { crate::bpf_probe_read(&self.uregs) }.ok() } } impl sockaddr { @@ -1143,6 +1086,7 @@ impl tcp_sock {} impl tcp_timewait_sock {} impl tcp_request_sock {} impl udp6_sock {} +impl unix_sock {} impl task_struct {} impl path {} impl inode {} diff --git a/bpf/aya-bpf-bindings/src/armv7/helpers.rs b/bpf/aya-bpf-bindings/src/armv7/helpers.rs index f8cb0f24..57b1a4c4 100644 --- a/bpf/aya-bpf-bindings/src/armv7/helpers.rs +++ b/bpf/aya-bpf-bindings/src/armv7/helpers.rs @@ -1790,3 +1790,22 @@ pub unsafe fn bpf_trace_vprintk( ) -> ::aya_bpf_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_bpf_cty::c_void) -> *mut unix_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_bpf_cty::c_void) -> *mut unix_sock = + ::core::mem::transmute(178usize); + fun(sk) +} +pub unsafe fn bpf_kallsyms_lookup_name( + name: *const ::aya_bpf_cty::c_char, + name_sz: ::aya_bpf_cty::c_int, + flags: ::aya_bpf_cty::c_int, + res: *mut __u64, +) -> ::aya_bpf_cty::c_long { + let fun: unsafe extern "C" fn( + name: *const ::aya_bpf_cty::c_char, + name_sz: ::aya_bpf_cty::c_int, + flags: ::aya_bpf_cty::c_int, + res: *mut __u64, + ) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(179usize); + fun(name, name_sz, flags, res) +} diff --git a/bpf/aya-bpf-bindings/src/x86_64/bindings.rs b/bpf/aya-bpf-bindings/src/x86_64/bindings.rs index c57d6a1e..974b0df9 100644 --- a/bpf/aya-bpf-bindings/src/x86_64/bindings.rs +++ b/bpf/aya-bpf-bindings/src/x86_64/bindings.rs @@ -228,9 +228,6 @@ 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_PREFER_BUSY_POLL: u32 = 69; -pub const SO_BUSY_POLL_BUDGET: u32 = 70; -pub const SO_NETNS_COOKIE: u32 = 71; pub const SO_TIMESTAMP: u32 = 29; pub const SO_TIMESTAMPNS: u32 = 35; pub const SO_TIMESTAMPING: u32 = 37; @@ -302,6 +299,7 @@ pub mod bpf_map_type { 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_ANY: ::aya_bpf_cty::c_uint = 0; pub const BPF_NOEXIST: ::aya_bpf_cty::c_uint = 1; @@ -745,6 +743,16 @@ pub struct bpf_map_info { pub btf_id: __u32, pub btf_key_type_id: __u32, pub btf_value_type_id: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub map_extra: __u64, +} +impl bpf_map_info { + #[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(Copy, Clone)] @@ -1153,6 +1161,11 @@ pub struct udp6_sock { } #[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], } diff --git a/bpf/aya-bpf-bindings/src/x86_64/getters.rs b/bpf/aya-bpf-bindings/src/x86_64/getters.rs index fa62dbce..ef78ab3b 100644 --- a/bpf/aya-bpf-bindings/src/x86_64/getters.rs +++ b/bpf/aya-bpf-bindings/src/x86_64/getters.rs @@ -590,6 +590,9 @@ impl bpf_map_info { pub fn btf_value_type_id(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.btf_value_type_id) }.ok() } + pub fn map_extra(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.map_extra) }.ok() + } } impl bpf_sock_addr { pub fn user_family(&self) -> Option<__u32> { @@ -1143,6 +1146,7 @@ impl tcp_sock {} impl tcp_timewait_sock {} impl tcp_request_sock {} impl udp6_sock {} +impl unix_sock {} impl task_struct {} impl path {} impl inode {} diff --git a/bpf/aya-bpf-bindings/src/x86_64/helpers.rs b/bpf/aya-bpf-bindings/src/x86_64/helpers.rs index f8cb0f24..57b1a4c4 100644 --- a/bpf/aya-bpf-bindings/src/x86_64/helpers.rs +++ b/bpf/aya-bpf-bindings/src/x86_64/helpers.rs @@ -1790,3 +1790,22 @@ pub unsafe fn bpf_trace_vprintk( ) -> ::aya_bpf_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_bpf_cty::c_void) -> *mut unix_sock { + let fun: unsafe extern "C" fn(sk: *mut ::aya_bpf_cty::c_void) -> *mut unix_sock = + ::core::mem::transmute(178usize); + fun(sk) +} +pub unsafe fn bpf_kallsyms_lookup_name( + name: *const ::aya_bpf_cty::c_char, + name_sz: ::aya_bpf_cty::c_int, + flags: ::aya_bpf_cty::c_int, + res: *mut __u64, +) -> ::aya_bpf_cty::c_long { + let fun: unsafe extern "C" fn( + name: *const ::aya_bpf_cty::c_char, + name_sz: ::aya_bpf_cty::c_int, + flags: ::aya_bpf_cty::c_int, + res: *mut __u64, + ) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(179usize); + fun(name, name_sz, flags, res) +}