#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage, Align> {
storage: Storage,
align: [Align; 0],
}
impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align> {
#[inline]
pub const fn new(storage: Storage) -> Self {
Self { storage, align: [] }
}
}
impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align>
where
Storage: AsRef<[u8]> + AsMut<[u8]>,
{
#[inline]
pub fn get_bit(&self, index: usize) -> bool {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = self.storage.as_ref()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
byte & mask == mask
}
#[inline]
pub fn set_bit(&mut self, index: usize, val: bool) {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = &mut self.storage.as_mut()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
if val {
*byte |= mask;
} else {
*byte &= !mask;
}
}
#[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
let mut val = 0;
for i in 0..(bit_width as usize) {
if self.get_bit(i + bit_offset) {
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
val |= 1 << index;
}
}
val
}
#[inline]
pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
self.set_bit(index + bit_offset, val_bit_is_set);
}
}
}
#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
impl<T> __IncompleteArrayField<T> {
#[inline]
pub const fn new() -> Self {
__IncompleteArrayField(::std::marker::PhantomData, [])
}
#[inline]
pub unsafe fn as_ptr(&self) -> *const T {
::std::mem::transmute(self)
}
#[inline]
pub unsafe fn as_mut_ptr(&mut self) -> *mut T {
::std::mem::transmute(self)
}
#[inline]
pub unsafe fn as_slice(&self, len: usize) -> &[T] {
::std::slice::from_raw_parts(self.as_ptr(), len)
}
#[inline]
pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
}
}
impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
fmt.write_str("__IncompleteArrayField")
}
}
impl<T> ::std::clone::Clone for __IncompleteArrayField<T> {
#[inline]
fn clone(&self) -> Self {
Self::new()
}
}
pub const BPF_LD: u32 = 0;
pub const BPF_LDX: u32 = 1;
pub const BPF_ST: u32 = 2;
pub const BPF_STX: u32 = 3;
pub const BPF_ALU: u32 = 4;
pub const BPF_JMP: u32 = 5;
pub const BPF_RET: u32 = 6;
pub const BPF_MISC: u32 = 7;
pub const BPF_W: u32 = 0;
pub const BPF_H: u32 = 8;
pub const BPF_B: u32 = 16;
pub const BPF_IMM: u32 = 0;
pub const BPF_ABS: u32 = 32;
pub const BPF_IND: u32 = 64;
pub const BPF_MEM: u32 = 96;
pub const BPF_LEN: u32 = 128;
pub const BPF_MSH: u32 = 160;
pub const BPF_ADD: u32 = 0;
pub const BPF_SUB: u32 = 16;
pub const BPF_MUL: u32 = 32;
pub const BPF_DIV: u32 = 48;
pub const BPF_OR: u32 = 64;
pub const BPF_AND: u32 = 80;
pub const BPF_LSH: u32 = 96;
pub const BPF_RSH: u32 = 112;
pub const BPF_NEG: u32 = 128;
pub const BPF_MOD: u32 = 144;
pub const BPF_XOR: u32 = 160;
pub const BPF_JA: u32 = 0;
pub const BPF_JEQ: u32 = 16;
pub const BPF_JGT: u32 = 32;
pub const BPF_JGE: u32 = 48;
pub const BPF_JSET: u32 = 64;
pub const BPF_K: u32 = 0;
pub const BPF_X: u32 = 8;
pub const BPF_MAXINSNS: u32 = 4096;
pub const BPF_JMP32: u32 = 6;
pub const BPF_ALU64: u32 = 7;
pub const BPF_DW: u32 = 24;
pub const BPF_XADD: u32 = 192;
pub const BPF_MOV: u32 = 176;
pub const BPF_ARSH: u32 = 192;
pub const BPF_END: u32 = 208;
pub const BPF_TO_LE: u32 = 0;
pub const BPF_TO_BE: u32 = 8;
pub const BPF_FROM_LE: u32 = 0;
pub const BPF_FROM_BE: u32 = 8;
pub const BPF_JNE: u32 = 80;
pub const BPF_JLT: u32 = 160;
pub const BPF_JLE: u32 = 176;
pub const BPF_JSGT: u32 = 96;
pub const BPF_JSGE: u32 = 112;
pub const BPF_JSLT: u32 = 192;
pub const BPF_JSLE: u32 = 208;
pub const BPF_CALL: u32 = 128;
pub const BPF_EXIT: u32 = 144;
pub const BPF_F_ALLOW_OVERRIDE: u32 = 1;
pub const BPF_F_ALLOW_MULTI: u32 = 2;
pub const BPF_F_STRICT_ALIGNMENT: u32 = 1;
pub const BPF_F_ANY_ALIGNMENT: u32 = 2;
pub const BPF_F_TEST_RND_HI32: u32 = 4;
pub const BPF_PSEUDO_MAP_FD: u32 = 1;
pub const BPF_PSEUDO_MAP_VALUE: u32 = 2;
pub const BPF_PSEUDO_CALL: u32 = 1;
pub const BPF_ANY: u32 = 0;
pub const BPF_NOEXIST: u32 = 1;
pub const BPF_EXIST: u32 = 2;
pub const BPF_F_LOCK: u32 = 4;
pub const BPF_F_NO_PREALLOC: u32 = 1;
pub const BPF_F_NO_COMMON_LRU: u32 = 2;
pub const BPF_F_NUMA_NODE: u32 = 4;
pub const BPF_OBJ_NAME_LEN: u32 = 16;
pub const BPF_F_RDONLY: u32 = 8;
pub const BPF_F_WRONLY: u32 = 16;
pub const BPF_F_STACK_BUILD_ID: u32 = 32;
pub const BPF_F_ZERO_SEED: u32 = 64;
pub const BPF_F_RDONLY_PROG: u32 = 128;
pub const BPF_F_WRONLY_PROG: u32 = 256;
pub const BPF_F_QUERY_EFFECTIVE: u32 = 1;
pub const BPF_BUILD_ID_SIZE: u32 = 20;
pub const BPF_F_RECOMPUTE_CSUM: u32 = 1;
pub const BPF_F_INVALIDATE_HASH: u32 = 2;
pub const BPF_F_HDR_FIELD_MASK: u32 = 15;
pub const BPF_F_PSEUDO_HDR: u32 = 16;
pub const BPF_F_MARK_MANGLED_0: u32 = 32;
pub const BPF_F_MARK_ENFORCE: u32 = 64;
pub const BPF_F_INGRESS: u32 = 1;
pub const BPF_F_TUNINFO_IPV6: u32 = 1;
pub const BPF_F_SKIP_FIELD_MASK: u32 = 255;
pub const BPF_F_USER_STACK: u32 = 256;
pub const BPF_F_FAST_STACK_CMP: u32 = 512;
pub const BPF_F_REUSE_STACKID: u32 = 1024;
pub const BPF_F_USER_BUILD_ID: u32 = 2048;
pub const BPF_F_ZERO_CSUM_TX: u32 = 2;
pub const BPF_F_DONT_FRAGMENT: u32 = 4;
pub const BPF_F_SEQ_NUMBER: u32 = 8;
pub const BPF_F_INDEX_MASK: u32 = 4294967295;
pub const BPF_F_CURRENT_CPU: u32 = 4294967295;
pub const BPF_F_CTXLEN_MASK: u64 = 4503595332403200;
pub const BPF_F_CURRENT_NETNS: i32 = -1;
pub const BPF_F_ADJ_ROOM_FIXED_GSO: u32 = 1;
pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: u32 = 255;
pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: u32 = 56;
pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: u32 = 2;
pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: u32 = 4;
pub const BPF_F_ADJ_ROOM_ENCAP_L4_GRE: u32 = 8;
pub const BPF_F_ADJ_ROOM_ENCAP_L4_UDP: u32 = 16;
pub const BPF_F_SYSCTL_BASE_NAME: u32 = 1;
pub const BPF_SK_STORAGE_GET_F_CREATE: u32 = 1;
pub const XDP_PACKET_HEADROOM: u32 = 256;
pub const BPF_TAG_SIZE: u32 = 8;
pub const BPF_SOCK_OPS_RTO_CB_FLAG: u32 = 1;
pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: u32 = 2;
pub const BPF_SOCK_OPS_STATE_CB_FLAG: u32 = 4;
pub const BPF_SOCK_OPS_RTT_CB_FLAG: u32 = 8;
pub const BPF_SOCK_OPS_ALL_CB_FLAGS: u32 = 15;
pub const TCP_BPF_IW: u32 = 1001;
pub const TCP_BPF_SNDCWND_CLAMP: u32 = 1002;
pub const BPF_DEVCG_ACC_MKNOD: u32 = 1;
pub const BPF_DEVCG_ACC_READ: u32 = 2;
pub const BPF_DEVCG_ACC_WRITE: u32 = 4;
pub const BPF_DEVCG_DEV_BLOCK: u32 = 1;
pub const BPF_DEVCG_DEV_CHAR: u32 = 2;
pub const BPF_FIB_LOOKUP_DIRECT: u32 = 1;
pub const BPF_FIB_LOOKUP_OUTPUT: u32 = 2;
pub const LOG_BUF_SIZE: u32 = 65536;
pub const BPF_FN_PREFIX: &'static [u8; 9usize] = b".bpf.fn.\0";
pub const STT_GNU_IFUNC: u32 = 10;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __uint64_t = ::std::os::raw::c_ulong;
pub type __pid_t = ::std::os::raw::c_int;
pub type pid_t = __pid_t;
extern "C" {
pub fn bpf_module_create_b(
filename: *const ::std::os::raw::c_char,
proto_filename: *const ::std::os::raw::c_char,
flags: ::std::os::raw::c_uint,
dev_name: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn bpf_module_create_c(
filename: *const ::std::os::raw::c_char,
flags: ::std::os::raw::c_uint,
cflags: *mut *const ::std::os::raw::c_char,
ncflags: ::std::os::raw::c_int,
allow_rlimit: bool,
dev_name: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn bpf_module_create_c_from_string(
text: *const ::std::os::raw::c_char,
flags: ::std::os::raw::c_uint,
cflags: *mut *const ::std::os::raw::c_char,
ncflags: ::std::os::raw::c_int,
allow_rlimit: bool,
dev_name: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn bpf_module_destroy(program: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn bpf_module_license(program: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn bpf_module_kern_version(program: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_uint;
}
extern "C" {
pub fn bpf_num_functions(program: *mut ::std::os::raw::c_void) -> usize;
}
extern "C" {
pub fn bpf_function_name(
program: *mut ::std::os::raw::c_void,
id: usize,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn bpf_function_start_id(
program: *mut ::std::os::raw::c_void,
id: usize,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn bpf_function_start(
program: *mut ::std::os::raw::c_void,
name: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn bpf_function_size_id(program: *mut ::std::os::raw::c_void, id: usize) -> usize;
}
extern "C" {
pub fn bpf_function_size(
program: *mut ::std::os::raw::c_void,
name: *const ::std::os::raw::c_char,
) -> usize;
}
extern "C" {
pub fn bpf_num_tables(program: *mut ::std::os::raw::c_void) -> usize;
}
extern "C" {
pub fn bpf_table_id(
program: *mut ::std::os::raw::c_void,
table_name: *const ::std::os::raw::c_char,
) -> usize;
}
extern "C" {
pub fn bpf_table_fd(
program: *mut ::std::os::raw::c_void,
table_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_table_fd_id(
program: *mut ::std::os::raw::c_void,
id: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_table_type(
program: *mut ::std::os::raw::c_void,
table_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_table_type_id(
program: *mut ::std::os::raw::c_void,
id: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_table_max_entries(
program: *mut ::std::os::raw::c_void,
table_name: *const ::std::os::raw::c_char,
) -> usize;
}
extern "C" {
pub fn bpf_table_max_entries_id(program: *mut ::std::os::raw::c_void, id: usize) -> usize;
}
extern "C" {
pub fn bpf_table_flags(
program: *mut ::std::os::raw::c_void,
table_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_table_flags_id(
program: *mut ::std::os::raw::c_void,
id: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_table_name(
program: *mut ::std::os::raw::c_void,
id: usize,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn bpf_table_key_desc(
program: *mut ::std::os::raw::c_void,
table_name: *const ::std::os::raw::c_char,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn bpf_table_key_desc_id(
program: *mut ::std::os::raw::c_void,
id: usize,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn bpf_table_leaf_desc(
program: *mut ::std::os::raw::c_void,
table_name: *const ::std::os::raw::c_char,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn bpf_table_leaf_desc_id(
program: *mut ::std::os::raw::c_void,
id: usize,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn bpf_table_key_size(
program: *mut ::std::os::raw::c_void,
table_name: *const ::std::os::raw::c_char,
) -> usize;
}
extern "C" {
pub fn bpf_table_key_size_id(program: *mut ::std::os::raw::c_void, id: usize) -> usize;
}
extern "C" {
pub fn bpf_table_leaf_size(
program: *mut ::std::os::raw::c_void,
table_name: *const ::std::os::raw::c_char,
) -> usize;
}
extern "C" {
pub fn bpf_table_leaf_size_id(program: *mut ::std::os::raw::c_void, id: usize) -> usize;
}
extern "C" {
pub fn bpf_table_key_snprintf(
program: *mut ::std::os::raw::c_void,
id: usize,
buf: *mut ::std::os::raw::c_char,
buflen: usize,
key: *const ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_table_leaf_snprintf(
program: *mut ::std::os::raw::c_void,
id: usize,
buf: *mut ::std::os::raw::c_char,
buflen: usize,
leaf: *const ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_table_key_sscanf(
program: *mut ::std::os::raw::c_void,
id: usize,
buf: *const ::std::os::raw::c_char,
key: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_table_leaf_sscanf(
program: *mut ::std::os::raw::c_void,
id: usize,
buf: *const ::std::os::raw::c_char,
leaf: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_perf_event_fields(
program: *mut ::std::os::raw::c_void,
event: *const ::std::os::raw::c_char,
) -> usize;
}
extern "C" {
pub fn bpf_perf_event_field(
program: *mut ::std::os::raw::c_void,
event: *const ::std::os::raw::c_char,
i: usize,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn bcc_func_load(
program: *mut ::std::os::raw::c_void,
prog_type: ::std::os::raw::c_int,
name: *const ::std::os::raw::c_char,
insns: *const bpf_insn,
prog_len: ::std::os::raw::c_int,
license: *const ::std::os::raw::c_char,
kern_version: ::std::os::raw::c_uint,
log_level: ::std::os::raw::c_int,
log_buf: *mut ::std::os::raw::c_char,
log_buf_size: ::std::os::raw::c_uint,
dev_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
pub type __u8 = ::std::os::raw::c_uchar;
pub type __s16 = ::std::os::raw::c_short;
pub type __u16 = ::std::os::raw::c_ushort;
pub type __s32 = ::std::os::raw::c_int;
pub type __u32 = ::std::os::raw::c_uint;
pub type __u64 = ::std::os::raw::c_ulonglong;
pub type __be16 = __u16;
pub type __be32 = __u32;
pub const BPF_REG_0: _bindgen_ty_1 = 0;
pub const BPF_REG_1: _bindgen_ty_1 = 1;
pub const BPF_REG_2: _bindgen_ty_1 = 2;
pub const BPF_REG_3: _bindgen_ty_1 = 3;
pub const BPF_REG_4: _bindgen_ty_1 = 4;
pub const BPF_REG_5: _bindgen_ty_1 = 5;
pub const BPF_REG_6: _bindgen_ty_1 = 6;
pub const BPF_REG_7: _bindgen_ty_1 = 7;
pub const BPF_REG_8: _bindgen_ty_1 = 8;
pub const BPF_REG_9: _bindgen_ty_1 = 9;
pub const BPF_REG_10: _bindgen_ty_1 = 10;
pub const __MAX_BPF_REG: _bindgen_ty_1 = 11;
pub type _bindgen_ty_1 = u32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_insn {
pub code: __u8,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
pub off: __s16,
pub imm: __s32,
}
#[test]
fn bindgen_test_layout_bpf_insn() {
assert_eq!(
::std::mem::size_of::<bpf_insn>(),
8usize,
concat!("Size of: ", stringify!(bpf_insn))
);
assert_eq!(
::std::mem::align_of::<bpf_insn>(),
4usize,
concat!("Alignment of ", stringify!(bpf_insn))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_insn>())).code as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_insn),
"::",
stringify!(code)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_insn>())).off as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(bpf_insn),
"::",
stringify!(off)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_insn>())).imm as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_insn),
"::",
stringify!(imm)
)
);
}
impl bpf_insn {
#[inline]
pub fn dst_reg(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) }
}
#[inline]
pub fn set_dst_reg(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 4u8, val as u64)
}
}
#[inline]
pub fn src_reg(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) }
}
#[inline]
pub fn set_src_reg(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);
self._bitfield_1.set(4usize, 4u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(dst_reg: __u8, src_reg: __u8) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 4u8, {
let dst_reg: u8 = unsafe { ::std::mem::transmute(dst_reg) };
dst_reg as u64
});
__bindgen_bitfield_unit.set(4usize, 4u8, {
let src_reg: u8 = unsafe { ::std::mem::transmute(src_reg) };
src_reg as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Default)]
pub struct bpf_lpm_trie_key {
pub prefixlen: __u32,
pub data: __IncompleteArrayField<__u8>,
}
#[test]
fn bindgen_test_layout_bpf_lpm_trie_key() {
assert_eq!(
::std::mem::size_of::<bpf_lpm_trie_key>(),
4usize,
concat!("Size of: ", stringify!(bpf_lpm_trie_key))
);
assert_eq!(
::std::mem::align_of::<bpf_lpm_trie_key>(),
4usize,
concat!("Alignment of ", stringify!(bpf_lpm_trie_key))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_lpm_trie_key>())).prefixlen as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_lpm_trie_key),
"::",
stringify!(prefixlen)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_lpm_trie_key>())).data as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_lpm_trie_key),
"::",
stringify!(data)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_cgroup_storage_key {
pub cgroup_inode_id: __u64,
pub attach_type: __u32,
}
#[test]
fn bindgen_test_layout_bpf_cgroup_storage_key() {
assert_eq!(
::std::mem::size_of::<bpf_cgroup_storage_key>(),
16usize,
concat!("Size of: ", stringify!(bpf_cgroup_storage_key))
);
assert_eq!(
::std::mem::align_of::<bpf_cgroup_storage_key>(),
8usize,
concat!("Alignment of ", stringify!(bpf_cgroup_storage_key))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_cgroup_storage_key>())).cgroup_inode_id as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_cgroup_storage_key),
"::",
stringify!(cgroup_inode_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_cgroup_storage_key>())).attach_type as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_cgroup_storage_key),
"::",
stringify!(attach_type)
)
);
}
pub const bpf_cmd_BPF_MAP_CREATE: bpf_cmd = 0;
pub const bpf_cmd_BPF_MAP_LOOKUP_ELEM: bpf_cmd = 1;
pub const bpf_cmd_BPF_MAP_UPDATE_ELEM: bpf_cmd = 2;
pub const bpf_cmd_BPF_MAP_DELETE_ELEM: bpf_cmd = 3;
pub const bpf_cmd_BPF_MAP_GET_NEXT_KEY: bpf_cmd = 4;
pub const bpf_cmd_BPF_PROG_LOAD: bpf_cmd = 5;
pub const bpf_cmd_BPF_OBJ_PIN: bpf_cmd = 6;
pub const bpf_cmd_BPF_OBJ_GET: bpf_cmd = 7;
pub const bpf_cmd_BPF_PROG_ATTACH: bpf_cmd = 8;
pub const bpf_cmd_BPF_PROG_DETACH: bpf_cmd = 9;
pub const bpf_cmd_BPF_PROG_TEST_RUN: bpf_cmd = 10;
pub const bpf_cmd_BPF_PROG_GET_NEXT_ID: bpf_cmd = 11;
pub const bpf_cmd_BPF_MAP_GET_NEXT_ID: bpf_cmd = 12;
pub const bpf_cmd_BPF_PROG_GET_FD_BY_ID: bpf_cmd = 13;
pub const bpf_cmd_BPF_MAP_GET_FD_BY_ID: bpf_cmd = 14;
pub const bpf_cmd_BPF_OBJ_GET_INFO_BY_FD: bpf_cmd = 15;
pub const bpf_cmd_BPF_PROG_QUERY: bpf_cmd = 16;
pub const bpf_cmd_BPF_RAW_TRACEPOINT_OPEN: bpf_cmd = 17;
pub const bpf_cmd_BPF_BTF_LOAD: bpf_cmd = 18;
pub const bpf_cmd_BPF_BTF_GET_FD_BY_ID: bpf_cmd = 19;
pub const bpf_cmd_BPF_TASK_FD_QUERY: bpf_cmd = 20;
pub const bpf_cmd_BPF_MAP_LOOKUP_AND_DELETE_ELEM: bpf_cmd = 21;
pub const bpf_cmd_BPF_MAP_FREEZE: bpf_cmd = 22;
pub type bpf_cmd = u32;
pub const bpf_map_type_BPF_MAP_TYPE_UNSPEC: bpf_map_type = 0;
pub const bpf_map_type_BPF_MAP_TYPE_HASH: bpf_map_type = 1;
pub const bpf_map_type_BPF_MAP_TYPE_ARRAY: bpf_map_type = 2;
pub const bpf_map_type_BPF_MAP_TYPE_PROG_ARRAY: bpf_map_type = 3;
pub const bpf_map_type_BPF_MAP_TYPE_PERF_EVENT_ARRAY: bpf_map_type = 4;
pub const bpf_map_type_BPF_MAP_TYPE_PERCPU_HASH: bpf_map_type = 5;
pub const bpf_map_type_BPF_MAP_TYPE_PERCPU_ARRAY: bpf_map_type = 6;
pub const bpf_map_type_BPF_MAP_TYPE_STACK_TRACE: bpf_map_type = 7;
pub const bpf_map_type_BPF_MAP_TYPE_CGROUP_ARRAY: bpf_map_type = 8;
pub const bpf_map_type_BPF_MAP_TYPE_LRU_HASH: bpf_map_type = 9;
pub const bpf_map_type_BPF_MAP_TYPE_LRU_PERCPU_HASH: bpf_map_type = 10;
pub const bpf_map_type_BPF_MAP_TYPE_LPM_TRIE: bpf_map_type = 11;
pub const bpf_map_type_BPF_MAP_TYPE_ARRAY_OF_MAPS: bpf_map_type = 12;
pub const bpf_map_type_BPF_MAP_TYPE_HASH_OF_MAPS: bpf_map_type = 13;
pub const bpf_map_type_BPF_MAP_TYPE_DEVMAP: bpf_map_type = 14;
pub const bpf_map_type_BPF_MAP_TYPE_SOCKMAP: bpf_map_type = 15;
pub const bpf_map_type_BPF_MAP_TYPE_CPUMAP: bpf_map_type = 16;
pub const bpf_map_type_BPF_MAP_TYPE_XSKMAP: bpf_map_type = 17;
pub const bpf_map_type_BPF_MAP_TYPE_SOCKHASH: bpf_map_type = 18;
pub const bpf_map_type_BPF_MAP_TYPE_CGROUP_STORAGE: bpf_map_type = 19;
pub const bpf_map_type_BPF_MAP_TYPE_REUSEPORT_SOCKARRAY: bpf_map_type = 20;
pub const bpf_map_type_BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE: bpf_map_type = 21;
pub const bpf_map_type_BPF_MAP_TYPE_QUEUE: bpf_map_type = 22;
pub const bpf_map_type_BPF_MAP_TYPE_STACK: bpf_map_type = 23;
pub const bpf_map_type_BPF_MAP_TYPE_SK_STORAGE: bpf_map_type = 24;
pub type bpf_map_type = u32;
pub const bpf_prog_type_BPF_PROG_TYPE_UNSPEC: bpf_prog_type = 0;
pub const bpf_prog_type_BPF_PROG_TYPE_SOCKET_FILTER: bpf_prog_type = 1;
pub const bpf_prog_type_BPF_PROG_TYPE_KPROBE: bpf_prog_type = 2;
pub const bpf_prog_type_BPF_PROG_TYPE_SCHED_CLS: bpf_prog_type = 3;
pub const bpf_prog_type_BPF_PROG_TYPE_SCHED_ACT: bpf_prog_type = 4;
pub const bpf_prog_type_BPF_PROG_TYPE_TRACEPOINT: bpf_prog_type = 5;
pub const bpf_prog_type_BPF_PROG_TYPE_XDP: bpf_prog_type = 6;
pub const bpf_prog_type_BPF_PROG_TYPE_PERF_EVENT: bpf_prog_type = 7;
pub const bpf_prog_type_BPF_PROG_TYPE_CGROUP_SKB: bpf_prog_type = 8;
pub const bpf_prog_type_BPF_PROG_TYPE_CGROUP_SOCK: bpf_prog_type = 9;
pub const bpf_prog_type_BPF_PROG_TYPE_LWT_IN: bpf_prog_type = 10;
pub const bpf_prog_type_BPF_PROG_TYPE_LWT_OUT: bpf_prog_type = 11;
pub const bpf_prog_type_BPF_PROG_TYPE_LWT_XMIT: bpf_prog_type = 12;
pub const bpf_prog_type_BPF_PROG_TYPE_SOCK_OPS: bpf_prog_type = 13;
pub const bpf_prog_type_BPF_PROG_TYPE_SK_SKB: bpf_prog_type = 14;
pub const bpf_prog_type_BPF_PROG_TYPE_CGROUP_DEVICE: bpf_prog_type = 15;
pub const bpf_prog_type_BPF_PROG_TYPE_SK_MSG: bpf_prog_type = 16;
pub const bpf_prog_type_BPF_PROG_TYPE_RAW_TRACEPOINT: bpf_prog_type = 17;
pub const bpf_prog_type_BPF_PROG_TYPE_CGROUP_SOCK_ADDR: bpf_prog_type = 18;
pub const bpf_prog_type_BPF_PROG_TYPE_LWT_SEG6LOCAL: bpf_prog_type = 19;
pub const bpf_prog_type_BPF_PROG_TYPE_LIRC_MODE2: bpf_prog_type = 20;
pub const bpf_prog_type_BPF_PROG_TYPE_SK_REUSEPORT: bpf_prog_type = 21;
pub const bpf_prog_type_BPF_PROG_TYPE_FLOW_DISSECTOR: bpf_prog_type = 22;
pub const bpf_prog_type_BPF_PROG_TYPE_CGROUP_SYSCTL: bpf_prog_type = 23;
pub const bpf_prog_type_BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE: bpf_prog_type = 24;
pub const bpf_prog_type_BPF_PROG_TYPE_CGROUP_SOCKOPT: bpf_prog_type = 25;
pub type bpf_prog_type = u32;
pub const bpf_attach_type_BPF_CGROUP_INET_INGRESS: bpf_attach_type = 0;
pub const bpf_attach_type_BPF_CGROUP_INET_EGRESS: bpf_attach_type = 1;
pub const bpf_attach_type_BPF_CGROUP_INET_SOCK_CREATE: bpf_attach_type = 2;
pub const bpf_attach_type_BPF_CGROUP_SOCK_OPS: bpf_attach_type = 3;
pub const bpf_attach_type_BPF_SK_SKB_STREAM_PARSER: bpf_attach_type = 4;
pub const bpf_attach_type_BPF_SK_SKB_STREAM_VERDICT: bpf_attach_type = 5;
pub const bpf_attach_type_BPF_CGROUP_DEVICE: bpf_attach_type = 6;
pub const bpf_attach_type_BPF_SK_MSG_VERDICT: bpf_attach_type = 7;
pub const bpf_attach_type_BPF_CGROUP_INET4_BIND: bpf_attach_type = 8;
pub const bpf_attach_type_BPF_CGROUP_INET6_BIND: bpf_attach_type = 9;
pub const bpf_attach_type_BPF_CGROUP_INET4_CONNECT: bpf_attach_type = 10;
pub const bpf_attach_type_BPF_CGROUP_INET6_CONNECT: bpf_attach_type = 11;
pub const bpf_attach_type_BPF_CGROUP_INET4_POST_BIND: bpf_attach_type = 12;
pub const bpf_attach_type_BPF_CGROUP_INET6_POST_BIND: bpf_attach_type = 13;
pub const bpf_attach_type_BPF_CGROUP_UDP4_SENDMSG: bpf_attach_type = 14;
pub const bpf_attach_type_BPF_CGROUP_UDP6_SENDMSG: bpf_attach_type = 15;
pub const bpf_attach_type_BPF_LIRC_MODE2: bpf_attach_type = 16;
pub const bpf_attach_type_BPF_FLOW_DISSECTOR: bpf_attach_type = 17;
pub const bpf_attach_type_BPF_CGROUP_SYSCTL: bpf_attach_type = 18;
pub const bpf_attach_type_BPF_CGROUP_UDP4_RECVMSG: bpf_attach_type = 19;
pub const bpf_attach_type_BPF_CGROUP_UDP6_RECVMSG: bpf_attach_type = 20;
pub const bpf_attach_type_BPF_CGROUP_GETSOCKOPT: bpf_attach_type = 21;
pub const bpf_attach_type_BPF_CGROUP_SETSOCKOPT: bpf_attach_type = 22;
pub const bpf_attach_type___MAX_BPF_ATTACH_TYPE: bpf_attach_type = 23;
pub type bpf_attach_type = u32;
pub const bpf_stack_build_id_status_BPF_STACK_BUILD_ID_EMPTY: bpf_stack_build_id_status = 0;
pub const bpf_stack_build_id_status_BPF_STACK_BUILD_ID_VALID: bpf_stack_build_id_status = 1;
pub const bpf_stack_build_id_status_BPF_STACK_BUILD_ID_IP: bpf_stack_build_id_status = 2;
pub type bpf_stack_build_id_status = u32;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_stack_build_id {
pub status: __s32,
pub build_id: [::std::os::raw::c_uchar; 20usize],
pub __bindgen_anon_1: bpf_stack_build_id__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_stack_build_id__bindgen_ty_1 {
pub offset: __u64,
pub ip: __u64,
_bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout_bpf_stack_build_id__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<bpf_stack_build_id__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(bpf_stack_build_id__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_stack_build_id__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(bpf_stack_build_id__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_stack_build_id__bindgen_ty_1>())).offset as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_stack_build_id__bindgen_ty_1),
"::",
stringify!(offset)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_stack_build_id__bindgen_ty_1>())).ip as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_stack_build_id__bindgen_ty_1),
"::",
stringify!(ip)
)
);
}
impl Default for bpf_stack_build_id__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_stack_build_id__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_stack_build_id__bindgen_ty_1 {{ union }}")
}
}
#[test]
fn bindgen_test_layout_bpf_stack_build_id() {
assert_eq!(
::std::mem::size_of::<bpf_stack_build_id>(),
32usize,
concat!("Size of: ", stringify!(bpf_stack_build_id))
);
assert_eq!(
::std::mem::align_of::<bpf_stack_build_id>(),
8usize,
concat!("Alignment of ", stringify!(bpf_stack_build_id))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_stack_build_id>())).status as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_stack_build_id),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_stack_build_id>())).build_id as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_stack_build_id),
"::",
stringify!(build_id)
)
);
}
impl Default for bpf_stack_build_id {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_stack_build_id {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"bpf_stack_build_id {{ status: {:?}, build_id: {:?}, __bindgen_anon_1: {:?} }}",
self.status, self.build_id, self.__bindgen_anon_1
)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_attr {
pub __bindgen_anon_1: bpf_attr__bindgen_ty_1,
pub __bindgen_anon_2: bpf_attr__bindgen_ty_2,
pub __bindgen_anon_3: bpf_attr__bindgen_ty_3,
pub __bindgen_anon_4: bpf_attr__bindgen_ty_4,
pub __bindgen_anon_5: bpf_attr__bindgen_ty_5,
pub test: bpf_attr__bindgen_ty_6,
pub __bindgen_anon_6: bpf_attr__bindgen_ty_7,
pub info: bpf_attr__bindgen_ty_8,
pub query: bpf_attr__bindgen_ty_9,
pub raw_tracepoint: bpf_attr__bindgen_ty_10,
pub __bindgen_anon_7: bpf_attr__bindgen_ty_11,
pub task_fd_query: bpf_attr__bindgen_ty_12,
_bindgen_union_align: [u64; 14usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_attr__bindgen_ty_1 {
pub map_type: __u32,
pub key_size: __u32,
pub value_size: __u32,
pub max_entries: __u32,
pub map_flags: __u32,
pub inner_map_fd: __u32,
pub numa_node: __u32,
pub map_name: [::std::os::raw::c_char; 16usize],
pub map_ifindex: __u32,
pub btf_fd: __u32,
pub btf_key_type_id: __u32,
pub btf_value_type_id: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_1>(),
60usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_1>())).map_type as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(map_type)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_1>())).key_size as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(key_size)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_1>())).value_size as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(value_size)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_1>())).max_entries as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(max_entries)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_1>())).map_flags as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(map_flags)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_1>())).inner_map_fd as *const _ as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(inner_map_fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_1>())).numa_node as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(numa_node)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_1>())).map_name as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(map_name)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_1>())).map_ifindex as *const _ as usize
},
44usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(map_ifindex)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_1>())).btf_fd as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(btf_fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_1>())).btf_key_type_id as *const _ as usize
},
52usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(btf_key_type_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_1>())).btf_value_type_id as *const _
as usize
},
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(btf_value_type_id)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_attr__bindgen_ty_2 {
pub map_fd: __u32,
pub key: __u64,
pub __bindgen_anon_1: bpf_attr__bindgen_ty_2__bindgen_ty_1,
pub flags: __u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_attr__bindgen_ty_2__bindgen_ty_1 {
pub value: __u64,
pub next_key: __u64,
_bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_2__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_2__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(bpf_attr__bindgen_ty_2__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_2__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(bpf_attr__bindgen_ty_2__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_2__bindgen_ty_1>())).value as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(value)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_2__bindgen_ty_1>())).next_key as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(next_key)
)
);
}
impl Default for bpf_attr__bindgen_ty_2__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_attr__bindgen_ty_2__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_attr__bindgen_ty_2__bindgen_ty_1 {{ union }}")
}
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_2() {
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_2>(),
32usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_2))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_2>(),
8usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_2))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_2>())).map_fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_2),
"::",
stringify!(map_fd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_2>())).key as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_2),
"::",
stringify!(key)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_2>())).flags as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_2),
"::",
stringify!(flags)
)
);
}
impl Default for bpf_attr__bindgen_ty_2 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_attr__bindgen_ty_2 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! ( f , "bpf_attr__bindgen_ty_2 {{ map_fd: {:?}, key: {:?}, __bindgen_anon_1: {:?}, flags: {:?} }}" , self . map_fd , self . key , self . __bindgen_anon_1 , self . flags )
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_attr__bindgen_ty_3 {
pub prog_type: __u32,
pub insn_cnt: __u32,
pub insns: __u64,
pub license: __u64,
pub log_level: __u32,
pub log_size: __u32,
pub log_buf: __u64,
pub kern_version: __u32,
pub prog_flags: __u32,
pub prog_name: [::std::os::raw::c_char; 16usize],
pub prog_ifindex: __u32,
pub expected_attach_type: __u32,
pub prog_btf_fd: __u32,
pub func_info_rec_size: __u32,
pub func_info: __u64,
pub func_info_cnt: __u32,
pub line_info_rec_size: __u32,
pub line_info: __u64,
pub line_info_cnt: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_3() {
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_3>(),
112usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_3))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_3>(),
8usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_3))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).prog_type as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(prog_type)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).insn_cnt as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(insn_cnt)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).insns as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(insns)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).license as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(license)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).log_level as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(log_level)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).log_size as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(log_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).log_buf as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(log_buf)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).kern_version as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(kern_version)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).prog_flags as *const _ as usize
},
44usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(prog_flags)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).prog_name as *const _ as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(prog_name)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).prog_ifindex as *const _ as usize
},
64usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(prog_ifindex)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).expected_attach_type as *const _
as usize
},
68usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(expected_attach_type)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).prog_btf_fd as *const _ as usize
},
72usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(prog_btf_fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).func_info_rec_size as *const _
as usize
},
76usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(func_info_rec_size)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).func_info as *const _ as usize
},
80usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(func_info)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).func_info_cnt as *const _ as usize
},
88usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(func_info_cnt)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).line_info_rec_size as *const _
as usize
},
92usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(line_info_rec_size)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).line_info as *const _ as usize
},
96usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(line_info)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_3>())).line_info_cnt as *const _ as usize
},
104usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(line_info_cnt)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_attr__bindgen_ty_4 {
pub pathname: __u64,
pub bpf_fd: __u32,
pub file_flags: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_4() {
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_4>(),
16usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_4))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_4>(),
8usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_4))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_4>())).pathname as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(pathname)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_4>())).bpf_fd as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(bpf_fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_4>())).file_flags as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(file_flags)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_attr__bindgen_ty_5 {
pub target_fd: __u32,
pub attach_bpf_fd: __u32,
pub attach_type: __u32,
pub attach_flags: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_5() {
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_5>(),
16usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_5))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_5>(),
4usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_5))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_5>())).target_fd as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_5),
"::",
stringify!(target_fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_5>())).attach_bpf_fd as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_5),
"::",
stringify!(attach_bpf_fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_5>())).attach_type as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_5),
"::",
stringify!(attach_type)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_5>())).attach_flags as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_5),
"::",
stringify!(attach_flags)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_attr__bindgen_ty_6 {
pub prog_fd: __u32,
pub retval: __u32,
pub data_size_in: __u32,
pub data_size_out: __u32,
pub data_in: __u64,
pub data_out: __u64,
pub repeat: __u32,
pub duration: __u32,
pub ctx_size_in: __u32,
pub ctx_size_out: __u32,
pub ctx_in: __u64,
pub ctx_out: __u64,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_6() {
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_6>(),
64usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_6))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_6>(),
8usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_6))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_6>())).prog_fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(prog_fd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_6>())).retval as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(retval)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_6>())).data_size_in as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(data_size_in)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_6>())).data_size_out as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(data_size_out)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_6>())).data_in as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(data_in)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_6>())).data_out as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(data_out)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_6>())).repeat as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(repeat)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_6>())).duration as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(duration)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_6>())).ctx_size_in as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(ctx_size_in)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_6>())).ctx_size_out as *const _ as usize
},
44usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(ctx_size_out)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_6>())).ctx_in as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(ctx_in)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_6>())).ctx_out as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(ctx_out)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_attr__bindgen_ty_7 {
pub __bindgen_anon_1: bpf_attr__bindgen_ty_7__bindgen_ty_1,
pub next_id: __u32,
pub open_flags: __u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_attr__bindgen_ty_7__bindgen_ty_1 {
pub start_id: __u32,
pub prog_id: __u32,
pub map_id: __u32,
pub btf_id: __u32,
_bindgen_union_align: u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_7__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_7__bindgen_ty_1>(),
4usize,
concat!(
"Size of: ",
stringify!(bpf_attr__bindgen_ty_7__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_7__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(bpf_attr__bindgen_ty_7__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_7__bindgen_ty_1>())).start_id as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7__bindgen_ty_1),
"::",
stringify!(start_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_7__bindgen_ty_1>())).prog_id as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7__bindgen_ty_1),
"::",
stringify!(prog_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_7__bindgen_ty_1>())).map_id as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7__bindgen_ty_1),
"::",
stringify!(map_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_7__bindgen_ty_1>())).btf_id as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7__bindgen_ty_1),
"::",
stringify!(btf_id)
)
);
}
impl Default for bpf_attr__bindgen_ty_7__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_attr__bindgen_ty_7__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_attr__bindgen_ty_7__bindgen_ty_1 {{ union }}")
}
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_7() {
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_7>(),
12usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_7))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_7>(),
4usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_7))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_7>())).next_id as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7),
"::",
stringify!(next_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_7>())).open_flags as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7),
"::",
stringify!(open_flags)
)
);
}
impl Default for bpf_attr__bindgen_ty_7 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_attr__bindgen_ty_7 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"bpf_attr__bindgen_ty_7 {{ __bindgen_anon_1: {:?}, next_id: {:?}, open_flags: {:?} }}",
self.__bindgen_anon_1, self.next_id, self.open_flags
)
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_attr__bindgen_ty_8 {
pub bpf_fd: __u32,
pub info_len: __u32,
pub info: __u64,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_8() {
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_8>(),
16usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_8))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_8>(),
8usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_8))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_8>())).bpf_fd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_8),
"::",
stringify!(bpf_fd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_8>())).info_len as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_8),
"::",
stringify!(info_len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_8>())).info as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_8),
"::",
stringify!(info)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_attr__bindgen_ty_9 {
pub target_fd: __u32,
pub attach_type: __u32,
pub query_flags: __u32,
pub attach_flags: __u32,
pub prog_ids: __u64,
pub prog_cnt: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_9() {
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_9>(),
32usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_9))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_9>(),
8usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_9))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_9>())).target_fd as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_9),
"::",
stringify!(target_fd)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_9>())).attach_type as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_9),
"::",
stringify!(attach_type)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_9>())).query_flags as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_9),
"::",
stringify!(query_flags)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_9>())).attach_flags as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_9),
"::",
stringify!(attach_flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_9>())).prog_ids as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_9),
"::",
stringify!(prog_ids)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_9>())).prog_cnt as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_9),
"::",
stringify!(prog_cnt)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_attr__bindgen_ty_10 {
pub name: __u64,
pub prog_fd: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_10() {
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_10>(),
16usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_10))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_10>(),
8usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_10))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_10>())).name as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_10),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_10>())).prog_fd as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_10),
"::",
stringify!(prog_fd)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_attr__bindgen_ty_11 {
pub btf: __u64,
pub btf_log_buf: __u64,
pub btf_size: __u32,
pub btf_log_size: __u32,
pub btf_log_level: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_11() {
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_11>(),
32usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_11))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_11>(),
8usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_11))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_11>())).btf as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_11),
"::",
stringify!(btf)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_11>())).btf_log_buf as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_11),
"::",
stringify!(btf_log_buf)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_11>())).btf_size as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_11),
"::",
stringify!(btf_size)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_11>())).btf_log_size as *const _ as usize
},
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_11),
"::",
stringify!(btf_log_size)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_11>())).btf_log_level as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_11),
"::",
stringify!(btf_log_level)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_attr__bindgen_ty_12 {
pub pid: __u32,
pub fd: __u32,
pub flags: __u32,
pub buf_len: __u32,
pub buf: __u64,
pub prog_id: __u32,
pub fd_type: __u32,
pub probe_offset: __u64,
pub probe_addr: __u64,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_12() {
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_12>(),
48usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_12))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_12>(),
8usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_12))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_12>())).pid as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_12),
"::",
stringify!(pid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_12>())).fd as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_12),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_12>())).flags as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_12),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_12>())).buf_len as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_12),
"::",
stringify!(buf_len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_12>())).buf as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_12),
"::",
stringify!(buf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_12>())).prog_id as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_12),
"::",
stringify!(prog_id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr__bindgen_ty_12>())).fd_type as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_12),
"::",
stringify!(fd_type)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_12>())).probe_offset as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_12),
"::",
stringify!(probe_offset)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_attr__bindgen_ty_12>())).probe_addr as *const _ as usize
},
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_12),
"::",
stringify!(probe_addr)
)
);
}
#[test]
fn bindgen_test_layout_bpf_attr() {
assert_eq!(
::std::mem::size_of::<bpf_attr>(),
112usize,
concat!("Size of: ", stringify!(bpf_attr))
);
assert_eq!(
::std::mem::align_of::<bpf_attr>(),
8usize,
concat!("Alignment of ", stringify!(bpf_attr))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr>())).test as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(test)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr>())).info as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(info)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr>())).query as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(query)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr>())).raw_tracepoint as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(raw_tracepoint)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_attr>())).task_fd_query as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(task_fd_query)
)
);
}
impl Default for bpf_attr {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_attr {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_attr {{ union }}")
}
}
pub const bpf_func_id_BPF_FUNC_unspec: bpf_func_id = 0;
pub const bpf_func_id_BPF_FUNC_map_lookup_elem: bpf_func_id = 1;
pub const bpf_func_id_BPF_FUNC_map_update_elem: bpf_func_id = 2;
pub const bpf_func_id_BPF_FUNC_map_delete_elem: bpf_func_id = 3;
pub const bpf_func_id_BPF_FUNC_probe_read: bpf_func_id = 4;
pub const bpf_func_id_BPF_FUNC_ktime_get_ns: bpf_func_id = 5;
pub const bpf_func_id_BPF_FUNC_trace_printk: bpf_func_id = 6;
pub const bpf_func_id_BPF_FUNC_get_prandom_u32: bpf_func_id = 7;
pub const bpf_func_id_BPF_FUNC_get_smp_processor_id: bpf_func_id = 8;
pub const bpf_func_id_BPF_FUNC_skb_store_bytes: bpf_func_id = 9;
pub const bpf_func_id_BPF_FUNC_l3_csum_replace: bpf_func_id = 10;
pub const bpf_func_id_BPF_FUNC_l4_csum_replace: bpf_func_id = 11;
pub const bpf_func_id_BPF_FUNC_tail_call: bpf_func_id = 12;
pub const bpf_func_id_BPF_FUNC_clone_redirect: bpf_func_id = 13;
pub const bpf_func_id_BPF_FUNC_get_current_pid_tgid: bpf_func_id = 14;
pub const bpf_func_id_BPF_FUNC_get_current_uid_gid: bpf_func_id = 15;
pub const bpf_func_id_BPF_FUNC_get_current_comm: bpf_func_id = 16;
pub const bpf_func_id_BPF_FUNC_get_cgroup_classid: bpf_func_id = 17;
pub const bpf_func_id_BPF_FUNC_skb_vlan_push: bpf_func_id = 18;
pub const bpf_func_id_BPF_FUNC_skb_vlan_pop: bpf_func_id = 19;
pub const bpf_func_id_BPF_FUNC_skb_get_tunnel_key: bpf_func_id = 20;
pub const bpf_func_id_BPF_FUNC_skb_set_tunnel_key: bpf_func_id = 21;
pub const bpf_func_id_BPF_FUNC_perf_event_read: bpf_func_id = 22;
pub const bpf_func_id_BPF_FUNC_redirect: bpf_func_id = 23;
pub const bpf_func_id_BPF_FUNC_get_route_realm: bpf_func_id = 24;
pub const bpf_func_id_BPF_FUNC_perf_event_output: bpf_func_id = 25;
pub const bpf_func_id_BPF_FUNC_skb_load_bytes: bpf_func_id = 26;
pub const bpf_func_id_BPF_FUNC_get_stackid: bpf_func_id = 27;
pub const bpf_func_id_BPF_FUNC_csum_diff: bpf_func_id = 28;
pub const bpf_func_id_BPF_FUNC_skb_get_tunnel_opt: bpf_func_id = 29;
pub const bpf_func_id_BPF_FUNC_skb_set_tunnel_opt: bpf_func_id = 30;
pub const bpf_func_id_BPF_FUNC_skb_change_proto: bpf_func_id = 31;
pub const bpf_func_id_BPF_FUNC_skb_change_type: bpf_func_id = 32;
pub const bpf_func_id_BPF_FUNC_skb_under_cgroup: bpf_func_id = 33;
pub const bpf_func_id_BPF_FUNC_get_hash_recalc: bpf_func_id = 34;
pub const bpf_func_id_BPF_FUNC_get_current_task: bpf_func_id = 35;
pub const bpf_func_id_BPF_FUNC_probe_write_user: bpf_func_id = 36;
pub const bpf_func_id_BPF_FUNC_current_task_under_cgroup: bpf_func_id = 37;
pub const bpf_func_id_BPF_FUNC_skb_change_tail: bpf_func_id = 38;
pub const bpf_func_id_BPF_FUNC_skb_pull_data: bpf_func_id = 39;
pub const bpf_func_id_BPF_FUNC_csum_update: bpf_func_id = 40;
pub const bpf_func_id_BPF_FUNC_set_hash_invalid: bpf_func_id = 41;
pub const bpf_func_id_BPF_FUNC_get_numa_node_id: bpf_func_id = 42;
pub const bpf_func_id_BPF_FUNC_skb_change_head: bpf_func_id = 43;
pub const bpf_func_id_BPF_FUNC_xdp_adjust_head: bpf_func_id = 44;
pub const bpf_func_id_BPF_FUNC_probe_read_str: bpf_func_id = 45;
pub const bpf_func_id_BPF_FUNC_get_socket_cookie: bpf_func_id = 46;
pub const bpf_func_id_BPF_FUNC_get_socket_uid: bpf_func_id = 47;
pub const bpf_func_id_BPF_FUNC_set_hash: bpf_func_id = 48;
pub const bpf_func_id_BPF_FUNC_setsockopt: bpf_func_id = 49;
pub const bpf_func_id_BPF_FUNC_skb_adjust_room: bpf_func_id = 50;
pub const bpf_func_id_BPF_FUNC_redirect_map: bpf_func_id = 51;
pub const bpf_func_id_BPF_FUNC_sk_redirect_map: bpf_func_id = 52;
pub const bpf_func_id_BPF_FUNC_sock_map_update: bpf_func_id = 53;
pub const bpf_func_id_BPF_FUNC_xdp_adjust_meta: bpf_func_id = 54;
pub const bpf_func_id_BPF_FUNC_perf_event_read_value: bpf_func_id = 55;
pub const bpf_func_id_BPF_FUNC_perf_prog_read_value: bpf_func_id = 56;
pub const bpf_func_id_BPF_FUNC_getsockopt: bpf_func_id = 57;
pub const bpf_func_id_BPF_FUNC_override_return: bpf_func_id = 58;
pub const bpf_func_id_BPF_FUNC_sock_ops_cb_flags_set: bpf_func_id = 59;
pub const bpf_func_id_BPF_FUNC_msg_redirect_map: bpf_func_id = 60;
pub const bpf_func_id_BPF_FUNC_msg_apply_bytes: bpf_func_id = 61;
pub const bpf_func_id_BPF_FUNC_msg_cork_bytes: bpf_func_id = 62;
pub const bpf_func_id_BPF_FUNC_msg_pull_data: bpf_func_id = 63;
pub const bpf_func_id_BPF_FUNC_bind: bpf_func_id = 64;
pub const bpf_func_id_BPF_FUNC_xdp_adjust_tail: bpf_func_id = 65;
pub const bpf_func_id_BPF_FUNC_skb_get_xfrm_state: bpf_func_id = 66;
pub const bpf_func_id_BPF_FUNC_get_stack: bpf_func_id = 67;
pub const bpf_func_id_BPF_FUNC_skb_load_bytes_relative: bpf_func_id = 68;
pub const bpf_func_id_BPF_FUNC_fib_lookup: bpf_func_id = 69;
pub const bpf_func_id_BPF_FUNC_sock_hash_update: bpf_func_id = 70;
pub const bpf_func_id_BPF_FUNC_msg_redirect_hash: bpf_func_id = 71;
pub const bpf_func_id_BPF_FUNC_sk_redirect_hash: bpf_func_id = 72;
pub const bpf_func_id_BPF_FUNC_lwt_push_encap: bpf_func_id = 73;
pub const bpf_func_id_BPF_FUNC_lwt_seg6_store_bytes: bpf_func_id = 74;
pub const bpf_func_id_BPF_FUNC_lwt_seg6_adjust_srh: bpf_func_id = 75;
pub const bpf_func_id_BPF_FUNC_lwt_seg6_action: bpf_func_id = 76;
pub const bpf_func_id_BPF_FUNC_rc_repeat: bpf_func_id = 77;
pub const bpf_func_id_BPF_FUNC_rc_keydown: bpf_func_id = 78;
pub const bpf_func_id_BPF_FUNC_skb_cgroup_id: bpf_func_id = 79;
pub const bpf_func_id_BPF_FUNC_get_current_cgroup_id: bpf_func_id = 80;
pub const bpf_func_id_BPF_FUNC_get_local_storage: bpf_func_id = 81;
pub const bpf_func_id_BPF_FUNC_sk_select_reuseport: bpf_func_id = 82;
pub const bpf_func_id_BPF_FUNC_skb_ancestor_cgroup_id: bpf_func_id = 83;
pub const bpf_func_id_BPF_FUNC_sk_lookup_tcp: bpf_func_id = 84;
pub const bpf_func_id_BPF_FUNC_sk_lookup_udp: bpf_func_id = 85;
pub const bpf_func_id_BPF_FUNC_sk_release: bpf_func_id = 86;
pub const bpf_func_id_BPF_FUNC_map_push_elem: bpf_func_id = 87;
pub const bpf_func_id_BPF_FUNC_map_pop_elem: bpf_func_id = 88;
pub const bpf_func_id_BPF_FUNC_map_peek_elem: bpf_func_id = 89;
pub const bpf_func_id_BPF_FUNC_msg_push_data: bpf_func_id = 90;
pub const bpf_func_id_BPF_FUNC_msg_pop_data: bpf_func_id = 91;
pub const bpf_func_id_BPF_FUNC_rc_pointer_rel: bpf_func_id = 92;
pub const bpf_func_id_BPF_FUNC_spin_lock: bpf_func_id = 93;
pub const bpf_func_id_BPF_FUNC_spin_unlock: bpf_func_id = 94;
pub const bpf_func_id_BPF_FUNC_sk_fullsock: bpf_func_id = 95;
pub const bpf_func_id_BPF_FUNC_tcp_sock: bpf_func_id = 96;
pub const bpf_func_id_BPF_FUNC_skb_ecn_set_ce: bpf_func_id = 97;
pub const bpf_func_id_BPF_FUNC_get_listener_sock: bpf_func_id = 98;
pub const bpf_func_id_BPF_FUNC_skc_lookup_tcp: bpf_func_id = 99;
pub const bpf_func_id_BPF_FUNC_tcp_check_syncookie: bpf_func_id = 100;
pub const bpf_func_id_BPF_FUNC_sysctl_get_name: bpf_func_id = 101;
pub const bpf_func_id_BPF_FUNC_sysctl_get_current_value: bpf_func_id = 102;
pub const bpf_func_id_BPF_FUNC_sysctl_get_new_value: bpf_func_id = 103;
pub const bpf_func_id_BPF_FUNC_sysctl_set_new_value: bpf_func_id = 104;
pub const bpf_func_id_BPF_FUNC_strtol: bpf_func_id = 105;
pub const bpf_func_id_BPF_FUNC_strtoul: bpf_func_id = 106;
pub const bpf_func_id_BPF_FUNC_sk_storage_get: bpf_func_id = 107;
pub const bpf_func_id_BPF_FUNC_sk_storage_delete: bpf_func_id = 108;
pub const bpf_func_id_BPF_FUNC_send_signal: bpf_func_id = 109;
pub const bpf_func_id___BPF_FUNC_MAX_ID: bpf_func_id = 110;
pub type bpf_func_id = u32;
pub const bpf_adj_room_mode_BPF_ADJ_ROOM_NET: bpf_adj_room_mode = 0;
pub const bpf_adj_room_mode_BPF_ADJ_ROOM_MAC: bpf_adj_room_mode = 1;
pub type bpf_adj_room_mode = u32;
pub const bpf_hdr_start_off_BPF_HDR_START_MAC: bpf_hdr_start_off = 0;
pub const bpf_hdr_start_off_BPF_HDR_START_NET: bpf_hdr_start_off = 1;
pub type bpf_hdr_start_off = u32;
pub const bpf_lwt_encap_mode_BPF_LWT_ENCAP_SEG6: bpf_lwt_encap_mode = 0;
pub const bpf_lwt_encap_mode_BPF_LWT_ENCAP_SEG6_INLINE: bpf_lwt_encap_mode = 1;
pub const bpf_lwt_encap_mode_BPF_LWT_ENCAP_IP: bpf_lwt_encap_mode = 2;
pub type bpf_lwt_encap_mode = u32;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __sk_buff {
pub len: __u32,
pub pkt_type: __u32,
pub mark: __u32,
pub queue_mapping: __u32,
pub protocol: __u32,
pub vlan_present: __u32,
pub vlan_tci: __u32,
pub vlan_proto: __u32,
pub priority: __u32,
pub ingress_ifindex: __u32,
pub ifindex: __u32,
pub tc_index: __u32,
pub cb: [__u32; 5usize],
pub hash: __u32,
pub tc_classid: __u32,
pub data: __u32,
pub data_end: __u32,
pub napi_id: __u32,
pub family: __u32,
pub remote_ip4: __u32,
pub local_ip4: __u32,
pub remote_ip6: [__u32; 4usize],
pub local_ip6: [__u32; 4usize],
pub remote_port: __u32,
pub local_port: __u32,
pub data_meta: __u32,
pub __bindgen_anon_1: __sk_buff__bindgen_ty_1,
pub tstamp: __u64,
pub wire_len: __u32,
pub gso_segs: __u32,
pub __bindgen_anon_2: __sk_buff__bindgen_ty_2,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __sk_buff__bindgen_ty_1 {
pub flow_keys: *mut bpf_flow_keys,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize], u8>,
_bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout___sk_buff__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<__sk_buff__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(__sk_buff__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<__sk_buff__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(__sk_buff__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<__sk_buff__bindgen_ty_1>())).flow_keys as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff__bindgen_ty_1),
"::",
stringify!(flow_keys)
)
);
}
impl Default for __sk_buff__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for __sk_buff__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "__sk_buff__bindgen_ty_1 {{ union }}")
}
}
impl __sk_buff__bindgen_ty_1 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize], u8> =
Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __sk_buff__bindgen_ty_2 {
pub sk: *mut bpf_sock,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize], u8>,
_bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout___sk_buff__bindgen_ty_2() {
assert_eq!(
::std::mem::size_of::<__sk_buff__bindgen_ty_2>(),
8usize,
concat!("Size of: ", stringify!(__sk_buff__bindgen_ty_2))
);
assert_eq!(
::std::mem::align_of::<__sk_buff__bindgen_ty_2>(),
8usize,
concat!("Alignment of ", stringify!(__sk_buff__bindgen_ty_2))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff__bindgen_ty_2>())).sk as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff__bindgen_ty_2),
"::",
stringify!(sk)
)
);
}
impl Default for __sk_buff__bindgen_ty_2 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for __sk_buff__bindgen_ty_2 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "__sk_buff__bindgen_ty_2 {{ union }}")
}
}
impl __sk_buff__bindgen_ty_2 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize], u8> =
Default::default();
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout___sk_buff() {
assert_eq!(
::std::mem::size_of::<__sk_buff>(),
176usize,
concat!("Size of: ", stringify!(__sk_buff))
);
assert_eq!(
::std::mem::align_of::<__sk_buff>(),
8usize,
concat!("Alignment of ", stringify!(__sk_buff))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).len as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).pkt_type as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(pkt_type)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).mark as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(mark)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).queue_mapping as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(queue_mapping)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).protocol as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(protocol)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).vlan_present as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(vlan_present)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).vlan_tci as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(vlan_tci)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).vlan_proto as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(vlan_proto)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).priority as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(priority)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).ingress_ifindex as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(ingress_ifindex)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).ifindex as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(ifindex)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).tc_index as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(tc_index)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).cb as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(cb)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).hash as *const _ as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(hash)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).tc_classid as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(tc_classid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).data as *const _ as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).data_end as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(data_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).napi_id as *const _ as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(napi_id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).family as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(family)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).remote_ip4 as *const _ as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(remote_ip4)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).local_ip4 as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(local_ip4)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).remote_ip6 as *const _ as usize },
100usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(remote_ip6)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).local_ip6 as *const _ as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(local_ip6)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).remote_port as *const _ as usize },
132usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(remote_port)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).local_port as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(local_port)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).data_meta as *const _ as usize },
140usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(data_meta)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).tstamp as *const _ as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(tstamp)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).wire_len as *const _ as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(wire_len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<__sk_buff>())).gso_segs as *const _ as usize },
164usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(gso_segs)
)
);
}
impl Default for __sk_buff {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for __sk_buff {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! ( f , "__sk_buff {{ len: {:?}, pkt_type: {:?}, mark: {:?}, queue_mapping: {:?}, protocol: {:?}, vlan_present: {:?}, vlan_tci: {:?}, vlan_proto: {:?}, priority: {:?}, ingress_ifindex: {:?}, ifindex: {:?}, tc_index: {:?}, cb: {:?}, hash: {:?}, tc_classid: {:?}, data: {:?}, data_end: {:?}, napi_id: {:?}, family: {:?}, remote_ip4: {:?}, local_ip4: {:?}, remote_ip6: {:?}, local_ip6: {:?}, remote_port: {:?}, local_port: {:?}, data_meta: {:?}, __bindgen_anon_1: {:?}, tstamp: {:?}, wire_len: {:?}, gso_segs: {:?}, __bindgen_anon_2: {:?} }}" , self . len , self . pkt_type , self . mark , self . queue_mapping , self . protocol , self . vlan_present , self . vlan_tci , self . vlan_proto , self . priority , self . ingress_ifindex , self . ifindex , self . tc_index , self . cb , self . hash , self . tc_classid , self . data , self . data_end , self . napi_id , self . family , self . remote_ip4 , self . local_ip4 , self . remote_ip6 , self . local_ip6 , self . remote_port , self . local_port , self . data_meta , self . __bindgen_anon_1 , self . tstamp , self . wire_len , self . gso_segs , self . __bindgen_anon_2 )
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_tunnel_key {
pub tunnel_id: __u32,
pub __bindgen_anon_1: bpf_tunnel_key__bindgen_ty_1,
pub tunnel_tos: __u8,
pub tunnel_ttl: __u8,
pub tunnel_ext: __u16,
pub tunnel_label: __u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_tunnel_key__bindgen_ty_1 {
pub remote_ipv4: __u32,
pub remote_ipv6: [__u32; 4usize],
_bindgen_union_align: [u32; 4usize],
}
#[test]
fn bindgen_test_layout_bpf_tunnel_key__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<bpf_tunnel_key__bindgen_ty_1>(),
16usize,
concat!("Size of: ", stringify!(bpf_tunnel_key__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_tunnel_key__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(bpf_tunnel_key__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_tunnel_key__bindgen_ty_1>())).remote_ipv4 as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_tunnel_key__bindgen_ty_1),
"::",
stringify!(remote_ipv4)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_tunnel_key__bindgen_ty_1>())).remote_ipv6 as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_tunnel_key__bindgen_ty_1),
"::",
stringify!(remote_ipv6)
)
);
}
impl Default for bpf_tunnel_key__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_tunnel_key__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_tunnel_key__bindgen_ty_1 {{ union }}")
}
}
#[test]
fn bindgen_test_layout_bpf_tunnel_key() {
assert_eq!(
::std::mem::size_of::<bpf_tunnel_key>(),
28usize,
concat!("Size of: ", stringify!(bpf_tunnel_key))
);
assert_eq!(
::std::mem::align_of::<bpf_tunnel_key>(),
4usize,
concat!("Alignment of ", stringify!(bpf_tunnel_key))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tunnel_key>())).tunnel_id as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_tunnel_key),
"::",
stringify!(tunnel_id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tunnel_key>())).tunnel_tos as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_tunnel_key),
"::",
stringify!(tunnel_tos)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tunnel_key>())).tunnel_ttl as *const _ as usize },
21usize,
concat!(
"Offset of field: ",
stringify!(bpf_tunnel_key),
"::",
stringify!(tunnel_ttl)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tunnel_key>())).tunnel_ext as *const _ as usize },
22usize,
concat!(
"Offset of field: ",
stringify!(bpf_tunnel_key),
"::",
stringify!(tunnel_ext)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tunnel_key>())).tunnel_label as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_tunnel_key),
"::",
stringify!(tunnel_label)
)
);
}
impl Default for bpf_tunnel_key {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_tunnel_key {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! ( f , "bpf_tunnel_key {{ tunnel_id: {:?}, __bindgen_anon_1: {:?}, tunnel_tos: {:?}, tunnel_ttl: {:?}, tunnel_ext: {:?}, tunnel_label: {:?} }}" , self . tunnel_id , self . __bindgen_anon_1 , self . tunnel_tos , self . tunnel_ttl , self . tunnel_ext , self . tunnel_label )
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_xfrm_state {
pub reqid: __u32,
pub spi: __u32,
pub family: __u16,
pub ext: __u16,
pub __bindgen_anon_1: bpf_xfrm_state__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_xfrm_state__bindgen_ty_1 {
pub remote_ipv4: __u32,
pub remote_ipv6: [__u32; 4usize],
_bindgen_union_align: [u32; 4usize],
}
#[test]
fn bindgen_test_layout_bpf_xfrm_state__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<bpf_xfrm_state__bindgen_ty_1>(),
16usize,
concat!("Size of: ", stringify!(bpf_xfrm_state__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_xfrm_state__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(bpf_xfrm_state__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_xfrm_state__bindgen_ty_1>())).remote_ipv4 as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_xfrm_state__bindgen_ty_1),
"::",
stringify!(remote_ipv4)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_xfrm_state__bindgen_ty_1>())).remote_ipv6 as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_xfrm_state__bindgen_ty_1),
"::",
stringify!(remote_ipv6)
)
);
}
impl Default for bpf_xfrm_state__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_xfrm_state__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_xfrm_state__bindgen_ty_1 {{ union }}")
}
}
#[test]
fn bindgen_test_layout_bpf_xfrm_state() {
assert_eq!(
::std::mem::size_of::<bpf_xfrm_state>(),
28usize,
concat!("Size of: ", stringify!(bpf_xfrm_state))
);
assert_eq!(
::std::mem::align_of::<bpf_xfrm_state>(),
4usize,
concat!("Alignment of ", stringify!(bpf_xfrm_state))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_xfrm_state>())).reqid as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_xfrm_state),
"::",
stringify!(reqid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_xfrm_state>())).spi as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_xfrm_state),
"::",
stringify!(spi)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_xfrm_state>())).family as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_xfrm_state),
"::",
stringify!(family)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_xfrm_state>())).ext as *const _ as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(bpf_xfrm_state),
"::",
stringify!(ext)
)
);
}
impl Default for bpf_xfrm_state {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_xfrm_state {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! ( f , "bpf_xfrm_state {{ reqid: {:?}, spi: {:?}, family: {:?}, ext: {:?}, __bindgen_anon_1: {:?} }}" , self . reqid , self . spi , self . family , self . ext , self . __bindgen_anon_1 )
}
}
pub const bpf_ret_code_BPF_OK: bpf_ret_code = 0;
pub const bpf_ret_code_BPF_DROP: bpf_ret_code = 2;
pub const bpf_ret_code_BPF_REDIRECT: bpf_ret_code = 7;
pub const bpf_ret_code_BPF_LWT_REROUTE: bpf_ret_code = 128;
pub type bpf_ret_code = u32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_sock {
pub bound_dev_if: __u32,
pub family: __u32,
pub type_: __u32,
pub protocol: __u32,
pub mark: __u32,
pub priority: __u32,
pub src_ip4: __u32,
pub src_ip6: [__u32; 4usize],
pub src_port: __u32,
pub dst_port: __u32,
pub dst_ip4: __u32,
pub dst_ip6: [__u32; 4usize],
pub state: __u32,
}
#[test]
fn bindgen_test_layout_bpf_sock() {
assert_eq!(
::std::mem::size_of::<bpf_sock>(),
76usize,
concat!("Size of: ", stringify!(bpf_sock))
);
assert_eq!(
::std::mem::align_of::<bpf_sock>(),
4usize,
concat!("Alignment of ", stringify!(bpf_sock))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock>())).bound_dev_if as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(bound_dev_if)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock>())).family as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(family)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock>())).type_ as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock>())).protocol as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(protocol)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock>())).mark as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(mark)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock>())).priority as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(priority)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock>())).src_ip4 as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(src_ip4)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock>())).src_ip6 as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(src_ip6)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock>())).src_port as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(src_port)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock>())).dst_port as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(dst_port)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock>())).dst_ip4 as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(dst_ip4)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock>())).dst_ip6 as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(dst_ip6)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock>())).state as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(state)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_tcp_sock {
pub snd_cwnd: __u32,
pub srtt_us: __u32,
pub rtt_min: __u32,
pub snd_ssthresh: __u32,
pub rcv_nxt: __u32,
pub snd_nxt: __u32,
pub snd_una: __u32,
pub mss_cache: __u32,
pub ecn_flags: __u32,
pub rate_delivered: __u32,
pub rate_interval_us: __u32,
pub packets_out: __u32,
pub retrans_out: __u32,
pub total_retrans: __u32,
pub segs_in: __u32,
pub data_segs_in: __u32,
pub segs_out: __u32,
pub data_segs_out: __u32,
pub lost_out: __u32,
pub sacked_out: __u32,
pub bytes_received: __u64,
pub bytes_acked: __u64,
pub dsack_dups: __u32,
pub delivered: __u32,
pub delivered_ce: __u32,
pub icsk_retransmits: __u32,
}
#[test]
fn bindgen_test_layout_bpf_tcp_sock() {
assert_eq!(
::std::mem::size_of::<bpf_tcp_sock>(),
112usize,
concat!("Size of: ", stringify!(bpf_tcp_sock))
);
assert_eq!(
::std::mem::align_of::<bpf_tcp_sock>(),
8usize,
concat!("Alignment of ", stringify!(bpf_tcp_sock))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).snd_cwnd as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(snd_cwnd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).srtt_us as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(srtt_us)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).rtt_min as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(rtt_min)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).snd_ssthresh as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(snd_ssthresh)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).rcv_nxt as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(rcv_nxt)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).snd_nxt as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(snd_nxt)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).snd_una as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(snd_una)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).mss_cache as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(mss_cache)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).ecn_flags as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(ecn_flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).rate_delivered as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(rate_delivered)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).rate_interval_us as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(rate_interval_us)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).packets_out as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(packets_out)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).retrans_out as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(retrans_out)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).total_retrans as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(total_retrans)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).segs_in as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(segs_in)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).data_segs_in as *const _ as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(data_segs_in)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).segs_out as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(segs_out)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).data_segs_out as *const _ as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(data_segs_out)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).lost_out as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(lost_out)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).sacked_out as *const _ as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(sacked_out)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).bytes_received as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(bytes_received)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).bytes_acked as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(bytes_acked)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).dsack_dups as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(dsack_dups)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).delivered as *const _ as usize },
100usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(delivered)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).delivered_ce as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(delivered_ce)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_tcp_sock>())).icsk_retransmits as *const _ as usize },
108usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(icsk_retransmits)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_sock_tuple {
pub __bindgen_anon_1: bpf_sock_tuple__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_sock_tuple__bindgen_ty_1 {
pub ipv4: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1,
pub ipv6: bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2,
_bindgen_union_align: [u32; 9usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 {
pub saddr: __be32,
pub daddr: __be32,
pub sport: __be16,
pub dport: __be16,
}
#[test]
fn bindgen_test_layout_bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1>(),
12usize,
concat!(
"Size of: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1>())).saddr as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(saddr)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1>())).daddr as *const _
as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(daddr)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1>())).sport as *const _
as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(sport)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1>())).dport as *const _
as usize
},
10usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(dport)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 {
pub saddr: [__be32; 4usize],
pub daddr: [__be32; 4usize],
pub sport: __be16,
pub dport: __be16,
}
#[test]
fn bindgen_test_layout_bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2() {
assert_eq!(
::std::mem::size_of::<bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2>(),
36usize,
concat!(
"Size of: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2>(),
4usize,
concat!(
"Alignment of ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2>())).saddr as *const _
as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(saddr)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2>())).daddr as *const _
as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(daddr)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2>())).sport as *const _
as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(sport)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2>())).dport as *const _
as usize
},
34usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(dport)
)
);
}
#[test]
fn bindgen_test_layout_bpf_sock_tuple__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<bpf_sock_tuple__bindgen_ty_1>(),
36usize,
concat!("Size of: ", stringify!(bpf_sock_tuple__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_sock_tuple__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(bpf_sock_tuple__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_sock_tuple__bindgen_ty_1>())).ipv4 as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1),
"::",
stringify!(ipv4)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_sock_tuple__bindgen_ty_1>())).ipv6 as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1),
"::",
stringify!(ipv6)
)
);
}
impl Default for bpf_sock_tuple__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_sock_tuple__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_sock_tuple__bindgen_ty_1 {{ union }}")
}
}
#[test]
fn bindgen_test_layout_bpf_sock_tuple() {
assert_eq!(
::std::mem::size_of::<bpf_sock_tuple>(),
36usize,
concat!("Size of: ", stringify!(bpf_sock_tuple))
);
assert_eq!(
::std::mem::align_of::<bpf_sock_tuple>(),
4usize,
concat!("Alignment of ", stringify!(bpf_sock_tuple))
);
}
impl Default for bpf_sock_tuple {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_sock_tuple {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"bpf_sock_tuple {{ __bindgen_anon_1: {:?} }}",
self.__bindgen_anon_1
)
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_xdp_sock {
pub queue_id: __u32,
}
#[test]
fn bindgen_test_layout_bpf_xdp_sock() {
assert_eq!(
::std::mem::size_of::<bpf_xdp_sock>(),
4usize,
concat!("Size of: ", stringify!(bpf_xdp_sock))
);
assert_eq!(
::std::mem::align_of::<bpf_xdp_sock>(),
4usize,
concat!("Alignment of ", stringify!(bpf_xdp_sock))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_xdp_sock>())).queue_id as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_xdp_sock),
"::",
stringify!(queue_id)
)
);
}
pub const xdp_action_XDP_ABORTED: xdp_action = 0;
pub const xdp_action_XDP_DROP: xdp_action = 1;
pub const xdp_action_XDP_PASS: xdp_action = 2;
pub const xdp_action_XDP_TX: xdp_action = 3;
pub const xdp_action_XDP_REDIRECT: xdp_action = 4;
pub type xdp_action = u32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct xdp_md {
pub data: __u32,
pub data_end: __u32,
pub data_meta: __u32,
pub ingress_ifindex: __u32,
pub rx_queue_index: __u32,
}
#[test]
fn bindgen_test_layout_xdp_md() {
assert_eq!(
::std::mem::size_of::<xdp_md>(),
20usize,
concat!("Size of: ", stringify!(xdp_md))
);
assert_eq!(
::std::mem::align_of::<xdp_md>(),
4usize,
concat!("Alignment of ", stringify!(xdp_md))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<xdp_md>())).data as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xdp_md),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<xdp_md>())).data_end as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(xdp_md),
"::",
stringify!(data_end)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<xdp_md>())).data_meta as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(xdp_md),
"::",
stringify!(data_meta)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<xdp_md>())).ingress_ifindex as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(xdp_md),
"::",
stringify!(ingress_ifindex)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<xdp_md>())).rx_queue_index as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(xdp_md),
"::",
stringify!(rx_queue_index)
)
);
}
pub const sk_action_SK_DROP: sk_action = 0;
pub const sk_action_SK_PASS: sk_action = 1;
pub type sk_action = u32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_prog_info {
pub type_: __u32,
pub id: __u32,
pub tag: [__u8; 8usize],
pub jited_prog_len: __u32,
pub xlated_prog_len: __u32,
pub jited_prog_insns: __u64,
pub xlated_prog_insns: __u64,
pub load_time: __u64,
pub created_by_uid: __u32,
pub nr_map_ids: __u32,
pub map_ids: __u64,
pub name: [::std::os::raw::c_char; 16usize],
pub ifindex: __u32,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u8>,
pub netns_dev: __u64,
pub netns_ino: __u64,
pub nr_jited_ksyms: __u32,
pub nr_jited_func_lens: __u32,
pub jited_ksyms: __u64,
pub jited_func_lens: __u64,
pub btf_id: __u32,
pub func_info_rec_size: __u32,
pub func_info: __u64,
pub nr_func_info: __u32,
pub nr_line_info: __u32,
pub line_info: __u64,
pub jited_line_info: __u64,
pub nr_jited_line_info: __u32,
pub line_info_rec_size: __u32,
pub jited_line_info_rec_size: __u32,
pub nr_prog_tags: __u32,
pub prog_tags: __u64,
pub run_time_ns: __u64,
pub run_cnt: __u64,
}
#[test]
fn bindgen_test_layout_bpf_prog_info() {
assert_eq!(
::std::mem::size_of::<bpf_prog_info>(),
208usize,
concat!("Size of: ", stringify!(bpf_prog_info))
);
assert_eq!(
::std::mem::align_of::<bpf_prog_info>(),
8usize,
concat!("Alignment of ", stringify!(bpf_prog_info))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).id as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).tag as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(tag)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).jited_prog_len as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(jited_prog_len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).xlated_prog_len as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(xlated_prog_len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).jited_prog_insns as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(jited_prog_insns)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).xlated_prog_insns as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(xlated_prog_insns)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).load_time as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(load_time)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).created_by_uid as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(created_by_uid)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).nr_map_ids as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(nr_map_ids)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).map_ids as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(map_ids)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).name as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).ifindex as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(ifindex)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).netns_dev as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(netns_dev)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).netns_ino as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(netns_ino)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).nr_jited_ksyms as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(nr_jited_ksyms)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_prog_info>())).nr_jited_func_lens as *const _ as usize
},
108usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(nr_jited_func_lens)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).jited_ksyms as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(jited_ksyms)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).jited_func_lens as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(jited_func_lens)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).btf_id as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(btf_id)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_prog_info>())).func_info_rec_size as *const _ as usize
},
132usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(func_info_rec_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).func_info as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(func_info)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).nr_func_info as *const _ as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(nr_func_info)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).nr_line_info as *const _ as usize },
148usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(nr_line_info)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).line_info as *const _ as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(line_info)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).jited_line_info as *const _ as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(jited_line_info)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_prog_info>())).nr_jited_line_info as *const _ as usize
},
168usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(nr_jited_line_info)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_prog_info>())).line_info_rec_size as *const _ as usize
},
172usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(line_info_rec_size)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_prog_info>())).jited_line_info_rec_size as *const _ as usize
},
176usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(jited_line_info_rec_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).nr_prog_tags as *const _ as usize },
180usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(nr_prog_tags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).prog_tags as *const _ as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(prog_tags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).run_time_ns as *const _ as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(run_time_ns)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_prog_info>())).run_cnt as *const _ as usize },
200usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(run_cnt)
)
);
}
impl bpf_prog_info {
#[inline]
pub fn gpl_compatible(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_gpl_compatible(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(gpl_compatible: __u32) -> __BindgenBitfieldUnit<[u8; 4usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u8> =
Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let gpl_compatible: u32 = unsafe { ::std::mem::transmute(gpl_compatible) };
gpl_compatible as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_map_info {
pub type_: __u32,
pub id: __u32,
pub key_size: __u32,
pub value_size: __u32,
pub max_entries: __u32,
pub map_flags: __u32,
pub name: [::std::os::raw::c_char; 16usize],
pub ifindex: __u32,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u8>,
pub netns_dev: __u64,
pub netns_ino: __u64,
pub btf_id: __u32,
pub btf_key_type_id: __u32,
pub btf_value_type_id: __u32,
}
#[test]
fn bindgen_test_layout_bpf_map_info() {
assert_eq!(
::std::mem::size_of::<bpf_map_info>(),
80usize,
concat!("Size of: ", stringify!(bpf_map_info))
);
assert_eq!(
::std::mem::align_of::<bpf_map_info>(),
8usize,
concat!("Alignment of ", stringify!(bpf_map_info))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_map_info>())).type_ as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_map_info>())).id as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_map_info>())).key_size as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(key_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_map_info>())).value_size as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(value_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_map_info>())).max_entries as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(max_entries)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_map_info>())).map_flags as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(map_flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_map_info>())).name as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_map_info>())).ifindex as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(ifindex)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_map_info>())).netns_dev as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(netns_dev)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_map_info>())).netns_ino as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(netns_ino)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_map_info>())).btf_id as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(btf_id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_map_info>())).btf_key_type_id as *const _ as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(btf_key_type_id)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_map_info>())).btf_value_type_id as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(btf_value_type_id)
)
);
}
impl bpf_map_info {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u8> =
Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_btf_info {
pub btf: __u64,
pub btf_size: __u32,
pub id: __u32,
}
#[test]
fn bindgen_test_layout_bpf_btf_info() {
assert_eq!(
::std::mem::size_of::<bpf_btf_info>(),
16usize,
concat!("Size of: ", stringify!(bpf_btf_info))
);
assert_eq!(
::std::mem::align_of::<bpf_btf_info>(),
8usize,
concat!("Alignment of ", stringify!(bpf_btf_info))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_btf_info>())).btf as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_btf_info),
"::",
stringify!(btf)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_btf_info>())).btf_size as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_btf_info),
"::",
stringify!(btf_size)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_btf_info>())).id as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_btf_info),
"::",
stringify!(id)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_sock_addr {
pub user_family: __u32,
pub user_ip4: __u32,
pub user_ip6: [__u32; 4usize],
pub user_port: __u32,
pub family: __u32,
pub type_: __u32,
pub protocol: __u32,
pub msg_src_ip4: __u32,
pub msg_src_ip6: [__u32; 4usize],
pub __bindgen_anon_1: bpf_sock_addr__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_sock_addr__bindgen_ty_1 {
pub sk: *mut bpf_sock,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize], u8>,
_bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout_bpf_sock_addr__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<bpf_sock_addr__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(bpf_sock_addr__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_sock_addr__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(bpf_sock_addr__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_addr__bindgen_ty_1>())).sk as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr__bindgen_ty_1),
"::",
stringify!(sk)
)
);
}
impl Default for bpf_sock_addr__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_sock_addr__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_sock_addr__bindgen_ty_1 {{ union }}")
}
}
impl bpf_sock_addr__bindgen_ty_1 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize], u8> =
Default::default();
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_bpf_sock_addr() {
assert_eq!(
::std::mem::size_of::<bpf_sock_addr>(),
72usize,
concat!("Size of: ", stringify!(bpf_sock_addr))
);
assert_eq!(
::std::mem::align_of::<bpf_sock_addr>(),
8usize,
concat!("Alignment of ", stringify!(bpf_sock_addr))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_addr>())).user_family as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(user_family)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_addr>())).user_ip4 as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(user_ip4)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_addr>())).user_ip6 as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(user_ip6)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_addr>())).user_port as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(user_port)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_addr>())).family as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(family)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_addr>())).type_ as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_addr>())).protocol as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(protocol)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_addr>())).msg_src_ip4 as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(msg_src_ip4)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_addr>())).msg_src_ip6 as *const _ as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(msg_src_ip6)
)
);
}
impl Default for bpf_sock_addr {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_sock_addr {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! ( f , "bpf_sock_addr {{ user_family: {:?}, user_ip4: {:?}, user_ip6: {:?}, user_port: {:?}, family: {:?}, type: {:?}, protocol: {:?}, msg_src_ip4: {:?}, msg_src_ip6: {:?}, __bindgen_anon_1: {:?} }}" , self . user_family , self . user_ip4 , self . user_ip6 , self . user_port , self . family , self . type_ , self . protocol , self . msg_src_ip4 , self . msg_src_ip6 , self . __bindgen_anon_1 )
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_sock_ops {
pub op: __u32,
pub __bindgen_anon_1: bpf_sock_ops__bindgen_ty_1,
pub family: __u32,
pub remote_ip4: __u32,
pub local_ip4: __u32,
pub remote_ip6: [__u32; 4usize],
pub local_ip6: [__u32; 4usize],
pub remote_port: __u32,
pub local_port: __u32,
pub is_fullsock: __u32,
pub snd_cwnd: __u32,
pub srtt_us: __u32,
pub bpf_sock_ops_cb_flags: __u32,
pub state: __u32,
pub rtt_min: __u32,
pub snd_ssthresh: __u32,
pub rcv_nxt: __u32,
pub snd_nxt: __u32,
pub snd_una: __u32,
pub mss_cache: __u32,
pub ecn_flags: __u32,
pub rate_delivered: __u32,
pub rate_interval_us: __u32,
pub packets_out: __u32,
pub retrans_out: __u32,
pub total_retrans: __u32,
pub segs_in: __u32,
pub data_segs_in: __u32,
pub segs_out: __u32,
pub data_segs_out: __u32,
pub lost_out: __u32,
pub sacked_out: __u32,
pub sk_txhash: __u32,
pub bytes_received: __u64,
pub bytes_acked: __u64,
pub __bindgen_anon_2: bpf_sock_ops__bindgen_ty_2,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_sock_ops__bindgen_ty_1 {
pub args: [__u32; 4usize],
pub reply: __u32,
pub replylong: [__u32; 4usize],
_bindgen_union_align: [u32; 4usize],
}
#[test]
fn bindgen_test_layout_bpf_sock_ops__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<bpf_sock_ops__bindgen_ty_1>(),
16usize,
concat!("Size of: ", stringify!(bpf_sock_ops__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_sock_ops__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(bpf_sock_ops__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops__bindgen_ty_1>())).args as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops__bindgen_ty_1),
"::",
stringify!(args)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_sock_ops__bindgen_ty_1>())).reply as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops__bindgen_ty_1),
"::",
stringify!(reply)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_sock_ops__bindgen_ty_1>())).replylong as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops__bindgen_ty_1),
"::",
stringify!(replylong)
)
);
}
impl Default for bpf_sock_ops__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_sock_ops__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_sock_ops__bindgen_ty_1 {{ union }}")
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_sock_ops__bindgen_ty_2 {
pub sk: *mut bpf_sock,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize], u8>,
_bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout_bpf_sock_ops__bindgen_ty_2() {
assert_eq!(
::std::mem::size_of::<bpf_sock_ops__bindgen_ty_2>(),
8usize,
concat!("Size of: ", stringify!(bpf_sock_ops__bindgen_ty_2))
);
assert_eq!(
::std::mem::align_of::<bpf_sock_ops__bindgen_ty_2>(),
8usize,
concat!("Alignment of ", stringify!(bpf_sock_ops__bindgen_ty_2))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops__bindgen_ty_2>())).sk as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops__bindgen_ty_2),
"::",
stringify!(sk)
)
);
}
impl Default for bpf_sock_ops__bindgen_ty_2 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_sock_ops__bindgen_ty_2 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_sock_ops__bindgen_ty_2 {{ union }}")
}
}
impl bpf_sock_ops__bindgen_ty_2 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize], u8> =
Default::default();
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_bpf_sock_ops() {
assert_eq!(
::std::mem::size_of::<bpf_sock_ops>(),
192usize,
concat!("Size of: ", stringify!(bpf_sock_ops))
);
assert_eq!(
::std::mem::align_of::<bpf_sock_ops>(),
8usize,
concat!("Alignment of ", stringify!(bpf_sock_ops))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).op as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(op)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).family as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(family)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).remote_ip4 as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(remote_ip4)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).local_ip4 as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(local_ip4)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).remote_ip6 as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(remote_ip6)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).local_ip6 as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(local_ip6)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).remote_port as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(remote_port)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).local_port as *const _ as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(local_port)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).is_fullsock as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(is_fullsock)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).snd_cwnd as *const _ as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(snd_cwnd)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).srtt_us as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(srtt_us)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_sock_ops>())).bpf_sock_ops_cb_flags as *const _ as usize
},
84usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(bpf_sock_ops_cb_flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).state as *const _ as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).rtt_min as *const _ as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(rtt_min)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).snd_ssthresh as *const _ as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(snd_ssthresh)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).rcv_nxt as *const _ as usize },
100usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(rcv_nxt)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).snd_nxt as *const _ as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(snd_nxt)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).snd_una as *const _ as usize },
108usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(snd_una)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).mss_cache as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(mss_cache)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).ecn_flags as *const _ as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(ecn_flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).rate_delivered as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(rate_delivered)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).rate_interval_us as *const _ as usize },
124usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(rate_interval_us)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).packets_out as *const _ as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(packets_out)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).retrans_out as *const _ as usize },
132usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(retrans_out)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).total_retrans as *const _ as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(total_retrans)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).segs_in as *const _ as usize },
140usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(segs_in)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).data_segs_in as *const _ as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(data_segs_in)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).segs_out as *const _ as usize },
148usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(segs_out)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).data_segs_out as *const _ as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(data_segs_out)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).lost_out as *const _ as usize },
156usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(lost_out)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).sacked_out as *const _ as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(sacked_out)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).sk_txhash as *const _ as usize },
164usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(sk_txhash)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).bytes_received as *const _ as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(bytes_received)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sock_ops>())).bytes_acked as *const _ as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(bytes_acked)
)
);
}
impl Default for bpf_sock_ops {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_sock_ops {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! ( f , "bpf_sock_ops {{ op: {:?}, __bindgen_anon_1: {:?}, family: {:?}, remote_ip4: {:?}, local_ip4: {:?}, remote_ip6: {:?}, local_ip6: {:?}, remote_port: {:?}, local_port: {:?}, is_fullsock: {:?}, snd_cwnd: {:?}, srtt_us: {:?}, bpf_sock_ops_cb_flags: {:?}, state: {:?}, rtt_min: {:?}, snd_ssthresh: {:?}, rcv_nxt: {:?}, snd_nxt: {:?}, snd_una: {:?}, mss_cache: {:?}, ecn_flags: {:?}, rate_delivered: {:?}, rate_interval_us: {:?}, packets_out: {:?}, retrans_out: {:?}, total_retrans: {:?}, segs_in: {:?}, data_segs_in: {:?}, segs_out: {:?}, data_segs_out: {:?}, lost_out: {:?}, sacked_out: {:?}, sk_txhash: {:?}, bytes_received: {:?}, bytes_acked: {:?}, __bindgen_anon_2: {:?} }}" , self . op , self . __bindgen_anon_1 , self . family , self . remote_ip4 , self . local_ip4 , self . remote_ip6 , self . local_ip6 , self . remote_port , self . local_port , self . is_fullsock , self . snd_cwnd , self . srtt_us , self . bpf_sock_ops_cb_flags , self . state , self . rtt_min , self . snd_ssthresh , self . rcv_nxt , self . snd_nxt , self . snd_una , self . mss_cache , self . ecn_flags , self . rate_delivered , self . rate_interval_us , self . packets_out , self . retrans_out , self . total_retrans , self . segs_in , self . data_segs_in , self . segs_out , self . data_segs_out , self . lost_out , self . sacked_out , self . sk_txhash , self . bytes_received , self . bytes_acked , self . __bindgen_anon_2 )
}
}
pub const BPF_SOCK_OPS_VOID: _bindgen_ty_2 = 0;
pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_2 = 1;
pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_2 = 2;
pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_2 = 3;
pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_2 = 4;
pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_2 = 5;
pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_2 = 6;
pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_2 = 7;
pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_2 = 8;
pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_2 = 9;
pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_2 = 10;
pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_2 = 11;
pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_2 = 12;
pub type _bindgen_ty_2 = u32;
pub const BPF_TCP_ESTABLISHED: _bindgen_ty_3 = 1;
pub const BPF_TCP_SYN_SENT: _bindgen_ty_3 = 2;
pub const BPF_TCP_SYN_RECV: _bindgen_ty_3 = 3;
pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_3 = 4;
pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_3 = 5;
pub const BPF_TCP_TIME_WAIT: _bindgen_ty_3 = 6;
pub const BPF_TCP_CLOSE: _bindgen_ty_3 = 7;
pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_3 = 8;
pub const BPF_TCP_LAST_ACK: _bindgen_ty_3 = 9;
pub const BPF_TCP_LISTEN: _bindgen_ty_3 = 10;
pub const BPF_TCP_CLOSING: _bindgen_ty_3 = 11;
pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_3 = 12;
pub const BPF_TCP_MAX_STATES: _bindgen_ty_3 = 13;
pub type _bindgen_ty_3 = u32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_perf_event_value {
pub counter: __u64,
pub enabled: __u64,
pub running: __u64,
}
#[test]
fn bindgen_test_layout_bpf_perf_event_value() {
assert_eq!(
::std::mem::size_of::<bpf_perf_event_value>(),
24usize,
concat!("Size of: ", stringify!(bpf_perf_event_value))
);
assert_eq!(
::std::mem::align_of::<bpf_perf_event_value>(),
8usize,
concat!("Alignment of ", stringify!(bpf_perf_event_value))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_perf_event_value>())).counter as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_perf_event_value),
"::",
stringify!(counter)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_perf_event_value>())).enabled as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_perf_event_value),
"::",
stringify!(enabled)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_perf_event_value>())).running as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_perf_event_value),
"::",
stringify!(running)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_cgroup_dev_ctx {
pub access_type: __u32,
pub major: __u32,
pub minor: __u32,
}
#[test]
fn bindgen_test_layout_bpf_cgroup_dev_ctx() {
assert_eq!(
::std::mem::size_of::<bpf_cgroup_dev_ctx>(),
12usize,
concat!("Size of: ", stringify!(bpf_cgroup_dev_ctx))
);
assert_eq!(
::std::mem::align_of::<bpf_cgroup_dev_ctx>(),
4usize,
concat!("Alignment of ", stringify!(bpf_cgroup_dev_ctx))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_cgroup_dev_ctx>())).access_type as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_cgroup_dev_ctx),
"::",
stringify!(access_type)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_cgroup_dev_ctx>())).major as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_cgroup_dev_ctx),
"::",
stringify!(major)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_cgroup_dev_ctx>())).minor as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_cgroup_dev_ctx),
"::",
stringify!(minor)
)
);
}
pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_4 = 0;
pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_4 = 1;
pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_4 = 2;
pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_4 = 3;
pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_4 = 4;
pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_4 = 5;
pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_4 = 6;
pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_4 = 7;
pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_4 = 8;
pub type _bindgen_ty_4 = u32;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_fib_lookup {
pub family: __u8,
pub l4_protocol: __u8,
pub sport: __be16,
pub dport: __be16,
pub tot_len: __u16,
pub ifindex: __u32,
pub __bindgen_anon_1: bpf_fib_lookup__bindgen_ty_1,
pub __bindgen_anon_2: bpf_fib_lookup__bindgen_ty_2,
pub __bindgen_anon_3: bpf_fib_lookup__bindgen_ty_3,
pub h_vlan_proto: __be16,
pub h_vlan_TCI: __be16,
pub smac: [__u8; 6usize],
pub dmac: [__u8; 6usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_fib_lookup__bindgen_ty_1 {
pub tos: __u8,
pub flowinfo: __be32,
pub rt_metric: __u32,
_bindgen_union_align: u32,
}
#[test]
fn bindgen_test_layout_bpf_fib_lookup__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<bpf_fib_lookup__bindgen_ty_1>(),
4usize,
concat!("Size of: ", stringify!(bpf_fib_lookup__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_fib_lookup__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(bpf_fib_lookup__bindgen_ty_1))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_fib_lookup__bindgen_ty_1>())).tos as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup__bindgen_ty_1),
"::",
stringify!(tos)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_fib_lookup__bindgen_ty_1>())).flowinfo as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup__bindgen_ty_1),
"::",
stringify!(flowinfo)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_fib_lookup__bindgen_ty_1>())).rt_metric as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup__bindgen_ty_1),
"::",
stringify!(rt_metric)
)
);
}
impl Default for bpf_fib_lookup__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_fib_lookup__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_fib_lookup__bindgen_ty_1 {{ union }}")
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_fib_lookup__bindgen_ty_2 {
pub ipv4_src: __be32,
pub ipv6_src: [__u32; 4usize],
_bindgen_union_align: [u32; 4usize],
}
#[test]
fn bindgen_test_layout_bpf_fib_lookup__bindgen_ty_2() {
assert_eq!(
::std::mem::size_of::<bpf_fib_lookup__bindgen_ty_2>(),
16usize,
concat!("Size of: ", stringify!(bpf_fib_lookup__bindgen_ty_2))
);
assert_eq!(
::std::mem::align_of::<bpf_fib_lookup__bindgen_ty_2>(),
4usize,
concat!("Alignment of ", stringify!(bpf_fib_lookup__bindgen_ty_2))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_fib_lookup__bindgen_ty_2>())).ipv4_src as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup__bindgen_ty_2),
"::",
stringify!(ipv4_src)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_fib_lookup__bindgen_ty_2>())).ipv6_src as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup__bindgen_ty_2),
"::",
stringify!(ipv6_src)
)
);
}
impl Default for bpf_fib_lookup__bindgen_ty_2 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_fib_lookup__bindgen_ty_2 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_fib_lookup__bindgen_ty_2 {{ union }}")
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_fib_lookup__bindgen_ty_3 {
pub ipv4_dst: __be32,
pub ipv6_dst: [__u32; 4usize],
_bindgen_union_align: [u32; 4usize],
}
#[test]
fn bindgen_test_layout_bpf_fib_lookup__bindgen_ty_3() {
assert_eq!(
::std::mem::size_of::<bpf_fib_lookup__bindgen_ty_3>(),
16usize,
concat!("Size of: ", stringify!(bpf_fib_lookup__bindgen_ty_3))
);
assert_eq!(
::std::mem::align_of::<bpf_fib_lookup__bindgen_ty_3>(),
4usize,
concat!("Alignment of ", stringify!(bpf_fib_lookup__bindgen_ty_3))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_fib_lookup__bindgen_ty_3>())).ipv4_dst as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup__bindgen_ty_3),
"::",
stringify!(ipv4_dst)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_fib_lookup__bindgen_ty_3>())).ipv6_dst as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup__bindgen_ty_3),
"::",
stringify!(ipv6_dst)
)
);
}
impl Default for bpf_fib_lookup__bindgen_ty_3 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_fib_lookup__bindgen_ty_3 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_fib_lookup__bindgen_ty_3 {{ union }}")
}
}
#[test]
fn bindgen_test_layout_bpf_fib_lookup() {
assert_eq!(
::std::mem::size_of::<bpf_fib_lookup>(),
64usize,
concat!("Size of: ", stringify!(bpf_fib_lookup))
);
assert_eq!(
::std::mem::align_of::<bpf_fib_lookup>(),
4usize,
concat!("Alignment of ", stringify!(bpf_fib_lookup))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_fib_lookup>())).family as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(family)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_fib_lookup>())).l4_protocol as *const _ as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(l4_protocol)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_fib_lookup>())).sport as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(sport)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_fib_lookup>())).dport as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(dport)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_fib_lookup>())).tot_len as *const _ as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(tot_len)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_fib_lookup>())).ifindex as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(ifindex)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_fib_lookup>())).h_vlan_proto as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(h_vlan_proto)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_fib_lookup>())).h_vlan_TCI as *const _ as usize },
50usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(h_vlan_TCI)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_fib_lookup>())).smac as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(smac)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_fib_lookup>())).dmac as *const _ as usize },
58usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(dmac)
)
);
}
impl Default for bpf_fib_lookup {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_fib_lookup {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! ( f , "bpf_fib_lookup {{ family: {:?}, l4_protocol: {:?}, sport: {:?}, dport: {:?}, tot_len: {:?}, ifindex: {:?}, __bindgen_anon_1: {:?}, __bindgen_anon_2: {:?}, __bindgen_anon_3: {:?}, h_vlan_proto: {:?}, h_vlan_TCI: {:?}, smac: {:?}, dmac: {:?} }}" , self . family , self . l4_protocol , self . sport , self . dport , self . tot_len , self . ifindex , self . __bindgen_anon_1 , self . __bindgen_anon_2 , self . __bindgen_anon_3 , self . h_vlan_proto , self . h_vlan_TCI , self . smac , self . dmac )
}
}
pub const bpf_task_fd_type_BPF_FD_TYPE_RAW_TRACEPOINT: bpf_task_fd_type = 0;
pub const bpf_task_fd_type_BPF_FD_TYPE_TRACEPOINT: bpf_task_fd_type = 1;
pub const bpf_task_fd_type_BPF_FD_TYPE_KPROBE: bpf_task_fd_type = 2;
pub const bpf_task_fd_type_BPF_FD_TYPE_KRETPROBE: bpf_task_fd_type = 3;
pub const bpf_task_fd_type_BPF_FD_TYPE_UPROBE: bpf_task_fd_type = 4;
pub const bpf_task_fd_type_BPF_FD_TYPE_URETPROBE: bpf_task_fd_type = 5;
pub type bpf_task_fd_type = u32;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_flow_keys {
pub nhoff: __u16,
pub thoff: __u16,
pub addr_proto: __u16,
pub is_frag: __u8,
pub is_first_frag: __u8,
pub is_encap: __u8,
pub ip_proto: __u8,
pub n_proto: __be16,
pub sport: __be16,
pub dport: __be16,
pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_flow_keys__bindgen_ty_1 {
pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1__bindgen_ty_1,
pub __bindgen_anon_2: bpf_flow_keys__bindgen_ty_1__bindgen_ty_2,
_bindgen_union_align: [u32; 8usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 {
pub ipv4_src: __be32,
pub ipv4_dst: __be32,
}
#[test]
fn bindgen_test_layout_bpf_flow_keys__bindgen_ty_1__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<bpf_flow_keys__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(bpf_flow_keys__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<bpf_flow_keys__bindgen_ty_1__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(bpf_flow_keys__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_flow_keys__bindgen_ty_1__bindgen_ty_1>())).ipv4_src
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(ipv4_src)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_flow_keys__bindgen_ty_1__bindgen_ty_1>())).ipv4_dst
as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(ipv4_dst)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 {
pub ipv6_src: [__u32; 4usize],
pub ipv6_dst: [__u32; 4usize],
}
#[test]
fn bindgen_test_layout_bpf_flow_keys__bindgen_ty_1__bindgen_ty_2() {
assert_eq!(
::std::mem::size_of::<bpf_flow_keys__bindgen_ty_1__bindgen_ty_2>(),
32usize,
concat!(
"Size of: ",
stringify!(bpf_flow_keys__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<bpf_flow_keys__bindgen_ty_1__bindgen_ty_2>(),
4usize,
concat!(
"Alignment of ",
stringify!(bpf_flow_keys__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_flow_keys__bindgen_ty_1__bindgen_ty_2>())).ipv6_src
as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(ipv6_src)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_flow_keys__bindgen_ty_1__bindgen_ty_2>())).ipv6_dst
as *const _ as usize
},
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(ipv6_dst)
)
);
}
#[test]
fn bindgen_test_layout_bpf_flow_keys__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<bpf_flow_keys__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(bpf_flow_keys__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_flow_keys__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(bpf_flow_keys__bindgen_ty_1))
);
}
impl Default for bpf_flow_keys__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_flow_keys__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_flow_keys__bindgen_ty_1 {{ union }}")
}
}
#[test]
fn bindgen_test_layout_bpf_flow_keys() {
assert_eq!(
::std::mem::size_of::<bpf_flow_keys>(),
48usize,
concat!("Size of: ", stringify!(bpf_flow_keys))
);
assert_eq!(
::std::mem::align_of::<bpf_flow_keys>(),
4usize,
concat!("Alignment of ", stringify!(bpf_flow_keys))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_flow_keys>())).nhoff as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(nhoff)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_flow_keys>())).thoff as *const _ as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(thoff)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_flow_keys>())).addr_proto as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(addr_proto)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_flow_keys>())).is_frag as *const _ as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(is_frag)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_flow_keys>())).is_first_frag as *const _ as usize },
7usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(is_first_frag)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_flow_keys>())).is_encap as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(is_encap)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_flow_keys>())).ip_proto as *const _ as usize },
9usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(ip_proto)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_flow_keys>())).n_proto as *const _ as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(n_proto)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_flow_keys>())).sport as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(sport)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_flow_keys>())).dport as *const _ as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(dport)
)
);
}
impl Default for bpf_flow_keys {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_flow_keys {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! ( f , "bpf_flow_keys {{ nhoff: {:?}, thoff: {:?}, addr_proto: {:?}, is_frag: {:?}, is_first_frag: {:?}, is_encap: {:?}, ip_proto: {:?}, n_proto: {:?}, sport: {:?}, dport: {:?}, __bindgen_anon_1: {:?} }}" , self . nhoff , self . thoff , self . addr_proto , self . is_frag , self . is_first_frag , self . is_encap , self . ip_proto , self . n_proto , self . sport , self . dport , self . __bindgen_anon_1 )
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_func_info {
pub insn_off: __u32,
pub type_id: __u32,
}
#[test]
fn bindgen_test_layout_bpf_func_info() {
assert_eq!(
::std::mem::size_of::<bpf_func_info>(),
8usize,
concat!("Size of: ", stringify!(bpf_func_info))
);
assert_eq!(
::std::mem::align_of::<bpf_func_info>(),
4usize,
concat!("Alignment of ", stringify!(bpf_func_info))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_func_info>())).insn_off as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_func_info),
"::",
stringify!(insn_off)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_func_info>())).type_id as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_func_info),
"::",
stringify!(type_id)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_line_info {
pub insn_off: __u32,
pub file_name_off: __u32,
pub line_off: __u32,
pub line_col: __u32,
}
#[test]
fn bindgen_test_layout_bpf_line_info() {
assert_eq!(
::std::mem::size_of::<bpf_line_info>(),
16usize,
concat!("Size of: ", stringify!(bpf_line_info))
);
assert_eq!(
::std::mem::align_of::<bpf_line_info>(),
4usize,
concat!("Alignment of ", stringify!(bpf_line_info))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_line_info>())).insn_off as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_line_info),
"::",
stringify!(insn_off)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_line_info>())).file_name_off as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_line_info),
"::",
stringify!(file_name_off)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_line_info>())).line_off as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_line_info),
"::",
stringify!(line_off)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_line_info>())).line_col as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_line_info),
"::",
stringify!(line_col)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_spin_lock {
pub val: __u32,
}
#[test]
fn bindgen_test_layout_bpf_spin_lock() {
assert_eq!(
::std::mem::size_of::<bpf_spin_lock>(),
4usize,
concat!("Size of: ", stringify!(bpf_spin_lock))
);
assert_eq!(
::std::mem::align_of::<bpf_spin_lock>(),
4usize,
concat!("Alignment of ", stringify!(bpf_spin_lock))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_spin_lock>())).val as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_spin_lock),
"::",
stringify!(val)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bpf_sysctl {
pub write: __u32,
pub file_pos: __u32,
}
#[test]
fn bindgen_test_layout_bpf_sysctl() {
assert_eq!(
::std::mem::size_of::<bpf_sysctl>(),
8usize,
concat!("Size of: ", stringify!(bpf_sysctl))
);
assert_eq!(
::std::mem::align_of::<bpf_sysctl>(),
4usize,
concat!("Alignment of ", stringify!(bpf_sysctl))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sysctl>())).write as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sysctl),
"::",
stringify!(write)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sysctl>())).file_pos as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_sysctl),
"::",
stringify!(file_pos)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_sockopt {
pub __bindgen_anon_1: bpf_sockopt__bindgen_ty_1,
pub __bindgen_anon_2: bpf_sockopt__bindgen_ty_2,
pub __bindgen_anon_3: bpf_sockopt__bindgen_ty_3,
pub level: __s32,
pub optname: __s32,
pub optlen: __s32,
pub retval: __s32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_sockopt__bindgen_ty_1 {
pub sk: *mut bpf_sock,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize], u8>,
_bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout_bpf_sockopt__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<bpf_sockopt__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(bpf_sockopt__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_sockopt__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(bpf_sockopt__bindgen_ty_1))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sockopt__bindgen_ty_1>())).sk as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sockopt__bindgen_ty_1),
"::",
stringify!(sk)
)
);
}
impl Default for bpf_sockopt__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_sockopt__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_sockopt__bindgen_ty_1 {{ union }}")
}
}
impl bpf_sockopt__bindgen_ty_1 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize], u8> =
Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_sockopt__bindgen_ty_2 {
pub optval: *mut ::std::os::raw::c_void,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize], u8>,
_bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout_bpf_sockopt__bindgen_ty_2() {
assert_eq!(
::std::mem::size_of::<bpf_sockopt__bindgen_ty_2>(),
8usize,
concat!("Size of: ", stringify!(bpf_sockopt__bindgen_ty_2))
);
assert_eq!(
::std::mem::align_of::<bpf_sockopt__bindgen_ty_2>(),
8usize,
concat!("Alignment of ", stringify!(bpf_sockopt__bindgen_ty_2))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_sockopt__bindgen_ty_2>())).optval as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sockopt__bindgen_ty_2),
"::",
stringify!(optval)
)
);
}
impl Default for bpf_sockopt__bindgen_ty_2 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_sockopt__bindgen_ty_2 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_sockopt__bindgen_ty_2 {{ union }}")
}
}
impl bpf_sockopt__bindgen_ty_2 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize], u8> =
Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_sockopt__bindgen_ty_3 {
pub optval_end: *mut ::std::os::raw::c_void,
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize], u8>,
_bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout_bpf_sockopt__bindgen_ty_3() {
assert_eq!(
::std::mem::size_of::<bpf_sockopt__bindgen_ty_3>(),
8usize,
concat!("Size of: ", stringify!(bpf_sockopt__bindgen_ty_3))
);
assert_eq!(
::std::mem::align_of::<bpf_sockopt__bindgen_ty_3>(),
8usize,
concat!("Alignment of ", stringify!(bpf_sockopt__bindgen_ty_3))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bpf_sockopt__bindgen_ty_3>())).optval_end as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sockopt__bindgen_ty_3),
"::",
stringify!(optval_end)
)
);
}
impl Default for bpf_sockopt__bindgen_ty_3 {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_sockopt__bindgen_ty_3 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "bpf_sockopt__bindgen_ty_3 {{ union }}")
}
}
impl bpf_sockopt__bindgen_ty_3 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize], u8> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize], u8> =
Default::default();
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_bpf_sockopt() {
assert_eq!(
::std::mem::size_of::<bpf_sockopt>(),
40usize,
concat!("Size of: ", stringify!(bpf_sockopt))
);
assert_eq!(
::std::mem::align_of::<bpf_sockopt>(),
8usize,
concat!("Alignment of ", stringify!(bpf_sockopt))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sockopt>())).level as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_sockopt),
"::",
stringify!(level)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sockopt>())).optname as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_sockopt),
"::",
stringify!(optname)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sockopt>())).optlen as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_sockopt),
"::",
stringify!(optlen)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bpf_sockopt>())).retval as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(bpf_sockopt),
"::",
stringify!(retval)
)
);
}
impl Default for bpf_sockopt {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
impl ::std::fmt::Debug for bpf_sockopt {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! ( f , "bpf_sockopt {{ __bindgen_anon_1: {:?}, __bindgen_anon_2: {:?}, __bindgen_anon_3: {:?}, level: {:?}, optname: {:?}, optlen: {:?}, retval: {:?} }}" , self . __bindgen_anon_1 , self . __bindgen_anon_2 , self . __bindgen_anon_3 , self . level , self . optname , self . optlen , self . retval )
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_create_map_attr {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_load_program_attr {
_unused: [u8; 0],
}
pub const bpf_probe_attach_type_BPF_PROBE_ENTRY: bpf_probe_attach_type = 0;
pub const bpf_probe_attach_type_BPF_PROBE_RETURN: bpf_probe_attach_type = 1;
pub type bpf_probe_attach_type = u32;
extern "C" {
pub fn bcc_create_map(
map_type: bpf_map_type,
name: *const ::std::os::raw::c_char,
key_size: ::std::os::raw::c_int,
value_size: ::std::os::raw::c_int,
max_entries: ::std::os::raw::c_int,
map_flags: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bcc_create_map_xattr(
attr: *mut bpf_create_map_attr,
allow_rlimit: bool,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_update_elem(
fd: ::std::os::raw::c_int,
key: *mut ::std::os::raw::c_void,
value: *mut ::std::os::raw::c_void,
flags: ::std::os::raw::c_ulonglong,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_lookup_elem(
fd: ::std::os::raw::c_int,
key: *mut ::std::os::raw::c_void,
value: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_delete_elem(
fd: ::std::os::raw::c_int,
key: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_get_first_key(
fd: ::std::os::raw::c_int,
key: *mut ::std::os::raw::c_void,
key_size: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_get_next_key(
fd: ::std::os::raw::c_int,
key: *mut ::std::os::raw::c_void,
next_key: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bcc_prog_load(
prog_type: bpf_prog_type,
name: *const ::std::os::raw::c_char,
insns: *const bpf_insn,
prog_len: ::std::os::raw::c_int,
license: *const ::std::os::raw::c_char,
kern_version: ::std::os::raw::c_uint,
log_level: ::std::os::raw::c_int,
log_buf: *mut ::std::os::raw::c_char,
log_buf_size: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bcc_prog_load_xattr(
attr: *mut bpf_load_program_attr,
prog_len: ::std::os::raw::c_int,
log_buf: *mut ::std::os::raw::c_char,
log_buf_size: ::std::os::raw::c_uint,
allow_rlimit: bool,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_attach_socket(
sockfd: ::std::os::raw::c_int,
progfd: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_open_raw_sock(name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
pub type perf_reader_raw_cb = ::std::option::Option<
unsafe extern "C" fn(
cb_cookie: *mut ::std::os::raw::c_void,
raw: *mut ::std::os::raw::c_void,
raw_size: ::std::os::raw::c_int,
),
>;
pub type perf_reader_lost_cb =
::std::option::Option<unsafe extern "C" fn(cb_cookie: *mut ::std::os::raw::c_void, lost: u64)>;
extern "C" {
pub fn bpf_attach_kprobe(
progfd: ::std::os::raw::c_int,
attach_type: bpf_probe_attach_type,
ev_name: *const ::std::os::raw::c_char,
fn_name: *const ::std::os::raw::c_char,
fn_offset: u64,
maxactive: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_detach_kprobe(ev_name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_attach_uprobe(
progfd: ::std::os::raw::c_int,
attach_type: bpf_probe_attach_type,
ev_name: *const ::std::os::raw::c_char,
binary_path: *const ::std::os::raw::c_char,
offset: u64,
pid: pid_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_detach_uprobe(ev_name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_attach_tracepoint(
progfd: ::std::os::raw::c_int,
tp_category: *const ::std::os::raw::c_char,
tp_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_detach_tracepoint(
tp_category: *const ::std::os::raw::c_char,
tp_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_attach_raw_tracepoint(
progfd: ::std::os::raw::c_int,
tp_name: *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_open_perf_buffer(
raw_cb: perf_reader_raw_cb,
lost_cb: perf_reader_lost_cb,
cb_cookie: *mut ::std::os::raw::c_void,
pid: ::std::os::raw::c_int,
cpu: ::std::os::raw::c_int,
page_cnt: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn bpf_attach_xdp(
dev_name: *const ::std::os::raw::c_char,
progfd: ::std::os::raw::c_int,
flags: u32,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_attach_perf_event_raw(
progfd: ::std::os::raw::c_int,
perf_event_attr: *mut ::std::os::raw::c_void,
pid: pid_t,
cpu: ::std::os::raw::c_int,
group_fd: ::std::os::raw::c_int,
extra_flags: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_attach_perf_event(
progfd: ::std::os::raw::c_int,
ev_type: u32,
ev_config: u32,
sample_period: u64,
sample_freq: u64,
pid: pid_t,
cpu: ::std::os::raw::c_int,
group_fd: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_open_perf_event(
type_: u32,
config: u64,
pid: ::std::os::raw::c_int,
cpu: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_close_perf_event_fd(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_obj_pin(
fd: ::std::os::raw::c_int,
pathname: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_obj_get(pathname: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_obj_get_info(
prog_map_fd: ::std::os::raw::c_int,
info: *mut ::std::os::raw::c_void,
info_len: *mut u32,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_prog_compute_tag(
insns: *const bpf_insn,
prog_len: ::std::os::raw::c_int,
tag: *mut ::std::os::raw::c_ulonglong,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_prog_get_tag(
fd: ::std::os::raw::c_int,
tag: *mut ::std::os::raw::c_ulonglong,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_prog_get_next_id(start_id: u32, next_id: *mut u32) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_prog_get_fd_by_id(id: u32) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map_get_fd_by_id(id: u32) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_obj_get_info_by_fd(
prog_fd: ::std::os::raw::c_int,
info: *mut ::std::os::raw::c_void,
info_len: *mut u32,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct mod_info {
pub name: *mut ::std::os::raw::c_char,
pub start_addr: u64,
pub end_addr: u64,
pub file_offset: ::std::os::raw::c_ulonglong,
pub dev_major: u64,
pub dev_minor: u64,
pub inode: u64,
}
#[test]
fn bindgen_test_layout_mod_info() {
assert_eq!(
::std::mem::size_of::<mod_info>(),
56usize,
concat!("Size of: ", stringify!(mod_info))
);
assert_eq!(
::std::mem::align_of::<mod_info>(),
8usize,
concat!("Alignment of ", stringify!(mod_info))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<mod_info>())).name as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(mod_info),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<mod_info>())).start_addr as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(mod_info),
"::",
stringify!(start_addr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<mod_info>())).end_addr as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(mod_info),
"::",
stringify!(end_addr)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<mod_info>())).file_offset as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(mod_info),
"::",
stringify!(file_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<mod_info>())).dev_major as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(mod_info),
"::",
stringify!(dev_major)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<mod_info>())).dev_minor as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(mod_info),
"::",
stringify!(dev_minor)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<mod_info>())).inode as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(mod_info),
"::",
stringify!(inode)
)
);
}
impl Default for mod_info {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
pub type bcc_procutils_modulecb = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut mod_info,
arg2: ::std::os::raw::c_int,
arg3: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
pub type bcc_procutils_ksymcb = ::std::option::Option<
unsafe extern "C" fn(
arg1: *const ::std::os::raw::c_char,
arg2: *const ::std::os::raw::c_char,
arg3: u64,
arg4: *mut ::std::os::raw::c_void,
),
>;
extern "C" {
pub fn bcc_procutils_which_so(
libname: *const ::std::os::raw::c_char,
pid: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn bcc_procutils_which(
binpath: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn bcc_mapping_is_file_backed(
mapname: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bcc_procutils_each_module(
pid: ::std::os::raw::c_int,
callback: bcc_procutils_modulecb,
payload: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bcc_procutils_each_ksym(
callback: bcc_procutils_ksymcb,
payload: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bcc_procutils_free(ptr: *const ::std::os::raw::c_char);
}
extern "C" {
pub fn bcc_procutils_language(pid: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bcc_symbol {
pub name: *const ::std::os::raw::c_char,
pub demangle_name: *const ::std::os::raw::c_char,
pub module: *const ::std::os::raw::c_char,
pub offset: u64,
}
#[test]
fn bindgen_test_layout_bcc_symbol() {
assert_eq!(
::std::mem::size_of::<bcc_symbol>(),
32usize,
concat!("Size of: ", stringify!(bcc_symbol))
);
assert_eq!(
::std::mem::align_of::<bcc_symbol>(),
8usize,
concat!("Alignment of ", stringify!(bcc_symbol))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bcc_symbol>())).name as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bcc_symbol),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bcc_symbol>())).demangle_name as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bcc_symbol),
"::",
stringify!(demangle_name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bcc_symbol>())).module as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bcc_symbol),
"::",
stringify!(module)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<bcc_symbol>())).offset as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bcc_symbol),
"::",
stringify!(offset)
)
);
}
impl Default for bcc_symbol {
fn default() -> Self {
unsafe { ::std::mem::zeroed() }
}
}
pub type SYM_CB = ::std::option::Option<
unsafe extern "C" fn(
symname: *const ::std::os::raw::c_char,
addr: u64,
) -> ::std::os::raw::c_int,
>;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct bcc_symbol_option {
pub use_debug_file: ::std::os::raw::c_int,
pub check_debug_file_crc: ::std::os::raw::c_int,
pub lazy_symbolize: ::std::os::raw::c_int,
pub use_symbol_type: u32,
}
#[test]
fn bindgen_test_layout_bcc_symbol_option() {
assert_eq!(
::std::mem::size_of::<bcc_symbol_option>(),
16usize,
concat!("Size of: ", stringify!(bcc_symbol_option))
);
assert_eq!(
::std::mem::align_of::<bcc_symbol_option>(),
4usize,
concat!("Alignment of ", stringify!(bcc_symbol_option))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bcc_symbol_option>())).use_debug_file as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(bcc_symbol_option),
"::",
stringify!(use_debug_file)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bcc_symbol_option>())).check_debug_file_crc as *const _ as usize
},
4usize,
concat!(
"Offset of field: ",
stringify!(bcc_symbol_option),
"::",
stringify!(check_debug_file_crc)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bcc_symbol_option>())).lazy_symbolize as *const _ as usize
},
8usize,
concat!(
"Offset of field: ",
stringify!(bcc_symbol_option),
"::",
stringify!(lazy_symbolize)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<bcc_symbol_option>())).use_symbol_type as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(bcc_symbol_option),
"::",
stringify!(use_symbol_type)
)
);
}
extern "C" {
pub fn bcc_symcache_new(
pid: ::std::os::raw::c_int,
option: *mut bcc_symbol_option,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn bcc_free_symcache(symcache: *mut ::std::os::raw::c_void, pid: ::std::os::raw::c_int);
}
extern "C" {
pub fn bcc_symbol_free_demangle_name(sym: *mut bcc_symbol);
}
extern "C" {
pub fn bcc_symcache_resolve(
symcache: *mut ::std::os::raw::c_void,
addr: u64,
sym: *mut bcc_symbol,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bcc_symcache_resolve_no_demangle(
symcache: *mut ::std::os::raw::c_void,
addr: u64,
sym: *mut bcc_symbol,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bcc_symcache_resolve_name(
resolver: *mut ::std::os::raw::c_void,
module: *const ::std::os::raw::c_char,
name: *const ::std::os::raw::c_char,
addr: *mut u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bcc_symcache_refresh(resolver: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn bcc_resolve_global_addr(
pid: ::std::os::raw::c_int,
module: *const ::std::os::raw::c_char,
address: u64,
inode_match_only: u8,
global: *mut u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bcc_buildsymcache_new() -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn bcc_free_buildsymcache(symcache: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn bcc_buildsymcache_add_module(
resolver: *mut ::std::os::raw::c_void,
module_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bcc_buildsymcache_resolve(
resolver: *mut ::std::os::raw::c_void,
trace: *mut bpf_stack_build_id,
sym: *mut bcc_symbol,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bcc_foreach_function_symbol(
module: *const ::std::os::raw::c_char,
cb: SYM_CB,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bcc_resolve_symname(
module: *const ::std::os::raw::c_char,
symname: *const ::std::os::raw::c_char,
addr: u64,
pid: ::std::os::raw::c_int,
option: *mut bcc_symbol_option,
sym: *mut bcc_symbol,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct perf_reader {
_unused: [u8; 0],
}
extern "C" {
pub fn perf_reader_new(
raw_cb: perf_reader_raw_cb,
lost_cb: perf_reader_lost_cb,
cb_cookie: *mut ::std::os::raw::c_void,
page_cnt: ::std::os::raw::c_int,
) -> *mut perf_reader;
}
extern "C" {
pub fn perf_reader_free(ptr: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn perf_reader_mmap(reader: *mut perf_reader) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn perf_reader_event_read(reader: *mut perf_reader);
}
extern "C" {
pub fn perf_reader_poll(
num_readers: ::std::os::raw::c_int,
readers: *mut *mut perf_reader,
timeout: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn perf_reader_fd(reader: *mut perf_reader) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn perf_reader_set_fd(reader: *mut perf_reader, fd: ::std::os::raw::c_int);
}