diff --git a/aya/src/generated/linux_bindings_aarch64.rs b/aya/src/generated/linux_bindings_aarch64.rs index 28341114..6e248082 100644 --- a/aya/src/generated/linux_bindings_aarch64.rs +++ b/aya/src/generated/linux_bindings_aarch64.rs @@ -633,6 +633,7 @@ pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1, pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2, pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3, + pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4, } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -656,6 +657,12 @@ pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3 { } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4 { + pub target_btf_id: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct bpf_attr__bindgen_ty_15 { pub link_fd: __u32, pub new_prog_fd: __u32, diff --git a/aya/src/generated/linux_bindings_armv7.rs b/aya/src/generated/linux_bindings_armv7.rs index 79585783..fbbb508e 100644 --- a/aya/src/generated/linux_bindings_armv7.rs +++ b/aya/src/generated/linux_bindings_armv7.rs @@ -633,6 +633,7 @@ pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1, pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2, pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3, + pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4, } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -656,6 +657,12 @@ pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3 { } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4 { + pub target_btf_id: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct bpf_attr__bindgen_ty_15 { pub link_fd: __u32, pub new_prog_fd: __u32, diff --git a/aya/src/generated/linux_bindings_x86_64.rs b/aya/src/generated/linux_bindings_x86_64.rs index 28341114..6e248082 100644 --- a/aya/src/generated/linux_bindings_x86_64.rs +++ b/aya/src/generated/linux_bindings_x86_64.rs @@ -633,6 +633,7 @@ pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1, pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2, pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3, + pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4, } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -656,6 +657,12 @@ pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3 { } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4 { + pub target_btf_id: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct bpf_attr__bindgen_ty_15 { pub link_fd: __u32, pub new_prog_fd: __u32, diff --git a/bpf/aya-bpf-bindings/src/aarch64/bindings.rs b/bpf/aya-bpf-bindings/src/aarch64/bindings.rs index c784d5c7..147c203f 100644 --- a/bpf/aya-bpf-bindings/src/aarch64/bindings.rs +++ b/bpf/aya-bpf-bindings/src/aarch64/bindings.rs @@ -78,6 +78,36 @@ where } } } +#[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; @@ -249,6 +279,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 type __u8 = ::aya_bpf_cty::c_uchar; +pub type __s16 = ::aya_bpf_cty::c_short; pub type __u16 = ::aya_bpf_cty::c_ushort; pub type __s32 = ::aya_bpf_cty::c_int; pub type __u32 = ::aya_bpf_cty::c_uint; @@ -270,6 +301,113 @@ pub const BPF_REG_9: ::aya_bpf_cty::c_uint = 9; pub const BPF_REG_10: ::aya_bpf_cty::c_uint = 10; pub const __MAX_BPF_REG: ::aya_bpf_cty::c_uint = 11; pub type _bindgen_ty_1 = ::aya_bpf_cty::c_uint; +#[repr(C)] +#[derive(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 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 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)] +pub struct bpf_lpm_trie_key { + pub prefixlen: __u32, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_cgroup_storage_key { + pub cgroup_inode_id: __u64, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_iter_link_info { + pub map: bpf_iter_link_info__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_1 { + pub map_fd: __u32, +} +pub mod bpf_cmd { + pub type Type = ::aya_bpf_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 mod bpf_map_type { pub type Type = ::aya_bpf_cty::c_uint; pub const BPF_MAP_TYPE_UNSPEC: Type = 0; @@ -304,6 +442,102 @@ pub mod bpf_map_type { pub const BPF_MAP_TYPE_TASK_STORAGE: Type = 29; pub const BPF_MAP_TYPE_BLOOM_FILTER: Type = 30; } +pub mod bpf_prog_type { + pub type Type = ::aya_bpf_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 mod bpf_attach_type { + pub type Type = ::aya_bpf_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 __MAX_BPF_ATTACH_TYPE: Type = 43; +} +pub mod bpf_link_type { + pub type Type = ::aya_bpf_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 MAX_BPF_LINK_TYPE: Type = 10; +} pub const BPF_ANY: ::aya_bpf_cty::c_uint = 0; pub const BPF_NOEXIST: ::aya_bpf_cty::c_uint = 1; pub const BPF_EXIST: ::aya_bpf_cty::c_uint = 2; @@ -323,6 +557,508 @@ pub const BPF_F_MMAPABLE: ::aya_bpf_cty::c_uint = 1024; pub const BPF_F_PRESERVE_ELEMS: ::aya_bpf_cty::c_uint = 2048; pub const BPF_F_INNER_MAP: ::aya_bpf_cty::c_uint = 4096; pub type _bindgen_ty_3 = ::aya_bpf_cty::c_uint; +pub mod bpf_stats_type { + pub type Type = ::aya_bpf_cty::c_uint; + pub const BPF_STATS_RUN_TIME: Type = 0; +} +pub mod bpf_stack_build_id_status { + pub type Type = ::aya_bpf_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_bpf_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, +} +#[repr(C)] +#[derive(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_bpf_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, +} +#[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(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_bpf_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, +} +#[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(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_5 { + pub pathname: __u64, + pub bpf_fd: __u32, + pub file_flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_6 { + pub target_fd: __u32, + pub attach_bpf_fd: __u32, + pub attach_type: __u32, + pub attach_flags: __u32, + pub replace_bpf_fd: __u32, +} +#[repr(C)] +#[derive(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(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 target_fd: __u32, + pub attach_type: __u32, + pub query_flags: __u32, + pub attach_flags: __u32, + pub prog_ids: __u64, + pub prog_cnt: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_11 { + pub name: __u64, + pub prog_fd: __u32, +} +#[repr(C)] +#[derive(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, +} +#[repr(C)] +#[derive(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 prog_fd: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1, + pub attach_type: __u32, + pub flags: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { + pub target_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1, + pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2, + pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3, + pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1 { + pub iter_info: __u64, + pub iter_info_len: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2 { + pub bpf_cookie: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3 { + pub flags: __u32, + pub cnt: __u32, + pub syms: __u64, + pub addrs: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4 { + pub target_btf_id: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_15 { + pub link_fd: __u32, + pub new_prog_fd: __u32, + pub flags: __u32, + pub old_prog_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_16 { + pub link_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_17 { + pub type_: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_18 { + pub link_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_19 { + pub prog_fd: __u32, + pub map_fd: __u32, + pub flags: __u32, +} +pub mod bpf_func_id { + pub type Type = ::aya_bpf_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_MAX_ID: Type = 196; +} pub const BPF_F_RECOMPUTE_CSUM: ::aya_bpf_cty::c_uint = 1; pub const BPF_F_INVALIDATE_HASH: ::aya_bpf_cty::c_uint = 2; pub type _bindgen_ty_4 = ::aya_bpf_cty::c_uint; @@ -395,6 +1131,17 @@ pub mod bpf_adj_room_mode { 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_bpf_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_bpf_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: ::aya_bpf_cty::c_uint = 1; pub type _bindgen_ty_23 = ::aya_bpf_cty::c_uint; pub const BPF_F_BROADCAST: ::aya_bpf_cty::c_uint = 8; @@ -489,6 +1236,7 @@ pub struct bpf_tunnel_key { pub tunnel_ttl: __u8, pub tunnel_ext: __u16, pub tunnel_label: __u32, + pub __bindgen_anon_2: bpf_tunnel_key__bindgen_ty_2, } #[repr(C)] #[derive(Copy, Clone)] @@ -498,6 +1246,12 @@ pub union bpf_tunnel_key__bindgen_ty_1 { } #[repr(C)] #[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_2 { + 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, @@ -511,6 +1265,13 @@ 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_bpf_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; +} #[repr(C)] #[derive(Copy, Clone)] pub struct bpf_sock { @@ -595,6 +1356,11 @@ pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { pub sport: __be16, pub dport: __be16, } +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_xdp_sock { + pub queue_id: __u32, +} pub mod xdp_action { pub type Type = ::aya_bpf_cty::c_uint; pub const XDP_ABORTED: Type = 0; @@ -613,6 +1379,30 @@ pub struct xdp_md { 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_bpf_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_bpf_cty::c_int, + pub id: __u32, +} pub mod sk_action { pub type Type = ::aya_bpf_cty::c_uint; pub const SK_DROP: Type = 0; @@ -746,6 +1536,69 @@ impl sk_reuseport_md__bindgen_ty_4 { } #[repr(C)] #[derive(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_bpf_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, +} +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 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(Copy, Clone)] pub struct bpf_map_info { pub type_: __u32, pub id: __u32, @@ -774,6 +1627,81 @@ impl bpf_map_info { } #[repr(C)] #[derive(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, +} +#[repr(C)] +#[derive(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(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(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, +} +#[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(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 struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 { + pub netns_ino: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 { + pub ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] pub struct bpf_sock_addr { pub user_family: __u32, pub user_ip4: __u32, @@ -956,6 +1884,17 @@ pub type _bindgen_ty_32 = ::aya_bpf_cty::c_uint; pub const BPF_DEVCG_DEV_BLOCK: ::aya_bpf_cty::c_uint = 1; pub const BPF_DEVCG_DEV_CHAR: ::aya_bpf_cty::c_uint = 2; pub type _bindgen_ty_33 = ::aya_bpf_cty::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_cgroup_dev_ctx { + pub access_type: __u32, + pub major: __u32, + pub minor: __u32, +} +#[repr(C)] +pub struct bpf_raw_tracepoint_args { + pub args: __IncompleteArrayField<__u64>, +} pub const BPF_FIB_LOOKUP_DIRECT: ::aya_bpf_cty::c_uint = 1; pub const BPF_FIB_LOOKUP_OUTPUT: ::aya_bpf_cty::c_uint = 2; pub type _bindgen_ty_34 = ::aya_bpf_cty::c_uint; @@ -1023,6 +1962,25 @@ 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_bpf_cty::c_uint; + pub const BPF_MTU_CHK_SEGS: Type = 1; +} +pub mod bpf_check_mtu_ret { + pub type Type = ::aya_bpf_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_bpf_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: ::aya_bpf_cty::c_uint = 1; pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: ::aya_bpf_cty::c_uint = 2; pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: ::aya_bpf_cty::c_uint = 4; @@ -1064,6 +2022,20 @@ pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 { } #[repr(C)] #[derive(Copy, Clone)] +pub struct bpf_func_info { + pub insn_off: __u32, + pub type_id: __u32, +} +#[repr(C)] +#[derive(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(Copy, Clone)] pub struct bpf_spin_lock { pub val: __u32, } @@ -1089,17 +2061,136 @@ pub struct bpf_sysctl { } #[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)] +#[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)] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_2 { + pub optval: *mut ::aya_bpf_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)] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_3 { + pub optval_end: *mut ::aya_bpf_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(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)] +#[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(Copy, Clone)] pub struct btf_ptr { pub ptr: *mut ::aya_bpf_cty::c_void, pub type_id: __u32, pub flags: __u32, } +pub mod bpf_core_relo_kind { + pub type Type = ::aya_bpf_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; +} +#[repr(C)] +#[derive(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, +} #[repr(C)] #[derive(Copy, Clone)] pub struct user_pt_regs { diff --git a/bpf/aya-bpf-bindings/src/aarch64/getters.rs b/bpf/aya-bpf-bindings/src/aarch64/getters.rs index 795fdbf2..55f5d7e6 100644 --- a/bpf/aya-bpf-bindings/src/aarch64/getters.rs +++ b/bpf/aya-bpf-bindings/src/aarch64/getters.rs @@ -1,5 +1,826 @@ use super::bindings::*; impl __BindgenBitfieldUnit {} +impl bpf_insn { + pub fn code(&self) -> Option<__u8> { + unsafe { crate::bpf_probe_read(&self.code) }.ok() + } + pub fn off(&self) -> Option<__s16> { + unsafe { crate::bpf_probe_read(&self.off) }.ok() + } + pub fn imm(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.imm) }.ok() + } +} +impl bpf_lpm_trie_key { + pub fn prefixlen(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prefixlen) }.ok() + } + pub fn data(&self) -> Option<__IncompleteArrayField<__u8>> { + unsafe { crate::bpf_probe_read(&self.data) }.ok() + } +} +impl bpf_cgroup_storage_key { + pub fn cgroup_inode_id(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.cgroup_inode_id) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } +} +impl bpf_iter_link_info { + pub fn map(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.map) }.ok() + } +} +impl bpf_iter_link_info__bindgen_ty_1 { + pub fn map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_fd) }.ok() + } +} +impl bpf_stack_build_id { + pub fn status(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.status) }.ok() + } + pub fn build_id(&self) -> Option<[::aya_bpf_cty::c_uchar; 20usize]> { + unsafe { crate::bpf_probe_read(&self.build_id) }.ok() + } + pub fn offset(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.offset) }.ok() + } + pub fn ip(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.ip) }.ok() + } +} +impl bpf_stack_build_id__bindgen_ty_1 { + pub fn offset(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.offset) }.ok() + } + pub fn ip(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.ip) }.ok() + } +} +impl bpf_attr { + pub fn map_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_type) }.ok() + } + pub fn key_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.key_size) }.ok() + } + pub fn value_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.value_size) }.ok() + } + pub fn max_entries(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.max_entries) }.ok() + } + pub fn map_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_flags) }.ok() + } + pub fn inner_map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.inner_map_fd) }.ok() + } + pub fn numa_node(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.numa_node) }.ok() + } + pub fn map_name(&self) -> Option<[::aya_bpf_cty::c_char; 16usize]> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_name) }.ok() + } + pub fn map_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_ifindex) }.ok() + } + pub fn btf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.btf_fd) }.ok() + } + pub fn btf_key_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.btf_key_type_id) }.ok() + } + pub fn btf_value_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.btf_value_type_id) }.ok() + } + pub fn btf_vmlinux_value_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.btf_vmlinux_value_type_id) }.ok() + } + pub fn map_extra(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_extra) }.ok() + } + pub fn map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.map_fd) }.ok() + } + pub fn key(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.key) }.ok() + } + pub fn value(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.__bindgen_anon_1.value) }.ok() + } + pub fn next_key(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.__bindgen_anon_1.next_key) }.ok() + } + pub fn flags(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.flags) }.ok() + } + pub fn batch(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.batch) }.ok() + } + pub fn prog_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.prog_type) }.ok() + } + pub fn insn_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.insn_cnt) }.ok() + } + pub fn insns(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.insns) }.ok() + } + pub fn license(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.license) }.ok() + } + pub fn log_level(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.log_level) }.ok() + } + pub fn log_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.log_size) }.ok() + } + pub fn log_buf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.log_buf) }.ok() + } + pub fn kern_version(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.kern_version) }.ok() + } + pub fn prog_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.prog_flags) }.ok() + } + pub fn prog_name(&self) -> Option<[::aya_bpf_cty::c_char; 16usize]> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.prog_name) }.ok() + } + pub fn prog_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.prog_ifindex) }.ok() + } + pub fn expected_attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.expected_attach_type) }.ok() + } + pub fn prog_btf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.prog_btf_fd) }.ok() + } + pub fn func_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.func_info_rec_size) }.ok() + } + pub fn func_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.func_info) }.ok() + } + pub fn func_info_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.func_info_cnt) }.ok() + } + pub fn line_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.line_info_rec_size) }.ok() + } + pub fn line_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.line_info) }.ok() + } + pub fn line_info_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.line_info_cnt) }.ok() + } + pub fn attach_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.attach_btf_id) }.ok() + } + pub fn attach_prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.__bindgen_anon_1.attach_prog_fd) } + .ok() + } + pub fn attach_btf_obj_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.__bindgen_anon_1.attach_btf_obj_fd) } + .ok() + } + pub fn core_relo_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.core_relo_cnt) }.ok() + } + pub fn fd_array(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.fd_array) }.ok() + } + pub fn core_relos(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.core_relos) }.ok() + } + pub fn core_relo_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.core_relo_rec_size) }.ok() + } + pub fn pathname(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_4.pathname) }.ok() + } + pub fn bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_4.bpf_fd) }.ok() + } + pub fn file_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_4.file_flags) }.ok() + } + pub fn target_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_5.target_fd) }.ok() + } + pub fn attach_bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_5.attach_bpf_fd) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_5.attach_type) }.ok() + } + pub fn attach_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_5.attach_flags) }.ok() + } + pub fn replace_bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_5.replace_bpf_fd) }.ok() + } + pub fn test(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.test) }.ok() + } + pub fn start_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.__bindgen_anon_1.start_id) }.ok() + } + pub fn prog_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.__bindgen_anon_1.prog_id) }.ok() + } + pub fn map_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.__bindgen_anon_1.map_id) }.ok() + } + pub fn btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.__bindgen_anon_1.btf_id) }.ok() + } + pub fn link_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.__bindgen_anon_1.link_id) }.ok() + } + pub fn next_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.next_id) }.ok() + } + pub fn open_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.open_flags) }.ok() + } + pub fn info(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.info) }.ok() + } + pub fn query(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.query) }.ok() + } + pub fn raw_tracepoint(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.raw_tracepoint) }.ok() + } + pub fn btf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_7.btf) }.ok() + } + pub fn btf_log_buf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_7.btf_log_buf) }.ok() + } + pub fn btf_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_7.btf_size) }.ok() + } + pub fn btf_log_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_7.btf_log_size) }.ok() + } + pub fn btf_log_level(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_7.btf_log_level) }.ok() + } + pub fn task_fd_query(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.task_fd_query) }.ok() + } + pub fn link_create(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.link_create) }.ok() + } + pub fn link_update(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.link_update) }.ok() + } + pub fn link_detach(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.link_detach) }.ok() + } + pub fn enable_stats(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.enable_stats) }.ok() + } + pub fn iter_create(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.iter_create) }.ok() + } + pub fn prog_bind_map(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.prog_bind_map) }.ok() + } +} +impl bpf_attr__bindgen_ty_1 { + pub fn map_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_type) }.ok() + } + pub fn key_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.key_size) }.ok() + } + pub fn value_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.value_size) }.ok() + } + pub fn max_entries(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.max_entries) }.ok() + } + pub fn map_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_flags) }.ok() + } + pub fn inner_map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.inner_map_fd) }.ok() + } + pub fn numa_node(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.numa_node) }.ok() + } + pub fn map_name(&self) -> Option<[::aya_bpf_cty::c_char; 16usize]> { + unsafe { crate::bpf_probe_read(&self.map_name) }.ok() + } + pub fn map_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_ifindex) }.ok() + } + pub fn btf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_fd) }.ok() + } + pub fn btf_key_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_key_type_id) }.ok() + } + pub fn btf_value_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_value_type_id) }.ok() + } + pub fn btf_vmlinux_value_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_vmlinux_value_type_id) }.ok() + } + pub fn map_extra(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.map_extra) }.ok() + } +} +impl bpf_attr__bindgen_ty_2 { + pub fn map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_fd) }.ok() + } + pub fn key(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.key) }.ok() + } + pub fn value(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.value) }.ok() + } + pub fn next_key(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.next_key) }.ok() + } + pub fn flags(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } +} +impl bpf_attr__bindgen_ty_2__bindgen_ty_1 { + pub fn value(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.value) }.ok() + } + pub fn next_key(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.next_key) }.ok() + } +} +impl bpf_attr__bindgen_ty_3 { + pub fn in_batch(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.in_batch) }.ok() + } + pub fn out_batch(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.out_batch) }.ok() + } + pub fn keys(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.keys) }.ok() + } + pub fn values(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.values) }.ok() + } + pub fn count(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.count) }.ok() + } + pub fn map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_fd) }.ok() + } + pub fn elem_flags(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.elem_flags) }.ok() + } + pub fn flags(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } +} +impl bpf_attr__bindgen_ty_4 { + pub fn prog_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_type) }.ok() + } + pub fn insn_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.insn_cnt) }.ok() + } + pub fn insns(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.insns) }.ok() + } + pub fn license(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.license) }.ok() + } + pub fn log_level(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.log_level) }.ok() + } + pub fn log_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.log_size) }.ok() + } + pub fn log_buf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.log_buf) }.ok() + } + pub fn kern_version(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.kern_version) }.ok() + } + pub fn prog_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_flags) }.ok() + } + pub fn prog_name(&self) -> Option<[::aya_bpf_cty::c_char; 16usize]> { + unsafe { crate::bpf_probe_read(&self.prog_name) }.ok() + } + pub fn prog_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_ifindex) }.ok() + } + pub fn expected_attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.expected_attach_type) }.ok() + } + pub fn prog_btf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_btf_fd) }.ok() + } + pub fn func_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.func_info_rec_size) }.ok() + } + pub fn func_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.func_info) }.ok() + } + pub fn func_info_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.func_info_cnt) }.ok() + } + pub fn line_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.line_info_rec_size) }.ok() + } + pub fn line_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.line_info) }.ok() + } + pub fn line_info_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.line_info_cnt) }.ok() + } + pub fn attach_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_btf_id) }.ok() + } + pub fn attach_prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.attach_prog_fd) }.ok() + } + pub fn attach_btf_obj_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.attach_btf_obj_fd) }.ok() + } + pub fn core_relo_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.core_relo_cnt) }.ok() + } + pub fn fd_array(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.fd_array) }.ok() + } + pub fn core_relos(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.core_relos) }.ok() + } + pub fn core_relo_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.core_relo_rec_size) }.ok() + } +} +impl bpf_attr__bindgen_ty_4__bindgen_ty_1 { + pub fn attach_prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_prog_fd) }.ok() + } + pub fn attach_btf_obj_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_btf_obj_fd) }.ok() + } +} +impl bpf_attr__bindgen_ty_5 { + pub fn pathname(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.pathname) }.ok() + } + pub fn bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.bpf_fd) }.ok() + } + pub fn file_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.file_flags) }.ok() + } +} +impl bpf_attr__bindgen_ty_6 { + pub fn target_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_fd) }.ok() + } + pub fn attach_bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_bpf_fd) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } + pub fn attach_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_flags) }.ok() + } + pub fn replace_bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.replace_bpf_fd) }.ok() + } +} +impl bpf_attr__bindgen_ty_7 { + pub fn prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_fd) }.ok() + } + pub fn retval(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.retval) }.ok() + } + pub fn data_size_in(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.data_size_in) }.ok() + } + pub fn data_size_out(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.data_size_out) }.ok() + } + pub fn data_in(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.data_in) }.ok() + } + pub fn data_out(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.data_out) }.ok() + } + pub fn repeat(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.repeat) }.ok() + } + pub fn duration(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.duration) }.ok() + } + pub fn ctx_size_in(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ctx_size_in) }.ok() + } + pub fn ctx_size_out(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ctx_size_out) }.ok() + } + pub fn ctx_in(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.ctx_in) }.ok() + } + pub fn ctx_out(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.ctx_out) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } + pub fn cpu(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.cpu) }.ok() + } + pub fn batch_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.batch_size) }.ok() + } +} +impl bpf_attr__bindgen_ty_8 { + pub fn start_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.start_id) }.ok() + } + pub fn prog_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.prog_id) }.ok() + } + pub fn map_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_id) }.ok() + } + pub fn btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.btf_id) }.ok() + } + pub fn link_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.link_id) }.ok() + } + pub fn next_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.next_id) }.ok() + } + pub fn open_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.open_flags) }.ok() + } +} +impl bpf_attr__bindgen_ty_8__bindgen_ty_1 { + pub fn start_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.start_id) }.ok() + } + pub fn prog_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_id) }.ok() + } + pub fn map_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_id) }.ok() + } + pub fn btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_id) }.ok() + } + pub fn link_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.link_id) }.ok() + } +} +impl bpf_attr__bindgen_ty_9 { + pub fn bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.bpf_fd) }.ok() + } + pub fn info_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.info_len) }.ok() + } + pub fn info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.info) }.ok() + } +} +impl bpf_attr__bindgen_ty_10 { + pub fn target_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_fd) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } + pub fn query_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.query_flags) }.ok() + } + pub fn attach_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_flags) }.ok() + } + pub fn prog_ids(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.prog_ids) }.ok() + } + pub fn prog_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_cnt) }.ok() + } +} +impl bpf_attr__bindgen_ty_11 { + pub fn name(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.name) }.ok() + } + pub fn prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_fd) }.ok() + } +} +impl bpf_attr__bindgen_ty_12 { + pub fn btf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.btf) }.ok() + } + pub fn btf_log_buf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.btf_log_buf) }.ok() + } + pub fn btf_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_size) }.ok() + } + pub fn btf_log_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_log_size) }.ok() + } + pub fn btf_log_level(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_log_level) }.ok() + } +} +impl bpf_attr__bindgen_ty_13 { + pub fn pid(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.pid) }.ok() + } + pub fn fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.fd) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } + pub fn buf_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.buf_len) }.ok() + } + pub fn buf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.buf) }.ok() + } + pub fn prog_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_id) }.ok() + } + pub fn fd_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.fd_type) }.ok() + } + pub fn probe_offset(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.probe_offset) }.ok() + } + pub fn probe_addr(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.probe_addr) }.ok() + } +} +impl bpf_attr__bindgen_ty_14 { + pub fn prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_fd) }.ok() + } + pub fn target_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.target_fd) }.ok() + } + pub fn target_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.target_ifindex) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } + pub fn target_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.target_btf_id) }.ok() + } + pub fn iter_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.__bindgen_anon_1.iter_info) }.ok() + } + pub fn iter_info_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.__bindgen_anon_1.iter_info_len) }.ok() + } + pub fn perf_event(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.perf_event) }.ok() + } + pub fn kprobe_multi(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.kprobe_multi) }.ok() + } + pub fn tracing(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.tracing) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_1 { + pub fn target_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_fd) }.ok() + } + pub fn target_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_ifindex) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_2 { + pub fn target_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_btf_id) }.ok() + } + pub fn iter_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.iter_info) }.ok() + } + pub fn iter_info_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.iter_info_len) }.ok() + } + pub fn perf_event(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.perf_event) }.ok() + } + pub fn kprobe_multi(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.kprobe_multi) }.ok() + } + pub fn tracing(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.tracing) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1 { + pub fn iter_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.iter_info) }.ok() + } + pub fn iter_info_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.iter_info_len) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2 { + pub fn bpf_cookie(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.bpf_cookie) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3 { + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } + pub fn cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.cnt) }.ok() + } + pub fn syms(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.syms) }.ok() + } + pub fn addrs(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.addrs) }.ok() + } + pub fn cookies(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.cookies) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4 { + pub fn target_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_btf_id) }.ok() + } + pub fn cookie(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.cookie) }.ok() + } +} +impl bpf_attr__bindgen_ty_15 { + pub fn link_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.link_fd) }.ok() + } + pub fn new_prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.new_prog_fd) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } + pub fn old_prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.old_prog_fd) }.ok() + } +} +impl bpf_attr__bindgen_ty_16 { + pub fn link_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.link_fd) }.ok() + } +} +impl bpf_attr__bindgen_ty_17 { + pub fn type_(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.type_) }.ok() + } +} +impl bpf_attr__bindgen_ty_18 { + pub fn link_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.link_fd) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } +} +impl bpf_attr__bindgen_ty_19 { + pub fn prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_fd) }.ok() + } + pub fn map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_fd) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } +} impl __sk_buff { pub fn len(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.len) }.ok() @@ -156,6 +977,12 @@ impl bpf_tunnel_key { pub fn tunnel_label(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.tunnel_label) }.ok() } + pub fn local_ipv4(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.local_ipv4) }.ok() + } + pub fn local_ipv6(&self) -> Option<[__u32; 4usize]> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.local_ipv6) }.ok() + } } impl bpf_tunnel_key__bindgen_ty_1 { pub fn remote_ipv4(&self) -> Option<__u32> { @@ -165,6 +992,14 @@ impl bpf_tunnel_key__bindgen_ty_1 { unsafe { crate::bpf_probe_read(&self.remote_ipv6) }.ok() } } +impl bpf_tunnel_key__bindgen_ty_2 { + pub fn local_ipv4(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.local_ipv4) }.ok() + } + pub fn local_ipv6(&self) -> Option<[__u32; 4usize]> { + unsafe { crate::bpf_probe_read(&self.local_ipv6) }.ok() + } +} impl bpf_xfrm_state { pub fn reqid(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.reqid) }.ok() @@ -361,6 +1196,11 @@ impl bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { unsafe { crate::bpf_probe_read(&self.dport) }.ok() } } +impl bpf_xdp_sock { + pub fn queue_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.queue_id) }.ok() + } +} impl xdp_md { pub fn data(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.data) }.ok() @@ -381,6 +1221,38 @@ impl xdp_md { unsafe { crate::bpf_probe_read(&self.egress_ifindex) }.ok() } } +impl bpf_devmap_val { + pub fn ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ifindex) }.ok() + } + pub fn bpf_prog(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.bpf_prog) }.ok() + } +} +impl bpf_devmap_val__bindgen_ty_1 { + pub fn fd(&self) -> Option<::aya_bpf_cty::c_int> { + unsafe { crate::bpf_probe_read(&self.fd) }.ok() + } + pub fn id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.id) }.ok() + } +} +impl bpf_cpumap_val { + pub fn qsize(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.qsize) }.ok() + } + pub fn bpf_prog(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.bpf_prog) }.ok() + } +} +impl bpf_cpumap_val__bindgen_ty_1 { + pub fn fd(&self) -> Option<::aya_bpf_cty::c_int> { + unsafe { crate::bpf_probe_read(&self.fd) }.ok() + } + pub fn id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.id) }.ok() + } +} impl sk_msg_md { pub fn data(&self) -> Option<*mut ::aya_bpf_cty::c_void> { let v = unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.data) }.ok()?; @@ -550,6 +1422,113 @@ impl sk_reuseport_md__bindgen_ty_4 { } } } +impl bpf_prog_info { + pub fn type_(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.type_) }.ok() + } + pub fn id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.id) }.ok() + } + pub fn tag(&self) -> Option<[__u8; 8usize]> { + unsafe { crate::bpf_probe_read(&self.tag) }.ok() + } + pub fn jited_prog_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.jited_prog_len) }.ok() + } + pub fn xlated_prog_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.xlated_prog_len) }.ok() + } + pub fn jited_prog_insns(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.jited_prog_insns) }.ok() + } + pub fn xlated_prog_insns(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.xlated_prog_insns) }.ok() + } + pub fn load_time(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.load_time) }.ok() + } + pub fn created_by_uid(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.created_by_uid) }.ok() + } + pub fn nr_map_ids(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_map_ids) }.ok() + } + pub fn map_ids(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.map_ids) }.ok() + } + pub fn name(&self) -> Option<[::aya_bpf_cty::c_char; 16usize]> { + unsafe { crate::bpf_probe_read(&self.name) }.ok() + } + pub fn ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ifindex) }.ok() + } + pub fn netns_dev(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.netns_dev) }.ok() + } + pub fn netns_ino(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.netns_ino) }.ok() + } + pub fn nr_jited_ksyms(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_jited_ksyms) }.ok() + } + pub fn nr_jited_func_lens(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_jited_func_lens) }.ok() + } + pub fn jited_ksyms(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.jited_ksyms) }.ok() + } + pub fn jited_func_lens(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.jited_func_lens) }.ok() + } + pub fn btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_id) }.ok() + } + pub fn func_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.func_info_rec_size) }.ok() + } + pub fn func_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.func_info) }.ok() + } + pub fn nr_func_info(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_func_info) }.ok() + } + pub fn nr_line_info(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_line_info) }.ok() + } + pub fn line_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.line_info) }.ok() + } + pub fn jited_line_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.jited_line_info) }.ok() + } + pub fn nr_jited_line_info(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_jited_line_info) }.ok() + } + pub fn line_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.line_info_rec_size) }.ok() + } + pub fn jited_line_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.jited_line_info_rec_size) }.ok() + } + pub fn nr_prog_tags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_prog_tags) }.ok() + } + pub fn prog_tags(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.prog_tags) }.ok() + } + pub fn run_time_ns(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.run_time_ns) }.ok() + } + pub fn run_cnt(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.run_cnt) }.ok() + } + pub fn recursion_misses(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.recursion_misses) }.ok() + } + pub fn verified_insns(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.verified_insns) }.ok() + } +} impl bpf_map_info { pub fn type_(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.type_) }.ok() @@ -597,6 +1576,140 @@ impl bpf_map_info { unsafe { crate::bpf_probe_read(&self.map_extra) }.ok() } } +impl bpf_btf_info { + pub fn btf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.btf) }.ok() + } + pub fn btf_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_size) }.ok() + } + pub fn id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.id) }.ok() + } + pub fn name(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.name) }.ok() + } + pub fn name_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.name_len) }.ok() + } + pub fn kernel_btf(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.kernel_btf) }.ok() + } +} +impl bpf_link_info { + pub fn type_(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.type_) }.ok() + } + pub fn id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.id) }.ok() + } + pub fn prog_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_id) }.ok() + } + pub fn raw_tracepoint(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.raw_tracepoint) }.ok() + } + pub fn tracing(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.tracing) }.ok() + } + pub fn cgroup(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.cgroup) }.ok() + } + pub fn iter(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.iter) }.ok() + } + pub fn netns(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.netns) }.ok() + } + pub fn xdp(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.xdp) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1 { + pub fn raw_tracepoint(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.raw_tracepoint) }.ok() + } + pub fn tracing(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.tracing) }.ok() + } + pub fn cgroup(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.cgroup) }.ok() + } + pub fn iter(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.iter) }.ok() + } + pub fn netns(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.netns) }.ok() + } + pub fn xdp(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.xdp) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_1 { + pub fn tp_name(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.tp_name) }.ok() + } + pub fn tp_name_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.tp_name_len) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_2 { + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } + pub fn target_obj_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_obj_id) }.ok() + } + pub fn target_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_btf_id) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_3 { + pub fn cgroup_id(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.cgroup_id) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_4 { + pub fn target_name(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.target_name) }.ok() + } + pub fn target_name_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_name_len) }.ok() + } + pub fn map( + &self, + ) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { + pub fn map( + &self, + ) -> Option { + unsafe { crate::bpf_probe_read(&self.map) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { + pub fn map_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_id) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_5 { + pub fn netns_ino(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.netns_ino) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_6 { + pub fn ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ifindex) }.ok() + } +} impl bpf_sock_addr { pub fn user_family(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.user_family) }.ok() @@ -839,6 +1952,22 @@ impl bpf_perf_event_value { unsafe { crate::bpf_probe_read(&self.running) }.ok() } } +impl bpf_cgroup_dev_ctx { + pub fn access_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.access_type) }.ok() + } + pub fn major(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.major) }.ok() + } + pub fn minor(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.minor) }.ok() + } +} +impl bpf_raw_tracepoint_args { + pub fn args(&self) -> Option<__IncompleteArrayField<__u64>> { + unsafe { crate::bpf_probe_read(&self.args) }.ok() + } +} impl bpf_fib_lookup { pub fn family(&self) -> Option<__u8> { unsafe { crate::bpf_probe_read(&self.family) }.ok() @@ -1029,6 +2158,28 @@ impl bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 { unsafe { crate::bpf_probe_read(&self.ipv6_dst) }.ok() } } +impl bpf_func_info { + pub fn insn_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.insn_off) }.ok() + } + pub fn type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.type_id) }.ok() + } +} +impl bpf_line_info { + pub fn insn_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.insn_off) }.ok() + } + pub fn file_name_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.file_name_off) }.ok() + } + pub fn line_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.line_off) }.ok() + } + pub fn line_col(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.line_col) }.ok() + } +} impl bpf_spin_lock { pub fn val(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.val) }.ok() @@ -1043,6 +2194,74 @@ impl bpf_sysctl { unsafe { crate::bpf_probe_read(&self.file_pos) }.ok() } } +impl bpf_sockopt { + pub fn sk(&self) -> Option<*mut bpf_sock> { + let v = unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.sk) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } + pub fn optval(&self) -> Option<*mut ::aya_bpf_cty::c_void> { + let v = unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.optval) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } + pub fn optval_end(&self) -> Option<*mut ::aya_bpf_cty::c_void> { + let v = unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.optval_end) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } + pub fn level(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.level) }.ok() + } + pub fn optname(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.optname) }.ok() + } + pub fn optlen(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.optlen) }.ok() + } + pub fn retval(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.retval) }.ok() + } +} +impl bpf_sockopt__bindgen_ty_1 { + pub fn sk(&self) -> Option<*mut bpf_sock> { + let v = unsafe { crate::bpf_probe_read(&self.sk) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } +} +impl bpf_sockopt__bindgen_ty_2 { + pub fn optval(&self) -> Option<*mut ::aya_bpf_cty::c_void> { + let v = unsafe { crate::bpf_probe_read(&self.optval) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } +} +impl bpf_sockopt__bindgen_ty_3 { + pub fn optval_end(&self) -> Option<*mut ::aya_bpf_cty::c_void> { + let v = unsafe { crate::bpf_probe_read(&self.optval_end) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } +} impl bpf_pidns_info { pub fn pid(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.pid) }.ok() @@ -1051,6 +2270,70 @@ impl bpf_pidns_info { unsafe { crate::bpf_probe_read(&self.tgid) }.ok() } } +impl bpf_sk_lookup { + pub fn sk(&self) -> Option<*mut bpf_sock> { + let v = + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.__bindgen_anon_1.sk) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } + pub fn cookie(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.cookie) }.ok() + } + pub fn family(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.family) }.ok() + } + pub fn protocol(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.protocol) }.ok() + } + pub fn remote_ip4(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.remote_ip4) }.ok() + } + pub fn remote_ip6(&self) -> Option<[__u32; 4usize]> { + unsafe { crate::bpf_probe_read(&self.remote_ip6) }.ok() + } + pub fn remote_port(&self) -> Option<__be16> { + unsafe { crate::bpf_probe_read(&self.remote_port) }.ok() + } + pub fn local_ip4(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.local_ip4) }.ok() + } + pub fn local_ip6(&self) -> Option<[__u32; 4usize]> { + unsafe { crate::bpf_probe_read(&self.local_ip6) }.ok() + } + pub fn local_port(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.local_port) }.ok() + } + pub fn ingress_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ingress_ifindex) }.ok() + } +} +impl bpf_sk_lookup__bindgen_ty_1 { + pub fn sk(&self) -> Option<*mut bpf_sock> { + let v = unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.sk) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } + pub fn cookie(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.cookie) }.ok() + } +} +impl bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 { + pub fn sk(&self) -> Option<*mut bpf_sock> { + let v = unsafe { crate::bpf_probe_read(&self.sk) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } +} impl btf_ptr { pub fn ptr(&self) -> Option<*mut ::aya_bpf_cty::c_void> { let v = unsafe { crate::bpf_probe_read(&self.ptr) }.ok()?; @@ -1067,6 +2350,20 @@ impl btf_ptr { unsafe { crate::bpf_probe_read(&self.flags) }.ok() } } +impl bpf_core_relo { + pub fn insn_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.insn_off) }.ok() + } + pub fn type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.type_id) }.ok() + } + pub fn access_str_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.access_str_off) }.ok() + } + pub fn kind(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.kind) }.ok() + } +} impl user_pt_regs { pub fn regs(&self) -> Option<[__u64; 31usize]> { unsafe { crate::bpf_probe_read(&self.regs) }.ok() diff --git a/bpf/aya-bpf-bindings/src/aarch64/helpers.rs b/bpf/aya-bpf-bindings/src/aarch64/helpers.rs index 554e67bb..454652a6 100644 --- a/bpf/aya-bpf-bindings/src/aarch64/helpers.rs +++ b/bpf/aya-bpf-bindings/src/aarch64/helpers.rs @@ -1969,3 +1969,15 @@ pub unsafe fn bpf_kptr_xchg( ) -> *mut ::aya_bpf_cty::c_void = ::core::mem::transmute(194usize); fun(map_value, ptr) } +pub unsafe fn bpf_map_lookup_percpu_elem( + map: *mut ::aya_bpf_cty::c_void, + key: *const ::aya_bpf_cty::c_void, + cpu: __u32, +) -> *mut ::aya_bpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_bpf_cty::c_void, + key: *const ::aya_bpf_cty::c_void, + cpu: __u32, + ) -> *mut ::aya_bpf_cty::c_void = ::core::mem::transmute(195usize); + fun(map, key, cpu) +} diff --git a/bpf/aya-bpf-bindings/src/armv7/bindings.rs b/bpf/aya-bpf-bindings/src/armv7/bindings.rs index d908453e..ae139037 100644 --- a/bpf/aya-bpf-bindings/src/armv7/bindings.rs +++ b/bpf/aya-bpf-bindings/src/armv7/bindings.rs @@ -78,6 +78,36 @@ where } } } +#[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; @@ -244,6 +274,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 type __u8 = ::aya_bpf_cty::c_uchar; +pub type __s16 = ::aya_bpf_cty::c_short; pub type __u16 = ::aya_bpf_cty::c_ushort; pub type __s32 = ::aya_bpf_cty::c_int; pub type __u32 = ::aya_bpf_cty::c_uint; @@ -265,6 +296,113 @@ pub const BPF_REG_9: ::aya_bpf_cty::c_uint = 9; pub const BPF_REG_10: ::aya_bpf_cty::c_uint = 10; pub const __MAX_BPF_REG: ::aya_bpf_cty::c_uint = 11; pub type _bindgen_ty_1 = ::aya_bpf_cty::c_uint; +#[repr(C)] +#[derive(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 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 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)] +pub struct bpf_lpm_trie_key { + pub prefixlen: __u32, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_cgroup_storage_key { + pub cgroup_inode_id: __u64, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_iter_link_info { + pub map: bpf_iter_link_info__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_1 { + pub map_fd: __u32, +} +pub mod bpf_cmd { + pub type Type = ::aya_bpf_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 mod bpf_map_type { pub type Type = ::aya_bpf_cty::c_uint; pub const BPF_MAP_TYPE_UNSPEC: Type = 0; @@ -299,6 +437,102 @@ pub mod bpf_map_type { pub const BPF_MAP_TYPE_TASK_STORAGE: Type = 29; pub const BPF_MAP_TYPE_BLOOM_FILTER: Type = 30; } +pub mod bpf_prog_type { + pub type Type = ::aya_bpf_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 mod bpf_attach_type { + pub type Type = ::aya_bpf_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 __MAX_BPF_ATTACH_TYPE: Type = 43; +} +pub mod bpf_link_type { + pub type Type = ::aya_bpf_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 MAX_BPF_LINK_TYPE: Type = 10; +} pub const BPF_ANY: ::aya_bpf_cty::c_uint = 0; pub const BPF_NOEXIST: ::aya_bpf_cty::c_uint = 1; pub const BPF_EXIST: ::aya_bpf_cty::c_uint = 2; @@ -318,6 +552,508 @@ pub const BPF_F_MMAPABLE: ::aya_bpf_cty::c_uint = 1024; pub const BPF_F_PRESERVE_ELEMS: ::aya_bpf_cty::c_uint = 2048; pub const BPF_F_INNER_MAP: ::aya_bpf_cty::c_uint = 4096; pub type _bindgen_ty_3 = ::aya_bpf_cty::c_uint; +pub mod bpf_stats_type { + pub type Type = ::aya_bpf_cty::c_uint; + pub const BPF_STATS_RUN_TIME: Type = 0; +} +pub mod bpf_stack_build_id_status { + pub type Type = ::aya_bpf_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_bpf_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, +} +#[repr(C)] +#[derive(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_bpf_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, +} +#[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(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_bpf_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, +} +#[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(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_5 { + pub pathname: __u64, + pub bpf_fd: __u32, + pub file_flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_6 { + pub target_fd: __u32, + pub attach_bpf_fd: __u32, + pub attach_type: __u32, + pub attach_flags: __u32, + pub replace_bpf_fd: __u32, +} +#[repr(C)] +#[derive(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(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 target_fd: __u32, + pub attach_type: __u32, + pub query_flags: __u32, + pub attach_flags: __u32, + pub prog_ids: __u64, + pub prog_cnt: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_11 { + pub name: __u64, + pub prog_fd: __u32, +} +#[repr(C)] +#[derive(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, +} +#[repr(C)] +#[derive(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 prog_fd: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1, + pub attach_type: __u32, + pub flags: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { + pub target_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1, + pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2, + pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3, + pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1 { + pub iter_info: __u64, + pub iter_info_len: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2 { + pub bpf_cookie: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3 { + pub flags: __u32, + pub cnt: __u32, + pub syms: __u64, + pub addrs: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4 { + pub target_btf_id: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_15 { + pub link_fd: __u32, + pub new_prog_fd: __u32, + pub flags: __u32, + pub old_prog_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_16 { + pub link_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_17 { + pub type_: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_18 { + pub link_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_19 { + pub prog_fd: __u32, + pub map_fd: __u32, + pub flags: __u32, +} +pub mod bpf_func_id { + pub type Type = ::aya_bpf_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_MAX_ID: Type = 196; +} pub const BPF_F_RECOMPUTE_CSUM: ::aya_bpf_cty::c_uint = 1; pub const BPF_F_INVALIDATE_HASH: ::aya_bpf_cty::c_uint = 2; pub type _bindgen_ty_4 = ::aya_bpf_cty::c_uint; @@ -390,6 +1126,17 @@ pub mod bpf_adj_room_mode { 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_bpf_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_bpf_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: ::aya_bpf_cty::c_uint = 1; pub type _bindgen_ty_23 = ::aya_bpf_cty::c_uint; pub const BPF_F_BROADCAST: ::aya_bpf_cty::c_uint = 8; @@ -486,6 +1233,7 @@ pub struct bpf_tunnel_key { pub tunnel_ttl: __u8, pub tunnel_ext: __u16, pub tunnel_label: __u32, + pub __bindgen_anon_2: bpf_tunnel_key__bindgen_ty_2, } #[repr(C)] #[derive(Copy, Clone)] @@ -495,6 +1243,12 @@ pub union bpf_tunnel_key__bindgen_ty_1 { } #[repr(C)] #[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_2 { + 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, @@ -508,6 +1262,13 @@ 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_bpf_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; +} #[repr(C)] #[derive(Copy, Clone)] pub struct bpf_sock { @@ -592,6 +1353,11 @@ pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { pub sport: __be16, pub dport: __be16, } +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_xdp_sock { + pub queue_id: __u32, +} pub mod xdp_action { pub type Type = ::aya_bpf_cty::c_uint; pub const XDP_ABORTED: Type = 0; @@ -610,6 +1376,30 @@ pub struct xdp_md { 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_bpf_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_bpf_cty::c_int, + pub id: __u32, +} pub mod sk_action { pub type Type = ::aya_bpf_cty::c_uint; pub const SK_DROP: Type = 0; @@ -750,6 +1540,69 @@ impl sk_reuseport_md__bindgen_ty_4 { } #[repr(C)] #[derive(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_bpf_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, +} +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 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(Copy, Clone)] pub struct bpf_map_info { pub type_: __u32, pub id: __u32, @@ -778,6 +1631,81 @@ impl bpf_map_info { } #[repr(C)] #[derive(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, +} +#[repr(C)] +#[derive(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(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(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, +} +#[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(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 struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 { + pub netns_ino: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 { + pub ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] pub struct bpf_sock_addr { pub user_family: __u32, pub user_ip4: __u32, @@ -964,6 +1892,17 @@ pub type _bindgen_ty_32 = ::aya_bpf_cty::c_uint; pub const BPF_DEVCG_DEV_BLOCK: ::aya_bpf_cty::c_uint = 1; pub const BPF_DEVCG_DEV_CHAR: ::aya_bpf_cty::c_uint = 2; pub type _bindgen_ty_33 = ::aya_bpf_cty::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_cgroup_dev_ctx { + pub access_type: __u32, + pub major: __u32, + pub minor: __u32, +} +#[repr(C)] +pub struct bpf_raw_tracepoint_args { + pub args: __IncompleteArrayField<__u64>, +} pub const BPF_FIB_LOOKUP_DIRECT: ::aya_bpf_cty::c_uint = 1; pub const BPF_FIB_LOOKUP_OUTPUT: ::aya_bpf_cty::c_uint = 2; pub type _bindgen_ty_34 = ::aya_bpf_cty::c_uint; @@ -1031,6 +1970,25 @@ 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_bpf_cty::c_uint; + pub const BPF_MTU_CHK_SEGS: Type = 1; +} +pub mod bpf_check_mtu_ret { + pub type Type = ::aya_bpf_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_bpf_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: ::aya_bpf_cty::c_uint = 1; pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: ::aya_bpf_cty::c_uint = 2; pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: ::aya_bpf_cty::c_uint = 4; @@ -1072,6 +2030,20 @@ pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 { } #[repr(C)] #[derive(Copy, Clone)] +pub struct bpf_func_info { + pub insn_off: __u32, + pub type_id: __u32, +} +#[repr(C)] +#[derive(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(Copy, Clone)] pub struct bpf_spin_lock { pub val: __u32, } @@ -1097,17 +2069,140 @@ pub struct bpf_sysctl { } #[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_bpf_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_bpf_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(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(Copy, Clone)] pub struct btf_ptr { pub ptr: *mut ::aya_bpf_cty::c_void, pub type_id: __u32, pub flags: __u32, } +pub mod bpf_core_relo_kind { + pub type Type = ::aya_bpf_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; +} +#[repr(C)] +#[derive(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, +} #[repr(C)] #[derive(Copy, Clone)] pub struct pt_regs { diff --git a/bpf/aya-bpf-bindings/src/armv7/getters.rs b/bpf/aya-bpf-bindings/src/armv7/getters.rs index eb4ea801..7a8caf42 100644 --- a/bpf/aya-bpf-bindings/src/armv7/getters.rs +++ b/bpf/aya-bpf-bindings/src/armv7/getters.rs @@ -1,5 +1,826 @@ use super::bindings::*; impl __BindgenBitfieldUnit {} +impl bpf_insn { + pub fn code(&self) -> Option<__u8> { + unsafe { crate::bpf_probe_read(&self.code) }.ok() + } + pub fn off(&self) -> Option<__s16> { + unsafe { crate::bpf_probe_read(&self.off) }.ok() + } + pub fn imm(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.imm) }.ok() + } +} +impl bpf_lpm_trie_key { + pub fn prefixlen(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prefixlen) }.ok() + } + pub fn data(&self) -> Option<__IncompleteArrayField<__u8>> { + unsafe { crate::bpf_probe_read(&self.data) }.ok() + } +} +impl bpf_cgroup_storage_key { + pub fn cgroup_inode_id(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.cgroup_inode_id) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } +} +impl bpf_iter_link_info { + pub fn map(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.map) }.ok() + } +} +impl bpf_iter_link_info__bindgen_ty_1 { + pub fn map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_fd) }.ok() + } +} +impl bpf_stack_build_id { + pub fn status(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.status) }.ok() + } + pub fn build_id(&self) -> Option<[::aya_bpf_cty::c_uchar; 20usize]> { + unsafe { crate::bpf_probe_read(&self.build_id) }.ok() + } + pub fn offset(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.offset) }.ok() + } + pub fn ip(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.ip) }.ok() + } +} +impl bpf_stack_build_id__bindgen_ty_1 { + pub fn offset(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.offset) }.ok() + } + pub fn ip(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.ip) }.ok() + } +} +impl bpf_attr { + pub fn map_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_type) }.ok() + } + pub fn key_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.key_size) }.ok() + } + pub fn value_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.value_size) }.ok() + } + pub fn max_entries(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.max_entries) }.ok() + } + pub fn map_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_flags) }.ok() + } + pub fn inner_map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.inner_map_fd) }.ok() + } + pub fn numa_node(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.numa_node) }.ok() + } + pub fn map_name(&self) -> Option<[::aya_bpf_cty::c_char; 16usize]> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_name) }.ok() + } + pub fn map_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_ifindex) }.ok() + } + pub fn btf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.btf_fd) }.ok() + } + pub fn btf_key_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.btf_key_type_id) }.ok() + } + pub fn btf_value_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.btf_value_type_id) }.ok() + } + pub fn btf_vmlinux_value_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.btf_vmlinux_value_type_id) }.ok() + } + pub fn map_extra(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_extra) }.ok() + } + pub fn map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.map_fd) }.ok() + } + pub fn key(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.key) }.ok() + } + pub fn value(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.__bindgen_anon_1.value) }.ok() + } + pub fn next_key(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.__bindgen_anon_1.next_key) }.ok() + } + pub fn flags(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.flags) }.ok() + } + pub fn batch(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.batch) }.ok() + } + pub fn prog_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.prog_type) }.ok() + } + pub fn insn_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.insn_cnt) }.ok() + } + pub fn insns(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.insns) }.ok() + } + pub fn license(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.license) }.ok() + } + pub fn log_level(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.log_level) }.ok() + } + pub fn log_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.log_size) }.ok() + } + pub fn log_buf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.log_buf) }.ok() + } + pub fn kern_version(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.kern_version) }.ok() + } + pub fn prog_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.prog_flags) }.ok() + } + pub fn prog_name(&self) -> Option<[::aya_bpf_cty::c_char; 16usize]> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.prog_name) }.ok() + } + pub fn prog_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.prog_ifindex) }.ok() + } + pub fn expected_attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.expected_attach_type) }.ok() + } + pub fn prog_btf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.prog_btf_fd) }.ok() + } + pub fn func_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.func_info_rec_size) }.ok() + } + pub fn func_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.func_info) }.ok() + } + pub fn func_info_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.func_info_cnt) }.ok() + } + pub fn line_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.line_info_rec_size) }.ok() + } + pub fn line_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.line_info) }.ok() + } + pub fn line_info_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.line_info_cnt) }.ok() + } + pub fn attach_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.attach_btf_id) }.ok() + } + pub fn attach_prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.__bindgen_anon_1.attach_prog_fd) } + .ok() + } + pub fn attach_btf_obj_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.__bindgen_anon_1.attach_btf_obj_fd) } + .ok() + } + pub fn core_relo_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.core_relo_cnt) }.ok() + } + pub fn fd_array(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.fd_array) }.ok() + } + pub fn core_relos(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.core_relos) }.ok() + } + pub fn core_relo_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.core_relo_rec_size) }.ok() + } + pub fn pathname(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_4.pathname) }.ok() + } + pub fn bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_4.bpf_fd) }.ok() + } + pub fn file_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_4.file_flags) }.ok() + } + pub fn target_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_5.target_fd) }.ok() + } + pub fn attach_bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_5.attach_bpf_fd) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_5.attach_type) }.ok() + } + pub fn attach_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_5.attach_flags) }.ok() + } + pub fn replace_bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_5.replace_bpf_fd) }.ok() + } + pub fn test(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.test) }.ok() + } + pub fn start_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.__bindgen_anon_1.start_id) }.ok() + } + pub fn prog_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.__bindgen_anon_1.prog_id) }.ok() + } + pub fn map_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.__bindgen_anon_1.map_id) }.ok() + } + pub fn btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.__bindgen_anon_1.btf_id) }.ok() + } + pub fn link_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.__bindgen_anon_1.link_id) }.ok() + } + pub fn next_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.next_id) }.ok() + } + pub fn open_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.open_flags) }.ok() + } + pub fn info(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.info) }.ok() + } + pub fn query(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.query) }.ok() + } + pub fn raw_tracepoint(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.raw_tracepoint) }.ok() + } + pub fn btf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_7.btf) }.ok() + } + pub fn btf_log_buf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_7.btf_log_buf) }.ok() + } + pub fn btf_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_7.btf_size) }.ok() + } + pub fn btf_log_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_7.btf_log_size) }.ok() + } + pub fn btf_log_level(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_7.btf_log_level) }.ok() + } + pub fn task_fd_query(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.task_fd_query) }.ok() + } + pub fn link_create(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.link_create) }.ok() + } + pub fn link_update(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.link_update) }.ok() + } + pub fn link_detach(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.link_detach) }.ok() + } + pub fn enable_stats(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.enable_stats) }.ok() + } + pub fn iter_create(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.iter_create) }.ok() + } + pub fn prog_bind_map(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.prog_bind_map) }.ok() + } +} +impl bpf_attr__bindgen_ty_1 { + pub fn map_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_type) }.ok() + } + pub fn key_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.key_size) }.ok() + } + pub fn value_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.value_size) }.ok() + } + pub fn max_entries(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.max_entries) }.ok() + } + pub fn map_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_flags) }.ok() + } + pub fn inner_map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.inner_map_fd) }.ok() + } + pub fn numa_node(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.numa_node) }.ok() + } + pub fn map_name(&self) -> Option<[::aya_bpf_cty::c_char; 16usize]> { + unsafe { crate::bpf_probe_read(&self.map_name) }.ok() + } + pub fn map_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_ifindex) }.ok() + } + pub fn btf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_fd) }.ok() + } + pub fn btf_key_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_key_type_id) }.ok() + } + pub fn btf_value_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_value_type_id) }.ok() + } + pub fn btf_vmlinux_value_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_vmlinux_value_type_id) }.ok() + } + pub fn map_extra(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.map_extra) }.ok() + } +} +impl bpf_attr__bindgen_ty_2 { + pub fn map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_fd) }.ok() + } + pub fn key(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.key) }.ok() + } + pub fn value(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.value) }.ok() + } + pub fn next_key(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.next_key) }.ok() + } + pub fn flags(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } +} +impl bpf_attr__bindgen_ty_2__bindgen_ty_1 { + pub fn value(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.value) }.ok() + } + pub fn next_key(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.next_key) }.ok() + } +} +impl bpf_attr__bindgen_ty_3 { + pub fn in_batch(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.in_batch) }.ok() + } + pub fn out_batch(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.out_batch) }.ok() + } + pub fn keys(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.keys) }.ok() + } + pub fn values(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.values) }.ok() + } + pub fn count(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.count) }.ok() + } + pub fn map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_fd) }.ok() + } + pub fn elem_flags(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.elem_flags) }.ok() + } + pub fn flags(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } +} +impl bpf_attr__bindgen_ty_4 { + pub fn prog_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_type) }.ok() + } + pub fn insn_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.insn_cnt) }.ok() + } + pub fn insns(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.insns) }.ok() + } + pub fn license(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.license) }.ok() + } + pub fn log_level(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.log_level) }.ok() + } + pub fn log_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.log_size) }.ok() + } + pub fn log_buf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.log_buf) }.ok() + } + pub fn kern_version(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.kern_version) }.ok() + } + pub fn prog_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_flags) }.ok() + } + pub fn prog_name(&self) -> Option<[::aya_bpf_cty::c_char; 16usize]> { + unsafe { crate::bpf_probe_read(&self.prog_name) }.ok() + } + pub fn prog_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_ifindex) }.ok() + } + pub fn expected_attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.expected_attach_type) }.ok() + } + pub fn prog_btf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_btf_fd) }.ok() + } + pub fn func_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.func_info_rec_size) }.ok() + } + pub fn func_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.func_info) }.ok() + } + pub fn func_info_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.func_info_cnt) }.ok() + } + pub fn line_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.line_info_rec_size) }.ok() + } + pub fn line_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.line_info) }.ok() + } + pub fn line_info_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.line_info_cnt) }.ok() + } + pub fn attach_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_btf_id) }.ok() + } + pub fn attach_prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.attach_prog_fd) }.ok() + } + pub fn attach_btf_obj_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.attach_btf_obj_fd) }.ok() + } + pub fn core_relo_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.core_relo_cnt) }.ok() + } + pub fn fd_array(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.fd_array) }.ok() + } + pub fn core_relos(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.core_relos) }.ok() + } + pub fn core_relo_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.core_relo_rec_size) }.ok() + } +} +impl bpf_attr__bindgen_ty_4__bindgen_ty_1 { + pub fn attach_prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_prog_fd) }.ok() + } + pub fn attach_btf_obj_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_btf_obj_fd) }.ok() + } +} +impl bpf_attr__bindgen_ty_5 { + pub fn pathname(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.pathname) }.ok() + } + pub fn bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.bpf_fd) }.ok() + } + pub fn file_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.file_flags) }.ok() + } +} +impl bpf_attr__bindgen_ty_6 { + pub fn target_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_fd) }.ok() + } + pub fn attach_bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_bpf_fd) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } + pub fn attach_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_flags) }.ok() + } + pub fn replace_bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.replace_bpf_fd) }.ok() + } +} +impl bpf_attr__bindgen_ty_7 { + pub fn prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_fd) }.ok() + } + pub fn retval(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.retval) }.ok() + } + pub fn data_size_in(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.data_size_in) }.ok() + } + pub fn data_size_out(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.data_size_out) }.ok() + } + pub fn data_in(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.data_in) }.ok() + } + pub fn data_out(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.data_out) }.ok() + } + pub fn repeat(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.repeat) }.ok() + } + pub fn duration(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.duration) }.ok() + } + pub fn ctx_size_in(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ctx_size_in) }.ok() + } + pub fn ctx_size_out(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ctx_size_out) }.ok() + } + pub fn ctx_in(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.ctx_in) }.ok() + } + pub fn ctx_out(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.ctx_out) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } + pub fn cpu(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.cpu) }.ok() + } + pub fn batch_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.batch_size) }.ok() + } +} +impl bpf_attr__bindgen_ty_8 { + pub fn start_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.start_id) }.ok() + } + pub fn prog_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.prog_id) }.ok() + } + pub fn map_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_id) }.ok() + } + pub fn btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.btf_id) }.ok() + } + pub fn link_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.link_id) }.ok() + } + pub fn next_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.next_id) }.ok() + } + pub fn open_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.open_flags) }.ok() + } +} +impl bpf_attr__bindgen_ty_8__bindgen_ty_1 { + pub fn start_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.start_id) }.ok() + } + pub fn prog_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_id) }.ok() + } + pub fn map_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_id) }.ok() + } + pub fn btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_id) }.ok() + } + pub fn link_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.link_id) }.ok() + } +} +impl bpf_attr__bindgen_ty_9 { + pub fn bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.bpf_fd) }.ok() + } + pub fn info_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.info_len) }.ok() + } + pub fn info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.info) }.ok() + } +} +impl bpf_attr__bindgen_ty_10 { + pub fn target_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_fd) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } + pub fn query_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.query_flags) }.ok() + } + pub fn attach_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_flags) }.ok() + } + pub fn prog_ids(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.prog_ids) }.ok() + } + pub fn prog_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_cnt) }.ok() + } +} +impl bpf_attr__bindgen_ty_11 { + pub fn name(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.name) }.ok() + } + pub fn prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_fd) }.ok() + } +} +impl bpf_attr__bindgen_ty_12 { + pub fn btf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.btf) }.ok() + } + pub fn btf_log_buf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.btf_log_buf) }.ok() + } + pub fn btf_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_size) }.ok() + } + pub fn btf_log_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_log_size) }.ok() + } + pub fn btf_log_level(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_log_level) }.ok() + } +} +impl bpf_attr__bindgen_ty_13 { + pub fn pid(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.pid) }.ok() + } + pub fn fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.fd) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } + pub fn buf_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.buf_len) }.ok() + } + pub fn buf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.buf) }.ok() + } + pub fn prog_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_id) }.ok() + } + pub fn fd_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.fd_type) }.ok() + } + pub fn probe_offset(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.probe_offset) }.ok() + } + pub fn probe_addr(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.probe_addr) }.ok() + } +} +impl bpf_attr__bindgen_ty_14 { + pub fn prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_fd) }.ok() + } + pub fn target_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.target_fd) }.ok() + } + pub fn target_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.target_ifindex) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } + pub fn target_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.target_btf_id) }.ok() + } + pub fn iter_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.__bindgen_anon_1.iter_info) }.ok() + } + pub fn iter_info_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.__bindgen_anon_1.iter_info_len) }.ok() + } + pub fn perf_event(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.perf_event) }.ok() + } + pub fn kprobe_multi(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.kprobe_multi) }.ok() + } + pub fn tracing(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.tracing) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_1 { + pub fn target_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_fd) }.ok() + } + pub fn target_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_ifindex) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_2 { + pub fn target_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_btf_id) }.ok() + } + pub fn iter_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.iter_info) }.ok() + } + pub fn iter_info_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.iter_info_len) }.ok() + } + pub fn perf_event(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.perf_event) }.ok() + } + pub fn kprobe_multi(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.kprobe_multi) }.ok() + } + pub fn tracing(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.tracing) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1 { + pub fn iter_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.iter_info) }.ok() + } + pub fn iter_info_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.iter_info_len) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2 { + pub fn bpf_cookie(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.bpf_cookie) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3 { + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } + pub fn cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.cnt) }.ok() + } + pub fn syms(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.syms) }.ok() + } + pub fn addrs(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.addrs) }.ok() + } + pub fn cookies(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.cookies) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4 { + pub fn target_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_btf_id) }.ok() + } + pub fn cookie(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.cookie) }.ok() + } +} +impl bpf_attr__bindgen_ty_15 { + pub fn link_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.link_fd) }.ok() + } + pub fn new_prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.new_prog_fd) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } + pub fn old_prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.old_prog_fd) }.ok() + } +} +impl bpf_attr__bindgen_ty_16 { + pub fn link_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.link_fd) }.ok() + } +} +impl bpf_attr__bindgen_ty_17 { + pub fn type_(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.type_) }.ok() + } +} +impl bpf_attr__bindgen_ty_18 { + pub fn link_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.link_fd) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } +} +impl bpf_attr__bindgen_ty_19 { + pub fn prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_fd) }.ok() + } + pub fn map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_fd) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } +} impl __sk_buff { pub fn len(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.len) }.ok() @@ -156,6 +977,12 @@ impl bpf_tunnel_key { pub fn tunnel_label(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.tunnel_label) }.ok() } + pub fn local_ipv4(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.local_ipv4) }.ok() + } + pub fn local_ipv6(&self) -> Option<[__u32; 4usize]> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.local_ipv6) }.ok() + } } impl bpf_tunnel_key__bindgen_ty_1 { pub fn remote_ipv4(&self) -> Option<__u32> { @@ -165,6 +992,14 @@ impl bpf_tunnel_key__bindgen_ty_1 { unsafe { crate::bpf_probe_read(&self.remote_ipv6) }.ok() } } +impl bpf_tunnel_key__bindgen_ty_2 { + pub fn local_ipv4(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.local_ipv4) }.ok() + } + pub fn local_ipv6(&self) -> Option<[__u32; 4usize]> { + unsafe { crate::bpf_probe_read(&self.local_ipv6) }.ok() + } +} impl bpf_xfrm_state { pub fn reqid(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.reqid) }.ok() @@ -361,6 +1196,11 @@ impl bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { unsafe { crate::bpf_probe_read(&self.dport) }.ok() } } +impl bpf_xdp_sock { + pub fn queue_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.queue_id) }.ok() + } +} impl xdp_md { pub fn data(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.data) }.ok() @@ -381,6 +1221,38 @@ impl xdp_md { unsafe { crate::bpf_probe_read(&self.egress_ifindex) }.ok() } } +impl bpf_devmap_val { + pub fn ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ifindex) }.ok() + } + pub fn bpf_prog(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.bpf_prog) }.ok() + } +} +impl bpf_devmap_val__bindgen_ty_1 { + pub fn fd(&self) -> Option<::aya_bpf_cty::c_int> { + unsafe { crate::bpf_probe_read(&self.fd) }.ok() + } + pub fn id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.id) }.ok() + } +} +impl bpf_cpumap_val { + pub fn qsize(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.qsize) }.ok() + } + pub fn bpf_prog(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.bpf_prog) }.ok() + } +} +impl bpf_cpumap_val__bindgen_ty_1 { + pub fn fd(&self) -> Option<::aya_bpf_cty::c_int> { + unsafe { crate::bpf_probe_read(&self.fd) }.ok() + } + pub fn id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.id) }.ok() + } +} impl sk_msg_md { pub fn data(&self) -> Option<*mut ::aya_bpf_cty::c_void> { let v = unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.data) }.ok()?; @@ -550,6 +1422,113 @@ impl sk_reuseport_md__bindgen_ty_4 { } } } +impl bpf_prog_info { + pub fn type_(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.type_) }.ok() + } + pub fn id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.id) }.ok() + } + pub fn tag(&self) -> Option<[__u8; 8usize]> { + unsafe { crate::bpf_probe_read(&self.tag) }.ok() + } + pub fn jited_prog_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.jited_prog_len) }.ok() + } + pub fn xlated_prog_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.xlated_prog_len) }.ok() + } + pub fn jited_prog_insns(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.jited_prog_insns) }.ok() + } + pub fn xlated_prog_insns(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.xlated_prog_insns) }.ok() + } + pub fn load_time(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.load_time) }.ok() + } + pub fn created_by_uid(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.created_by_uid) }.ok() + } + pub fn nr_map_ids(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_map_ids) }.ok() + } + pub fn map_ids(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.map_ids) }.ok() + } + pub fn name(&self) -> Option<[::aya_bpf_cty::c_char; 16usize]> { + unsafe { crate::bpf_probe_read(&self.name) }.ok() + } + pub fn ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ifindex) }.ok() + } + pub fn netns_dev(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.netns_dev) }.ok() + } + pub fn netns_ino(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.netns_ino) }.ok() + } + pub fn nr_jited_ksyms(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_jited_ksyms) }.ok() + } + pub fn nr_jited_func_lens(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_jited_func_lens) }.ok() + } + pub fn jited_ksyms(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.jited_ksyms) }.ok() + } + pub fn jited_func_lens(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.jited_func_lens) }.ok() + } + pub fn btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_id) }.ok() + } + pub fn func_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.func_info_rec_size) }.ok() + } + pub fn func_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.func_info) }.ok() + } + pub fn nr_func_info(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_func_info) }.ok() + } + pub fn nr_line_info(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_line_info) }.ok() + } + pub fn line_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.line_info) }.ok() + } + pub fn jited_line_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.jited_line_info) }.ok() + } + pub fn nr_jited_line_info(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_jited_line_info) }.ok() + } + pub fn line_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.line_info_rec_size) }.ok() + } + pub fn jited_line_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.jited_line_info_rec_size) }.ok() + } + pub fn nr_prog_tags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_prog_tags) }.ok() + } + pub fn prog_tags(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.prog_tags) }.ok() + } + pub fn run_time_ns(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.run_time_ns) }.ok() + } + pub fn run_cnt(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.run_cnt) }.ok() + } + pub fn recursion_misses(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.recursion_misses) }.ok() + } + pub fn verified_insns(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.verified_insns) }.ok() + } +} impl bpf_map_info { pub fn type_(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.type_) }.ok() @@ -597,6 +1576,140 @@ impl bpf_map_info { unsafe { crate::bpf_probe_read(&self.map_extra) }.ok() } } +impl bpf_btf_info { + pub fn btf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.btf) }.ok() + } + pub fn btf_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_size) }.ok() + } + pub fn id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.id) }.ok() + } + pub fn name(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.name) }.ok() + } + pub fn name_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.name_len) }.ok() + } + pub fn kernel_btf(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.kernel_btf) }.ok() + } +} +impl bpf_link_info { + pub fn type_(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.type_) }.ok() + } + pub fn id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.id) }.ok() + } + pub fn prog_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_id) }.ok() + } + pub fn raw_tracepoint(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.raw_tracepoint) }.ok() + } + pub fn tracing(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.tracing) }.ok() + } + pub fn cgroup(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.cgroup) }.ok() + } + pub fn iter(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.iter) }.ok() + } + pub fn netns(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.netns) }.ok() + } + pub fn xdp(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.xdp) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1 { + pub fn raw_tracepoint(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.raw_tracepoint) }.ok() + } + pub fn tracing(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.tracing) }.ok() + } + pub fn cgroup(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.cgroup) }.ok() + } + pub fn iter(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.iter) }.ok() + } + pub fn netns(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.netns) }.ok() + } + pub fn xdp(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.xdp) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_1 { + pub fn tp_name(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.tp_name) }.ok() + } + pub fn tp_name_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.tp_name_len) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_2 { + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } + pub fn target_obj_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_obj_id) }.ok() + } + pub fn target_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_btf_id) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_3 { + pub fn cgroup_id(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.cgroup_id) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_4 { + pub fn target_name(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.target_name) }.ok() + } + pub fn target_name_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_name_len) }.ok() + } + pub fn map( + &self, + ) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { + pub fn map( + &self, + ) -> Option { + unsafe { crate::bpf_probe_read(&self.map) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { + pub fn map_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_id) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_5 { + pub fn netns_ino(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.netns_ino) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_6 { + pub fn ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ifindex) }.ok() + } +} impl bpf_sock_addr { pub fn user_family(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.user_family) }.ok() @@ -839,6 +1952,22 @@ impl bpf_perf_event_value { unsafe { crate::bpf_probe_read(&self.running) }.ok() } } +impl bpf_cgroup_dev_ctx { + pub fn access_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.access_type) }.ok() + } + pub fn major(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.major) }.ok() + } + pub fn minor(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.minor) }.ok() + } +} +impl bpf_raw_tracepoint_args { + pub fn args(&self) -> Option<__IncompleteArrayField<__u64>> { + unsafe { crate::bpf_probe_read(&self.args) }.ok() + } +} impl bpf_fib_lookup { pub fn family(&self) -> Option<__u8> { unsafe { crate::bpf_probe_read(&self.family) }.ok() @@ -1029,6 +2158,28 @@ impl bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 { unsafe { crate::bpf_probe_read(&self.ipv6_dst) }.ok() } } +impl bpf_func_info { + pub fn insn_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.insn_off) }.ok() + } + pub fn type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.type_id) }.ok() + } +} +impl bpf_line_info { + pub fn insn_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.insn_off) }.ok() + } + pub fn file_name_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.file_name_off) }.ok() + } + pub fn line_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.line_off) }.ok() + } + pub fn line_col(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.line_col) }.ok() + } +} impl bpf_spin_lock { pub fn val(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.val) }.ok() @@ -1043,6 +2194,74 @@ impl bpf_sysctl { unsafe { crate::bpf_probe_read(&self.file_pos) }.ok() } } +impl bpf_sockopt { + pub fn sk(&self) -> Option<*mut bpf_sock> { + let v = unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.sk) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } + pub fn optval(&self) -> Option<*mut ::aya_bpf_cty::c_void> { + let v = unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.optval) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } + pub fn optval_end(&self) -> Option<*mut ::aya_bpf_cty::c_void> { + let v = unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.optval_end) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } + pub fn level(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.level) }.ok() + } + pub fn optname(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.optname) }.ok() + } + pub fn optlen(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.optlen) }.ok() + } + pub fn retval(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.retval) }.ok() + } +} +impl bpf_sockopt__bindgen_ty_1 { + pub fn sk(&self) -> Option<*mut bpf_sock> { + let v = unsafe { crate::bpf_probe_read(&self.sk) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } +} +impl bpf_sockopt__bindgen_ty_2 { + pub fn optval(&self) -> Option<*mut ::aya_bpf_cty::c_void> { + let v = unsafe { crate::bpf_probe_read(&self.optval) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } +} +impl bpf_sockopt__bindgen_ty_3 { + pub fn optval_end(&self) -> Option<*mut ::aya_bpf_cty::c_void> { + let v = unsafe { crate::bpf_probe_read(&self.optval_end) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } +} impl bpf_pidns_info { pub fn pid(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.pid) }.ok() @@ -1051,6 +2270,70 @@ impl bpf_pidns_info { unsafe { crate::bpf_probe_read(&self.tgid) }.ok() } } +impl bpf_sk_lookup { + pub fn sk(&self) -> Option<*mut bpf_sock> { + let v = + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.__bindgen_anon_1.sk) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } + pub fn cookie(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.cookie) }.ok() + } + pub fn family(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.family) }.ok() + } + pub fn protocol(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.protocol) }.ok() + } + pub fn remote_ip4(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.remote_ip4) }.ok() + } + pub fn remote_ip6(&self) -> Option<[__u32; 4usize]> { + unsafe { crate::bpf_probe_read(&self.remote_ip6) }.ok() + } + pub fn remote_port(&self) -> Option<__be16> { + unsafe { crate::bpf_probe_read(&self.remote_port) }.ok() + } + pub fn local_ip4(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.local_ip4) }.ok() + } + pub fn local_ip6(&self) -> Option<[__u32; 4usize]> { + unsafe { crate::bpf_probe_read(&self.local_ip6) }.ok() + } + pub fn local_port(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.local_port) }.ok() + } + pub fn ingress_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ingress_ifindex) }.ok() + } +} +impl bpf_sk_lookup__bindgen_ty_1 { + pub fn sk(&self) -> Option<*mut bpf_sock> { + let v = unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.sk) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } + pub fn cookie(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.cookie) }.ok() + } +} +impl bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 { + pub fn sk(&self) -> Option<*mut bpf_sock> { + let v = unsafe { crate::bpf_probe_read(&self.sk) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } +} impl btf_ptr { pub fn ptr(&self) -> Option<*mut ::aya_bpf_cty::c_void> { let v = unsafe { crate::bpf_probe_read(&self.ptr) }.ok()?; @@ -1067,6 +2350,20 @@ impl btf_ptr { unsafe { crate::bpf_probe_read(&self.flags) }.ok() } } +impl bpf_core_relo { + pub fn insn_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.insn_off) }.ok() + } + pub fn type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.type_id) }.ok() + } + pub fn access_str_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.access_str_off) }.ok() + } + pub fn kind(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.kind) }.ok() + } +} impl pt_regs { pub fn uregs(&self) -> Option<[::aya_bpf_cty::c_long; 18usize]> { unsafe { crate::bpf_probe_read(&self.uregs) }.ok() diff --git a/bpf/aya-bpf-bindings/src/armv7/helpers.rs b/bpf/aya-bpf-bindings/src/armv7/helpers.rs index 554e67bb..454652a6 100644 --- a/bpf/aya-bpf-bindings/src/armv7/helpers.rs +++ b/bpf/aya-bpf-bindings/src/armv7/helpers.rs @@ -1969,3 +1969,15 @@ pub unsafe fn bpf_kptr_xchg( ) -> *mut ::aya_bpf_cty::c_void = ::core::mem::transmute(194usize); fun(map_value, ptr) } +pub unsafe fn bpf_map_lookup_percpu_elem( + map: *mut ::aya_bpf_cty::c_void, + key: *const ::aya_bpf_cty::c_void, + cpu: __u32, +) -> *mut ::aya_bpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_bpf_cty::c_void, + key: *const ::aya_bpf_cty::c_void, + cpu: __u32, + ) -> *mut ::aya_bpf_cty::c_void = ::core::mem::transmute(195usize); + fun(map, key, cpu) +} diff --git a/bpf/aya-bpf-bindings/src/x86_64/bindings.rs b/bpf/aya-bpf-bindings/src/x86_64/bindings.rs index 3341fcb8..3704d217 100644 --- a/bpf/aya-bpf-bindings/src/x86_64/bindings.rs +++ b/bpf/aya-bpf-bindings/src/x86_64/bindings.rs @@ -78,6 +78,36 @@ where } } } +#[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; @@ -249,6 +279,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 type __u8 = ::aya_bpf_cty::c_uchar; +pub type __s16 = ::aya_bpf_cty::c_short; pub type __u16 = ::aya_bpf_cty::c_ushort; pub type __s32 = ::aya_bpf_cty::c_int; pub type __u32 = ::aya_bpf_cty::c_uint; @@ -270,6 +301,113 @@ pub const BPF_REG_9: ::aya_bpf_cty::c_uint = 9; pub const BPF_REG_10: ::aya_bpf_cty::c_uint = 10; pub const __MAX_BPF_REG: ::aya_bpf_cty::c_uint = 11; pub type _bindgen_ty_1 = ::aya_bpf_cty::c_uint; +#[repr(C)] +#[derive(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 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 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)] +pub struct bpf_lpm_trie_key { + pub prefixlen: __u32, + pub data: __IncompleteArrayField<__u8>, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_cgroup_storage_key { + pub cgroup_inode_id: __u64, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_iter_link_info { + pub map: bpf_iter_link_info__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_iter_link_info__bindgen_ty_1 { + pub map_fd: __u32, +} +pub mod bpf_cmd { + pub type Type = ::aya_bpf_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 mod bpf_map_type { pub type Type = ::aya_bpf_cty::c_uint; pub const BPF_MAP_TYPE_UNSPEC: Type = 0; @@ -304,6 +442,102 @@ pub mod bpf_map_type { pub const BPF_MAP_TYPE_TASK_STORAGE: Type = 29; pub const BPF_MAP_TYPE_BLOOM_FILTER: Type = 30; } +pub mod bpf_prog_type { + pub type Type = ::aya_bpf_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 mod bpf_attach_type { + pub type Type = ::aya_bpf_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 __MAX_BPF_ATTACH_TYPE: Type = 43; +} +pub mod bpf_link_type { + pub type Type = ::aya_bpf_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 MAX_BPF_LINK_TYPE: Type = 10; +} pub const BPF_ANY: ::aya_bpf_cty::c_uint = 0; pub const BPF_NOEXIST: ::aya_bpf_cty::c_uint = 1; pub const BPF_EXIST: ::aya_bpf_cty::c_uint = 2; @@ -323,6 +557,508 @@ pub const BPF_F_MMAPABLE: ::aya_bpf_cty::c_uint = 1024; pub const BPF_F_PRESERVE_ELEMS: ::aya_bpf_cty::c_uint = 2048; pub const BPF_F_INNER_MAP: ::aya_bpf_cty::c_uint = 4096; pub type _bindgen_ty_3 = ::aya_bpf_cty::c_uint; +pub mod bpf_stats_type { + pub type Type = ::aya_bpf_cty::c_uint; + pub const BPF_STATS_RUN_TIME: Type = 0; +} +pub mod bpf_stack_build_id_status { + pub type Type = ::aya_bpf_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_bpf_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, +} +#[repr(C)] +#[derive(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_bpf_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, +} +#[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(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_bpf_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, +} +#[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(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_5 { + pub pathname: __u64, + pub bpf_fd: __u32, + pub file_flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_6 { + pub target_fd: __u32, + pub attach_bpf_fd: __u32, + pub attach_type: __u32, + pub attach_flags: __u32, + pub replace_bpf_fd: __u32, +} +#[repr(C)] +#[derive(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(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 target_fd: __u32, + pub attach_type: __u32, + pub query_flags: __u32, + pub attach_flags: __u32, + pub prog_ids: __u64, + pub prog_cnt: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_11 { + pub name: __u64, + pub prog_fd: __u32, +} +#[repr(C)] +#[derive(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, +} +#[repr(C)] +#[derive(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 prog_fd: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1, + pub attach_type: __u32, + pub flags: __u32, + pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 { + pub target_fd: __u32, + pub target_ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 { + pub target_btf_id: __u32, + pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1, + pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2, + pub kprobe_multi: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3, + pub tracing: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1 { + pub iter_info: __u64, + pub iter_info_len: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2 { + pub bpf_cookie: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3 { + pub flags: __u32, + pub cnt: __u32, + pub syms: __u64, + pub addrs: __u64, + pub cookies: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4 { + pub target_btf_id: __u32, + pub cookie: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_15 { + pub link_fd: __u32, + pub new_prog_fd: __u32, + pub flags: __u32, + pub old_prog_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_16 { + pub link_fd: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_17 { + pub type_: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_18 { + pub link_fd: __u32, + pub flags: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_attr__bindgen_ty_19 { + pub prog_fd: __u32, + pub map_fd: __u32, + pub flags: __u32, +} +pub mod bpf_func_id { + pub type Type = ::aya_bpf_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_MAX_ID: Type = 196; +} pub const BPF_F_RECOMPUTE_CSUM: ::aya_bpf_cty::c_uint = 1; pub const BPF_F_INVALIDATE_HASH: ::aya_bpf_cty::c_uint = 2; pub type _bindgen_ty_4 = ::aya_bpf_cty::c_uint; @@ -395,6 +1131,17 @@ pub mod bpf_adj_room_mode { 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_bpf_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_bpf_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: ::aya_bpf_cty::c_uint = 1; pub type _bindgen_ty_23 = ::aya_bpf_cty::c_uint; pub const BPF_F_BROADCAST: ::aya_bpf_cty::c_uint = 8; @@ -489,6 +1236,7 @@ pub struct bpf_tunnel_key { pub tunnel_ttl: __u8, pub tunnel_ext: __u16, pub tunnel_label: __u32, + pub __bindgen_anon_2: bpf_tunnel_key__bindgen_ty_2, } #[repr(C)] #[derive(Copy, Clone)] @@ -498,6 +1246,12 @@ pub union bpf_tunnel_key__bindgen_ty_1 { } #[repr(C)] #[derive(Copy, Clone)] +pub union bpf_tunnel_key__bindgen_ty_2 { + 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, @@ -511,6 +1265,13 @@ 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_bpf_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; +} #[repr(C)] #[derive(Copy, Clone)] pub struct bpf_sock { @@ -595,6 +1356,11 @@ pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { pub sport: __be16, pub dport: __be16, } +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_xdp_sock { + pub queue_id: __u32, +} pub mod xdp_action { pub type Type = ::aya_bpf_cty::c_uint; pub const XDP_ABORTED: Type = 0; @@ -613,6 +1379,30 @@ pub struct xdp_md { 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_bpf_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_bpf_cty::c_int, + pub id: __u32, +} pub mod sk_action { pub type Type = ::aya_bpf_cty::c_uint; pub const SK_DROP: Type = 0; @@ -746,6 +1536,69 @@ impl sk_reuseport_md__bindgen_ty_4 { } #[repr(C)] #[derive(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_bpf_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, +} +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 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(Copy, Clone)] pub struct bpf_map_info { pub type_: __u32, pub id: __u32, @@ -774,6 +1627,81 @@ impl bpf_map_info { } #[repr(C)] #[derive(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, +} +#[repr(C)] +#[derive(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(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(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, +} +#[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(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 struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 { + pub netns_ino: __u32, + pub attach_type: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 { + pub ifindex: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] pub struct bpf_sock_addr { pub user_family: __u32, pub user_ip4: __u32, @@ -956,6 +1884,17 @@ pub type _bindgen_ty_32 = ::aya_bpf_cty::c_uint; pub const BPF_DEVCG_DEV_BLOCK: ::aya_bpf_cty::c_uint = 1; pub const BPF_DEVCG_DEV_CHAR: ::aya_bpf_cty::c_uint = 2; pub type _bindgen_ty_33 = ::aya_bpf_cty::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct bpf_cgroup_dev_ctx { + pub access_type: __u32, + pub major: __u32, + pub minor: __u32, +} +#[repr(C)] +pub struct bpf_raw_tracepoint_args { + pub args: __IncompleteArrayField<__u64>, +} pub const BPF_FIB_LOOKUP_DIRECT: ::aya_bpf_cty::c_uint = 1; pub const BPF_FIB_LOOKUP_OUTPUT: ::aya_bpf_cty::c_uint = 2; pub type _bindgen_ty_34 = ::aya_bpf_cty::c_uint; @@ -1023,6 +1962,25 @@ 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_bpf_cty::c_uint; + pub const BPF_MTU_CHK_SEGS: Type = 1; +} +pub mod bpf_check_mtu_ret { + pub type Type = ::aya_bpf_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_bpf_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: ::aya_bpf_cty::c_uint = 1; pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: ::aya_bpf_cty::c_uint = 2; pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: ::aya_bpf_cty::c_uint = 4; @@ -1064,6 +2022,20 @@ pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 { } #[repr(C)] #[derive(Copy, Clone)] +pub struct bpf_func_info { + pub insn_off: __u32, + pub type_id: __u32, +} +#[repr(C)] +#[derive(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(Copy, Clone)] pub struct bpf_spin_lock { pub val: __u32, } @@ -1089,17 +2061,136 @@ pub struct bpf_sysctl { } #[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)] +#[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)] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_2 { + pub optval: *mut ::aya_bpf_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)] +#[derive(Copy, Clone)] +pub union bpf_sockopt__bindgen_ty_3 { + pub optval_end: *mut ::aya_bpf_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(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)] +#[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(Copy, Clone)] pub struct btf_ptr { pub ptr: *mut ::aya_bpf_cty::c_void, pub type_id: __u32, pub flags: __u32, } +pub mod bpf_core_relo_kind { + pub type Type = ::aya_bpf_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; +} +#[repr(C)] +#[derive(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, +} #[repr(C)] #[derive(Copy, Clone)] pub struct pt_regs { diff --git a/bpf/aya-bpf-bindings/src/x86_64/getters.rs b/bpf/aya-bpf-bindings/src/x86_64/getters.rs index b40b9017..2b54a5f6 100644 --- a/bpf/aya-bpf-bindings/src/x86_64/getters.rs +++ b/bpf/aya-bpf-bindings/src/x86_64/getters.rs @@ -1,5 +1,826 @@ use super::bindings::*; impl __BindgenBitfieldUnit {} +impl bpf_insn { + pub fn code(&self) -> Option<__u8> { + unsafe { crate::bpf_probe_read(&self.code) }.ok() + } + pub fn off(&self) -> Option<__s16> { + unsafe { crate::bpf_probe_read(&self.off) }.ok() + } + pub fn imm(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.imm) }.ok() + } +} +impl bpf_lpm_trie_key { + pub fn prefixlen(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prefixlen) }.ok() + } + pub fn data(&self) -> Option<__IncompleteArrayField<__u8>> { + unsafe { crate::bpf_probe_read(&self.data) }.ok() + } +} +impl bpf_cgroup_storage_key { + pub fn cgroup_inode_id(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.cgroup_inode_id) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } +} +impl bpf_iter_link_info { + pub fn map(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.map) }.ok() + } +} +impl bpf_iter_link_info__bindgen_ty_1 { + pub fn map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_fd) }.ok() + } +} +impl bpf_stack_build_id { + pub fn status(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.status) }.ok() + } + pub fn build_id(&self) -> Option<[::aya_bpf_cty::c_uchar; 20usize]> { + unsafe { crate::bpf_probe_read(&self.build_id) }.ok() + } + pub fn offset(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.offset) }.ok() + } + pub fn ip(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.ip) }.ok() + } +} +impl bpf_stack_build_id__bindgen_ty_1 { + pub fn offset(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.offset) }.ok() + } + pub fn ip(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.ip) }.ok() + } +} +impl bpf_attr { + pub fn map_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_type) }.ok() + } + pub fn key_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.key_size) }.ok() + } + pub fn value_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.value_size) }.ok() + } + pub fn max_entries(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.max_entries) }.ok() + } + pub fn map_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_flags) }.ok() + } + pub fn inner_map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.inner_map_fd) }.ok() + } + pub fn numa_node(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.numa_node) }.ok() + } + pub fn map_name(&self) -> Option<[::aya_bpf_cty::c_char; 16usize]> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_name) }.ok() + } + pub fn map_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_ifindex) }.ok() + } + pub fn btf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.btf_fd) }.ok() + } + pub fn btf_key_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.btf_key_type_id) }.ok() + } + pub fn btf_value_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.btf_value_type_id) }.ok() + } + pub fn btf_vmlinux_value_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.btf_vmlinux_value_type_id) }.ok() + } + pub fn map_extra(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_extra) }.ok() + } + pub fn map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.map_fd) }.ok() + } + pub fn key(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.key) }.ok() + } + pub fn value(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.__bindgen_anon_1.value) }.ok() + } + pub fn next_key(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.__bindgen_anon_1.next_key) }.ok() + } + pub fn flags(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.flags) }.ok() + } + pub fn batch(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.batch) }.ok() + } + pub fn prog_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.prog_type) }.ok() + } + pub fn insn_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.insn_cnt) }.ok() + } + pub fn insns(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.insns) }.ok() + } + pub fn license(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.license) }.ok() + } + pub fn log_level(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.log_level) }.ok() + } + pub fn log_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.log_size) }.ok() + } + pub fn log_buf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.log_buf) }.ok() + } + pub fn kern_version(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.kern_version) }.ok() + } + pub fn prog_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.prog_flags) }.ok() + } + pub fn prog_name(&self) -> Option<[::aya_bpf_cty::c_char; 16usize]> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.prog_name) }.ok() + } + pub fn prog_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.prog_ifindex) }.ok() + } + pub fn expected_attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.expected_attach_type) }.ok() + } + pub fn prog_btf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.prog_btf_fd) }.ok() + } + pub fn func_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.func_info_rec_size) }.ok() + } + pub fn func_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.func_info) }.ok() + } + pub fn func_info_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.func_info_cnt) }.ok() + } + pub fn line_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.line_info_rec_size) }.ok() + } + pub fn line_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.line_info) }.ok() + } + pub fn line_info_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.line_info_cnt) }.ok() + } + pub fn attach_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.attach_btf_id) }.ok() + } + pub fn attach_prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.__bindgen_anon_1.attach_prog_fd) } + .ok() + } + pub fn attach_btf_obj_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.__bindgen_anon_1.attach_btf_obj_fd) } + .ok() + } + pub fn core_relo_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.core_relo_cnt) }.ok() + } + pub fn fd_array(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.fd_array) }.ok() + } + pub fn core_relos(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.core_relos) }.ok() + } + pub fn core_relo_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.core_relo_rec_size) }.ok() + } + pub fn pathname(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_4.pathname) }.ok() + } + pub fn bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_4.bpf_fd) }.ok() + } + pub fn file_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_4.file_flags) }.ok() + } + pub fn target_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_5.target_fd) }.ok() + } + pub fn attach_bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_5.attach_bpf_fd) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_5.attach_type) }.ok() + } + pub fn attach_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_5.attach_flags) }.ok() + } + pub fn replace_bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_5.replace_bpf_fd) }.ok() + } + pub fn test(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.test) }.ok() + } + pub fn start_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.__bindgen_anon_1.start_id) }.ok() + } + pub fn prog_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.__bindgen_anon_1.prog_id) }.ok() + } + pub fn map_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.__bindgen_anon_1.map_id) }.ok() + } + pub fn btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.__bindgen_anon_1.btf_id) }.ok() + } + pub fn link_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.__bindgen_anon_1.link_id) }.ok() + } + pub fn next_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.next_id) }.ok() + } + pub fn open_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_6.open_flags) }.ok() + } + pub fn info(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.info) }.ok() + } + pub fn query(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.query) }.ok() + } + pub fn raw_tracepoint(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.raw_tracepoint) }.ok() + } + pub fn btf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_7.btf) }.ok() + } + pub fn btf_log_buf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_7.btf_log_buf) }.ok() + } + pub fn btf_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_7.btf_size) }.ok() + } + pub fn btf_log_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_7.btf_log_size) }.ok() + } + pub fn btf_log_level(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_7.btf_log_level) }.ok() + } + pub fn task_fd_query(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.task_fd_query) }.ok() + } + pub fn link_create(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.link_create) }.ok() + } + pub fn link_update(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.link_update) }.ok() + } + pub fn link_detach(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.link_detach) }.ok() + } + pub fn enable_stats(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.enable_stats) }.ok() + } + pub fn iter_create(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.iter_create) }.ok() + } + pub fn prog_bind_map(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.prog_bind_map) }.ok() + } +} +impl bpf_attr__bindgen_ty_1 { + pub fn map_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_type) }.ok() + } + pub fn key_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.key_size) }.ok() + } + pub fn value_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.value_size) }.ok() + } + pub fn max_entries(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.max_entries) }.ok() + } + pub fn map_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_flags) }.ok() + } + pub fn inner_map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.inner_map_fd) }.ok() + } + pub fn numa_node(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.numa_node) }.ok() + } + pub fn map_name(&self) -> Option<[::aya_bpf_cty::c_char; 16usize]> { + unsafe { crate::bpf_probe_read(&self.map_name) }.ok() + } + pub fn map_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_ifindex) }.ok() + } + pub fn btf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_fd) }.ok() + } + pub fn btf_key_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_key_type_id) }.ok() + } + pub fn btf_value_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_value_type_id) }.ok() + } + pub fn btf_vmlinux_value_type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_vmlinux_value_type_id) }.ok() + } + pub fn map_extra(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.map_extra) }.ok() + } +} +impl bpf_attr__bindgen_ty_2 { + pub fn map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_fd) }.ok() + } + pub fn key(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.key) }.ok() + } + pub fn value(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.value) }.ok() + } + pub fn next_key(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.next_key) }.ok() + } + pub fn flags(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } +} +impl bpf_attr__bindgen_ty_2__bindgen_ty_1 { + pub fn value(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.value) }.ok() + } + pub fn next_key(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.next_key) }.ok() + } +} +impl bpf_attr__bindgen_ty_3 { + pub fn in_batch(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.in_batch) }.ok() + } + pub fn out_batch(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.out_batch) }.ok() + } + pub fn keys(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.keys) }.ok() + } + pub fn values(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.values) }.ok() + } + pub fn count(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.count) }.ok() + } + pub fn map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_fd) }.ok() + } + pub fn elem_flags(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.elem_flags) }.ok() + } + pub fn flags(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } +} +impl bpf_attr__bindgen_ty_4 { + pub fn prog_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_type) }.ok() + } + pub fn insn_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.insn_cnt) }.ok() + } + pub fn insns(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.insns) }.ok() + } + pub fn license(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.license) }.ok() + } + pub fn log_level(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.log_level) }.ok() + } + pub fn log_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.log_size) }.ok() + } + pub fn log_buf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.log_buf) }.ok() + } + pub fn kern_version(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.kern_version) }.ok() + } + pub fn prog_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_flags) }.ok() + } + pub fn prog_name(&self) -> Option<[::aya_bpf_cty::c_char; 16usize]> { + unsafe { crate::bpf_probe_read(&self.prog_name) }.ok() + } + pub fn prog_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_ifindex) }.ok() + } + pub fn expected_attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.expected_attach_type) }.ok() + } + pub fn prog_btf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_btf_fd) }.ok() + } + pub fn func_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.func_info_rec_size) }.ok() + } + pub fn func_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.func_info) }.ok() + } + pub fn func_info_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.func_info_cnt) }.ok() + } + pub fn line_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.line_info_rec_size) }.ok() + } + pub fn line_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.line_info) }.ok() + } + pub fn line_info_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.line_info_cnt) }.ok() + } + pub fn attach_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_btf_id) }.ok() + } + pub fn attach_prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.attach_prog_fd) }.ok() + } + pub fn attach_btf_obj_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.attach_btf_obj_fd) }.ok() + } + pub fn core_relo_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.core_relo_cnt) }.ok() + } + pub fn fd_array(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.fd_array) }.ok() + } + pub fn core_relos(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.core_relos) }.ok() + } + pub fn core_relo_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.core_relo_rec_size) }.ok() + } +} +impl bpf_attr__bindgen_ty_4__bindgen_ty_1 { + pub fn attach_prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_prog_fd) }.ok() + } + pub fn attach_btf_obj_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_btf_obj_fd) }.ok() + } +} +impl bpf_attr__bindgen_ty_5 { + pub fn pathname(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.pathname) }.ok() + } + pub fn bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.bpf_fd) }.ok() + } + pub fn file_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.file_flags) }.ok() + } +} +impl bpf_attr__bindgen_ty_6 { + pub fn target_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_fd) }.ok() + } + pub fn attach_bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_bpf_fd) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } + pub fn attach_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_flags) }.ok() + } + pub fn replace_bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.replace_bpf_fd) }.ok() + } +} +impl bpf_attr__bindgen_ty_7 { + pub fn prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_fd) }.ok() + } + pub fn retval(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.retval) }.ok() + } + pub fn data_size_in(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.data_size_in) }.ok() + } + pub fn data_size_out(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.data_size_out) }.ok() + } + pub fn data_in(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.data_in) }.ok() + } + pub fn data_out(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.data_out) }.ok() + } + pub fn repeat(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.repeat) }.ok() + } + pub fn duration(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.duration) }.ok() + } + pub fn ctx_size_in(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ctx_size_in) }.ok() + } + pub fn ctx_size_out(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ctx_size_out) }.ok() + } + pub fn ctx_in(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.ctx_in) }.ok() + } + pub fn ctx_out(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.ctx_out) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } + pub fn cpu(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.cpu) }.ok() + } + pub fn batch_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.batch_size) }.ok() + } +} +impl bpf_attr__bindgen_ty_8 { + pub fn start_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.start_id) }.ok() + } + pub fn prog_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.prog_id) }.ok() + } + pub fn map_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map_id) }.ok() + } + pub fn btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.btf_id) }.ok() + } + pub fn link_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.link_id) }.ok() + } + pub fn next_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.next_id) }.ok() + } + pub fn open_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.open_flags) }.ok() + } +} +impl bpf_attr__bindgen_ty_8__bindgen_ty_1 { + pub fn start_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.start_id) }.ok() + } + pub fn prog_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_id) }.ok() + } + pub fn map_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_id) }.ok() + } + pub fn btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_id) }.ok() + } + pub fn link_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.link_id) }.ok() + } +} +impl bpf_attr__bindgen_ty_9 { + pub fn bpf_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.bpf_fd) }.ok() + } + pub fn info_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.info_len) }.ok() + } + pub fn info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.info) }.ok() + } +} +impl bpf_attr__bindgen_ty_10 { + pub fn target_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_fd) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } + pub fn query_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.query_flags) }.ok() + } + pub fn attach_flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_flags) }.ok() + } + pub fn prog_ids(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.prog_ids) }.ok() + } + pub fn prog_cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_cnt) }.ok() + } +} +impl bpf_attr__bindgen_ty_11 { + pub fn name(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.name) }.ok() + } + pub fn prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_fd) }.ok() + } +} +impl bpf_attr__bindgen_ty_12 { + pub fn btf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.btf) }.ok() + } + pub fn btf_log_buf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.btf_log_buf) }.ok() + } + pub fn btf_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_size) }.ok() + } + pub fn btf_log_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_log_size) }.ok() + } + pub fn btf_log_level(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_log_level) }.ok() + } +} +impl bpf_attr__bindgen_ty_13 { + pub fn pid(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.pid) }.ok() + } + pub fn fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.fd) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } + pub fn buf_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.buf_len) }.ok() + } + pub fn buf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.buf) }.ok() + } + pub fn prog_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_id) }.ok() + } + pub fn fd_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.fd_type) }.ok() + } + pub fn probe_offset(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.probe_offset) }.ok() + } + pub fn probe_addr(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.probe_addr) }.ok() + } +} +impl bpf_attr__bindgen_ty_14 { + pub fn prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_fd) }.ok() + } + pub fn target_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.target_fd) }.ok() + } + pub fn target_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.target_ifindex) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } + pub fn target_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.target_btf_id) }.ok() + } + pub fn iter_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.__bindgen_anon_1.iter_info) }.ok() + } + pub fn iter_info_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.__bindgen_anon_1.iter_info_len) }.ok() + } + pub fn perf_event(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.perf_event) }.ok() + } + pub fn kprobe_multi(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.kprobe_multi) }.ok() + } + pub fn tracing(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.tracing) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_1 { + pub fn target_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_fd) }.ok() + } + pub fn target_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_ifindex) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_2 { + pub fn target_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_btf_id) }.ok() + } + pub fn iter_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.iter_info) }.ok() + } + pub fn iter_info_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.iter_info_len) }.ok() + } + pub fn perf_event(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.perf_event) }.ok() + } + pub fn kprobe_multi(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.kprobe_multi) }.ok() + } + pub fn tracing(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.tracing) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1 { + pub fn iter_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.iter_info) }.ok() + } + pub fn iter_info_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.iter_info_len) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2 { + pub fn bpf_cookie(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.bpf_cookie) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_3 { + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } + pub fn cnt(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.cnt) }.ok() + } + pub fn syms(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.syms) }.ok() + } + pub fn addrs(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.addrs) }.ok() + } + pub fn cookies(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.cookies) }.ok() + } +} +impl bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_4 { + pub fn target_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_btf_id) }.ok() + } + pub fn cookie(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.cookie) }.ok() + } +} +impl bpf_attr__bindgen_ty_15 { + pub fn link_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.link_fd) }.ok() + } + pub fn new_prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.new_prog_fd) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } + pub fn old_prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.old_prog_fd) }.ok() + } +} +impl bpf_attr__bindgen_ty_16 { + pub fn link_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.link_fd) }.ok() + } +} +impl bpf_attr__bindgen_ty_17 { + pub fn type_(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.type_) }.ok() + } +} +impl bpf_attr__bindgen_ty_18 { + pub fn link_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.link_fd) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } +} +impl bpf_attr__bindgen_ty_19 { + pub fn prog_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_fd) }.ok() + } + pub fn map_fd(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_fd) }.ok() + } + pub fn flags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.flags) }.ok() + } +} impl __sk_buff { pub fn len(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.len) }.ok() @@ -156,6 +977,12 @@ impl bpf_tunnel_key { pub fn tunnel_label(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.tunnel_label) }.ok() } + pub fn local_ipv4(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.local_ipv4) }.ok() + } + pub fn local_ipv6(&self) -> Option<[__u32; 4usize]> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.local_ipv6) }.ok() + } } impl bpf_tunnel_key__bindgen_ty_1 { pub fn remote_ipv4(&self) -> Option<__u32> { @@ -165,6 +992,14 @@ impl bpf_tunnel_key__bindgen_ty_1 { unsafe { crate::bpf_probe_read(&self.remote_ipv6) }.ok() } } +impl bpf_tunnel_key__bindgen_ty_2 { + pub fn local_ipv4(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.local_ipv4) }.ok() + } + pub fn local_ipv6(&self) -> Option<[__u32; 4usize]> { + unsafe { crate::bpf_probe_read(&self.local_ipv6) }.ok() + } +} impl bpf_xfrm_state { pub fn reqid(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.reqid) }.ok() @@ -361,6 +1196,11 @@ impl bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { unsafe { crate::bpf_probe_read(&self.dport) }.ok() } } +impl bpf_xdp_sock { + pub fn queue_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.queue_id) }.ok() + } +} impl xdp_md { pub fn data(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.data) }.ok() @@ -381,6 +1221,38 @@ impl xdp_md { unsafe { crate::bpf_probe_read(&self.egress_ifindex) }.ok() } } +impl bpf_devmap_val { + pub fn ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ifindex) }.ok() + } + pub fn bpf_prog(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.bpf_prog) }.ok() + } +} +impl bpf_devmap_val__bindgen_ty_1 { + pub fn fd(&self) -> Option<::aya_bpf_cty::c_int> { + unsafe { crate::bpf_probe_read(&self.fd) }.ok() + } + pub fn id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.id) }.ok() + } +} +impl bpf_cpumap_val { + pub fn qsize(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.qsize) }.ok() + } + pub fn bpf_prog(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.bpf_prog) }.ok() + } +} +impl bpf_cpumap_val__bindgen_ty_1 { + pub fn fd(&self) -> Option<::aya_bpf_cty::c_int> { + unsafe { crate::bpf_probe_read(&self.fd) }.ok() + } + pub fn id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.id) }.ok() + } +} impl sk_msg_md { pub fn data(&self) -> Option<*mut ::aya_bpf_cty::c_void> { let v = unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.data) }.ok()?; @@ -550,6 +1422,113 @@ impl sk_reuseport_md__bindgen_ty_4 { } } } +impl bpf_prog_info { + pub fn type_(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.type_) }.ok() + } + pub fn id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.id) }.ok() + } + pub fn tag(&self) -> Option<[__u8; 8usize]> { + unsafe { crate::bpf_probe_read(&self.tag) }.ok() + } + pub fn jited_prog_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.jited_prog_len) }.ok() + } + pub fn xlated_prog_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.xlated_prog_len) }.ok() + } + pub fn jited_prog_insns(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.jited_prog_insns) }.ok() + } + pub fn xlated_prog_insns(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.xlated_prog_insns) }.ok() + } + pub fn load_time(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.load_time) }.ok() + } + pub fn created_by_uid(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.created_by_uid) }.ok() + } + pub fn nr_map_ids(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_map_ids) }.ok() + } + pub fn map_ids(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.map_ids) }.ok() + } + pub fn name(&self) -> Option<[::aya_bpf_cty::c_char; 16usize]> { + unsafe { crate::bpf_probe_read(&self.name) }.ok() + } + pub fn ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ifindex) }.ok() + } + pub fn netns_dev(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.netns_dev) }.ok() + } + pub fn netns_ino(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.netns_ino) }.ok() + } + pub fn nr_jited_ksyms(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_jited_ksyms) }.ok() + } + pub fn nr_jited_func_lens(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_jited_func_lens) }.ok() + } + pub fn jited_ksyms(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.jited_ksyms) }.ok() + } + pub fn jited_func_lens(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.jited_func_lens) }.ok() + } + pub fn btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_id) }.ok() + } + pub fn func_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.func_info_rec_size) }.ok() + } + pub fn func_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.func_info) }.ok() + } + pub fn nr_func_info(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_func_info) }.ok() + } + pub fn nr_line_info(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_line_info) }.ok() + } + pub fn line_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.line_info) }.ok() + } + pub fn jited_line_info(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.jited_line_info) }.ok() + } + pub fn nr_jited_line_info(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_jited_line_info) }.ok() + } + pub fn line_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.line_info_rec_size) }.ok() + } + pub fn jited_line_info_rec_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.jited_line_info_rec_size) }.ok() + } + pub fn nr_prog_tags(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.nr_prog_tags) }.ok() + } + pub fn prog_tags(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.prog_tags) }.ok() + } + pub fn run_time_ns(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.run_time_ns) }.ok() + } + pub fn run_cnt(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.run_cnt) }.ok() + } + pub fn recursion_misses(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.recursion_misses) }.ok() + } + pub fn verified_insns(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.verified_insns) }.ok() + } +} impl bpf_map_info { pub fn type_(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.type_) }.ok() @@ -597,6 +1576,140 @@ impl bpf_map_info { unsafe { crate::bpf_probe_read(&self.map_extra) }.ok() } } +impl bpf_btf_info { + pub fn btf(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.btf) }.ok() + } + pub fn btf_size(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.btf_size) }.ok() + } + pub fn id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.id) }.ok() + } + pub fn name(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.name) }.ok() + } + pub fn name_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.name_len) }.ok() + } + pub fn kernel_btf(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.kernel_btf) }.ok() + } +} +impl bpf_link_info { + pub fn type_(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.type_) }.ok() + } + pub fn id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.id) }.ok() + } + pub fn prog_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.prog_id) }.ok() + } + pub fn raw_tracepoint(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.raw_tracepoint) }.ok() + } + pub fn tracing(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.tracing) }.ok() + } + pub fn cgroup(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.cgroup) }.ok() + } + pub fn iter(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.iter) }.ok() + } + pub fn netns(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.netns) }.ok() + } + pub fn xdp(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.xdp) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1 { + pub fn raw_tracepoint(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.raw_tracepoint) }.ok() + } + pub fn tracing(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.tracing) }.ok() + } + pub fn cgroup(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.cgroup) }.ok() + } + pub fn iter(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.iter) }.ok() + } + pub fn netns(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.netns) }.ok() + } + pub fn xdp(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.xdp) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_1 { + pub fn tp_name(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.tp_name) }.ok() + } + pub fn tp_name_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.tp_name_len) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_2 { + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } + pub fn target_obj_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_obj_id) }.ok() + } + pub fn target_btf_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_btf_id) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_3 { + pub fn cgroup_id(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.cgroup_id) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_4 { + pub fn target_name(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.target_name) }.ok() + } + pub fn target_name_len(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.target_name_len) }.ok() + } + pub fn map( + &self, + ) -> Option { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.map) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 { + pub fn map( + &self, + ) -> Option { + unsafe { crate::bpf_probe_read(&self.map) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { + pub fn map_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.map_id) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_5 { + pub fn netns_ino(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.netns_ino) }.ok() + } + pub fn attach_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.attach_type) }.ok() + } +} +impl bpf_link_info__bindgen_ty_1__bindgen_ty_6 { + pub fn ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ifindex) }.ok() + } +} impl bpf_sock_addr { pub fn user_family(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.user_family) }.ok() @@ -839,6 +1952,22 @@ impl bpf_perf_event_value { unsafe { crate::bpf_probe_read(&self.running) }.ok() } } +impl bpf_cgroup_dev_ctx { + pub fn access_type(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.access_type) }.ok() + } + pub fn major(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.major) }.ok() + } + pub fn minor(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.minor) }.ok() + } +} +impl bpf_raw_tracepoint_args { + pub fn args(&self) -> Option<__IncompleteArrayField<__u64>> { + unsafe { crate::bpf_probe_read(&self.args) }.ok() + } +} impl bpf_fib_lookup { pub fn family(&self) -> Option<__u8> { unsafe { crate::bpf_probe_read(&self.family) }.ok() @@ -1029,6 +2158,28 @@ impl bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 { unsafe { crate::bpf_probe_read(&self.ipv6_dst) }.ok() } } +impl bpf_func_info { + pub fn insn_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.insn_off) }.ok() + } + pub fn type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.type_id) }.ok() + } +} +impl bpf_line_info { + pub fn insn_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.insn_off) }.ok() + } + pub fn file_name_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.file_name_off) }.ok() + } + pub fn line_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.line_off) }.ok() + } + pub fn line_col(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.line_col) }.ok() + } +} impl bpf_spin_lock { pub fn val(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.val) }.ok() @@ -1043,6 +2194,74 @@ impl bpf_sysctl { unsafe { crate::bpf_probe_read(&self.file_pos) }.ok() } } +impl bpf_sockopt { + pub fn sk(&self) -> Option<*mut bpf_sock> { + let v = unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.sk) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } + pub fn optval(&self) -> Option<*mut ::aya_bpf_cty::c_void> { + let v = unsafe { crate::bpf_probe_read(&self.__bindgen_anon_2.optval) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } + pub fn optval_end(&self) -> Option<*mut ::aya_bpf_cty::c_void> { + let v = unsafe { crate::bpf_probe_read(&self.__bindgen_anon_3.optval_end) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } + pub fn level(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.level) }.ok() + } + pub fn optname(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.optname) }.ok() + } + pub fn optlen(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.optlen) }.ok() + } + pub fn retval(&self) -> Option<__s32> { + unsafe { crate::bpf_probe_read(&self.retval) }.ok() + } +} +impl bpf_sockopt__bindgen_ty_1 { + pub fn sk(&self) -> Option<*mut bpf_sock> { + let v = unsafe { crate::bpf_probe_read(&self.sk) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } +} +impl bpf_sockopt__bindgen_ty_2 { + pub fn optval(&self) -> Option<*mut ::aya_bpf_cty::c_void> { + let v = unsafe { crate::bpf_probe_read(&self.optval) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } +} +impl bpf_sockopt__bindgen_ty_3 { + pub fn optval_end(&self) -> Option<*mut ::aya_bpf_cty::c_void> { + let v = unsafe { crate::bpf_probe_read(&self.optval_end) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } +} impl bpf_pidns_info { pub fn pid(&self) -> Option<__u32> { unsafe { crate::bpf_probe_read(&self.pid) }.ok() @@ -1051,6 +2270,70 @@ impl bpf_pidns_info { unsafe { crate::bpf_probe_read(&self.tgid) }.ok() } } +impl bpf_sk_lookup { + pub fn sk(&self) -> Option<*mut bpf_sock> { + let v = + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.__bindgen_anon_1.sk) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } + pub fn cookie(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.cookie) }.ok() + } + pub fn family(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.family) }.ok() + } + pub fn protocol(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.protocol) }.ok() + } + pub fn remote_ip4(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.remote_ip4) }.ok() + } + pub fn remote_ip6(&self) -> Option<[__u32; 4usize]> { + unsafe { crate::bpf_probe_read(&self.remote_ip6) }.ok() + } + pub fn remote_port(&self) -> Option<__be16> { + unsafe { crate::bpf_probe_read(&self.remote_port) }.ok() + } + pub fn local_ip4(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.local_ip4) }.ok() + } + pub fn local_ip6(&self) -> Option<[__u32; 4usize]> { + unsafe { crate::bpf_probe_read(&self.local_ip6) }.ok() + } + pub fn local_port(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.local_port) }.ok() + } + pub fn ingress_ifindex(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.ingress_ifindex) }.ok() + } +} +impl bpf_sk_lookup__bindgen_ty_1 { + pub fn sk(&self) -> Option<*mut bpf_sock> { + let v = unsafe { crate::bpf_probe_read(&self.__bindgen_anon_1.sk) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } + pub fn cookie(&self) -> Option<__u64> { + unsafe { crate::bpf_probe_read(&self.cookie) }.ok() + } +} +impl bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 { + pub fn sk(&self) -> Option<*mut bpf_sock> { + let v = unsafe { crate::bpf_probe_read(&self.sk) }.ok()?; + if v.is_null() { + None + } else { + Some(v) + } + } +} impl btf_ptr { pub fn ptr(&self) -> Option<*mut ::aya_bpf_cty::c_void> { let v = unsafe { crate::bpf_probe_read(&self.ptr) }.ok()?; @@ -1067,6 +2350,20 @@ impl btf_ptr { unsafe { crate::bpf_probe_read(&self.flags) }.ok() } } +impl bpf_core_relo { + pub fn insn_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.insn_off) }.ok() + } + pub fn type_id(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.type_id) }.ok() + } + pub fn access_str_off(&self) -> Option<__u32> { + unsafe { crate::bpf_probe_read(&self.access_str_off) }.ok() + } + pub fn kind(&self) -> Option { + unsafe { crate::bpf_probe_read(&self.kind) }.ok() + } +} impl pt_regs { pub fn r15(&self) -> Option<::aya_bpf_cty::c_ulong> { unsafe { crate::bpf_probe_read(&self.r15) }.ok() diff --git a/bpf/aya-bpf-bindings/src/x86_64/helpers.rs b/bpf/aya-bpf-bindings/src/x86_64/helpers.rs index 554e67bb..454652a6 100644 --- a/bpf/aya-bpf-bindings/src/x86_64/helpers.rs +++ b/bpf/aya-bpf-bindings/src/x86_64/helpers.rs @@ -1969,3 +1969,15 @@ pub unsafe fn bpf_kptr_xchg( ) -> *mut ::aya_bpf_cty::c_void = ::core::mem::transmute(194usize); fun(map_value, ptr) } +pub unsafe fn bpf_map_lookup_percpu_elem( + map: *mut ::aya_bpf_cty::c_void, + key: *const ::aya_bpf_cty::c_void, + cpu: __u32, +) -> *mut ::aya_bpf_cty::c_void { + let fun: unsafe extern "C" fn( + map: *mut ::aya_bpf_cty::c_void, + key: *const ::aya_bpf_cty::c_void, + cpu: __u32, + ) -> *mut ::aya_bpf_cty::c_void = ::core::mem::transmute(195usize); + fun(map, key, cpu) +}