Merge pull request #251 from aya-rs/codegen

Update libbpf to 3a4e26307d0f9b227e3ebd28b443a1a715e4e17d
pull/252/head
Dave Tucker 2 years ago committed by GitHub
commit e1f448e6b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -131,6 +131,8 @@ pub const BPF_F_ANY_ALIGNMENT: u32 = 2;
pub const BPF_F_TEST_RND_HI32: u32 = 4; pub const BPF_F_TEST_RND_HI32: u32 = 4;
pub const BPF_F_TEST_STATE_FREQ: u32 = 8; pub const BPF_F_TEST_STATE_FREQ: u32 = 8;
pub const BPF_F_SLEEPABLE: u32 = 16; pub const BPF_F_SLEEPABLE: u32 = 16;
pub const BPF_F_XDP_HAS_FRAGS: u32 = 32;
pub const BPF_F_KPROBE_MULTI_RETURN: u32 = 1;
pub const BPF_PSEUDO_MAP_FD: u32 = 1; pub const BPF_PSEUDO_MAP_FD: u32 = 1;
pub const BPF_PSEUDO_MAP_IDX: u32 = 5; pub const BPF_PSEUDO_MAP_IDX: u32 = 5;
pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; pub const BPF_PSEUDO_MAP_VALUE: u32 = 2;
@ -141,6 +143,7 @@ pub const BPF_PSEUDO_CALL: u32 = 1;
pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2;
pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; pub const BPF_F_QUERY_EFFECTIVE: u32 = 1;
pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1;
pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2;
pub const BTF_INT_SIGNED: u32 = 1; pub const BTF_INT_SIGNED: u32 = 1;
pub const BTF_INT_CHAR: u32 = 2; pub const BTF_INT_CHAR: u32 = 2;
pub const BTF_INT_BOOL: u32 = 4; pub const BTF_INT_BOOL: u32 = 4;
@ -388,7 +391,8 @@ pub enum bpf_attach_type {
BPF_SK_REUSEPORT_SELECT = 39, BPF_SK_REUSEPORT_SELECT = 39,
BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 40, BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 40,
BPF_PERF_EVENT = 41, BPF_PERF_EVENT = 41,
__MAX_BPF_ATTACH_TYPE = 42, BPF_TRACE_KPROBE_MULTI = 42,
__MAX_BPF_ATTACH_TYPE = 43,
} }
pub const BPF_ANY: ::std::os::raw::c_uint = 0; pub const BPF_ANY: ::std::os::raw::c_uint = 0;
pub const BPF_NOEXIST: ::std::os::raw::c_uint = 1; pub const BPF_NOEXIST: ::std::os::raw::c_uint = 1;
@ -544,6 +548,7 @@ pub struct bpf_attr__bindgen_ty_7 {
pub ctx_out: __u64, pub ctx_out: __u64,
pub flags: __u32, pub flags: __u32,
pub cpu: __u32, pub cpu: __u32,
pub batch_size: __u32,
} }
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
@ -627,6 +632,7 @@ pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 {
pub target_btf_id: __u32, pub target_btf_id: __u32,
pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1, 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 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,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
@ -641,6 +647,15 @@ pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2 {
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Debug, 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(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_15 { pub struct bpf_attr__bindgen_ty_15 {
pub link_fd: __u32, pub link_fd: __u32,
pub new_prog_fd: __u32, pub new_prog_fd: __u32,
@ -849,7 +864,7 @@ pub const BTF_KIND_DECL_TAG: ::std::os::raw::c_uint = 17;
pub const BTF_KIND_TYPE_TAG: ::std::os::raw::c_uint = 18; pub const BTF_KIND_TYPE_TAG: ::std::os::raw::c_uint = 18;
pub const NR_BTF_KINDS: ::std::os::raw::c_uint = 19; pub const NR_BTF_KINDS: ::std::os::raw::c_uint = 19;
pub const BTF_KIND_MAX: ::std::os::raw::c_uint = 18; pub const BTF_KIND_MAX: ::std::os::raw::c_uint = 18;
pub type _bindgen_ty_37 = ::std::os::raw::c_uint; pub type _bindgen_ty_38 = ::std::os::raw::c_uint;
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
pub struct btf_enum { pub struct btf_enum {
@ -879,7 +894,7 @@ pub struct btf_param {
pub const BTF_VAR_STATIC: ::std::os::raw::c_uint = 0; pub const BTF_VAR_STATIC: ::std::os::raw::c_uint = 0;
pub const BTF_VAR_GLOBAL_ALLOCATED: ::std::os::raw::c_uint = 1; pub const BTF_VAR_GLOBAL_ALLOCATED: ::std::os::raw::c_uint = 1;
pub const BTF_VAR_GLOBAL_EXTERN: ::std::os::raw::c_uint = 2; pub const BTF_VAR_GLOBAL_EXTERN: ::std::os::raw::c_uint = 2;
pub type _bindgen_ty_38 = ::std::os::raw::c_uint; pub type _bindgen_ty_39 = ::std::os::raw::c_uint;
#[repr(u32)] #[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum btf_func_linkage { pub enum btf_func_linkage {
@ -971,7 +986,8 @@ pub enum perf_sw_ids {
PERF_COUNT_SW_EMULATION_FAULTS = 8, PERF_COUNT_SW_EMULATION_FAULTS = 8,
PERF_COUNT_SW_DUMMY = 9, PERF_COUNT_SW_DUMMY = 9,
PERF_COUNT_SW_BPF_OUTPUT = 10, PERF_COUNT_SW_BPF_OUTPUT = 10,
PERF_COUNT_SW_MAX = 11, PERF_COUNT_SW_CGROUP_SWITCHES = 11,
PERF_COUNT_SW_MAX = 12,
} }
#[repr(u64)] #[repr(u64)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@ -996,7 +1012,12 @@ pub enum perf_event_sample_format {
PERF_SAMPLE_TRANSACTION = 131072, PERF_SAMPLE_TRANSACTION = 131072,
PERF_SAMPLE_REGS_INTR = 262144, PERF_SAMPLE_REGS_INTR = 262144,
PERF_SAMPLE_PHYS_ADDR = 524288, PERF_SAMPLE_PHYS_ADDR = 524288,
PERF_SAMPLE_MAX = 1048576, PERF_SAMPLE_AUX = 1048576,
PERF_SAMPLE_CGROUP = 2097152,
PERF_SAMPLE_DATA_PAGE_SIZE = 4194304,
PERF_SAMPLE_CODE_PAGE_SIZE = 8388608,
PERF_SAMPLE_WEIGHT_STRUCT = 16777216,
PERF_SAMPLE_MAX = 33554432,
__PERF_SAMPLE_CALLCHAIN_EARLY = 9223372036854775808, __PERF_SAMPLE_CALLCHAIN_EARLY = 9223372036854775808,
} }
#[repr(C)] #[repr(C)]
@ -1022,6 +1043,9 @@ pub struct perf_event_attr {
pub aux_watermark: __u32, pub aux_watermark: __u32,
pub sample_max_stack: __u16, pub sample_max_stack: __u16,
pub __reserved_2: __u16, pub __reserved_2: __u16,
pub aux_sample_size: __u32,
pub __reserved_3: __u32,
pub sig_data: __u64,
} }
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
@ -1394,14 +1418,80 @@ impl perf_event_attr {
} }
} }
#[inline] #[inline]
pub fn cgroup(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) }
}
#[inline]
pub fn set_cgroup(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(32usize, 1u8, val as u64)
}
}
#[inline]
pub fn text_poke(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) }
}
#[inline]
pub fn set_text_poke(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(33usize, 1u8, val as u64)
}
}
#[inline]
pub fn build_id(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) }
}
#[inline]
pub fn set_build_id(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(34usize, 1u8, val as u64)
}
}
#[inline]
pub fn inherit_thread(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) }
}
#[inline]
pub fn set_inherit_thread(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(35usize, 1u8, val as u64)
}
}
#[inline]
pub fn remove_on_exec(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) }
}
#[inline]
pub fn set_remove_on_exec(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(36usize, 1u8, val as u64)
}
}
#[inline]
pub fn sigtrap(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) }
}
#[inline]
pub fn set_sigtrap(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(37usize, 1u8, val as u64)
}
}
#[inline]
pub fn __reserved_1(&self) -> __u64 { pub fn __reserved_1(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 32u8) as u64) } unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) }
} }
#[inline] #[inline]
pub fn set___reserved_1(&mut self, val: __u64) { pub fn set___reserved_1(&mut self, val: __u64) {
unsafe { unsafe {
let val: u64 = ::std::mem::transmute(val); let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(32usize, 32u8, val as u64) self._bitfield_1.set(38usize, 26u8, val as u64)
} }
} }
#[inline] #[inline]
@ -1437,6 +1527,12 @@ impl perf_event_attr {
ksymbol: __u64, ksymbol: __u64,
bpf_event: __u64, bpf_event: __u64,
aux_output: __u64, aux_output: __u64,
cgroup: __u64,
text_poke: __u64,
build_id: __u64,
inherit_thread: __u64,
remove_on_exec: __u64,
sigtrap: __u64,
__reserved_1: __u64, __reserved_1: __u64,
) -> __BindgenBitfieldUnit<[u8; 8usize]> { ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
@ -1566,7 +1662,31 @@ impl perf_event_attr {
let aux_output: u64 = unsafe { ::std::mem::transmute(aux_output) }; let aux_output: u64 = unsafe { ::std::mem::transmute(aux_output) };
aux_output as u64 aux_output as u64
}); });
__bindgen_bitfield_unit.set(32usize, 32u8, { __bindgen_bitfield_unit.set(32usize, 1u8, {
let cgroup: u64 = unsafe { ::std::mem::transmute(cgroup) };
cgroup as u64
});
__bindgen_bitfield_unit.set(33usize, 1u8, {
let text_poke: u64 = unsafe { ::std::mem::transmute(text_poke) };
text_poke as u64
});
__bindgen_bitfield_unit.set(34usize, 1u8, {
let build_id: u64 = unsafe { ::std::mem::transmute(build_id) };
build_id as u64
});
__bindgen_bitfield_unit.set(35usize, 1u8, {
let inherit_thread: u64 = unsafe { ::std::mem::transmute(inherit_thread) };
inherit_thread as u64
});
__bindgen_bitfield_unit.set(36usize, 1u8, {
let remove_on_exec: u64 = unsafe { ::std::mem::transmute(remove_on_exec) };
remove_on_exec as u64
});
__bindgen_bitfield_unit.set(37usize, 1u8, {
let sigtrap: u64 = unsafe { ::std::mem::transmute(sigtrap) };
sigtrap as u64
});
__bindgen_bitfield_unit.set(38usize, 26u8, {
let __reserved_1: u64 = unsafe { ::std::mem::transmute(__reserved_1) }; let __reserved_1: u64 = unsafe { ::std::mem::transmute(__reserved_1) };
__reserved_1 as u64 __reserved_1 as u64
}); });
@ -1590,7 +1710,10 @@ pub struct perf_event_mmap_page {
pub time_offset: __u64, pub time_offset: __u64,
pub time_zero: __u64, pub time_zero: __u64,
pub size: __u32, pub size: __u32,
pub __reserved: [__u8; 948usize], pub __reserved_1: __u32,
pub time_cycles: __u64,
pub time_mask: __u64,
pub __reserved: [__u8; 928usize],
pub data_head: __u64, pub data_head: __u64,
pub data_tail: __u64, pub data_tail: __u64,
pub data_offset: __u64, pub data_offset: __u64,
@ -1670,14 +1793,25 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 {
} }
} }
#[inline] #[inline]
pub fn cap_user_time_short(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) }
}
#[inline]
pub fn set_cap_user_time_short(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(5usize, 1u8, val as u64)
}
}
#[inline]
pub fn cap_____res(&self) -> __u64 { pub fn cap_____res(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 59u8) as u64) } unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) }
} }
#[inline] #[inline]
pub fn set_cap_____res(&mut self, val: __u64) { pub fn set_cap_____res(&mut self, val: __u64) {
unsafe { unsafe {
let val: u64 = ::std::mem::transmute(val); let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(5usize, 59u8, val as u64) self._bitfield_1.set(6usize, 58u8, val as u64)
} }
} }
#[inline] #[inline]
@ -1687,6 +1821,7 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 {
cap_user_rdpmc: __u64, cap_user_rdpmc: __u64,
cap_user_time: __u64, cap_user_time: __u64,
cap_user_time_zero: __u64, cap_user_time_zero: __u64,
cap_user_time_short: __u64,
cap_____res: __u64, cap_____res: __u64,
) -> __BindgenBitfieldUnit<[u8; 8usize]> { ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
@ -1711,7 +1846,11 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 {
let cap_user_time_zero: u64 = unsafe { ::std::mem::transmute(cap_user_time_zero) }; let cap_user_time_zero: u64 = unsafe { ::std::mem::transmute(cap_user_time_zero) };
cap_user_time_zero as u64 cap_user_time_zero as u64
}); });
__bindgen_bitfield_unit.set(5usize, 59u8, { __bindgen_bitfield_unit.set(5usize, 1u8, {
let cap_user_time_short: u64 = unsafe { ::std::mem::transmute(cap_user_time_short) };
cap_user_time_short as u64
});
__bindgen_bitfield_unit.set(6usize, 58u8, {
let cap_____res: u64 = unsafe { ::std::mem::transmute(cap_____res) }; let cap_____res: u64 = unsafe { ::std::mem::transmute(cap_____res) };
cap_____res as u64 cap_____res as u64
}); });
@ -1746,21 +1885,24 @@ pub enum perf_event_type {
PERF_RECORD_NAMESPACES = 16, PERF_RECORD_NAMESPACES = 16,
PERF_RECORD_KSYMBOL = 17, PERF_RECORD_KSYMBOL = 17,
PERF_RECORD_BPF_EVENT = 18, PERF_RECORD_BPF_EVENT = 18,
PERF_RECORD_MAX = 19, PERF_RECORD_CGROUP = 19,
} PERF_RECORD_TEXT_POKE = 20,
pub const IFLA_XDP_UNSPEC: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_UNSPEC; PERF_RECORD_AUX_OUTPUT_HW_ID = 21,
pub const IFLA_XDP_FD: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_FD; PERF_RECORD_MAX = 22,
pub const IFLA_XDP_ATTACHED: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_ATTACHED; }
pub const IFLA_XDP_FLAGS: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_FLAGS; pub const IFLA_XDP_UNSPEC: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_UNSPEC;
pub const IFLA_XDP_PROG_ID: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_PROG_ID; pub const IFLA_XDP_FD: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_FD;
pub const IFLA_XDP_DRV_PROG_ID: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_DRV_PROG_ID; pub const IFLA_XDP_ATTACHED: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_ATTACHED;
pub const IFLA_XDP_SKB_PROG_ID: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_SKB_PROG_ID; pub const IFLA_XDP_FLAGS: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_FLAGS;
pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_HW_PROG_ID; pub const IFLA_XDP_PROG_ID: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_PROG_ID;
pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_EXPECTED_FD; pub const IFLA_XDP_DRV_PROG_ID: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_DRV_PROG_ID;
pub const __IFLA_XDP_MAX: _bindgen_ty_84 = _bindgen_ty_84::__IFLA_XDP_MAX; pub const IFLA_XDP_SKB_PROG_ID: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_SKB_PROG_ID;
pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_HW_PROG_ID;
pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_EXPECTED_FD;
pub const __IFLA_XDP_MAX: _bindgen_ty_85 = _bindgen_ty_85::__IFLA_XDP_MAX;
#[repr(u32)] #[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_84 { pub enum _bindgen_ty_85 {
IFLA_XDP_UNSPEC = 0, IFLA_XDP_UNSPEC = 0,
IFLA_XDP_FD = 1, IFLA_XDP_FD = 1,
IFLA_XDP_ATTACHED = 2, IFLA_XDP_ATTACHED = 2,
@ -1793,25 +1935,25 @@ pub struct tcmsg {
pub tcm_parent: __u32, pub tcm_parent: __u32,
pub tcm_info: __u32, pub tcm_info: __u32,
} }
pub const TCA_UNSPEC: _bindgen_ty_97 = _bindgen_ty_97::TCA_UNSPEC; pub const TCA_UNSPEC: _bindgen_ty_98 = _bindgen_ty_98::TCA_UNSPEC;
pub const TCA_KIND: _bindgen_ty_97 = _bindgen_ty_97::TCA_KIND; pub const TCA_KIND: _bindgen_ty_98 = _bindgen_ty_98::TCA_KIND;
pub const TCA_OPTIONS: _bindgen_ty_97 = _bindgen_ty_97::TCA_OPTIONS; pub const TCA_OPTIONS: _bindgen_ty_98 = _bindgen_ty_98::TCA_OPTIONS;
pub const TCA_STATS: _bindgen_ty_97 = _bindgen_ty_97::TCA_STATS; pub const TCA_STATS: _bindgen_ty_98 = _bindgen_ty_98::TCA_STATS;
pub const TCA_XSTATS: _bindgen_ty_97 = _bindgen_ty_97::TCA_XSTATS; pub const TCA_XSTATS: _bindgen_ty_98 = _bindgen_ty_98::TCA_XSTATS;
pub const TCA_RATE: _bindgen_ty_97 = _bindgen_ty_97::TCA_RATE; pub const TCA_RATE: _bindgen_ty_98 = _bindgen_ty_98::TCA_RATE;
pub const TCA_FCNT: _bindgen_ty_97 = _bindgen_ty_97::TCA_FCNT; pub const TCA_FCNT: _bindgen_ty_98 = _bindgen_ty_98::TCA_FCNT;
pub const TCA_STATS2: _bindgen_ty_97 = _bindgen_ty_97::TCA_STATS2; pub const TCA_STATS2: _bindgen_ty_98 = _bindgen_ty_98::TCA_STATS2;
pub const TCA_STAB: _bindgen_ty_97 = _bindgen_ty_97::TCA_STAB; pub const TCA_STAB: _bindgen_ty_98 = _bindgen_ty_98::TCA_STAB;
pub const TCA_PAD: _bindgen_ty_97 = _bindgen_ty_97::TCA_PAD; pub const TCA_PAD: _bindgen_ty_98 = _bindgen_ty_98::TCA_PAD;
pub const TCA_DUMP_INVISIBLE: _bindgen_ty_97 = _bindgen_ty_97::TCA_DUMP_INVISIBLE; pub const TCA_DUMP_INVISIBLE: _bindgen_ty_98 = _bindgen_ty_98::TCA_DUMP_INVISIBLE;
pub const TCA_CHAIN: _bindgen_ty_97 = _bindgen_ty_97::TCA_CHAIN; pub const TCA_CHAIN: _bindgen_ty_98 = _bindgen_ty_98::TCA_CHAIN;
pub const TCA_HW_OFFLOAD: _bindgen_ty_97 = _bindgen_ty_97::TCA_HW_OFFLOAD; pub const TCA_HW_OFFLOAD: _bindgen_ty_98 = _bindgen_ty_98::TCA_HW_OFFLOAD;
pub const TCA_INGRESS_BLOCK: _bindgen_ty_97 = _bindgen_ty_97::TCA_INGRESS_BLOCK; pub const TCA_INGRESS_BLOCK: _bindgen_ty_98 = _bindgen_ty_98::TCA_INGRESS_BLOCK;
pub const TCA_EGRESS_BLOCK: _bindgen_ty_97 = _bindgen_ty_97::TCA_EGRESS_BLOCK; pub const TCA_EGRESS_BLOCK: _bindgen_ty_98 = _bindgen_ty_98::TCA_EGRESS_BLOCK;
pub const __TCA_MAX: _bindgen_ty_97 = _bindgen_ty_97::__TCA_MAX; pub const __TCA_MAX: _bindgen_ty_98 = _bindgen_ty_98::__TCA_MAX;
#[repr(u32)] #[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_97 { pub enum _bindgen_ty_98 {
TCA_UNSPEC = 0, TCA_UNSPEC = 0,
TCA_KIND = 1, TCA_KIND = 1,
TCA_OPTIONS = 2, TCA_OPTIONS = 2,
@ -1829,22 +1971,22 @@ pub enum _bindgen_ty_97 {
TCA_EGRESS_BLOCK = 14, TCA_EGRESS_BLOCK = 14,
__TCA_MAX = 15, __TCA_MAX = 15,
} }
pub const TCA_BPF_UNSPEC: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_UNSPEC; pub const TCA_BPF_UNSPEC: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_UNSPEC;
pub const TCA_BPF_ACT: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_ACT; pub const TCA_BPF_ACT: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_ACT;
pub const TCA_BPF_POLICE: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_POLICE; pub const TCA_BPF_POLICE: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_POLICE;
pub const TCA_BPF_CLASSID: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_CLASSID; pub const TCA_BPF_CLASSID: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_CLASSID;
pub const TCA_BPF_OPS_LEN: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_OPS_LEN; pub const TCA_BPF_OPS_LEN: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_OPS_LEN;
pub const TCA_BPF_OPS: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_OPS; pub const TCA_BPF_OPS: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_OPS;
pub const TCA_BPF_FD: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_FD; pub const TCA_BPF_FD: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_FD;
pub const TCA_BPF_NAME: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_NAME; pub const TCA_BPF_NAME: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_NAME;
pub const TCA_BPF_FLAGS: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_FLAGS; pub const TCA_BPF_FLAGS: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_FLAGS;
pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_FLAGS_GEN; pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_FLAGS_GEN;
pub const TCA_BPF_TAG: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_TAG; pub const TCA_BPF_TAG: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_TAG;
pub const TCA_BPF_ID: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_ID; pub const TCA_BPF_ID: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_ID;
pub const __TCA_BPF_MAX: _bindgen_ty_153 = _bindgen_ty_153::__TCA_BPF_MAX; pub const __TCA_BPF_MAX: _bindgen_ty_154 = _bindgen_ty_154::__TCA_BPF_MAX;
#[repr(u32)] #[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_153 { pub enum _bindgen_ty_154 {
TCA_BPF_UNSPEC = 0, TCA_BPF_UNSPEC = 0,
TCA_BPF_ACT = 1, TCA_BPF_ACT = 1,
TCA_BPF_POLICE = 2, TCA_BPF_POLICE = 2,

@ -131,6 +131,8 @@ pub const BPF_F_ANY_ALIGNMENT: u32 = 2;
pub const BPF_F_TEST_RND_HI32: u32 = 4; pub const BPF_F_TEST_RND_HI32: u32 = 4;
pub const BPF_F_TEST_STATE_FREQ: u32 = 8; pub const BPF_F_TEST_STATE_FREQ: u32 = 8;
pub const BPF_F_SLEEPABLE: u32 = 16; pub const BPF_F_SLEEPABLE: u32 = 16;
pub const BPF_F_XDP_HAS_FRAGS: u32 = 32;
pub const BPF_F_KPROBE_MULTI_RETURN: u32 = 1;
pub const BPF_PSEUDO_MAP_FD: u32 = 1; pub const BPF_PSEUDO_MAP_FD: u32 = 1;
pub const BPF_PSEUDO_MAP_IDX: u32 = 5; pub const BPF_PSEUDO_MAP_IDX: u32 = 5;
pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; pub const BPF_PSEUDO_MAP_VALUE: u32 = 2;
@ -141,6 +143,7 @@ pub const BPF_PSEUDO_CALL: u32 = 1;
pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2;
pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; pub const BPF_F_QUERY_EFFECTIVE: u32 = 1;
pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1;
pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2;
pub const BTF_INT_SIGNED: u32 = 1; pub const BTF_INT_SIGNED: u32 = 1;
pub const BTF_INT_CHAR: u32 = 2; pub const BTF_INT_CHAR: u32 = 2;
pub const BTF_INT_BOOL: u32 = 4; pub const BTF_INT_BOOL: u32 = 4;
@ -388,7 +391,8 @@ pub enum bpf_attach_type {
BPF_SK_REUSEPORT_SELECT = 39, BPF_SK_REUSEPORT_SELECT = 39,
BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 40, BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 40,
BPF_PERF_EVENT = 41, BPF_PERF_EVENT = 41,
__MAX_BPF_ATTACH_TYPE = 42, BPF_TRACE_KPROBE_MULTI = 42,
__MAX_BPF_ATTACH_TYPE = 43,
} }
pub const BPF_ANY: ::std::os::raw::c_uint = 0; pub const BPF_ANY: ::std::os::raw::c_uint = 0;
pub const BPF_NOEXIST: ::std::os::raw::c_uint = 1; pub const BPF_NOEXIST: ::std::os::raw::c_uint = 1;
@ -544,6 +548,7 @@ pub struct bpf_attr__bindgen_ty_7 {
pub ctx_out: __u64, pub ctx_out: __u64,
pub flags: __u32, pub flags: __u32,
pub cpu: __u32, pub cpu: __u32,
pub batch_size: __u32,
} }
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
@ -627,6 +632,7 @@ pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 {
pub target_btf_id: __u32, pub target_btf_id: __u32,
pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1, 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 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,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
@ -641,6 +647,15 @@ pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2 {
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Debug, 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(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_15 { pub struct bpf_attr__bindgen_ty_15 {
pub link_fd: __u32, pub link_fd: __u32,
pub new_prog_fd: __u32, pub new_prog_fd: __u32,
@ -849,7 +864,7 @@ pub const BTF_KIND_DECL_TAG: ::std::os::raw::c_uint = 17;
pub const BTF_KIND_TYPE_TAG: ::std::os::raw::c_uint = 18; pub const BTF_KIND_TYPE_TAG: ::std::os::raw::c_uint = 18;
pub const NR_BTF_KINDS: ::std::os::raw::c_uint = 19; pub const NR_BTF_KINDS: ::std::os::raw::c_uint = 19;
pub const BTF_KIND_MAX: ::std::os::raw::c_uint = 18; pub const BTF_KIND_MAX: ::std::os::raw::c_uint = 18;
pub type _bindgen_ty_37 = ::std::os::raw::c_uint; pub type _bindgen_ty_38 = ::std::os::raw::c_uint;
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
pub struct btf_enum { pub struct btf_enum {
@ -879,7 +894,7 @@ pub struct btf_param {
pub const BTF_VAR_STATIC: ::std::os::raw::c_uint = 0; pub const BTF_VAR_STATIC: ::std::os::raw::c_uint = 0;
pub const BTF_VAR_GLOBAL_ALLOCATED: ::std::os::raw::c_uint = 1; pub const BTF_VAR_GLOBAL_ALLOCATED: ::std::os::raw::c_uint = 1;
pub const BTF_VAR_GLOBAL_EXTERN: ::std::os::raw::c_uint = 2; pub const BTF_VAR_GLOBAL_EXTERN: ::std::os::raw::c_uint = 2;
pub type _bindgen_ty_38 = ::std::os::raw::c_uint; pub type _bindgen_ty_39 = ::std::os::raw::c_uint;
#[repr(u32)] #[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum btf_func_linkage { pub enum btf_func_linkage {
@ -971,7 +986,8 @@ pub enum perf_sw_ids {
PERF_COUNT_SW_EMULATION_FAULTS = 8, PERF_COUNT_SW_EMULATION_FAULTS = 8,
PERF_COUNT_SW_DUMMY = 9, PERF_COUNT_SW_DUMMY = 9,
PERF_COUNT_SW_BPF_OUTPUT = 10, PERF_COUNT_SW_BPF_OUTPUT = 10,
PERF_COUNT_SW_MAX = 11, PERF_COUNT_SW_CGROUP_SWITCHES = 11,
PERF_COUNT_SW_MAX = 12,
} }
#[repr(u64)] #[repr(u64)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@ -996,7 +1012,12 @@ pub enum perf_event_sample_format {
PERF_SAMPLE_TRANSACTION = 131072, PERF_SAMPLE_TRANSACTION = 131072,
PERF_SAMPLE_REGS_INTR = 262144, PERF_SAMPLE_REGS_INTR = 262144,
PERF_SAMPLE_PHYS_ADDR = 524288, PERF_SAMPLE_PHYS_ADDR = 524288,
PERF_SAMPLE_MAX = 1048576, PERF_SAMPLE_AUX = 1048576,
PERF_SAMPLE_CGROUP = 2097152,
PERF_SAMPLE_DATA_PAGE_SIZE = 4194304,
PERF_SAMPLE_CODE_PAGE_SIZE = 8388608,
PERF_SAMPLE_WEIGHT_STRUCT = 16777216,
PERF_SAMPLE_MAX = 33554432,
__PERF_SAMPLE_CALLCHAIN_EARLY = 9223372036854775808, __PERF_SAMPLE_CALLCHAIN_EARLY = 9223372036854775808,
} }
#[repr(C)] #[repr(C)]
@ -1022,6 +1043,9 @@ pub struct perf_event_attr {
pub aux_watermark: __u32, pub aux_watermark: __u32,
pub sample_max_stack: __u16, pub sample_max_stack: __u16,
pub __reserved_2: __u16, pub __reserved_2: __u16,
pub aux_sample_size: __u32,
pub __reserved_3: __u32,
pub sig_data: __u64,
} }
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
@ -1394,14 +1418,80 @@ impl perf_event_attr {
} }
} }
#[inline] #[inline]
pub fn cgroup(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) }
}
#[inline]
pub fn set_cgroup(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(32usize, 1u8, val as u64)
}
}
#[inline]
pub fn text_poke(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) }
}
#[inline]
pub fn set_text_poke(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(33usize, 1u8, val as u64)
}
}
#[inline]
pub fn build_id(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) }
}
#[inline]
pub fn set_build_id(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(34usize, 1u8, val as u64)
}
}
#[inline]
pub fn inherit_thread(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) }
}
#[inline]
pub fn set_inherit_thread(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(35usize, 1u8, val as u64)
}
}
#[inline]
pub fn remove_on_exec(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) }
}
#[inline]
pub fn set_remove_on_exec(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(36usize, 1u8, val as u64)
}
}
#[inline]
pub fn sigtrap(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) }
}
#[inline]
pub fn set_sigtrap(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(37usize, 1u8, val as u64)
}
}
#[inline]
pub fn __reserved_1(&self) -> __u64 { pub fn __reserved_1(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 32u8) as u64) } unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) }
} }
#[inline] #[inline]
pub fn set___reserved_1(&mut self, val: __u64) { pub fn set___reserved_1(&mut self, val: __u64) {
unsafe { unsafe {
let val: u64 = ::std::mem::transmute(val); let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(32usize, 32u8, val as u64) self._bitfield_1.set(38usize, 26u8, val as u64)
} }
} }
#[inline] #[inline]
@ -1437,6 +1527,12 @@ impl perf_event_attr {
ksymbol: __u64, ksymbol: __u64,
bpf_event: __u64, bpf_event: __u64,
aux_output: __u64, aux_output: __u64,
cgroup: __u64,
text_poke: __u64,
build_id: __u64,
inherit_thread: __u64,
remove_on_exec: __u64,
sigtrap: __u64,
__reserved_1: __u64, __reserved_1: __u64,
) -> __BindgenBitfieldUnit<[u8; 8usize]> { ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
@ -1566,7 +1662,31 @@ impl perf_event_attr {
let aux_output: u64 = unsafe { ::std::mem::transmute(aux_output) }; let aux_output: u64 = unsafe { ::std::mem::transmute(aux_output) };
aux_output as u64 aux_output as u64
}); });
__bindgen_bitfield_unit.set(32usize, 32u8, { __bindgen_bitfield_unit.set(32usize, 1u8, {
let cgroup: u64 = unsafe { ::std::mem::transmute(cgroup) };
cgroup as u64
});
__bindgen_bitfield_unit.set(33usize, 1u8, {
let text_poke: u64 = unsafe { ::std::mem::transmute(text_poke) };
text_poke as u64
});
__bindgen_bitfield_unit.set(34usize, 1u8, {
let build_id: u64 = unsafe { ::std::mem::transmute(build_id) };
build_id as u64
});
__bindgen_bitfield_unit.set(35usize, 1u8, {
let inherit_thread: u64 = unsafe { ::std::mem::transmute(inherit_thread) };
inherit_thread as u64
});
__bindgen_bitfield_unit.set(36usize, 1u8, {
let remove_on_exec: u64 = unsafe { ::std::mem::transmute(remove_on_exec) };
remove_on_exec as u64
});
__bindgen_bitfield_unit.set(37usize, 1u8, {
let sigtrap: u64 = unsafe { ::std::mem::transmute(sigtrap) };
sigtrap as u64
});
__bindgen_bitfield_unit.set(38usize, 26u8, {
let __reserved_1: u64 = unsafe { ::std::mem::transmute(__reserved_1) }; let __reserved_1: u64 = unsafe { ::std::mem::transmute(__reserved_1) };
__reserved_1 as u64 __reserved_1 as u64
}); });
@ -1590,7 +1710,10 @@ pub struct perf_event_mmap_page {
pub time_offset: __u64, pub time_offset: __u64,
pub time_zero: __u64, pub time_zero: __u64,
pub size: __u32, pub size: __u32,
pub __reserved: [__u8; 948usize], pub __reserved_1: __u32,
pub time_cycles: __u64,
pub time_mask: __u64,
pub __reserved: [__u8; 928usize],
pub data_head: __u64, pub data_head: __u64,
pub data_tail: __u64, pub data_tail: __u64,
pub data_offset: __u64, pub data_offset: __u64,
@ -1670,14 +1793,25 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 {
} }
} }
#[inline] #[inline]
pub fn cap_user_time_short(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) }
}
#[inline]
pub fn set_cap_user_time_short(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(5usize, 1u8, val as u64)
}
}
#[inline]
pub fn cap_____res(&self) -> __u64 { pub fn cap_____res(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 59u8) as u64) } unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) }
} }
#[inline] #[inline]
pub fn set_cap_____res(&mut self, val: __u64) { pub fn set_cap_____res(&mut self, val: __u64) {
unsafe { unsafe {
let val: u64 = ::std::mem::transmute(val); let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(5usize, 59u8, val as u64) self._bitfield_1.set(6usize, 58u8, val as u64)
} }
} }
#[inline] #[inline]
@ -1687,6 +1821,7 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 {
cap_user_rdpmc: __u64, cap_user_rdpmc: __u64,
cap_user_time: __u64, cap_user_time: __u64,
cap_user_time_zero: __u64, cap_user_time_zero: __u64,
cap_user_time_short: __u64,
cap_____res: __u64, cap_____res: __u64,
) -> __BindgenBitfieldUnit<[u8; 8usize]> { ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
@ -1711,7 +1846,11 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 {
let cap_user_time_zero: u64 = unsafe { ::std::mem::transmute(cap_user_time_zero) }; let cap_user_time_zero: u64 = unsafe { ::std::mem::transmute(cap_user_time_zero) };
cap_user_time_zero as u64 cap_user_time_zero as u64
}); });
__bindgen_bitfield_unit.set(5usize, 59u8, { __bindgen_bitfield_unit.set(5usize, 1u8, {
let cap_user_time_short: u64 = unsafe { ::std::mem::transmute(cap_user_time_short) };
cap_user_time_short as u64
});
__bindgen_bitfield_unit.set(6usize, 58u8, {
let cap_____res: u64 = unsafe { ::std::mem::transmute(cap_____res) }; let cap_____res: u64 = unsafe { ::std::mem::transmute(cap_____res) };
cap_____res as u64 cap_____res as u64
}); });
@ -1746,21 +1885,24 @@ pub enum perf_event_type {
PERF_RECORD_NAMESPACES = 16, PERF_RECORD_NAMESPACES = 16,
PERF_RECORD_KSYMBOL = 17, PERF_RECORD_KSYMBOL = 17,
PERF_RECORD_BPF_EVENT = 18, PERF_RECORD_BPF_EVENT = 18,
PERF_RECORD_MAX = 19, PERF_RECORD_CGROUP = 19,
} PERF_RECORD_TEXT_POKE = 20,
pub const IFLA_XDP_UNSPEC: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_UNSPEC; PERF_RECORD_AUX_OUTPUT_HW_ID = 21,
pub const IFLA_XDP_FD: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_FD; PERF_RECORD_MAX = 22,
pub const IFLA_XDP_ATTACHED: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_ATTACHED; }
pub const IFLA_XDP_FLAGS: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_FLAGS; pub const IFLA_XDP_UNSPEC: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_UNSPEC;
pub const IFLA_XDP_PROG_ID: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_PROG_ID; pub const IFLA_XDP_FD: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_FD;
pub const IFLA_XDP_DRV_PROG_ID: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_DRV_PROG_ID; pub const IFLA_XDP_ATTACHED: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_ATTACHED;
pub const IFLA_XDP_SKB_PROG_ID: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_SKB_PROG_ID; pub const IFLA_XDP_FLAGS: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_FLAGS;
pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_HW_PROG_ID; pub const IFLA_XDP_PROG_ID: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_PROG_ID;
pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_EXPECTED_FD; pub const IFLA_XDP_DRV_PROG_ID: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_DRV_PROG_ID;
pub const __IFLA_XDP_MAX: _bindgen_ty_84 = _bindgen_ty_84::__IFLA_XDP_MAX; pub const IFLA_XDP_SKB_PROG_ID: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_SKB_PROG_ID;
pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_HW_PROG_ID;
pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_EXPECTED_FD;
pub const __IFLA_XDP_MAX: _bindgen_ty_85 = _bindgen_ty_85::__IFLA_XDP_MAX;
#[repr(u32)] #[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_84 { pub enum _bindgen_ty_85 {
IFLA_XDP_UNSPEC = 0, IFLA_XDP_UNSPEC = 0,
IFLA_XDP_FD = 1, IFLA_XDP_FD = 1,
IFLA_XDP_ATTACHED = 2, IFLA_XDP_ATTACHED = 2,
@ -1793,25 +1935,25 @@ pub struct tcmsg {
pub tcm_parent: __u32, pub tcm_parent: __u32,
pub tcm_info: __u32, pub tcm_info: __u32,
} }
pub const TCA_UNSPEC: _bindgen_ty_97 = _bindgen_ty_97::TCA_UNSPEC; pub const TCA_UNSPEC: _bindgen_ty_98 = _bindgen_ty_98::TCA_UNSPEC;
pub const TCA_KIND: _bindgen_ty_97 = _bindgen_ty_97::TCA_KIND; pub const TCA_KIND: _bindgen_ty_98 = _bindgen_ty_98::TCA_KIND;
pub const TCA_OPTIONS: _bindgen_ty_97 = _bindgen_ty_97::TCA_OPTIONS; pub const TCA_OPTIONS: _bindgen_ty_98 = _bindgen_ty_98::TCA_OPTIONS;
pub const TCA_STATS: _bindgen_ty_97 = _bindgen_ty_97::TCA_STATS; pub const TCA_STATS: _bindgen_ty_98 = _bindgen_ty_98::TCA_STATS;
pub const TCA_XSTATS: _bindgen_ty_97 = _bindgen_ty_97::TCA_XSTATS; pub const TCA_XSTATS: _bindgen_ty_98 = _bindgen_ty_98::TCA_XSTATS;
pub const TCA_RATE: _bindgen_ty_97 = _bindgen_ty_97::TCA_RATE; pub const TCA_RATE: _bindgen_ty_98 = _bindgen_ty_98::TCA_RATE;
pub const TCA_FCNT: _bindgen_ty_97 = _bindgen_ty_97::TCA_FCNT; pub const TCA_FCNT: _bindgen_ty_98 = _bindgen_ty_98::TCA_FCNT;
pub const TCA_STATS2: _bindgen_ty_97 = _bindgen_ty_97::TCA_STATS2; pub const TCA_STATS2: _bindgen_ty_98 = _bindgen_ty_98::TCA_STATS2;
pub const TCA_STAB: _bindgen_ty_97 = _bindgen_ty_97::TCA_STAB; pub const TCA_STAB: _bindgen_ty_98 = _bindgen_ty_98::TCA_STAB;
pub const TCA_PAD: _bindgen_ty_97 = _bindgen_ty_97::TCA_PAD; pub const TCA_PAD: _bindgen_ty_98 = _bindgen_ty_98::TCA_PAD;
pub const TCA_DUMP_INVISIBLE: _bindgen_ty_97 = _bindgen_ty_97::TCA_DUMP_INVISIBLE; pub const TCA_DUMP_INVISIBLE: _bindgen_ty_98 = _bindgen_ty_98::TCA_DUMP_INVISIBLE;
pub const TCA_CHAIN: _bindgen_ty_97 = _bindgen_ty_97::TCA_CHAIN; pub const TCA_CHAIN: _bindgen_ty_98 = _bindgen_ty_98::TCA_CHAIN;
pub const TCA_HW_OFFLOAD: _bindgen_ty_97 = _bindgen_ty_97::TCA_HW_OFFLOAD; pub const TCA_HW_OFFLOAD: _bindgen_ty_98 = _bindgen_ty_98::TCA_HW_OFFLOAD;
pub const TCA_INGRESS_BLOCK: _bindgen_ty_97 = _bindgen_ty_97::TCA_INGRESS_BLOCK; pub const TCA_INGRESS_BLOCK: _bindgen_ty_98 = _bindgen_ty_98::TCA_INGRESS_BLOCK;
pub const TCA_EGRESS_BLOCK: _bindgen_ty_97 = _bindgen_ty_97::TCA_EGRESS_BLOCK; pub const TCA_EGRESS_BLOCK: _bindgen_ty_98 = _bindgen_ty_98::TCA_EGRESS_BLOCK;
pub const __TCA_MAX: _bindgen_ty_97 = _bindgen_ty_97::__TCA_MAX; pub const __TCA_MAX: _bindgen_ty_98 = _bindgen_ty_98::__TCA_MAX;
#[repr(u32)] #[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_97 { pub enum _bindgen_ty_98 {
TCA_UNSPEC = 0, TCA_UNSPEC = 0,
TCA_KIND = 1, TCA_KIND = 1,
TCA_OPTIONS = 2, TCA_OPTIONS = 2,
@ -1829,22 +1971,22 @@ pub enum _bindgen_ty_97 {
TCA_EGRESS_BLOCK = 14, TCA_EGRESS_BLOCK = 14,
__TCA_MAX = 15, __TCA_MAX = 15,
} }
pub const TCA_BPF_UNSPEC: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_UNSPEC; pub const TCA_BPF_UNSPEC: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_UNSPEC;
pub const TCA_BPF_ACT: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_ACT; pub const TCA_BPF_ACT: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_ACT;
pub const TCA_BPF_POLICE: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_POLICE; pub const TCA_BPF_POLICE: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_POLICE;
pub const TCA_BPF_CLASSID: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_CLASSID; pub const TCA_BPF_CLASSID: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_CLASSID;
pub const TCA_BPF_OPS_LEN: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_OPS_LEN; pub const TCA_BPF_OPS_LEN: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_OPS_LEN;
pub const TCA_BPF_OPS: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_OPS; pub const TCA_BPF_OPS: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_OPS;
pub const TCA_BPF_FD: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_FD; pub const TCA_BPF_FD: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_FD;
pub const TCA_BPF_NAME: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_NAME; pub const TCA_BPF_NAME: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_NAME;
pub const TCA_BPF_FLAGS: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_FLAGS; pub const TCA_BPF_FLAGS: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_FLAGS;
pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_FLAGS_GEN; pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_FLAGS_GEN;
pub const TCA_BPF_TAG: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_TAG; pub const TCA_BPF_TAG: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_TAG;
pub const TCA_BPF_ID: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_ID; pub const TCA_BPF_ID: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_ID;
pub const __TCA_BPF_MAX: _bindgen_ty_153 = _bindgen_ty_153::__TCA_BPF_MAX; pub const __TCA_BPF_MAX: _bindgen_ty_154 = _bindgen_ty_154::__TCA_BPF_MAX;
#[repr(u32)] #[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_153 { pub enum _bindgen_ty_154 {
TCA_BPF_UNSPEC = 0, TCA_BPF_UNSPEC = 0,
TCA_BPF_ACT = 1, TCA_BPF_ACT = 1,
TCA_BPF_POLICE = 2, TCA_BPF_POLICE = 2,

@ -131,6 +131,8 @@ pub const BPF_F_ANY_ALIGNMENT: u32 = 2;
pub const BPF_F_TEST_RND_HI32: u32 = 4; pub const BPF_F_TEST_RND_HI32: u32 = 4;
pub const BPF_F_TEST_STATE_FREQ: u32 = 8; pub const BPF_F_TEST_STATE_FREQ: u32 = 8;
pub const BPF_F_SLEEPABLE: u32 = 16; pub const BPF_F_SLEEPABLE: u32 = 16;
pub const BPF_F_XDP_HAS_FRAGS: u32 = 32;
pub const BPF_F_KPROBE_MULTI_RETURN: u32 = 1;
pub const BPF_PSEUDO_MAP_FD: u32 = 1; pub const BPF_PSEUDO_MAP_FD: u32 = 1;
pub const BPF_PSEUDO_MAP_IDX: u32 = 5; pub const BPF_PSEUDO_MAP_IDX: u32 = 5;
pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; pub const BPF_PSEUDO_MAP_VALUE: u32 = 2;
@ -141,6 +143,7 @@ pub const BPF_PSEUDO_CALL: u32 = 1;
pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2;
pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; pub const BPF_F_QUERY_EFFECTIVE: u32 = 1;
pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1;
pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2;
pub const BTF_INT_SIGNED: u32 = 1; pub const BTF_INT_SIGNED: u32 = 1;
pub const BTF_INT_CHAR: u32 = 2; pub const BTF_INT_CHAR: u32 = 2;
pub const BTF_INT_BOOL: u32 = 4; pub const BTF_INT_BOOL: u32 = 4;
@ -388,7 +391,8 @@ pub enum bpf_attach_type {
BPF_SK_REUSEPORT_SELECT = 39, BPF_SK_REUSEPORT_SELECT = 39,
BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 40, BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 40,
BPF_PERF_EVENT = 41, BPF_PERF_EVENT = 41,
__MAX_BPF_ATTACH_TYPE = 42, BPF_TRACE_KPROBE_MULTI = 42,
__MAX_BPF_ATTACH_TYPE = 43,
} }
pub const BPF_ANY: ::std::os::raw::c_uint = 0; pub const BPF_ANY: ::std::os::raw::c_uint = 0;
pub const BPF_NOEXIST: ::std::os::raw::c_uint = 1; pub const BPF_NOEXIST: ::std::os::raw::c_uint = 1;
@ -544,6 +548,7 @@ pub struct bpf_attr__bindgen_ty_7 {
pub ctx_out: __u64, pub ctx_out: __u64,
pub flags: __u32, pub flags: __u32,
pub cpu: __u32, pub cpu: __u32,
pub batch_size: __u32,
} }
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
@ -627,6 +632,7 @@ pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 {
pub target_btf_id: __u32, pub target_btf_id: __u32,
pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1, 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 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,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
@ -641,6 +647,15 @@ pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2 {
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Debug, 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(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_15 { pub struct bpf_attr__bindgen_ty_15 {
pub link_fd: __u32, pub link_fd: __u32,
pub new_prog_fd: __u32, pub new_prog_fd: __u32,
@ -849,7 +864,7 @@ pub const BTF_KIND_DECL_TAG: ::std::os::raw::c_uint = 17;
pub const BTF_KIND_TYPE_TAG: ::std::os::raw::c_uint = 18; pub const BTF_KIND_TYPE_TAG: ::std::os::raw::c_uint = 18;
pub const NR_BTF_KINDS: ::std::os::raw::c_uint = 19; pub const NR_BTF_KINDS: ::std::os::raw::c_uint = 19;
pub const BTF_KIND_MAX: ::std::os::raw::c_uint = 18; pub const BTF_KIND_MAX: ::std::os::raw::c_uint = 18;
pub type _bindgen_ty_37 = ::std::os::raw::c_uint; pub type _bindgen_ty_38 = ::std::os::raw::c_uint;
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
pub struct btf_enum { pub struct btf_enum {
@ -879,7 +894,7 @@ pub struct btf_param {
pub const BTF_VAR_STATIC: ::std::os::raw::c_uint = 0; pub const BTF_VAR_STATIC: ::std::os::raw::c_uint = 0;
pub const BTF_VAR_GLOBAL_ALLOCATED: ::std::os::raw::c_uint = 1; pub const BTF_VAR_GLOBAL_ALLOCATED: ::std::os::raw::c_uint = 1;
pub const BTF_VAR_GLOBAL_EXTERN: ::std::os::raw::c_uint = 2; pub const BTF_VAR_GLOBAL_EXTERN: ::std::os::raw::c_uint = 2;
pub type _bindgen_ty_38 = ::std::os::raw::c_uint; pub type _bindgen_ty_39 = ::std::os::raw::c_uint;
#[repr(u32)] #[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum btf_func_linkage { pub enum btf_func_linkage {
@ -971,7 +986,8 @@ pub enum perf_sw_ids {
PERF_COUNT_SW_EMULATION_FAULTS = 8, PERF_COUNT_SW_EMULATION_FAULTS = 8,
PERF_COUNT_SW_DUMMY = 9, PERF_COUNT_SW_DUMMY = 9,
PERF_COUNT_SW_BPF_OUTPUT = 10, PERF_COUNT_SW_BPF_OUTPUT = 10,
PERF_COUNT_SW_MAX = 11, PERF_COUNT_SW_CGROUP_SWITCHES = 11,
PERF_COUNT_SW_MAX = 12,
} }
#[repr(u64)] #[repr(u64)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
@ -996,7 +1012,12 @@ pub enum perf_event_sample_format {
PERF_SAMPLE_TRANSACTION = 131072, PERF_SAMPLE_TRANSACTION = 131072,
PERF_SAMPLE_REGS_INTR = 262144, PERF_SAMPLE_REGS_INTR = 262144,
PERF_SAMPLE_PHYS_ADDR = 524288, PERF_SAMPLE_PHYS_ADDR = 524288,
PERF_SAMPLE_MAX = 1048576, PERF_SAMPLE_AUX = 1048576,
PERF_SAMPLE_CGROUP = 2097152,
PERF_SAMPLE_DATA_PAGE_SIZE = 4194304,
PERF_SAMPLE_CODE_PAGE_SIZE = 8388608,
PERF_SAMPLE_WEIGHT_STRUCT = 16777216,
PERF_SAMPLE_MAX = 33554432,
__PERF_SAMPLE_CALLCHAIN_EARLY = 9223372036854775808, __PERF_SAMPLE_CALLCHAIN_EARLY = 9223372036854775808,
} }
#[repr(C)] #[repr(C)]
@ -1022,6 +1043,9 @@ pub struct perf_event_attr {
pub aux_watermark: __u32, pub aux_watermark: __u32,
pub sample_max_stack: __u16, pub sample_max_stack: __u16,
pub __reserved_2: __u16, pub __reserved_2: __u16,
pub aux_sample_size: __u32,
pub __reserved_3: __u32,
pub sig_data: __u64,
} }
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
@ -1394,14 +1418,80 @@ impl perf_event_attr {
} }
} }
#[inline] #[inline]
pub fn cgroup(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) }
}
#[inline]
pub fn set_cgroup(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(32usize, 1u8, val as u64)
}
}
#[inline]
pub fn text_poke(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) }
}
#[inline]
pub fn set_text_poke(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(33usize, 1u8, val as u64)
}
}
#[inline]
pub fn build_id(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) }
}
#[inline]
pub fn set_build_id(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(34usize, 1u8, val as u64)
}
}
#[inline]
pub fn inherit_thread(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) }
}
#[inline]
pub fn set_inherit_thread(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(35usize, 1u8, val as u64)
}
}
#[inline]
pub fn remove_on_exec(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) }
}
#[inline]
pub fn set_remove_on_exec(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(36usize, 1u8, val as u64)
}
}
#[inline]
pub fn sigtrap(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) }
}
#[inline]
pub fn set_sigtrap(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(37usize, 1u8, val as u64)
}
}
#[inline]
pub fn __reserved_1(&self) -> __u64 { pub fn __reserved_1(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 32u8) as u64) } unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 26u8) as u64) }
} }
#[inline] #[inline]
pub fn set___reserved_1(&mut self, val: __u64) { pub fn set___reserved_1(&mut self, val: __u64) {
unsafe { unsafe {
let val: u64 = ::std::mem::transmute(val); let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(32usize, 32u8, val as u64) self._bitfield_1.set(38usize, 26u8, val as u64)
} }
} }
#[inline] #[inline]
@ -1437,6 +1527,12 @@ impl perf_event_attr {
ksymbol: __u64, ksymbol: __u64,
bpf_event: __u64, bpf_event: __u64,
aux_output: __u64, aux_output: __u64,
cgroup: __u64,
text_poke: __u64,
build_id: __u64,
inherit_thread: __u64,
remove_on_exec: __u64,
sigtrap: __u64,
__reserved_1: __u64, __reserved_1: __u64,
) -> __BindgenBitfieldUnit<[u8; 8usize]> { ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
@ -1566,7 +1662,31 @@ impl perf_event_attr {
let aux_output: u64 = unsafe { ::std::mem::transmute(aux_output) }; let aux_output: u64 = unsafe { ::std::mem::transmute(aux_output) };
aux_output as u64 aux_output as u64
}); });
__bindgen_bitfield_unit.set(32usize, 32u8, { __bindgen_bitfield_unit.set(32usize, 1u8, {
let cgroup: u64 = unsafe { ::std::mem::transmute(cgroup) };
cgroup as u64
});
__bindgen_bitfield_unit.set(33usize, 1u8, {
let text_poke: u64 = unsafe { ::std::mem::transmute(text_poke) };
text_poke as u64
});
__bindgen_bitfield_unit.set(34usize, 1u8, {
let build_id: u64 = unsafe { ::std::mem::transmute(build_id) };
build_id as u64
});
__bindgen_bitfield_unit.set(35usize, 1u8, {
let inherit_thread: u64 = unsafe { ::std::mem::transmute(inherit_thread) };
inherit_thread as u64
});
__bindgen_bitfield_unit.set(36usize, 1u8, {
let remove_on_exec: u64 = unsafe { ::std::mem::transmute(remove_on_exec) };
remove_on_exec as u64
});
__bindgen_bitfield_unit.set(37usize, 1u8, {
let sigtrap: u64 = unsafe { ::std::mem::transmute(sigtrap) };
sigtrap as u64
});
__bindgen_bitfield_unit.set(38usize, 26u8, {
let __reserved_1: u64 = unsafe { ::std::mem::transmute(__reserved_1) }; let __reserved_1: u64 = unsafe { ::std::mem::transmute(__reserved_1) };
__reserved_1 as u64 __reserved_1 as u64
}); });
@ -1590,7 +1710,10 @@ pub struct perf_event_mmap_page {
pub time_offset: __u64, pub time_offset: __u64,
pub time_zero: __u64, pub time_zero: __u64,
pub size: __u32, pub size: __u32,
pub __reserved: [__u8; 948usize], pub __reserved_1: __u32,
pub time_cycles: __u64,
pub time_mask: __u64,
pub __reserved: [__u8; 928usize],
pub data_head: __u64, pub data_head: __u64,
pub data_tail: __u64, pub data_tail: __u64,
pub data_offset: __u64, pub data_offset: __u64,
@ -1670,14 +1793,25 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 {
} }
} }
#[inline] #[inline]
pub fn cap_user_time_short(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) }
}
#[inline]
pub fn set_cap_user_time_short(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(5usize, 1u8, val as u64)
}
}
#[inline]
pub fn cap_____res(&self) -> __u64 { pub fn cap_____res(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 59u8) as u64) } unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 58u8) as u64) }
} }
#[inline] #[inline]
pub fn set_cap_____res(&mut self, val: __u64) { pub fn set_cap_____res(&mut self, val: __u64) {
unsafe { unsafe {
let val: u64 = ::std::mem::transmute(val); let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(5usize, 59u8, val as u64) self._bitfield_1.set(6usize, 58u8, val as u64)
} }
} }
#[inline] #[inline]
@ -1687,6 +1821,7 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 {
cap_user_rdpmc: __u64, cap_user_rdpmc: __u64,
cap_user_time: __u64, cap_user_time: __u64,
cap_user_time_zero: __u64, cap_user_time_zero: __u64,
cap_user_time_short: __u64,
cap_____res: __u64, cap_____res: __u64,
) -> __BindgenBitfieldUnit<[u8; 8usize]> { ) -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
@ -1711,7 +1846,11 @@ impl perf_event_mmap_page__bindgen_ty_1__bindgen_ty_1 {
let cap_user_time_zero: u64 = unsafe { ::std::mem::transmute(cap_user_time_zero) }; let cap_user_time_zero: u64 = unsafe { ::std::mem::transmute(cap_user_time_zero) };
cap_user_time_zero as u64 cap_user_time_zero as u64
}); });
__bindgen_bitfield_unit.set(5usize, 59u8, { __bindgen_bitfield_unit.set(5usize, 1u8, {
let cap_user_time_short: u64 = unsafe { ::std::mem::transmute(cap_user_time_short) };
cap_user_time_short as u64
});
__bindgen_bitfield_unit.set(6usize, 58u8, {
let cap_____res: u64 = unsafe { ::std::mem::transmute(cap_____res) }; let cap_____res: u64 = unsafe { ::std::mem::transmute(cap_____res) };
cap_____res as u64 cap_____res as u64
}); });
@ -1746,21 +1885,24 @@ pub enum perf_event_type {
PERF_RECORD_NAMESPACES = 16, PERF_RECORD_NAMESPACES = 16,
PERF_RECORD_KSYMBOL = 17, PERF_RECORD_KSYMBOL = 17,
PERF_RECORD_BPF_EVENT = 18, PERF_RECORD_BPF_EVENT = 18,
PERF_RECORD_MAX = 19, PERF_RECORD_CGROUP = 19,
} PERF_RECORD_TEXT_POKE = 20,
pub const IFLA_XDP_UNSPEC: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_UNSPEC; PERF_RECORD_AUX_OUTPUT_HW_ID = 21,
pub const IFLA_XDP_FD: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_FD; PERF_RECORD_MAX = 22,
pub const IFLA_XDP_ATTACHED: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_ATTACHED; }
pub const IFLA_XDP_FLAGS: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_FLAGS; pub const IFLA_XDP_UNSPEC: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_UNSPEC;
pub const IFLA_XDP_PROG_ID: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_PROG_ID; pub const IFLA_XDP_FD: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_FD;
pub const IFLA_XDP_DRV_PROG_ID: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_DRV_PROG_ID; pub const IFLA_XDP_ATTACHED: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_ATTACHED;
pub const IFLA_XDP_SKB_PROG_ID: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_SKB_PROG_ID; pub const IFLA_XDP_FLAGS: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_FLAGS;
pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_HW_PROG_ID; pub const IFLA_XDP_PROG_ID: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_PROG_ID;
pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_84 = _bindgen_ty_84::IFLA_XDP_EXPECTED_FD; pub const IFLA_XDP_DRV_PROG_ID: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_DRV_PROG_ID;
pub const __IFLA_XDP_MAX: _bindgen_ty_84 = _bindgen_ty_84::__IFLA_XDP_MAX; pub const IFLA_XDP_SKB_PROG_ID: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_SKB_PROG_ID;
pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_HW_PROG_ID;
pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_85 = _bindgen_ty_85::IFLA_XDP_EXPECTED_FD;
pub const __IFLA_XDP_MAX: _bindgen_ty_85 = _bindgen_ty_85::__IFLA_XDP_MAX;
#[repr(u32)] #[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_84 { pub enum _bindgen_ty_85 {
IFLA_XDP_UNSPEC = 0, IFLA_XDP_UNSPEC = 0,
IFLA_XDP_FD = 1, IFLA_XDP_FD = 1,
IFLA_XDP_ATTACHED = 2, IFLA_XDP_ATTACHED = 2,
@ -1793,25 +1935,25 @@ pub struct tcmsg {
pub tcm_parent: __u32, pub tcm_parent: __u32,
pub tcm_info: __u32, pub tcm_info: __u32,
} }
pub const TCA_UNSPEC: _bindgen_ty_97 = _bindgen_ty_97::TCA_UNSPEC; pub const TCA_UNSPEC: _bindgen_ty_98 = _bindgen_ty_98::TCA_UNSPEC;
pub const TCA_KIND: _bindgen_ty_97 = _bindgen_ty_97::TCA_KIND; pub const TCA_KIND: _bindgen_ty_98 = _bindgen_ty_98::TCA_KIND;
pub const TCA_OPTIONS: _bindgen_ty_97 = _bindgen_ty_97::TCA_OPTIONS; pub const TCA_OPTIONS: _bindgen_ty_98 = _bindgen_ty_98::TCA_OPTIONS;
pub const TCA_STATS: _bindgen_ty_97 = _bindgen_ty_97::TCA_STATS; pub const TCA_STATS: _bindgen_ty_98 = _bindgen_ty_98::TCA_STATS;
pub const TCA_XSTATS: _bindgen_ty_97 = _bindgen_ty_97::TCA_XSTATS; pub const TCA_XSTATS: _bindgen_ty_98 = _bindgen_ty_98::TCA_XSTATS;
pub const TCA_RATE: _bindgen_ty_97 = _bindgen_ty_97::TCA_RATE; pub const TCA_RATE: _bindgen_ty_98 = _bindgen_ty_98::TCA_RATE;
pub const TCA_FCNT: _bindgen_ty_97 = _bindgen_ty_97::TCA_FCNT; pub const TCA_FCNT: _bindgen_ty_98 = _bindgen_ty_98::TCA_FCNT;
pub const TCA_STATS2: _bindgen_ty_97 = _bindgen_ty_97::TCA_STATS2; pub const TCA_STATS2: _bindgen_ty_98 = _bindgen_ty_98::TCA_STATS2;
pub const TCA_STAB: _bindgen_ty_97 = _bindgen_ty_97::TCA_STAB; pub const TCA_STAB: _bindgen_ty_98 = _bindgen_ty_98::TCA_STAB;
pub const TCA_PAD: _bindgen_ty_97 = _bindgen_ty_97::TCA_PAD; pub const TCA_PAD: _bindgen_ty_98 = _bindgen_ty_98::TCA_PAD;
pub const TCA_DUMP_INVISIBLE: _bindgen_ty_97 = _bindgen_ty_97::TCA_DUMP_INVISIBLE; pub const TCA_DUMP_INVISIBLE: _bindgen_ty_98 = _bindgen_ty_98::TCA_DUMP_INVISIBLE;
pub const TCA_CHAIN: _bindgen_ty_97 = _bindgen_ty_97::TCA_CHAIN; pub const TCA_CHAIN: _bindgen_ty_98 = _bindgen_ty_98::TCA_CHAIN;
pub const TCA_HW_OFFLOAD: _bindgen_ty_97 = _bindgen_ty_97::TCA_HW_OFFLOAD; pub const TCA_HW_OFFLOAD: _bindgen_ty_98 = _bindgen_ty_98::TCA_HW_OFFLOAD;
pub const TCA_INGRESS_BLOCK: _bindgen_ty_97 = _bindgen_ty_97::TCA_INGRESS_BLOCK; pub const TCA_INGRESS_BLOCK: _bindgen_ty_98 = _bindgen_ty_98::TCA_INGRESS_BLOCK;
pub const TCA_EGRESS_BLOCK: _bindgen_ty_97 = _bindgen_ty_97::TCA_EGRESS_BLOCK; pub const TCA_EGRESS_BLOCK: _bindgen_ty_98 = _bindgen_ty_98::TCA_EGRESS_BLOCK;
pub const __TCA_MAX: _bindgen_ty_97 = _bindgen_ty_97::__TCA_MAX; pub const __TCA_MAX: _bindgen_ty_98 = _bindgen_ty_98::__TCA_MAX;
#[repr(u32)] #[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_97 { pub enum _bindgen_ty_98 {
TCA_UNSPEC = 0, TCA_UNSPEC = 0,
TCA_KIND = 1, TCA_KIND = 1,
TCA_OPTIONS = 2, TCA_OPTIONS = 2,
@ -1829,22 +1971,22 @@ pub enum _bindgen_ty_97 {
TCA_EGRESS_BLOCK = 14, TCA_EGRESS_BLOCK = 14,
__TCA_MAX = 15, __TCA_MAX = 15,
} }
pub const TCA_BPF_UNSPEC: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_UNSPEC; pub const TCA_BPF_UNSPEC: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_UNSPEC;
pub const TCA_BPF_ACT: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_ACT; pub const TCA_BPF_ACT: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_ACT;
pub const TCA_BPF_POLICE: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_POLICE; pub const TCA_BPF_POLICE: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_POLICE;
pub const TCA_BPF_CLASSID: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_CLASSID; pub const TCA_BPF_CLASSID: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_CLASSID;
pub const TCA_BPF_OPS_LEN: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_OPS_LEN; pub const TCA_BPF_OPS_LEN: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_OPS_LEN;
pub const TCA_BPF_OPS: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_OPS; pub const TCA_BPF_OPS: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_OPS;
pub const TCA_BPF_FD: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_FD; pub const TCA_BPF_FD: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_FD;
pub const TCA_BPF_NAME: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_NAME; pub const TCA_BPF_NAME: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_NAME;
pub const TCA_BPF_FLAGS: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_FLAGS; pub const TCA_BPF_FLAGS: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_FLAGS;
pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_FLAGS_GEN; pub const TCA_BPF_FLAGS_GEN: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_FLAGS_GEN;
pub const TCA_BPF_TAG: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_TAG; pub const TCA_BPF_TAG: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_TAG;
pub const TCA_BPF_ID: _bindgen_ty_153 = _bindgen_ty_153::TCA_BPF_ID; pub const TCA_BPF_ID: _bindgen_ty_154 = _bindgen_ty_154::TCA_BPF_ID;
pub const __TCA_BPF_MAX: _bindgen_ty_153 = _bindgen_ty_153::__TCA_BPF_MAX; pub const __TCA_BPF_MAX: _bindgen_ty_154 = _bindgen_ty_154::__TCA_BPF_MAX;
#[repr(u32)] #[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum _bindgen_ty_153 { pub enum _bindgen_ty_154 {
TCA_BPF_UNSPEC = 0, TCA_BPF_UNSPEC = 0,
TCA_BPF_ACT = 1, TCA_BPF_ACT = 1,
TCA_BPF_POLICE = 2, TCA_BPF_POLICE = 2,

@ -146,6 +146,8 @@ pub const BPF_F_ANY_ALIGNMENT: u32 = 2;
pub const BPF_F_TEST_RND_HI32: u32 = 4; pub const BPF_F_TEST_RND_HI32: u32 = 4;
pub const BPF_F_TEST_STATE_FREQ: u32 = 8; pub const BPF_F_TEST_STATE_FREQ: u32 = 8;
pub const BPF_F_SLEEPABLE: u32 = 16; pub const BPF_F_SLEEPABLE: u32 = 16;
pub const BPF_F_XDP_HAS_FRAGS: u32 = 32;
pub const BPF_F_KPROBE_MULTI_RETURN: u32 = 1;
pub const BPF_PSEUDO_MAP_FD: u32 = 1; pub const BPF_PSEUDO_MAP_FD: u32 = 1;
pub const BPF_PSEUDO_MAP_IDX: u32 = 5; pub const BPF_PSEUDO_MAP_IDX: u32 = 5;
pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; pub const BPF_PSEUDO_MAP_VALUE: u32 = 2;
@ -156,6 +158,7 @@ pub const BPF_PSEUDO_CALL: u32 = 1;
pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2;
pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; pub const BPF_F_QUERY_EFFECTIVE: u32 = 1;
pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1;
pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2;
pub const BPF_BUILD_ID_SIZE: u32 = 20; pub const BPF_BUILD_ID_SIZE: u32 = 20;
pub const BPF_OBJ_NAME_LEN: u32 = 16; pub const BPF_OBJ_NAME_LEN: u32 = 16;
pub const BPF_TAG_SIZE: u32 = 8; pub const BPF_TAG_SIZE: u32 = 8;
@ -397,6 +400,11 @@ pub type _bindgen_ty_23 = ::aya_bpf_cty::c_uint;
pub const BPF_F_BROADCAST: ::aya_bpf_cty::c_uint = 8; pub const BPF_F_BROADCAST: ::aya_bpf_cty::c_uint = 8;
pub const BPF_F_EXCLUDE_INGRESS: ::aya_bpf_cty::c_uint = 16; pub const BPF_F_EXCLUDE_INGRESS: ::aya_bpf_cty::c_uint = 16;
pub type _bindgen_ty_24 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_24 = ::aya_bpf_cty::c_uint;
pub mod _bindgen_ty_25 {
pub type Type = ::aya_bpf_cty::c_uint;
pub const BPF_SKB_TSTAMP_UNSPEC: Type = 0;
pub const BPF_SKB_TSTAMP_DELIVERY_MONO: Type = 1;
}
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
pub struct __sk_buff { pub struct __sk_buff {
@ -432,8 +440,9 @@ pub struct __sk_buff {
pub gso_segs: __u32, pub gso_segs: __u32,
pub __bindgen_anon_2: __sk_buff__bindgen_ty_2, pub __bindgen_anon_2: __sk_buff__bindgen_ty_2,
pub gso_size: __u32, pub gso_size: __u32,
pub tstamp_type: __u8,
pub _bitfield_align_1: [u8; 0], pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
pub hwtstamp: __u64, pub hwtstamp: __u64,
} }
#[repr(C)] #[repr(C)]
@ -466,8 +475,8 @@ impl __sk_buff__bindgen_ty_2 {
} }
impl __sk_buff { impl __sk_buff {
#[inline] #[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 3usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
__bindgen_bitfield_unit __bindgen_bitfield_unit
} }
} }
@ -503,7 +512,7 @@ pub union bpf_xfrm_state__bindgen_ty_1 {
pub remote_ipv6: [__u32; 4usize], pub remote_ipv6: [__u32; 4usize],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_sock { pub struct bpf_sock {
pub bound_dev_if: __u32, pub bound_dev_if: __u32,
pub family: __u32, pub family: __u32,
@ -514,14 +523,23 @@ pub struct bpf_sock {
pub src_ip4: __u32, pub src_ip4: __u32,
pub src_ip6: [__u32; 4usize], pub src_ip6: [__u32; 4usize],
pub src_port: __u32, pub src_port: __u32,
pub dst_port: __u32, pub dst_port: __be16,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
pub dst_ip4: __u32, pub dst_ip4: __u32,
pub dst_ip6: [__u32; 4usize], pub dst_ip6: [__u32; 4usize],
pub state: __u32, pub state: __u32,
pub rx_queue_mapping: __s32, pub rx_queue_mapping: __s32,
} }
impl bpf_sock {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_tcp_sock { pub struct bpf_tcp_sock {
pub snd_cwnd: __u32, pub snd_cwnd: __u32,
pub srtt_us: __u32, pub srtt_us: __u32,
@ -562,7 +580,7 @@ pub union bpf_sock_tuple__bindgen_ty_1 {
pub ipv6: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2, pub ipv6: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 { pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 {
pub saddr: __be32, pub saddr: __be32,
pub daddr: __be32, pub daddr: __be32,
@ -570,7 +588,7 @@ pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 {
pub dport: __be16, pub dport: __be16,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 {
pub saddr: [__be32; 4usize], pub saddr: [__be32; 4usize],
pub daddr: [__be32; 4usize], pub daddr: [__be32; 4usize],
@ -586,7 +604,7 @@ pub mod xdp_action {
pub const XDP_REDIRECT: Type = 4; pub const XDP_REDIRECT: Type = 4;
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct xdp_md { pub struct xdp_md {
pub data: __u32, pub data: __u32,
pub data_end: __u32, pub data_end: __u32,
@ -727,7 +745,7 @@ impl sk_reuseport_md__bindgen_ty_4 {
} }
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_map_info { pub struct bpf_map_info {
pub type_: __u32, pub type_: __u32,
pub id: __u32, pub id: __u32,
@ -883,7 +901,7 @@ pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: ::aya_bpf_cty::c_uint = 16;
pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: ::aya_bpf_cty::c_uint = 32; pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: ::aya_bpf_cty::c_uint = 32;
pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: ::aya_bpf_cty::c_uint = 64; pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: ::aya_bpf_cty::c_uint = 64;
pub const BPF_SOCK_OPS_ALL_CB_FLAGS: ::aya_bpf_cty::c_uint = 127; pub const BPF_SOCK_OPS_ALL_CB_FLAGS: ::aya_bpf_cty::c_uint = 127;
pub type _bindgen_ty_25 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_26 = ::aya_bpf_cty::c_uint;
pub const BPF_SOCK_OPS_VOID: ::aya_bpf_cty::c_uint = 0; pub const BPF_SOCK_OPS_VOID: ::aya_bpf_cty::c_uint = 0;
pub const BPF_SOCK_OPS_TIMEOUT_INIT: ::aya_bpf_cty::c_uint = 1; pub const BPF_SOCK_OPS_TIMEOUT_INIT: ::aya_bpf_cty::c_uint = 1;
pub const BPF_SOCK_OPS_RWND_INIT: ::aya_bpf_cty::c_uint = 2; pub const BPF_SOCK_OPS_RWND_INIT: ::aya_bpf_cty::c_uint = 2;
@ -900,7 +918,7 @@ pub const BPF_SOCK_OPS_RTT_CB: ::aya_bpf_cty::c_uint = 12;
pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: ::aya_bpf_cty::c_uint = 13; pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: ::aya_bpf_cty::c_uint = 13;
pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: ::aya_bpf_cty::c_uint = 14; pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: ::aya_bpf_cty::c_uint = 14;
pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: ::aya_bpf_cty::c_uint = 15; pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: ::aya_bpf_cty::c_uint = 15;
pub type _bindgen_ty_26 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_27 = ::aya_bpf_cty::c_uint;
pub const BPF_TCP_ESTABLISHED: ::aya_bpf_cty::c_uint = 1; pub const BPF_TCP_ESTABLISHED: ::aya_bpf_cty::c_uint = 1;
pub const BPF_TCP_SYN_SENT: ::aya_bpf_cty::c_uint = 2; pub const BPF_TCP_SYN_SENT: ::aya_bpf_cty::c_uint = 2;
pub const BPF_TCP_SYN_RECV: ::aya_bpf_cty::c_uint = 3; pub const BPF_TCP_SYN_RECV: ::aya_bpf_cty::c_uint = 3;
@ -914,18 +932,18 @@ pub const BPF_TCP_LISTEN: ::aya_bpf_cty::c_uint = 10;
pub const BPF_TCP_CLOSING: ::aya_bpf_cty::c_uint = 11; pub const BPF_TCP_CLOSING: ::aya_bpf_cty::c_uint = 11;
pub const BPF_TCP_NEW_SYN_RECV: ::aya_bpf_cty::c_uint = 12; pub const BPF_TCP_NEW_SYN_RECV: ::aya_bpf_cty::c_uint = 12;
pub const BPF_TCP_MAX_STATES: ::aya_bpf_cty::c_uint = 13; pub const BPF_TCP_MAX_STATES: ::aya_bpf_cty::c_uint = 13;
pub type _bindgen_ty_27 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_28 = ::aya_bpf_cty::c_uint;
pub mod _bindgen_ty_29 { pub mod _bindgen_ty_30 {
pub type Type = ::aya_bpf_cty::c_uint; pub type Type = ::aya_bpf_cty::c_uint;
pub const BPF_LOAD_HDR_OPT_TCP_SYN: Type = 1; pub const BPF_LOAD_HDR_OPT_TCP_SYN: Type = 1;
} }
pub mod _bindgen_ty_30 { pub mod _bindgen_ty_31 {
pub type Type = ::aya_bpf_cty::c_uint; pub type Type = ::aya_bpf_cty::c_uint;
pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: Type = 1; pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: Type = 1;
pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: Type = 2; pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: Type = 2;
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_perf_event_value { pub struct bpf_perf_event_value {
pub counter: __u64, pub counter: __u64,
pub enabled: __u64, pub enabled: __u64,
@ -934,13 +952,13 @@ pub struct bpf_perf_event_value {
pub const BPF_DEVCG_ACC_MKNOD: ::aya_bpf_cty::c_uint = 1; pub const BPF_DEVCG_ACC_MKNOD: ::aya_bpf_cty::c_uint = 1;
pub const BPF_DEVCG_ACC_READ: ::aya_bpf_cty::c_uint = 2; pub const BPF_DEVCG_ACC_READ: ::aya_bpf_cty::c_uint = 2;
pub const BPF_DEVCG_ACC_WRITE: ::aya_bpf_cty::c_uint = 4; pub const BPF_DEVCG_ACC_WRITE: ::aya_bpf_cty::c_uint = 4;
pub type _bindgen_ty_31 = ::aya_bpf_cty::c_uint; 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_BLOCK: ::aya_bpf_cty::c_uint = 1;
pub const BPF_DEVCG_DEV_CHAR: ::aya_bpf_cty::c_uint = 2; pub const BPF_DEVCG_DEV_CHAR: ::aya_bpf_cty::c_uint = 2;
pub type _bindgen_ty_32 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_33 = ::aya_bpf_cty::c_uint;
pub const BPF_FIB_LOOKUP_DIRECT: ::aya_bpf_cty::c_uint = 1; 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 const BPF_FIB_LOOKUP_OUTPUT: ::aya_bpf_cty::c_uint = 2;
pub type _bindgen_ty_33 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_34 = ::aya_bpf_cty::c_uint;
pub const BPF_FIB_LKUP_RET_SUCCESS: ::aya_bpf_cty::c_uint = 0; pub const BPF_FIB_LKUP_RET_SUCCESS: ::aya_bpf_cty::c_uint = 0;
pub const BPF_FIB_LKUP_RET_BLACKHOLE: ::aya_bpf_cty::c_uint = 1; pub const BPF_FIB_LKUP_RET_BLACKHOLE: ::aya_bpf_cty::c_uint = 1;
pub const BPF_FIB_LKUP_RET_UNREACHABLE: ::aya_bpf_cty::c_uint = 2; pub const BPF_FIB_LKUP_RET_UNREACHABLE: ::aya_bpf_cty::c_uint = 2;
@ -950,7 +968,7 @@ pub const BPF_FIB_LKUP_RET_FWD_DISABLED: ::aya_bpf_cty::c_uint = 5;
pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: ::aya_bpf_cty::c_uint = 6; pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: ::aya_bpf_cty::c_uint = 6;
pub const BPF_FIB_LKUP_RET_NO_NEIGH: ::aya_bpf_cty::c_uint = 7; pub const BPF_FIB_LKUP_RET_NO_NEIGH: ::aya_bpf_cty::c_uint = 7;
pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: ::aya_bpf_cty::c_uint = 8; pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: ::aya_bpf_cty::c_uint = 8;
pub type _bindgen_ty_34 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_35 = ::aya_bpf_cty::c_uint;
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_fib_lookup { pub struct bpf_fib_lookup {
@ -1008,7 +1026,7 @@ pub union bpf_redir_neigh__bindgen_ty_1 {
pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: ::aya_bpf_cty::c_uint = 1; 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_FLOW_LABEL: ::aya_bpf_cty::c_uint = 2;
pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: ::aya_bpf_cty::c_uint = 4; pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: ::aya_bpf_cty::c_uint = 4;
pub type _bindgen_ty_35 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_36 = ::aya_bpf_cty::c_uint;
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_flow_keys { pub struct bpf_flow_keys {
@ -1033,25 +1051,25 @@ pub union bpf_flow_keys__bindgen_ty_1 {
pub __bindgen_anon_2: bpf_flow_keys__bindgen_ty_1__bindgen_ty_2, pub __bindgen_anon_2: bpf_flow_keys__bindgen_ty_1__bindgen_ty_2,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 { pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 {
pub ipv4_src: __be32, pub ipv4_src: __be32,
pub ipv4_dst: __be32, pub ipv4_dst: __be32,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 { pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 {
pub ipv6_src: [__u32; 4usize], pub ipv6_src: [__u32; 4usize],
pub ipv6_dst: [__u32; 4usize], pub ipv6_dst: [__u32; 4usize],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_spin_lock { pub struct bpf_spin_lock {
pub val: __u32, pub val: __u32,
} }
#[repr(C)] #[repr(C)]
#[repr(align(8))] #[repr(align(8))]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_timer { pub struct bpf_timer {
pub _bitfield_align_1: [u8; 0], pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>, pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>,
@ -1064,26 +1082,26 @@ impl bpf_timer {
} }
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_sysctl { pub struct bpf_sysctl {
pub write: __u32, pub write: __u32,
pub file_pos: __u32, pub file_pos: __u32,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_pidns_info { pub struct bpf_pidns_info {
pub pid: __u32, pub pid: __u32,
pub tgid: __u32, pub tgid: __u32,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct btf_ptr { pub struct btf_ptr {
pub ptr: *mut ::aya_bpf_cty::c_void, pub ptr: *mut ::aya_bpf_cty::c_void,
pub type_id: __u32, pub type_id: __u32,
pub flags: __u32, pub flags: __u32,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct user_pt_regs { pub struct user_pt_regs {
pub regs: [__u64; 31usize], pub regs: [__u64; 31usize],
pub sp: __u64, pub sp: __u64,
@ -1092,88 +1110,88 @@ pub struct user_pt_regs {
} }
pub type sa_family_t = ::aya_bpf_cty::c_ushort; pub type sa_family_t = ::aya_bpf_cty::c_ushort;
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct sockaddr { pub struct sockaddr {
pub sa_family: sa_family_t, pub sa_family: sa_family_t,
pub sa_data: [::aya_bpf_cty::c_char; 14usize], pub sa_data: [::aya_bpf_cty::c_char; 14usize],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_perf_event_data { pub struct bpf_perf_event_data {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct linux_binprm { pub struct linux_binprm {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct pt_regs { pub struct pt_regs {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct tcphdr { pub struct tcphdr {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct seq_file { pub struct seq_file {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct tcp6_sock { pub struct tcp6_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct tcp_sock { pub struct tcp_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct tcp_timewait_sock { pub struct tcp_timewait_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct tcp_request_sock { pub struct tcp_request_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct udp6_sock { pub struct udp6_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct unix_sock { pub struct unix_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct task_struct { pub struct task_struct {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct path { pub struct path {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct inode { pub struct inode {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct socket { pub struct socket {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct file { pub struct file {
_unused: [u8; 0], _unused: [u8; 0],
} }

@ -107,6 +107,9 @@ impl __sk_buff {
pub fn gso_size(&self) -> Option<__u32> { pub fn gso_size(&self) -> Option<__u32> {
unsafe { crate::bpf_probe_read(&self.gso_size) }.ok() unsafe { crate::bpf_probe_read(&self.gso_size) }.ok()
} }
pub fn tstamp_type(&self) -> Option<__u8> {
unsafe { crate::bpf_probe_read(&self.tstamp_type) }.ok()
}
pub fn hwtstamp(&self) -> Option<__u64> { pub fn hwtstamp(&self) -> Option<__u64> {
unsafe { crate::bpf_probe_read(&self.hwtstamp) }.ok() unsafe { crate::bpf_probe_read(&self.hwtstamp) }.ok()
} }
@ -218,7 +221,7 @@ impl bpf_sock {
pub fn src_port(&self) -> Option<__u32> { pub fn src_port(&self) -> Option<__u32> {
unsafe { crate::bpf_probe_read(&self.src_port) }.ok() unsafe { crate::bpf_probe_read(&self.src_port) }.ok()
} }
pub fn dst_port(&self) -> Option<__u32> { pub fn dst_port(&self) -> Option<__be16> {
unsafe { crate::bpf_probe_read(&self.dst_port) }.ok() unsafe { crate::bpf_probe_read(&self.dst_port) }.ok()
} }
pub fn dst_ip4(&self) -> Option<__u32> { pub fn dst_ip4(&self) -> Option<__u32> {

@ -1878,3 +1878,94 @@ pub unsafe fn bpf_get_func_arg_cnt(ctx: *mut ::aya_bpf_cty::c_void) -> ::aya_bpf
::core::mem::transmute(185usize); ::core::mem::transmute(185usize);
fun(ctx) fun(ctx)
} }
pub unsafe fn bpf_get_retval() -> ::aya_bpf_cty::c_int {
let fun: unsafe extern "C" fn() -> ::aya_bpf_cty::c_int = ::core::mem::transmute(186usize);
fun()
}
pub unsafe fn bpf_set_retval(retval: ::aya_bpf_cty::c_int) -> ::aya_bpf_cty::c_int {
let fun: unsafe extern "C" fn(retval: ::aya_bpf_cty::c_int) -> ::aya_bpf_cty::c_int =
::core::mem::transmute(187usize);
fun(retval)
}
pub unsafe fn bpf_xdp_get_buff_len(xdp_md: *mut xdp_md) -> __u64 {
let fun: unsafe extern "C" fn(xdp_md: *mut xdp_md) -> __u64 = ::core::mem::transmute(188usize);
fun(xdp_md)
}
pub unsafe fn bpf_xdp_load_bytes(
xdp_md: *mut xdp_md,
offset: __u32,
buf: *mut ::aya_bpf_cty::c_void,
len: __u32,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
xdp_md: *mut xdp_md,
offset: __u32,
buf: *mut ::aya_bpf_cty::c_void,
len: __u32,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(189usize);
fun(xdp_md, offset, buf, len)
}
pub unsafe fn bpf_xdp_store_bytes(
xdp_md: *mut xdp_md,
offset: __u32,
buf: *mut ::aya_bpf_cty::c_void,
len: __u32,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
xdp_md: *mut xdp_md,
offset: __u32,
buf: *mut ::aya_bpf_cty::c_void,
len: __u32,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(190usize);
fun(xdp_md, offset, buf, len)
}
pub unsafe fn bpf_copy_from_user_task(
dst: *mut ::aya_bpf_cty::c_void,
size: __u32,
user_ptr: *const ::aya_bpf_cty::c_void,
tsk: *mut task_struct,
flags: __u64,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
dst: *mut ::aya_bpf_cty::c_void,
size: __u32,
user_ptr: *const ::aya_bpf_cty::c_void,
tsk: *mut task_struct,
flags: __u64,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(191usize);
fun(dst, size, user_ptr, tsk, flags)
}
pub unsafe fn bpf_skb_set_tstamp(
skb: *mut __sk_buff,
tstamp: __u64,
tstamp_type: __u32,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
skb: *mut __sk_buff,
tstamp: __u64,
tstamp_type: __u32,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(192usize);
fun(skb, tstamp, tstamp_type)
}
pub unsafe fn bpf_ima_file_hash(
file: *mut file,
dst: *mut ::aya_bpf_cty::c_void,
size: __u32,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
file: *mut file,
dst: *mut ::aya_bpf_cty::c_void,
size: __u32,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(193usize);
fun(file, dst, size)
}
pub unsafe fn bpf_kptr_xchg(
map_value: *mut ::aya_bpf_cty::c_void,
ptr: *mut ::aya_bpf_cty::c_void,
) -> *mut ::aya_bpf_cty::c_void {
let fun: unsafe extern "C" fn(
map_value: *mut ::aya_bpf_cty::c_void,
ptr: *mut ::aya_bpf_cty::c_void,
) -> *mut ::aya_bpf_cty::c_void = ::core::mem::transmute(194usize);
fun(map_value, ptr)
}

@ -146,6 +146,8 @@ pub const BPF_F_ANY_ALIGNMENT: u32 = 2;
pub const BPF_F_TEST_RND_HI32: u32 = 4; pub const BPF_F_TEST_RND_HI32: u32 = 4;
pub const BPF_F_TEST_STATE_FREQ: u32 = 8; pub const BPF_F_TEST_STATE_FREQ: u32 = 8;
pub const BPF_F_SLEEPABLE: u32 = 16; pub const BPF_F_SLEEPABLE: u32 = 16;
pub const BPF_F_XDP_HAS_FRAGS: u32 = 32;
pub const BPF_F_KPROBE_MULTI_RETURN: u32 = 1;
pub const BPF_PSEUDO_MAP_FD: u32 = 1; pub const BPF_PSEUDO_MAP_FD: u32 = 1;
pub const BPF_PSEUDO_MAP_IDX: u32 = 5; pub const BPF_PSEUDO_MAP_IDX: u32 = 5;
pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; pub const BPF_PSEUDO_MAP_VALUE: u32 = 2;
@ -156,6 +158,7 @@ pub const BPF_PSEUDO_CALL: u32 = 1;
pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2;
pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; pub const BPF_F_QUERY_EFFECTIVE: u32 = 1;
pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1;
pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2;
pub const BPF_BUILD_ID_SIZE: u32 = 20; pub const BPF_BUILD_ID_SIZE: u32 = 20;
pub const BPF_OBJ_NAME_LEN: u32 = 16; pub const BPF_OBJ_NAME_LEN: u32 = 16;
pub const BPF_TAG_SIZE: u32 = 8; pub const BPF_TAG_SIZE: u32 = 8;
@ -392,6 +395,11 @@ pub type _bindgen_ty_23 = ::aya_bpf_cty::c_uint;
pub const BPF_F_BROADCAST: ::aya_bpf_cty::c_uint = 8; pub const BPF_F_BROADCAST: ::aya_bpf_cty::c_uint = 8;
pub const BPF_F_EXCLUDE_INGRESS: ::aya_bpf_cty::c_uint = 16; pub const BPF_F_EXCLUDE_INGRESS: ::aya_bpf_cty::c_uint = 16;
pub type _bindgen_ty_24 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_24 = ::aya_bpf_cty::c_uint;
pub mod _bindgen_ty_25 {
pub type Type = ::aya_bpf_cty::c_uint;
pub const BPF_SKB_TSTAMP_UNSPEC: Type = 0;
pub const BPF_SKB_TSTAMP_DELIVERY_MONO: Type = 1;
}
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
pub struct __sk_buff { pub struct __sk_buff {
@ -427,8 +435,9 @@ pub struct __sk_buff {
pub gso_segs: __u32, pub gso_segs: __u32,
pub __bindgen_anon_2: __sk_buff__bindgen_ty_2, pub __bindgen_anon_2: __sk_buff__bindgen_ty_2,
pub gso_size: __u32, pub gso_size: __u32,
pub tstamp_type: __u8,
pub _bitfield_align_1: [u8; 0], pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
pub hwtstamp: __u64, pub hwtstamp: __u64,
} }
#[repr(C)] #[repr(C)]
@ -463,8 +472,8 @@ impl __sk_buff__bindgen_ty_2 {
} }
impl __sk_buff { impl __sk_buff {
#[inline] #[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 3usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
__bindgen_bitfield_unit __bindgen_bitfield_unit
} }
} }
@ -500,7 +509,7 @@ pub union bpf_xfrm_state__bindgen_ty_1 {
pub remote_ipv6: [__u32; 4usize], pub remote_ipv6: [__u32; 4usize],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_sock { pub struct bpf_sock {
pub bound_dev_if: __u32, pub bound_dev_if: __u32,
pub family: __u32, pub family: __u32,
@ -511,14 +520,23 @@ pub struct bpf_sock {
pub src_ip4: __u32, pub src_ip4: __u32,
pub src_ip6: [__u32; 4usize], pub src_ip6: [__u32; 4usize],
pub src_port: __u32, pub src_port: __u32,
pub dst_port: __u32, pub dst_port: __be16,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
pub dst_ip4: __u32, pub dst_ip4: __u32,
pub dst_ip6: [__u32; 4usize], pub dst_ip6: [__u32; 4usize],
pub state: __u32, pub state: __u32,
pub rx_queue_mapping: __s32, pub rx_queue_mapping: __s32,
} }
impl bpf_sock {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_tcp_sock { pub struct bpf_tcp_sock {
pub snd_cwnd: __u32, pub snd_cwnd: __u32,
pub srtt_us: __u32, pub srtt_us: __u32,
@ -559,7 +577,7 @@ pub union bpf_sock_tuple__bindgen_ty_1 {
pub ipv6: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2, pub ipv6: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 { pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 {
pub saddr: __be32, pub saddr: __be32,
pub daddr: __be32, pub daddr: __be32,
@ -567,7 +585,7 @@ pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 {
pub dport: __be16, pub dport: __be16,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 {
pub saddr: [__be32; 4usize], pub saddr: [__be32; 4usize],
pub daddr: [__be32; 4usize], pub daddr: [__be32; 4usize],
@ -583,7 +601,7 @@ pub mod xdp_action {
pub const XDP_REDIRECT: Type = 4; pub const XDP_REDIRECT: Type = 4;
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct xdp_md { pub struct xdp_md {
pub data: __u32, pub data: __u32,
pub data_end: __u32, pub data_end: __u32,
@ -731,7 +749,7 @@ impl sk_reuseport_md__bindgen_ty_4 {
} }
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_map_info { pub struct bpf_map_info {
pub type_: __u32, pub type_: __u32,
pub id: __u32, pub id: __u32,
@ -891,7 +909,7 @@ pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: ::aya_bpf_cty::c_uint = 16;
pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: ::aya_bpf_cty::c_uint = 32; pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: ::aya_bpf_cty::c_uint = 32;
pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: ::aya_bpf_cty::c_uint = 64; pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: ::aya_bpf_cty::c_uint = 64;
pub const BPF_SOCK_OPS_ALL_CB_FLAGS: ::aya_bpf_cty::c_uint = 127; pub const BPF_SOCK_OPS_ALL_CB_FLAGS: ::aya_bpf_cty::c_uint = 127;
pub type _bindgen_ty_25 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_26 = ::aya_bpf_cty::c_uint;
pub const BPF_SOCK_OPS_VOID: ::aya_bpf_cty::c_uint = 0; pub const BPF_SOCK_OPS_VOID: ::aya_bpf_cty::c_uint = 0;
pub const BPF_SOCK_OPS_TIMEOUT_INIT: ::aya_bpf_cty::c_uint = 1; pub const BPF_SOCK_OPS_TIMEOUT_INIT: ::aya_bpf_cty::c_uint = 1;
pub const BPF_SOCK_OPS_RWND_INIT: ::aya_bpf_cty::c_uint = 2; pub const BPF_SOCK_OPS_RWND_INIT: ::aya_bpf_cty::c_uint = 2;
@ -908,7 +926,7 @@ pub const BPF_SOCK_OPS_RTT_CB: ::aya_bpf_cty::c_uint = 12;
pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: ::aya_bpf_cty::c_uint = 13; pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: ::aya_bpf_cty::c_uint = 13;
pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: ::aya_bpf_cty::c_uint = 14; pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: ::aya_bpf_cty::c_uint = 14;
pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: ::aya_bpf_cty::c_uint = 15; pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: ::aya_bpf_cty::c_uint = 15;
pub type _bindgen_ty_26 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_27 = ::aya_bpf_cty::c_uint;
pub const BPF_TCP_ESTABLISHED: ::aya_bpf_cty::c_uint = 1; pub const BPF_TCP_ESTABLISHED: ::aya_bpf_cty::c_uint = 1;
pub const BPF_TCP_SYN_SENT: ::aya_bpf_cty::c_uint = 2; pub const BPF_TCP_SYN_SENT: ::aya_bpf_cty::c_uint = 2;
pub const BPF_TCP_SYN_RECV: ::aya_bpf_cty::c_uint = 3; pub const BPF_TCP_SYN_RECV: ::aya_bpf_cty::c_uint = 3;
@ -922,18 +940,18 @@ pub const BPF_TCP_LISTEN: ::aya_bpf_cty::c_uint = 10;
pub const BPF_TCP_CLOSING: ::aya_bpf_cty::c_uint = 11; pub const BPF_TCP_CLOSING: ::aya_bpf_cty::c_uint = 11;
pub const BPF_TCP_NEW_SYN_RECV: ::aya_bpf_cty::c_uint = 12; pub const BPF_TCP_NEW_SYN_RECV: ::aya_bpf_cty::c_uint = 12;
pub const BPF_TCP_MAX_STATES: ::aya_bpf_cty::c_uint = 13; pub const BPF_TCP_MAX_STATES: ::aya_bpf_cty::c_uint = 13;
pub type _bindgen_ty_27 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_28 = ::aya_bpf_cty::c_uint;
pub mod _bindgen_ty_29 { pub mod _bindgen_ty_30 {
pub type Type = ::aya_bpf_cty::c_uint; pub type Type = ::aya_bpf_cty::c_uint;
pub const BPF_LOAD_HDR_OPT_TCP_SYN: Type = 1; pub const BPF_LOAD_HDR_OPT_TCP_SYN: Type = 1;
} }
pub mod _bindgen_ty_30 { pub mod _bindgen_ty_31 {
pub type Type = ::aya_bpf_cty::c_uint; pub type Type = ::aya_bpf_cty::c_uint;
pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: Type = 1; pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: Type = 1;
pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: Type = 2; pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: Type = 2;
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_perf_event_value { pub struct bpf_perf_event_value {
pub counter: __u64, pub counter: __u64,
pub enabled: __u64, pub enabled: __u64,
@ -942,13 +960,13 @@ pub struct bpf_perf_event_value {
pub const BPF_DEVCG_ACC_MKNOD: ::aya_bpf_cty::c_uint = 1; pub const BPF_DEVCG_ACC_MKNOD: ::aya_bpf_cty::c_uint = 1;
pub const BPF_DEVCG_ACC_READ: ::aya_bpf_cty::c_uint = 2; pub const BPF_DEVCG_ACC_READ: ::aya_bpf_cty::c_uint = 2;
pub const BPF_DEVCG_ACC_WRITE: ::aya_bpf_cty::c_uint = 4; pub const BPF_DEVCG_ACC_WRITE: ::aya_bpf_cty::c_uint = 4;
pub type _bindgen_ty_31 = ::aya_bpf_cty::c_uint; 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_BLOCK: ::aya_bpf_cty::c_uint = 1;
pub const BPF_DEVCG_DEV_CHAR: ::aya_bpf_cty::c_uint = 2; pub const BPF_DEVCG_DEV_CHAR: ::aya_bpf_cty::c_uint = 2;
pub type _bindgen_ty_32 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_33 = ::aya_bpf_cty::c_uint;
pub const BPF_FIB_LOOKUP_DIRECT: ::aya_bpf_cty::c_uint = 1; 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 const BPF_FIB_LOOKUP_OUTPUT: ::aya_bpf_cty::c_uint = 2;
pub type _bindgen_ty_33 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_34 = ::aya_bpf_cty::c_uint;
pub const BPF_FIB_LKUP_RET_SUCCESS: ::aya_bpf_cty::c_uint = 0; pub const BPF_FIB_LKUP_RET_SUCCESS: ::aya_bpf_cty::c_uint = 0;
pub const BPF_FIB_LKUP_RET_BLACKHOLE: ::aya_bpf_cty::c_uint = 1; pub const BPF_FIB_LKUP_RET_BLACKHOLE: ::aya_bpf_cty::c_uint = 1;
pub const BPF_FIB_LKUP_RET_UNREACHABLE: ::aya_bpf_cty::c_uint = 2; pub const BPF_FIB_LKUP_RET_UNREACHABLE: ::aya_bpf_cty::c_uint = 2;
@ -958,7 +976,7 @@ pub const BPF_FIB_LKUP_RET_FWD_DISABLED: ::aya_bpf_cty::c_uint = 5;
pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: ::aya_bpf_cty::c_uint = 6; pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: ::aya_bpf_cty::c_uint = 6;
pub const BPF_FIB_LKUP_RET_NO_NEIGH: ::aya_bpf_cty::c_uint = 7; pub const BPF_FIB_LKUP_RET_NO_NEIGH: ::aya_bpf_cty::c_uint = 7;
pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: ::aya_bpf_cty::c_uint = 8; pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: ::aya_bpf_cty::c_uint = 8;
pub type _bindgen_ty_34 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_35 = ::aya_bpf_cty::c_uint;
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_fib_lookup { pub struct bpf_fib_lookup {
@ -1016,7 +1034,7 @@ pub union bpf_redir_neigh__bindgen_ty_1 {
pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: ::aya_bpf_cty::c_uint = 1; 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_FLOW_LABEL: ::aya_bpf_cty::c_uint = 2;
pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: ::aya_bpf_cty::c_uint = 4; pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: ::aya_bpf_cty::c_uint = 4;
pub type _bindgen_ty_35 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_36 = ::aya_bpf_cty::c_uint;
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_flow_keys { pub struct bpf_flow_keys {
@ -1041,25 +1059,25 @@ pub union bpf_flow_keys__bindgen_ty_1 {
pub __bindgen_anon_2: bpf_flow_keys__bindgen_ty_1__bindgen_ty_2, pub __bindgen_anon_2: bpf_flow_keys__bindgen_ty_1__bindgen_ty_2,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 { pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 {
pub ipv4_src: __be32, pub ipv4_src: __be32,
pub ipv4_dst: __be32, pub ipv4_dst: __be32,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 { pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 {
pub ipv6_src: [__u32; 4usize], pub ipv6_src: [__u32; 4usize],
pub ipv6_dst: [__u32; 4usize], pub ipv6_dst: [__u32; 4usize],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_spin_lock { pub struct bpf_spin_lock {
pub val: __u32, pub val: __u32,
} }
#[repr(C)] #[repr(C)]
#[repr(align(8))] #[repr(align(8))]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_timer { pub struct bpf_timer {
pub _bitfield_align_1: [u8; 0], pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>, pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>,
@ -1072,108 +1090,108 @@ impl bpf_timer {
} }
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_sysctl { pub struct bpf_sysctl {
pub write: __u32, pub write: __u32,
pub file_pos: __u32, pub file_pos: __u32,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_pidns_info { pub struct bpf_pidns_info {
pub pid: __u32, pub pid: __u32,
pub tgid: __u32, pub tgid: __u32,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct btf_ptr { pub struct btf_ptr {
pub ptr: *mut ::aya_bpf_cty::c_void, pub ptr: *mut ::aya_bpf_cty::c_void,
pub type_id: __u32, pub type_id: __u32,
pub flags: __u32, pub flags: __u32,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct pt_regs { pub struct pt_regs {
pub uregs: [::aya_bpf_cty::c_long; 18usize], pub uregs: [::aya_bpf_cty::c_long; 18usize],
} }
pub type sa_family_t = ::aya_bpf_cty::c_ushort; pub type sa_family_t = ::aya_bpf_cty::c_ushort;
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct sockaddr { pub struct sockaddr {
pub sa_family: sa_family_t, pub sa_family: sa_family_t,
pub sa_data: [::aya_bpf_cty::c_char; 14usize], pub sa_data: [::aya_bpf_cty::c_char; 14usize],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_perf_event_data { pub struct bpf_perf_event_data {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct linux_binprm { pub struct linux_binprm {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct tcphdr { pub struct tcphdr {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct seq_file { pub struct seq_file {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct tcp6_sock { pub struct tcp6_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct tcp_sock { pub struct tcp_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct tcp_timewait_sock { pub struct tcp_timewait_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct tcp_request_sock { pub struct tcp_request_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct udp6_sock { pub struct udp6_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct unix_sock { pub struct unix_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct task_struct { pub struct task_struct {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct path { pub struct path {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct inode { pub struct inode {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct socket { pub struct socket {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct file { pub struct file {
_unused: [u8; 0], _unused: [u8; 0],
} }

@ -107,6 +107,9 @@ impl __sk_buff {
pub fn gso_size(&self) -> Option<__u32> { pub fn gso_size(&self) -> Option<__u32> {
unsafe { crate::bpf_probe_read(&self.gso_size) }.ok() unsafe { crate::bpf_probe_read(&self.gso_size) }.ok()
} }
pub fn tstamp_type(&self) -> Option<__u8> {
unsafe { crate::bpf_probe_read(&self.tstamp_type) }.ok()
}
pub fn hwtstamp(&self) -> Option<__u64> { pub fn hwtstamp(&self) -> Option<__u64> {
unsafe { crate::bpf_probe_read(&self.hwtstamp) }.ok() unsafe { crate::bpf_probe_read(&self.hwtstamp) }.ok()
} }
@ -218,7 +221,7 @@ impl bpf_sock {
pub fn src_port(&self) -> Option<__u32> { pub fn src_port(&self) -> Option<__u32> {
unsafe { crate::bpf_probe_read(&self.src_port) }.ok() unsafe { crate::bpf_probe_read(&self.src_port) }.ok()
} }
pub fn dst_port(&self) -> Option<__u32> { pub fn dst_port(&self) -> Option<__be16> {
unsafe { crate::bpf_probe_read(&self.dst_port) }.ok() unsafe { crate::bpf_probe_read(&self.dst_port) }.ok()
} }
pub fn dst_ip4(&self) -> Option<__u32> { pub fn dst_ip4(&self) -> Option<__u32> {

@ -1878,3 +1878,94 @@ pub unsafe fn bpf_get_func_arg_cnt(ctx: *mut ::aya_bpf_cty::c_void) -> ::aya_bpf
::core::mem::transmute(185usize); ::core::mem::transmute(185usize);
fun(ctx) fun(ctx)
} }
pub unsafe fn bpf_get_retval() -> ::aya_bpf_cty::c_int {
let fun: unsafe extern "C" fn() -> ::aya_bpf_cty::c_int = ::core::mem::transmute(186usize);
fun()
}
pub unsafe fn bpf_set_retval(retval: ::aya_bpf_cty::c_int) -> ::aya_bpf_cty::c_int {
let fun: unsafe extern "C" fn(retval: ::aya_bpf_cty::c_int) -> ::aya_bpf_cty::c_int =
::core::mem::transmute(187usize);
fun(retval)
}
pub unsafe fn bpf_xdp_get_buff_len(xdp_md: *mut xdp_md) -> __u64 {
let fun: unsafe extern "C" fn(xdp_md: *mut xdp_md) -> __u64 = ::core::mem::transmute(188usize);
fun(xdp_md)
}
pub unsafe fn bpf_xdp_load_bytes(
xdp_md: *mut xdp_md,
offset: __u32,
buf: *mut ::aya_bpf_cty::c_void,
len: __u32,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
xdp_md: *mut xdp_md,
offset: __u32,
buf: *mut ::aya_bpf_cty::c_void,
len: __u32,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(189usize);
fun(xdp_md, offset, buf, len)
}
pub unsafe fn bpf_xdp_store_bytes(
xdp_md: *mut xdp_md,
offset: __u32,
buf: *mut ::aya_bpf_cty::c_void,
len: __u32,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
xdp_md: *mut xdp_md,
offset: __u32,
buf: *mut ::aya_bpf_cty::c_void,
len: __u32,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(190usize);
fun(xdp_md, offset, buf, len)
}
pub unsafe fn bpf_copy_from_user_task(
dst: *mut ::aya_bpf_cty::c_void,
size: __u32,
user_ptr: *const ::aya_bpf_cty::c_void,
tsk: *mut task_struct,
flags: __u64,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
dst: *mut ::aya_bpf_cty::c_void,
size: __u32,
user_ptr: *const ::aya_bpf_cty::c_void,
tsk: *mut task_struct,
flags: __u64,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(191usize);
fun(dst, size, user_ptr, tsk, flags)
}
pub unsafe fn bpf_skb_set_tstamp(
skb: *mut __sk_buff,
tstamp: __u64,
tstamp_type: __u32,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
skb: *mut __sk_buff,
tstamp: __u64,
tstamp_type: __u32,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(192usize);
fun(skb, tstamp, tstamp_type)
}
pub unsafe fn bpf_ima_file_hash(
file: *mut file,
dst: *mut ::aya_bpf_cty::c_void,
size: __u32,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
file: *mut file,
dst: *mut ::aya_bpf_cty::c_void,
size: __u32,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(193usize);
fun(file, dst, size)
}
pub unsafe fn bpf_kptr_xchg(
map_value: *mut ::aya_bpf_cty::c_void,
ptr: *mut ::aya_bpf_cty::c_void,
) -> *mut ::aya_bpf_cty::c_void {
let fun: unsafe extern "C" fn(
map_value: *mut ::aya_bpf_cty::c_void,
ptr: *mut ::aya_bpf_cty::c_void,
) -> *mut ::aya_bpf_cty::c_void = ::core::mem::transmute(194usize);
fun(map_value, ptr)
}

@ -146,6 +146,8 @@ pub const BPF_F_ANY_ALIGNMENT: u32 = 2;
pub const BPF_F_TEST_RND_HI32: u32 = 4; pub const BPF_F_TEST_RND_HI32: u32 = 4;
pub const BPF_F_TEST_STATE_FREQ: u32 = 8; pub const BPF_F_TEST_STATE_FREQ: u32 = 8;
pub const BPF_F_SLEEPABLE: u32 = 16; pub const BPF_F_SLEEPABLE: u32 = 16;
pub const BPF_F_XDP_HAS_FRAGS: u32 = 32;
pub const BPF_F_KPROBE_MULTI_RETURN: u32 = 1;
pub const BPF_PSEUDO_MAP_FD: u32 = 1; pub const BPF_PSEUDO_MAP_FD: u32 = 1;
pub const BPF_PSEUDO_MAP_IDX: u32 = 5; pub const BPF_PSEUDO_MAP_IDX: u32 = 5;
pub const BPF_PSEUDO_MAP_VALUE: u32 = 2; pub const BPF_PSEUDO_MAP_VALUE: u32 = 2;
@ -156,6 +158,7 @@ pub const BPF_PSEUDO_CALL: u32 = 1;
pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2; pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2;
pub const BPF_F_QUERY_EFFECTIVE: u32 = 1; pub const BPF_F_QUERY_EFFECTIVE: u32 = 1;
pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1; pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1;
pub const BPF_F_TEST_XDP_LIVE_FRAMES: u32 = 2;
pub const BPF_BUILD_ID_SIZE: u32 = 20; pub const BPF_BUILD_ID_SIZE: u32 = 20;
pub const BPF_OBJ_NAME_LEN: u32 = 16; pub const BPF_OBJ_NAME_LEN: u32 = 16;
pub const BPF_TAG_SIZE: u32 = 8; pub const BPF_TAG_SIZE: u32 = 8;
@ -397,6 +400,11 @@ pub type _bindgen_ty_23 = ::aya_bpf_cty::c_uint;
pub const BPF_F_BROADCAST: ::aya_bpf_cty::c_uint = 8; pub const BPF_F_BROADCAST: ::aya_bpf_cty::c_uint = 8;
pub const BPF_F_EXCLUDE_INGRESS: ::aya_bpf_cty::c_uint = 16; pub const BPF_F_EXCLUDE_INGRESS: ::aya_bpf_cty::c_uint = 16;
pub type _bindgen_ty_24 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_24 = ::aya_bpf_cty::c_uint;
pub mod _bindgen_ty_25 {
pub type Type = ::aya_bpf_cty::c_uint;
pub const BPF_SKB_TSTAMP_UNSPEC: Type = 0;
pub const BPF_SKB_TSTAMP_DELIVERY_MONO: Type = 1;
}
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
pub struct __sk_buff { pub struct __sk_buff {
@ -432,8 +440,9 @@ pub struct __sk_buff {
pub gso_segs: __u32, pub gso_segs: __u32,
pub __bindgen_anon_2: __sk_buff__bindgen_ty_2, pub __bindgen_anon_2: __sk_buff__bindgen_ty_2,
pub gso_size: __u32, pub gso_size: __u32,
pub tstamp_type: __u8,
pub _bitfield_align_1: [u8; 0], pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
pub hwtstamp: __u64, pub hwtstamp: __u64,
} }
#[repr(C)] #[repr(C)]
@ -466,8 +475,8 @@ impl __sk_buff__bindgen_ty_2 {
} }
impl __sk_buff { impl __sk_buff {
#[inline] #[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> { pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 3usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
__bindgen_bitfield_unit __bindgen_bitfield_unit
} }
} }
@ -503,7 +512,7 @@ pub union bpf_xfrm_state__bindgen_ty_1 {
pub remote_ipv6: [__u32; 4usize], pub remote_ipv6: [__u32; 4usize],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_sock { pub struct bpf_sock {
pub bound_dev_if: __u32, pub bound_dev_if: __u32,
pub family: __u32, pub family: __u32,
@ -514,14 +523,23 @@ pub struct bpf_sock {
pub src_ip4: __u32, pub src_ip4: __u32,
pub src_ip6: [__u32; 4usize], pub src_ip6: [__u32; 4usize],
pub src_port: __u32, pub src_port: __u32,
pub dst_port: __u32, pub dst_port: __be16,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
pub dst_ip4: __u32, pub dst_ip4: __u32,
pub dst_ip6: [__u32; 4usize], pub dst_ip6: [__u32; 4usize],
pub state: __u32, pub state: __u32,
pub rx_queue_mapping: __s32, pub rx_queue_mapping: __s32,
} }
impl bpf_sock {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_tcp_sock { pub struct bpf_tcp_sock {
pub snd_cwnd: __u32, pub snd_cwnd: __u32,
pub srtt_us: __u32, pub srtt_us: __u32,
@ -562,7 +580,7 @@ pub union bpf_sock_tuple__bindgen_ty_1 {
pub ipv6: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2, pub ipv6: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 { pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 {
pub saddr: __be32, pub saddr: __be32,
pub daddr: __be32, pub daddr: __be32,
@ -570,7 +588,7 @@ pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 {
pub dport: __be16, pub dport: __be16,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 { pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 {
pub saddr: [__be32; 4usize], pub saddr: [__be32; 4usize],
pub daddr: [__be32; 4usize], pub daddr: [__be32; 4usize],
@ -586,7 +604,7 @@ pub mod xdp_action {
pub const XDP_REDIRECT: Type = 4; pub const XDP_REDIRECT: Type = 4;
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct xdp_md { pub struct xdp_md {
pub data: __u32, pub data: __u32,
pub data_end: __u32, pub data_end: __u32,
@ -727,7 +745,7 @@ impl sk_reuseport_md__bindgen_ty_4 {
} }
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_map_info { pub struct bpf_map_info {
pub type_: __u32, pub type_: __u32,
pub id: __u32, pub id: __u32,
@ -883,7 +901,7 @@ pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: ::aya_bpf_cty::c_uint = 16;
pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: ::aya_bpf_cty::c_uint = 32; pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: ::aya_bpf_cty::c_uint = 32;
pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: ::aya_bpf_cty::c_uint = 64; pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: ::aya_bpf_cty::c_uint = 64;
pub const BPF_SOCK_OPS_ALL_CB_FLAGS: ::aya_bpf_cty::c_uint = 127; pub const BPF_SOCK_OPS_ALL_CB_FLAGS: ::aya_bpf_cty::c_uint = 127;
pub type _bindgen_ty_25 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_26 = ::aya_bpf_cty::c_uint;
pub const BPF_SOCK_OPS_VOID: ::aya_bpf_cty::c_uint = 0; pub const BPF_SOCK_OPS_VOID: ::aya_bpf_cty::c_uint = 0;
pub const BPF_SOCK_OPS_TIMEOUT_INIT: ::aya_bpf_cty::c_uint = 1; pub const BPF_SOCK_OPS_TIMEOUT_INIT: ::aya_bpf_cty::c_uint = 1;
pub const BPF_SOCK_OPS_RWND_INIT: ::aya_bpf_cty::c_uint = 2; pub const BPF_SOCK_OPS_RWND_INIT: ::aya_bpf_cty::c_uint = 2;
@ -900,7 +918,7 @@ pub const BPF_SOCK_OPS_RTT_CB: ::aya_bpf_cty::c_uint = 12;
pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: ::aya_bpf_cty::c_uint = 13; pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: ::aya_bpf_cty::c_uint = 13;
pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: ::aya_bpf_cty::c_uint = 14; pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: ::aya_bpf_cty::c_uint = 14;
pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: ::aya_bpf_cty::c_uint = 15; pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: ::aya_bpf_cty::c_uint = 15;
pub type _bindgen_ty_26 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_27 = ::aya_bpf_cty::c_uint;
pub const BPF_TCP_ESTABLISHED: ::aya_bpf_cty::c_uint = 1; pub const BPF_TCP_ESTABLISHED: ::aya_bpf_cty::c_uint = 1;
pub const BPF_TCP_SYN_SENT: ::aya_bpf_cty::c_uint = 2; pub const BPF_TCP_SYN_SENT: ::aya_bpf_cty::c_uint = 2;
pub const BPF_TCP_SYN_RECV: ::aya_bpf_cty::c_uint = 3; pub const BPF_TCP_SYN_RECV: ::aya_bpf_cty::c_uint = 3;
@ -914,18 +932,18 @@ pub const BPF_TCP_LISTEN: ::aya_bpf_cty::c_uint = 10;
pub const BPF_TCP_CLOSING: ::aya_bpf_cty::c_uint = 11; pub const BPF_TCP_CLOSING: ::aya_bpf_cty::c_uint = 11;
pub const BPF_TCP_NEW_SYN_RECV: ::aya_bpf_cty::c_uint = 12; pub const BPF_TCP_NEW_SYN_RECV: ::aya_bpf_cty::c_uint = 12;
pub const BPF_TCP_MAX_STATES: ::aya_bpf_cty::c_uint = 13; pub const BPF_TCP_MAX_STATES: ::aya_bpf_cty::c_uint = 13;
pub type _bindgen_ty_27 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_28 = ::aya_bpf_cty::c_uint;
pub mod _bindgen_ty_29 { pub mod _bindgen_ty_30 {
pub type Type = ::aya_bpf_cty::c_uint; pub type Type = ::aya_bpf_cty::c_uint;
pub const BPF_LOAD_HDR_OPT_TCP_SYN: Type = 1; pub const BPF_LOAD_HDR_OPT_TCP_SYN: Type = 1;
} }
pub mod _bindgen_ty_30 { pub mod _bindgen_ty_31 {
pub type Type = ::aya_bpf_cty::c_uint; pub type Type = ::aya_bpf_cty::c_uint;
pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: Type = 1; pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: Type = 1;
pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: Type = 2; pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: Type = 2;
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_perf_event_value { pub struct bpf_perf_event_value {
pub counter: __u64, pub counter: __u64,
pub enabled: __u64, pub enabled: __u64,
@ -934,13 +952,13 @@ pub struct bpf_perf_event_value {
pub const BPF_DEVCG_ACC_MKNOD: ::aya_bpf_cty::c_uint = 1; pub const BPF_DEVCG_ACC_MKNOD: ::aya_bpf_cty::c_uint = 1;
pub const BPF_DEVCG_ACC_READ: ::aya_bpf_cty::c_uint = 2; pub const BPF_DEVCG_ACC_READ: ::aya_bpf_cty::c_uint = 2;
pub const BPF_DEVCG_ACC_WRITE: ::aya_bpf_cty::c_uint = 4; pub const BPF_DEVCG_ACC_WRITE: ::aya_bpf_cty::c_uint = 4;
pub type _bindgen_ty_31 = ::aya_bpf_cty::c_uint; 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_BLOCK: ::aya_bpf_cty::c_uint = 1;
pub const BPF_DEVCG_DEV_CHAR: ::aya_bpf_cty::c_uint = 2; pub const BPF_DEVCG_DEV_CHAR: ::aya_bpf_cty::c_uint = 2;
pub type _bindgen_ty_32 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_33 = ::aya_bpf_cty::c_uint;
pub const BPF_FIB_LOOKUP_DIRECT: ::aya_bpf_cty::c_uint = 1; 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 const BPF_FIB_LOOKUP_OUTPUT: ::aya_bpf_cty::c_uint = 2;
pub type _bindgen_ty_33 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_34 = ::aya_bpf_cty::c_uint;
pub const BPF_FIB_LKUP_RET_SUCCESS: ::aya_bpf_cty::c_uint = 0; pub const BPF_FIB_LKUP_RET_SUCCESS: ::aya_bpf_cty::c_uint = 0;
pub const BPF_FIB_LKUP_RET_BLACKHOLE: ::aya_bpf_cty::c_uint = 1; pub const BPF_FIB_LKUP_RET_BLACKHOLE: ::aya_bpf_cty::c_uint = 1;
pub const BPF_FIB_LKUP_RET_UNREACHABLE: ::aya_bpf_cty::c_uint = 2; pub const BPF_FIB_LKUP_RET_UNREACHABLE: ::aya_bpf_cty::c_uint = 2;
@ -950,7 +968,7 @@ pub const BPF_FIB_LKUP_RET_FWD_DISABLED: ::aya_bpf_cty::c_uint = 5;
pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: ::aya_bpf_cty::c_uint = 6; pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: ::aya_bpf_cty::c_uint = 6;
pub const BPF_FIB_LKUP_RET_NO_NEIGH: ::aya_bpf_cty::c_uint = 7; pub const BPF_FIB_LKUP_RET_NO_NEIGH: ::aya_bpf_cty::c_uint = 7;
pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: ::aya_bpf_cty::c_uint = 8; pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: ::aya_bpf_cty::c_uint = 8;
pub type _bindgen_ty_34 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_35 = ::aya_bpf_cty::c_uint;
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_fib_lookup { pub struct bpf_fib_lookup {
@ -1008,7 +1026,7 @@ pub union bpf_redir_neigh__bindgen_ty_1 {
pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: ::aya_bpf_cty::c_uint = 1; 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_FLOW_LABEL: ::aya_bpf_cty::c_uint = 2;
pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: ::aya_bpf_cty::c_uint = 4; pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: ::aya_bpf_cty::c_uint = 4;
pub type _bindgen_ty_35 = ::aya_bpf_cty::c_uint; pub type _bindgen_ty_36 = ::aya_bpf_cty::c_uint;
#[repr(C)] #[repr(C)]
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_flow_keys { pub struct bpf_flow_keys {
@ -1033,25 +1051,25 @@ pub union bpf_flow_keys__bindgen_ty_1 {
pub __bindgen_anon_2: bpf_flow_keys__bindgen_ty_1__bindgen_ty_2, pub __bindgen_anon_2: bpf_flow_keys__bindgen_ty_1__bindgen_ty_2,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 { pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 {
pub ipv4_src: __be32, pub ipv4_src: __be32,
pub ipv4_dst: __be32, pub ipv4_dst: __be32,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 { pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 {
pub ipv6_src: [__u32; 4usize], pub ipv6_src: [__u32; 4usize],
pub ipv6_dst: [__u32; 4usize], pub ipv6_dst: [__u32; 4usize],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_spin_lock { pub struct bpf_spin_lock {
pub val: __u32, pub val: __u32,
} }
#[repr(C)] #[repr(C)]
#[repr(align(8))] #[repr(align(8))]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_timer { pub struct bpf_timer {
pub _bitfield_align_1: [u8; 0], pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>, pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>,
@ -1064,26 +1082,26 @@ impl bpf_timer {
} }
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_sysctl { pub struct bpf_sysctl {
pub write: __u32, pub write: __u32,
pub file_pos: __u32, pub file_pos: __u32,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_pidns_info { pub struct bpf_pidns_info {
pub pid: __u32, pub pid: __u32,
pub tgid: __u32, pub tgid: __u32,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct btf_ptr { pub struct btf_ptr {
pub ptr: *mut ::aya_bpf_cty::c_void, pub ptr: *mut ::aya_bpf_cty::c_void,
pub type_id: __u32, pub type_id: __u32,
pub flags: __u32, pub flags: __u32,
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct pt_regs { pub struct pt_regs {
pub r15: ::aya_bpf_cty::c_ulong, pub r15: ::aya_bpf_cty::c_ulong,
pub r14: ::aya_bpf_cty::c_ulong, pub r14: ::aya_bpf_cty::c_ulong,
@ -1109,83 +1127,83 @@ pub struct pt_regs {
} }
pub type sa_family_t = ::aya_bpf_cty::c_ushort; pub type sa_family_t = ::aya_bpf_cty::c_ushort;
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct sockaddr { pub struct sockaddr {
pub sa_family: sa_family_t, pub sa_family: sa_family_t,
pub sa_data: [::aya_bpf_cty::c_char; 14usize], pub sa_data: [::aya_bpf_cty::c_char; 14usize],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct bpf_perf_event_data { pub struct bpf_perf_event_data {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct linux_binprm { pub struct linux_binprm {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct tcphdr { pub struct tcphdr {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct seq_file { pub struct seq_file {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct tcp6_sock { pub struct tcp6_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct tcp_sock { pub struct tcp_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct tcp_timewait_sock { pub struct tcp_timewait_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct tcp_request_sock { pub struct tcp_request_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct udp6_sock { pub struct udp6_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct unix_sock { pub struct unix_sock {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct task_struct { pub struct task_struct {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct path { pub struct path {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct inode { pub struct inode {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct socket { pub struct socket {
_unused: [u8; 0], _unused: [u8; 0],
} }
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Copy, Clone)]
pub struct file { pub struct file {
_unused: [u8; 0], _unused: [u8; 0],
} }

@ -107,6 +107,9 @@ impl __sk_buff {
pub fn gso_size(&self) -> Option<__u32> { pub fn gso_size(&self) -> Option<__u32> {
unsafe { crate::bpf_probe_read(&self.gso_size) }.ok() unsafe { crate::bpf_probe_read(&self.gso_size) }.ok()
} }
pub fn tstamp_type(&self) -> Option<__u8> {
unsafe { crate::bpf_probe_read(&self.tstamp_type) }.ok()
}
pub fn hwtstamp(&self) -> Option<__u64> { pub fn hwtstamp(&self) -> Option<__u64> {
unsafe { crate::bpf_probe_read(&self.hwtstamp) }.ok() unsafe { crate::bpf_probe_read(&self.hwtstamp) }.ok()
} }
@ -218,7 +221,7 @@ impl bpf_sock {
pub fn src_port(&self) -> Option<__u32> { pub fn src_port(&self) -> Option<__u32> {
unsafe { crate::bpf_probe_read(&self.src_port) }.ok() unsafe { crate::bpf_probe_read(&self.src_port) }.ok()
} }
pub fn dst_port(&self) -> Option<__u32> { pub fn dst_port(&self) -> Option<__be16> {
unsafe { crate::bpf_probe_read(&self.dst_port) }.ok() unsafe { crate::bpf_probe_read(&self.dst_port) }.ok()
} }
pub fn dst_ip4(&self) -> Option<__u32> { pub fn dst_ip4(&self) -> Option<__u32> {

@ -1878,3 +1878,94 @@ pub unsafe fn bpf_get_func_arg_cnt(ctx: *mut ::aya_bpf_cty::c_void) -> ::aya_bpf
::core::mem::transmute(185usize); ::core::mem::transmute(185usize);
fun(ctx) fun(ctx)
} }
pub unsafe fn bpf_get_retval() -> ::aya_bpf_cty::c_int {
let fun: unsafe extern "C" fn() -> ::aya_bpf_cty::c_int = ::core::mem::transmute(186usize);
fun()
}
pub unsafe fn bpf_set_retval(retval: ::aya_bpf_cty::c_int) -> ::aya_bpf_cty::c_int {
let fun: unsafe extern "C" fn(retval: ::aya_bpf_cty::c_int) -> ::aya_bpf_cty::c_int =
::core::mem::transmute(187usize);
fun(retval)
}
pub unsafe fn bpf_xdp_get_buff_len(xdp_md: *mut xdp_md) -> __u64 {
let fun: unsafe extern "C" fn(xdp_md: *mut xdp_md) -> __u64 = ::core::mem::transmute(188usize);
fun(xdp_md)
}
pub unsafe fn bpf_xdp_load_bytes(
xdp_md: *mut xdp_md,
offset: __u32,
buf: *mut ::aya_bpf_cty::c_void,
len: __u32,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
xdp_md: *mut xdp_md,
offset: __u32,
buf: *mut ::aya_bpf_cty::c_void,
len: __u32,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(189usize);
fun(xdp_md, offset, buf, len)
}
pub unsafe fn bpf_xdp_store_bytes(
xdp_md: *mut xdp_md,
offset: __u32,
buf: *mut ::aya_bpf_cty::c_void,
len: __u32,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
xdp_md: *mut xdp_md,
offset: __u32,
buf: *mut ::aya_bpf_cty::c_void,
len: __u32,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(190usize);
fun(xdp_md, offset, buf, len)
}
pub unsafe fn bpf_copy_from_user_task(
dst: *mut ::aya_bpf_cty::c_void,
size: __u32,
user_ptr: *const ::aya_bpf_cty::c_void,
tsk: *mut task_struct,
flags: __u64,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
dst: *mut ::aya_bpf_cty::c_void,
size: __u32,
user_ptr: *const ::aya_bpf_cty::c_void,
tsk: *mut task_struct,
flags: __u64,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(191usize);
fun(dst, size, user_ptr, tsk, flags)
}
pub unsafe fn bpf_skb_set_tstamp(
skb: *mut __sk_buff,
tstamp: __u64,
tstamp_type: __u32,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
skb: *mut __sk_buff,
tstamp: __u64,
tstamp_type: __u32,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(192usize);
fun(skb, tstamp, tstamp_type)
}
pub unsafe fn bpf_ima_file_hash(
file: *mut file,
dst: *mut ::aya_bpf_cty::c_void,
size: __u32,
) -> ::aya_bpf_cty::c_long {
let fun: unsafe extern "C" fn(
file: *mut file,
dst: *mut ::aya_bpf_cty::c_void,
size: __u32,
) -> ::aya_bpf_cty::c_long = ::core::mem::transmute(193usize);
fun(file, dst, size)
}
pub unsafe fn bpf_kptr_xchg(
map_value: *mut ::aya_bpf_cty::c_void,
ptr: *mut ::aya_bpf_cty::c_void,
) -> *mut ::aya_bpf_cty::c_void {
let fun: unsafe extern "C" fn(
map_value: *mut ::aya_bpf_cty::c_void,
ptr: *mut ::aya_bpf_cty::c_void,
) -> *mut ::aya_bpf_cty::c_void = ::core::mem::transmute(194usize);
fun(map_value, ptr)
}

Loading…
Cancel
Save