/* automatically generated by rust-bindgen 0.65.1 */
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage> {
storage: Storage,
}
impl<Storage> __BindgenBitfieldUnit<Storage> {
#[inline]
pub const fn new(storage: Storage) -> Self {
Self { storage }
}
}
impl<Storage> __BindgenBitfieldUnit<Storage>
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 fn as_ptr(&self) -> *const T {
self as *const _ as *const T
}
#[inline]
pub fn as_mut_ptr(&mut self) -> *mut T {
self as *mut _ as *mut T
}
#[inline]
pub unsafe fn as_slice(&self, len: usize) -> &[T] {
::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")
}
}
pub const _STDIO_H: u32 = 1;
pub const _FEATURES_H: u32 = 1;
pub const _DEFAULT_SOURCE: u32 = 1;
pub const __GLIBC_USE_ISOC2X: u32 = 0;
pub const __USE_ISOC11: u32 = 1;
pub const __USE_ISOC99: u32 = 1;
pub const __USE_ISOC95: u32 = 1;
pub const __USE_POSIX_IMPLICITLY: u32 = 1;
pub const _POSIX_SOURCE: u32 = 1;
pub const _POSIX_C_SOURCE: u32 = 200809;
pub const __USE_POSIX: u32 = 1;
pub const __USE_POSIX2: u32 = 1;
pub const __USE_POSIX199309: u32 = 1;
pub const __USE_POSIX199506: u32 = 1;
pub const __USE_XOPEN2K: u32 = 1;
pub const __USE_XOPEN2K8: u32 = 1;
pub const _ATFILE_SOURCE: u32 = 1;
pub const __WORDSIZE: u32 = 64;
pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
pub const __SYSCALL_WORDSIZE: u32 = 64;
pub const __TIMESIZE: u32 = 64;
pub const __USE_MISC: u32 = 1;
pub const __USE_ATFILE: u32 = 1;
pub const __USE_FORTIFY_LEVEL: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
pub const _STDC_PREDEF_H: u32 = 1;
pub const __STDC_IEC_559__: u32 = 1;
pub const __STDC_IEC_60559_BFP__: u32 = 201404;
pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
pub const __STDC_ISO_10646__: u32 = 201706;
pub const __GNU_LIBRARY__: u32 = 6;
pub const __GLIBC__: u32 = 2;
pub const __GLIBC_MINOR__: u32 = 35;
pub const _SYS_CDEFS_H: u32 = 1;
pub const __glibc_c99_flexarr_available: u32 = 1;
pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
pub const __HAVE_GENERIC_SELECTION: u32 = 1;
pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
pub const __GNUC_VA_LIST: u32 = 1;
pub const _BITS_TYPES_H: u32 = 1;
pub const _BITS_TYPESIZES_H: u32 = 1;
pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
pub const __INO_T_MATCHES_INO64_T: u32 = 1;
pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
pub const __STATFS_MATCHES_STATFS64: u32 = 1;
pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
pub const __FD_SETSIZE: u32 = 1024;
pub const _BITS_TIME64_H: u32 = 1;
pub const _____fpos_t_defined: u32 = 1;
pub const ____mbstate_t_defined: u32 = 1;
pub const _____fpos64_t_defined: u32 = 1;
pub const ____FILE_defined: u32 = 1;
pub const __FILE_defined: u32 = 1;
pub const __struct_FILE_defined: u32 = 1;
pub const _IO_EOF_SEEN: u32 = 16;
pub const _IO_ERR_SEEN: u32 = 32;
pub const _IO_USER_LOCK: u32 = 32768;
pub const _IOFBF: u32 = 0;
pub const _IOLBF: u32 = 1;
pub const _IONBF: u32 = 2;
pub const BUFSIZ: u32 = 8192;
pub const EOF: i32 = -1;
pub const SEEK_SET: u32 = 0;
pub const SEEK_CUR: u32 = 1;
pub const SEEK_END: u32 = 2;
pub const P_tmpdir: &[u8; 5usize] = b"/tmp\0";
pub const _BITS_STDIO_LIM_H: u32 = 1;
pub const L_tmpnam: u32 = 20;
pub const TMP_MAX: u32 = 238328;
pub const FILENAME_MAX: u32 = 4096;
pub const L_ctermid: u32 = 9;
pub const FOPEN_MAX: u32 = 16;
pub const __HAVE_FLOAT128: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT128: u32 = 0;
pub const __HAVE_FLOAT64X: u32 = 1;
pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1;
pub const __HAVE_FLOAT16: u32 = 0;
pub const __HAVE_FLOAT32: u32 = 1;
pub const __HAVE_FLOAT64: u32 = 1;
pub const __HAVE_FLOAT32X: u32 = 1;
pub const __HAVE_FLOAT128X: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT16: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT32: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT64: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0;
pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0;
pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0;
pub const __BITS_PER_LONG: u32 = 64;
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_ATOMIC: u32 = 192;
pub const BPF_XADD: u32 = 192;
pub const BPF_MOV: u32 = 176;
pub const BPF_ARSH: u32 = 192;
pub const BPF_END: u32 = 208;
pub const BPF_TO_LE: u32 = 0;
pub const BPF_TO_BE: u32 = 8;
pub const BPF_FROM_LE: u32 = 0;
pub const BPF_FROM_BE: u32 = 8;
pub const BPF_JNE: u32 = 80;
pub const BPF_JLT: u32 = 160;
pub const BPF_JLE: u32 = 176;
pub const BPF_JSGT: u32 = 96;
pub const BPF_JSGE: u32 = 112;
pub const BPF_JSLT: u32 = 192;
pub const BPF_JSLE: u32 = 208;
pub const BPF_CALL: u32 = 128;
pub const BPF_EXIT: u32 = 144;
pub const BPF_FETCH: u32 = 1;
pub const BPF_XCHG: u32 = 225;
pub const BPF_CMPXCHG: u32 = 241;
pub const BPF_F_ALLOW_OVERRIDE: u32 = 1;
pub const BPF_F_ALLOW_MULTI: u32 = 2;
pub const BPF_F_REPLACE: u32 = 4;
pub const BPF_F_STRICT_ALIGNMENT: u32 = 1;
pub const BPF_F_ANY_ALIGNMENT: u32 = 2;
pub const BPF_F_TEST_RND_HI32: u32 = 4;
pub const BPF_F_TEST_STATE_FREQ: u32 = 8;
pub const BPF_F_SLEEPABLE: u32 = 16;
pub const BPF_PSEUDO_MAP_FD: u32 = 1;
pub const BPF_PSEUDO_MAP_IDX: u32 = 5;
pub const BPF_PSEUDO_MAP_VALUE: u32 = 2;
pub const BPF_PSEUDO_MAP_IDX_VALUE: u32 = 6;
pub const BPF_PSEUDO_BTF_ID: u32 = 3;
pub const BPF_PSEUDO_FUNC: u32 = 4;
pub const BPF_PSEUDO_CALL: u32 = 1;
pub const BPF_PSEUDO_KFUNC_CALL: u32 = 2;
pub const BPF_F_QUERY_EFFECTIVE: u32 = 1;
pub const BPF_F_TEST_RUN_ON_CPU: u32 = 1;
pub const BPF_BUILD_ID_SIZE: u32 = 20;
pub const BPF_OBJ_NAME_LEN: u32 = 16;
pub const XDP_PACKET_HEADROOM: u32 = 256;
pub const BPF_TAG_SIZE: u32 = 8;
pub const _STDINT_H: u32 = 1;
pub const _BITS_WCHAR_H: u32 = 1;
pub const _BITS_STDINT_INTN_H: u32 = 1;
pub const _BITS_STDINT_UINTN_H: u32 = 1;
pub const INT8_MIN: i32 = -128;
pub const INT16_MIN: i32 = -32768;
pub const INT32_MIN: i32 = -2147483648;
pub const INT8_MAX: u32 = 127;
pub const INT16_MAX: u32 = 32767;
pub const INT32_MAX: u32 = 2147483647;
pub const UINT8_MAX: u32 = 255;
pub const UINT16_MAX: u32 = 65535;
pub const UINT32_MAX: u32 = 4294967295;
pub const INT_LEAST8_MIN: i32 = -128;
pub const INT_LEAST16_MIN: i32 = -32768;
pub const INT_LEAST32_MIN: i32 = -2147483648;
pub const INT_LEAST8_MAX: u32 = 127;
pub const INT_LEAST16_MAX: u32 = 32767;
pub const INT_LEAST32_MAX: u32 = 2147483647;
pub const UINT_LEAST8_MAX: u32 = 255;
pub const UINT_LEAST16_MAX: u32 = 65535;
pub const UINT_LEAST32_MAX: u32 = 4294967295;
pub const INT_FAST8_MIN: i32 = -128;
pub const INT_FAST16_MIN: i64 = -9223372036854775808;
pub const INT_FAST32_MIN: i64 = -9223372036854775808;
pub const INT_FAST8_MAX: u32 = 127;
pub const INT_FAST16_MAX: u64 = 9223372036854775807;
pub const INT_FAST32_MAX: u64 = 9223372036854775807;
pub const UINT_FAST8_MAX: u32 = 255;
pub const UINT_FAST16_MAX: i32 = -1;
pub const UINT_FAST32_MAX: i32 = -1;
pub const INTPTR_MIN: i64 = -9223372036854775808;
pub const INTPTR_MAX: u64 = 9223372036854775807;
pub const UINTPTR_MAX: i32 = -1;
pub const PTRDIFF_MIN: i64 = -9223372036854775808;
pub const PTRDIFF_MAX: u64 = 9223372036854775807;
pub const SIG_ATOMIC_MIN: i32 = -2147483648;
pub const SIG_ATOMIC_MAX: u32 = 2147483647;
pub const SIZE_MAX: i32 = -1;
pub const WINT_MIN: u32 = 0;
pub const WINT_MAX: u32 = 4294967295;
pub const true_: u32 = 1;
pub const false_: u32 = 0;
pub const __bool_true_false_are_defined: u32 = 1;
pub const _SYS_TYPES_H: u32 = 1;
pub const __clock_t_defined: u32 = 1;
pub const __clockid_t_defined: u32 = 1;
pub const __time_t_defined: u32 = 1;
pub const __timer_t_defined: u32 = 1;
pub const __BIT_TYPES_DEFINED__: u32 = 1;
pub const _ENDIAN_H: u32 = 1;
pub const _BITS_ENDIAN_H: u32 = 1;
pub const __LITTLE_ENDIAN: u32 = 1234;
pub const __BIG_ENDIAN: u32 = 4321;
pub const __PDP_ENDIAN: u32 = 3412;
pub const _BITS_ENDIANNESS_H: u32 = 1;
pub const __BYTE_ORDER: u32 = 1234;
pub const __FLOAT_WORD_ORDER: u32 = 1234;
pub const LITTLE_ENDIAN: u32 = 1234;
pub const BIG_ENDIAN: u32 = 4321;
pub const PDP_ENDIAN: u32 = 3412;
pub const BYTE_ORDER: u32 = 1234;
pub const _BITS_BYTESWAP_H: u32 = 1;
pub const _BITS_UINTN_IDENTITY_H: u32 = 1;
pub const _SYS_SELECT_H: u32 = 1;
pub const __sigset_t_defined: u32 = 1;
pub const __timeval_defined: u32 = 1;
pub const _STRUCT_TIMESPEC: u32 = 1;
pub const FD_SETSIZE: u32 = 1024;
pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1;
pub const _THREAD_SHARED_TYPES_H: u32 = 1;
pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1;
pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40;
pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56;
pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56;
pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32;
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4;
pub const __SIZEOF_PTHREAD_COND_T: u32 = 48;
pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4;
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8;
pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4;
pub const _THREAD_MUTEX_INTERNAL_H: u32 = 1;
pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1;
pub const __have_pthread_attr_t: u32 = 1;
pub const _STRING_H: u32 = 1;
pub const _BITS_TYPES_LOCALE_T_H: u32 = 1;
pub const _BITS_TYPES___LOCALE_T_H: u32 = 1;
pub const _STRINGS_H: u32 = 1;
pub const LIBBPF_MAJOR_VERSION: u32 = 1;
pub const LIBBPF_MINOR_VERSION: u32 = 0;
pub const MAPS_RELAX_COMPAT: u32 = 1;
pub const BPF_LOG_BUF_SIZE: u32 = 16777215;
pub const XDP_DEFAULT_RUN_PRIO: u32 = 50;
pub const XDP_BPFFS_ENVVAR: &[u8; 13usize] = b"LIBXDP_BPFFS\0";
pub const XDP_BPFFS_MOUNT_ENVVAR: &[u8; 23usize] = b"LIBXDP_BPFFS_AUTOMOUNT\0";
pub const XDP_OBJECT_ENVVAR: &[u8; 19usize] = b"LIBXDP_OBJECT_PATH\0";
pub const XDP_METADATA_SECTION: &[u8; 13usize] = b"xdp_metadata\0";
pub const XDP_DISPATCHER_VERSION: u32 = 2;
pub const XDP_DISPATCHER_MAGIC: u32 = 236;
pub const XDP_DISPATCHER_RETVAL: u32 = 31;
pub const MAX_DISPATCHER_ACTIONS: u32 = 10;
pub const XDP_SHARED_UMEM: u32 = 1;
pub const XDP_COPY: u32 = 2;
pub const XDP_ZEROCOPY: u32 = 4;
pub const XDP_USE_NEED_WAKEUP: u32 = 8;
pub const XDP_UMEM_UNALIGNED_CHUNK_FLAG: u32 = 1;
pub const XDP_RING_NEED_WAKEUP: u32 = 1;
pub const XDP_MMAP_OFFSETS: u32 = 1;
pub const XDP_RX_RING: u32 = 2;
pub const XDP_TX_RING: u32 = 3;
pub const XDP_UMEM_REG: u32 = 4;
pub const XDP_UMEM_FILL_RING: u32 = 5;
pub const XDP_UMEM_COMPLETION_RING: u32 = 6;
pub const XDP_STATISTICS: u32 = 7;
pub const XDP_OPTIONS: u32 = 8;
pub const XDP_OPTIONS_ZEROCOPY: u32 = 1;
pub const XDP_PGOFF_RX_RING: u32 = 0;
pub const XDP_PGOFF_TX_RING: u32 = 2147483648;
pub const XDP_UMEM_PGOFF_FILL_RING: u64 = 4294967296;
pub const XDP_UMEM_PGOFF_COMPLETION_RING: u64 = 6442450944;
pub const XSK_UNALIGNED_BUF_OFFSET_SHIFT: u32 = 48;
pub const XSK_UNALIGNED_BUF_ADDR_MASK: u64 = 281474976710655;
pub const XSK_RING_CONS__DEFAULT_NUM_DESCS: u32 = 2048;
pub const XSK_RING_PROD__DEFAULT_NUM_DESCS: u32 = 2048;
pub const XSK_UMEM__DEFAULT_FRAME_SHIFT: u32 = 12;
pub const XSK_UMEM__DEFAULT_FRAME_SIZE: u32 = 4096;
pub const XSK_UMEM__DEFAULT_FRAME_HEADROOM: u32 = 0;
pub const XSK_UMEM__DEFAULT_FLAGS: u32 = 0;
pub const XSK_LIBBPF_FLAGS__INHIBIT_PROG_LOAD: u32 = 1;
pub const XSK_LIBXDP_FLAGS__INHIBIT_PROG_LOAD: u32 = 1;
pub const _K_SS_MAXSIZE: u32 = 128;
pub const SOCK_SNDBUF_LOCK: u32 = 1;
pub const SOCK_RCVBUF_LOCK: u32 = 2;
pub const SOCK_BUF_LOCK_MASK: u32 = 3;
pub const NETLINK_ROUTE: u32 = 0;
pub const NETLINK_UNUSED: u32 = 1;
pub const NETLINK_USERSOCK: u32 = 2;
pub const NETLINK_FIREWALL: u32 = 3;
pub const NETLINK_SOCK_DIAG: u32 = 4;
pub const NETLINK_NFLOG: u32 = 5;
pub const NETLINK_XFRM: u32 = 6;
pub const NETLINK_SELINUX: u32 = 7;
pub const NETLINK_ISCSI: u32 = 8;
pub const NETLINK_AUDIT: u32 = 9;
pub const NETLINK_FIB_LOOKUP: u32 = 10;
pub const NETLINK_CONNECTOR: u32 = 11;
pub const NETLINK_NETFILTER: u32 = 12;
pub const NETLINK_IP6_FW: u32 = 13;
pub const NETLINK_DNRTMSG: u32 = 14;
pub const NETLINK_KOBJECT_UEVENT: u32 = 15;
pub const NETLINK_GENERIC: u32 = 16;
pub const NETLINK_SCSITRANSPORT: u32 = 18;
pub const NETLINK_ECRYPTFS: u32 = 19;
pub const NETLINK_RDMA: u32 = 20;
pub const NETLINK_CRYPTO: u32 = 21;
pub const NETLINK_SMC: u32 = 22;
pub const NETLINK_INET_DIAG: u32 = 4;
pub const MAX_LINKS: u32 = 32;
pub const NLM_F_REQUEST: u32 = 1;
pub const NLM_F_MULTI: u32 = 2;
pub const NLM_F_ACK: u32 = 4;
pub const NLM_F_ECHO: u32 = 8;
pub const NLM_F_DUMP_INTR: u32 = 16;
pub const NLM_F_DUMP_FILTERED: u32 = 32;
pub const NLM_F_ROOT: u32 = 256;
pub const NLM_F_MATCH: u32 = 512;
pub const NLM_F_ATOMIC: u32 = 1024;
pub const NLM_F_DUMP: u32 = 768;
pub const NLM_F_REPLACE: u32 = 256;
pub const NLM_F_EXCL: u32 = 512;
pub const NLM_F_CREATE: u32 = 1024;
pub const NLM_F_APPEND: u32 = 2048;
pub const NLM_F_NONREC: u32 = 256;
pub const NLM_F_CAPPED: u32 = 256;
pub const NLM_F_ACK_TLVS: u32 = 512;
pub const NLMSG_ALIGNTO: u32 = 4;
pub const NLMSG_NOOP: u32 = 1;
pub const NLMSG_ERROR: u32 = 2;
pub const NLMSG_DONE: u32 = 3;
pub const NLMSG_OVERRUN: u32 = 4;
pub const NLMSG_MIN_TYPE: u32 = 16;
pub const NETLINK_ADD_MEMBERSHIP: u32 = 1;
pub const NETLINK_DROP_MEMBERSHIP: u32 = 2;
pub const NETLINK_PKTINFO: u32 = 3;
pub const NETLINK_BROADCAST_ERROR: u32 = 4;
pub const NETLINK_NO_ENOBUFS: u32 = 5;
pub const NETLINK_RX_RING: u32 = 6;
pub const NETLINK_TX_RING: u32 = 7;
pub const NETLINK_LISTEN_ALL_NSID: u32 = 8;
pub const NETLINK_LIST_MEMBERSHIPS: u32 = 9;
pub const NETLINK_CAP_ACK: u32 = 10;
pub const NETLINK_EXT_ACK: u32 = 11;
pub const NETLINK_GET_STRICT_CHK: u32 = 12;
pub const NL_MMAP_MSG_ALIGNMENT: u32 = 4;
pub const NET_MAJOR: u32 = 36;
pub const NLA_F_NESTED: u32 = 32768;
pub const NLA_F_NET_BYTEORDER: u32 = 16384;
pub const NLA_TYPE_MASK: i32 = -49153;
pub const NLA_ALIGNTO: u32 = 4;
pub const MACVLAN_FLAG_NOPROMISC: u32 = 1;
pub const MACVLAN_FLAG_NODST: u32 = 2;
pub const IPVLAN_F_PRIVATE: u32 = 1;
pub const IPVLAN_F_VEPA: u32 = 2;
pub const MAX_VLAN_LIST_LEN: u32 = 1;
pub const PORT_PROFILE_MAX: u32 = 40;
pub const PORT_UUID_MAX: u32 = 16;
pub const PORT_SELF_VF: i32 = -1;
pub const XDP_FLAGS_UPDATE_IF_NOEXIST: u32 = 1;
pub const XDP_FLAGS_SKB_MODE: u32 = 2;
pub const XDP_FLAGS_DRV_MODE: u32 = 4;
pub const XDP_FLAGS_HW_MODE: u32 = 8;
pub const XDP_FLAGS_REPLACE: u32 = 16;
pub const XDP_FLAGS_MODES: u32 = 14;
pub const XDP_FLAGS_MASK: u32 = 31;
pub const RMNET_FLAGS_INGRESS_DEAGGREGATION: u32 = 1;
pub const RMNET_FLAGS_INGRESS_MAP_COMMANDS: u32 = 2;
pub const RMNET_FLAGS_INGRESS_MAP_CKSUMV4: u32 = 4;
pub const RMNET_FLAGS_EGRESS_MAP_CKSUMV4: u32 = 8;
pub const RMNET_FLAGS_INGRESS_MAP_CKSUMV5: u32 = 16;
pub const RMNET_FLAGS_EGRESS_MAP_CKSUMV5: u32 = 32;
pub type va_list = __builtin_va_list;
pub type __gnuc_va_list = __builtin_va_list;
pub type __u_char = ::std::os::raw::c_uchar;
pub type __u_short = ::std::os::raw::c_ushort;
pub type __u_int = ::std::os::raw::c_uint;
pub type __u_long = ::std::os::raw::c_ulong;
pub type __int8_t = ::std::os::raw::c_schar;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int16_t = ::std::os::raw::c_short;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
pub type __uint64_t = ::std::os::raw::c_ulong;
pub type __int_least8_t = __int8_t;
pub type __uint_least8_t = __uint8_t;
pub type __int_least16_t = __int16_t;
pub type __uint_least16_t = __uint16_t;
pub type __int_least32_t = __int32_t;
pub type __uint_least32_t = __uint32_t;
pub type __int_least64_t = __int64_t;
pub type __uint_least64_t = __uint64_t;
pub type __quad_t = ::std::os::raw::c_long;
pub type __u_quad_t = ::std::os::raw::c_ulong;
pub type __intmax_t = ::std::os::raw::c_long;
pub type __uintmax_t = ::std::os::raw::c_ulong;
pub type __dev_t = ::std::os::raw::c_ulong;
pub type __uid_t = ::std::os::raw::c_uint;
pub type __gid_t = ::std::os::raw::c_uint;
pub type __ino_t = ::std::os::raw::c_ulong;
pub type __ino64_t = ::std::os::raw::c_ulong;
pub type __mode_t = ::std::os::raw::c_uint;
pub type __nlink_t = ::std::os::raw::c_ulong;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = ::std::os::raw::c_long;
pub type __pid_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __fsid_t {
pub __val: [::std::os::raw::c_int; 2usize],
}
#[test]
fn bindgen_test_layout___fsid_t() {
const UNINIT: ::std::mem::MaybeUninit<__fsid_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__fsid_t>(),
8usize,
concat!("Size of: ", stringify!(__fsid_t))
);
assert_eq!(
::std::mem::align_of::<__fsid_t>(),
4usize,
concat!("Alignment of ", stringify!(__fsid_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__fsid_t),
"::",
stringify!(__val)
)
);
}
pub type __clock_t = ::std::os::raw::c_long;
pub type __rlim_t = ::std::os::raw::c_ulong;
pub type __rlim64_t = ::std::os::raw::c_ulong;
pub type __id_t = ::std::os::raw::c_uint;
pub type __time_t = ::std::os::raw::c_long;
pub type __useconds_t = ::std::os::raw::c_uint;
pub type __suseconds_t = ::std::os::raw::c_long;
pub type __suseconds64_t = ::std::os::raw::c_long;
pub type __daddr_t = ::std::os::raw::c_int;
pub type __key_t = ::std::os::raw::c_int;
pub type __clockid_t = ::std::os::raw::c_int;
pub type __timer_t = *mut ::std::os::raw::c_void;
pub type __blksize_t = ::std::os::raw::c_long;
pub type __blkcnt_t = ::std::os::raw::c_long;
pub type __blkcnt64_t = ::std::os::raw::c_long;
pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
pub type __fsword_t = ::std::os::raw::c_long;
pub type __ssize_t = ::std::os::raw::c_long;
pub type __syscall_slong_t = ::std::os::raw::c_long;
pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
pub type __loff_t = __off64_t;
pub type __caddr_t = *mut ::std::os::raw::c_char;
pub type __intptr_t = ::std::os::raw::c_long;
pub type __socklen_t = ::std::os::raw::c_uint;
pub type __sig_atomic_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __mbstate_t {
pub __count: ::std::os::raw::c_int,
pub __value: __mbstate_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __mbstate_t__bindgen_ty_1 {
pub __wch: ::std::os::raw::c_uint,
pub __wchb: [::std::os::raw::c_char; 4usize],
}
#[test]
fn bindgen_test_layout___mbstate_t__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<__mbstate_t__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__mbstate_t__bindgen_ty_1>(),
4usize,
concat!("Size of: ", stringify!(__mbstate_t__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<__mbstate_t__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(__mbstate_t__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__wch) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__mbstate_t__bindgen_ty_1),
"::",
stringify!(__wch)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__wchb) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__mbstate_t__bindgen_ty_1),
"::",
stringify!(__wchb)
)
);
}
#[test]
fn bindgen_test_layout___mbstate_t() {
const UNINIT: ::std::mem::MaybeUninit<__mbstate_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__mbstate_t>(),
8usize,
concat!("Size of: ", stringify!(__mbstate_t))
);
assert_eq!(
::std::mem::align_of::<__mbstate_t>(),
4usize,
concat!("Alignment of ", stringify!(__mbstate_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__count) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__mbstate_t),
"::",
stringify!(__count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__value) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__mbstate_t),
"::",
stringify!(__value)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _G_fpos_t {
pub __pos: __off_t,
pub __state: __mbstate_t,
}
#[test]
fn bindgen_test_layout__G_fpos_t() {
const UNINIT: ::std::mem::MaybeUninit<_G_fpos_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_G_fpos_t>(),
16usize,
concat!("Size of: ", stringify!(_G_fpos_t))
);
assert_eq!(
::std::mem::align_of::<_G_fpos_t>(),
8usize,
concat!("Alignment of ", stringify!(_G_fpos_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__pos) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_G_fpos_t),
"::",
stringify!(__pos)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__state) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_G_fpos_t),
"::",
stringify!(__state)
)
);
}
pub type __fpos_t = _G_fpos_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _G_fpos64_t {
pub __pos: __off64_t,
pub __state: __mbstate_t,
}
#[test]
fn bindgen_test_layout__G_fpos64_t() {
const UNINIT: ::std::mem::MaybeUninit<_G_fpos64_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_G_fpos64_t>(),
16usize,
concat!("Size of: ", stringify!(_G_fpos64_t))
);
assert_eq!(
::std::mem::align_of::<_G_fpos64_t>(),
8usize,
concat!("Alignment of ", stringify!(_G_fpos64_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__pos) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_G_fpos64_t),
"::",
stringify!(__pos)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__state) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_G_fpos64_t),
"::",
stringify!(__state)
)
);
}
pub type __fpos64_t = _G_fpos64_t;
pub type __FILE = _IO_FILE;
pub type FILE = _IO_FILE;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_marker {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_codecvt {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_wide_data {
_unused: [u8; 0],
}
pub type _IO_lock_t = ::std::os::raw::c_void;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _IO_FILE {
pub _flags: ::std::os::raw::c_int,
pub _IO_read_ptr: *mut ::std::os::raw::c_char,
pub _IO_read_end: *mut ::std::os::raw::c_char,
pub _IO_read_base: *mut ::std::os::raw::c_char,
pub _IO_write_base: *mut ::std::os::raw::c_char,
pub _IO_write_ptr: *mut ::std::os::raw::c_char,
pub _IO_write_end: *mut ::std::os::raw::c_char,
pub _IO_buf_base: *mut ::std::os::raw::c_char,
pub _IO_buf_end: *mut ::std::os::raw::c_char,
pub _IO_save_base: *mut ::std::os::raw::c_char,
pub _IO_backup_base: *mut ::std::os::raw::c_char,
pub _IO_save_end: *mut ::std::os::raw::c_char,
pub _markers: *mut _IO_marker,
pub _chain: *mut _IO_FILE,
pub _fileno: ::std::os::raw::c_int,
pub _flags2: ::std::os::raw::c_int,
pub _old_offset: __off_t,
pub _cur_column: ::std::os::raw::c_ushort,
pub _vtable_offset: ::std::os::raw::c_schar,
pub _shortbuf: [::std::os::raw::c_char; 1usize],
pub _lock: *mut _IO_lock_t,
pub _offset: __off64_t,
pub _codecvt: *mut _IO_codecvt,
pub _wide_data: *mut _IO_wide_data,
pub _freeres_list: *mut _IO_FILE,
pub _freeres_buf: *mut ::std::os::raw::c_void,
pub __pad5: usize,
pub _mode: ::std::os::raw::c_int,
pub _unused2: [::std::os::raw::c_char; 20usize],
}
#[test]
fn bindgen_test_layout__IO_FILE() {
const UNINIT: ::std::mem::MaybeUninit<_IO_FILE> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_IO_FILE>(),
216usize,
concat!("Size of: ", stringify!(_IO_FILE))
);
assert_eq!(
::std::mem::align_of::<_IO_FILE>(),
8usize,
concat!("Alignment of ", stringify!(_IO_FILE))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_ptr) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_ptr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_end) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_end)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_base) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_read_base)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_base) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_base)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_ptr) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_ptr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_end) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_write_end)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_base) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_buf_base)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_end) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_buf_end)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_base) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_save_base)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_backup_base) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_backup_base)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_end) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_IO_save_end)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._markers) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_markers)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._chain) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_chain)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._fileno) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_fileno)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._flags2) as usize - ptr as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_flags2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._old_offset) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_old_offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._cur_column) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_cur_column)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._vtable_offset) as usize - ptr as usize },
130usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_vtable_offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._shortbuf) as usize - ptr as usize },
131usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_shortbuf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._lock) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_lock)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._codecvt) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_codecvt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._wide_data) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_wide_data)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._freeres_list) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_freeres_list)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._freeres_buf) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_freeres_buf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__pad5) as usize - ptr as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(__pad5)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._mode) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_mode)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._unused2) as usize - ptr as usize },
196usize,
concat!(
"Offset of field: ",
stringify!(_IO_FILE),
"::",
stringify!(_unused2)
)
);
}
pub type off_t = __off_t;
pub type fpos_t = __fpos_t;
extern "C" {
pub static mut stdin: *mut FILE;
}
extern "C" {
pub static mut stdout: *mut FILE;
}
extern "C" {
pub static mut stderr: *mut FILE;
}
extern "C" {
pub fn remove(__filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rename(
__old: *const ::std::os::raw::c_char,
__new: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn renameat(
__oldfd: ::std::os::raw::c_int,
__old: *const ::std::os::raw::c_char,
__newfd: ::std::os::raw::c_int,
__new: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fclose(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn tmpfile() -> *mut FILE;
}
extern "C" {
pub fn tmpnam(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn tmpnam_r(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn tempnam(
__dir: *const ::std::os::raw::c_char,
__pfx: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn fflush(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fflush_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fopen(
__filename: *const ::std::os::raw::c_char,
__modes: *const ::std::os::raw::c_char,
) -> *mut FILE;
}
extern "C" {
pub fn freopen(
__filename: *const ::std::os::raw::c_char,
__modes: *const ::std::os::raw::c_char,
__stream: *mut FILE,
) -> *mut FILE;
}
extern "C" {
pub fn fdopen(__fd: ::std::os::raw::c_int, __modes: *const ::std::os::raw::c_char)
-> *mut FILE;
}
extern "C" {
pub fn fmemopen(
__s: *mut ::std::os::raw::c_void,
__len: usize,
__modes: *const ::std::os::raw::c_char,
) -> *mut FILE;
}
extern "C" {
pub fn open_memstream(
__bufloc: *mut *mut ::std::os::raw::c_char,
__sizeloc: *mut usize,
) -> *mut FILE;
}
extern "C" {
pub fn setbuf(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char);
}
extern "C" {
pub fn setvbuf(
__stream: *mut FILE,
__buf: *mut ::std::os::raw::c_char,
__modes: ::std::os::raw::c_int,
__n: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn setbuffer(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char, __size: usize);
}
extern "C" {
pub fn setlinebuf(__stream: *mut FILE);
}
extern "C" {
pub fn fprintf(
__stream: *mut FILE,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn printf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sprintf(
__s: *mut ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vfprintf(
__s: *mut FILE,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vprintf(
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vsprintf(
__s: *mut ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn snprintf(
__s: *mut ::std::os::raw::c_char,
__maxlen: ::std::os::raw::c_ulong,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vsnprintf(
__s: *mut ::std::os::raw::c_char,
__maxlen: ::std::os::raw::c_ulong,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vdprintf(
__fd: ::std::os::raw::c_int,
__fmt: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn dprintf(
__fd: ::std::os::raw::c_int,
__fmt: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fscanf(
__stream: *mut FILE,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn scanf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sscanf(
__s: *const ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
pub type _Float32 = f32;
pub type _Float64 = f64;
pub type _Float32x = f64;
pub type _Float64x = u128;
extern "C" {
#[link_name = "\u{1}__isoc99_fscanf"]
pub fn fscanf1(
__stream: *mut FILE,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_scanf"]
pub fn scanf1(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_sscanf"]
pub fn sscanf1(
__s: *const ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
...
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vfscanf(
__s: *mut FILE,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vscanf(
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn vsscanf(
__s: *const ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_vfscanf"]
pub fn vfscanf1(
__s: *mut FILE,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_vscanf"]
pub fn vscanf1(
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}__isoc99_vsscanf"]
pub fn vsscanf1(
__s: *const ::std::os::raw::c_char,
__format: *const ::std::os::raw::c_char,
__arg: *mut __va_list_tag,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fgetc(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn getc(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn getchar() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn getc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn getchar_unlocked() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fgetc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fputc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn putc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn putchar(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fputc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn putc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn putchar_unlocked(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn getw(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn putw(__w: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fgets(
__s: *mut ::std::os::raw::c_char,
__n: ::std::os::raw::c_int,
__stream: *mut FILE,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn __getdelim(
__lineptr: *mut *mut ::std::os::raw::c_char,
__n: *mut usize,
__delimiter: ::std::os::raw::c_int,
__stream: *mut FILE,
) -> __ssize_t;
}
extern "C" {
pub fn getdelim(
__lineptr: *mut *mut ::std::os::raw::c_char,
__n: *mut usize,
__delimiter: ::std::os::raw::c_int,
__stream: *mut FILE,
) -> __ssize_t;
}
extern "C" {
pub fn getline(
__lineptr: *mut *mut ::std::os::raw::c_char,
__n: *mut usize,
__stream: *mut FILE,
) -> __ssize_t;
}
extern "C" {
pub fn fputs(__s: *const ::std::os::raw::c_char, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn puts(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ungetc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fread(
__ptr: *mut ::std::os::raw::c_void,
__size: ::std::os::raw::c_ulong,
__n: ::std::os::raw::c_ulong,
__stream: *mut FILE,
) -> ::std::os::raw::c_ulong;
}
extern "C" {
pub fn fwrite(
__ptr: *const ::std::os::raw::c_void,
__size: ::std::os::raw::c_ulong,
__n: ::std::os::raw::c_ulong,
__s: *mut FILE,
) -> ::std::os::raw::c_ulong;
}
extern "C" {
pub fn fread_unlocked(
__ptr: *mut ::std::os::raw::c_void,
__size: usize,
__n: usize,
__stream: *mut FILE,
) -> usize;
}
extern "C" {
pub fn fwrite_unlocked(
__ptr: *const ::std::os::raw::c_void,
__size: usize,
__n: usize,
__stream: *mut FILE,
) -> usize;
}
extern "C" {
pub fn fseek(
__stream: *mut FILE,
__off: ::std::os::raw::c_long,
__whence: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ftell(__stream: *mut FILE) -> ::std::os::raw::c_long;
}
extern "C" {
pub fn rewind(__stream: *mut FILE);
}
extern "C" {
pub fn fseeko(
__stream: *mut FILE,
__off: __off_t,
__whence: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ftello(__stream: *mut FILE) -> __off_t;
}
extern "C" {
pub fn fgetpos(__stream: *mut FILE, __pos: *mut fpos_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fsetpos(__stream: *mut FILE, __pos: *const fpos_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn clearerr(__stream: *mut FILE);
}
extern "C" {
pub fn feof(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ferror(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn clearerr_unlocked(__stream: *mut FILE);
}
extern "C" {
pub fn feof_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ferror_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn perror(__s: *const ::std::os::raw::c_char);
}
extern "C" {
pub fn fileno(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn fileno_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pclose(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn popen(
__command: *const ::std::os::raw::c_char,
__modes: *const ::std::os::raw::c_char,
) -> *mut FILE;
}
extern "C" {
pub fn ctermid(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn flockfile(__stream: *mut FILE);
}
extern "C" {
pub fn ftrylockfile(__stream: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn funlockfile(__stream: *mut FILE);
}
extern "C" {
pub fn __uflow(arg1: *mut FILE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn __overflow(arg1: *mut FILE, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
pub type __s8 = ::std::os::raw::c_schar;
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 __s64 = ::std::os::raw::c_longlong;
pub type __u64 = ::std::os::raw::c_ulonglong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __kernel_fd_set {
pub fds_bits: [::std::os::raw::c_ulong; 16usize],
}
#[test]
fn bindgen_test_layout___kernel_fd_set() {
const UNINIT: ::std::mem::MaybeUninit<__kernel_fd_set> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__kernel_fd_set>(),
128usize,
concat!("Size of: ", stringify!(__kernel_fd_set))
);
assert_eq!(
::std::mem::align_of::<__kernel_fd_set>(),
8usize,
concat!("Alignment of ", stringify!(__kernel_fd_set))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__kernel_fd_set),
"::",
stringify!(fds_bits)
)
);
}
pub type __kernel_sighandler_t =
::std::option::Option<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>;
pub type __kernel_key_t = ::std::os::raw::c_int;
pub type __kernel_mqd_t = ::std::os::raw::c_int;
pub type __kernel_old_uid_t = ::std::os::raw::c_ushort;
pub type __kernel_old_gid_t = ::std::os::raw::c_ushort;
pub type __kernel_old_dev_t = ::std::os::raw::c_ulong;
pub type __kernel_long_t = ::std::os::raw::c_long;
pub type __kernel_ulong_t = ::std::os::raw::c_ulong;
pub type __kernel_ino_t = __kernel_ulong_t;
pub type __kernel_mode_t = ::std::os::raw::c_uint;
pub type __kernel_pid_t = ::std::os::raw::c_int;
pub type __kernel_ipc_pid_t = ::std::os::raw::c_int;
pub type __kernel_uid_t = ::std::os::raw::c_uint;
pub type __kernel_gid_t = ::std::os::raw::c_uint;
pub type __kernel_suseconds_t = __kernel_long_t;
pub type __kernel_daddr_t = ::std::os::raw::c_int;
pub type __kernel_uid32_t = ::std::os::raw::c_uint;
pub type __kernel_gid32_t = ::std::os::raw::c_uint;
pub type __kernel_size_t = __kernel_ulong_t;
pub type __kernel_ssize_t = __kernel_long_t;
pub type __kernel_ptrdiff_t = __kernel_long_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __kernel_fsid_t {
pub val: [::std::os::raw::c_int; 2usize],
}
#[test]
fn bindgen_test_layout___kernel_fsid_t() {
const UNINIT: ::std::mem::MaybeUninit<__kernel_fsid_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__kernel_fsid_t>(),
8usize,
concat!("Size of: ", stringify!(__kernel_fsid_t))
);
assert_eq!(
::std::mem::align_of::<__kernel_fsid_t>(),
4usize,
concat!("Alignment of ", stringify!(__kernel_fsid_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__kernel_fsid_t),
"::",
stringify!(val)
)
);
}
pub type __kernel_off_t = __kernel_long_t;
pub type __kernel_loff_t = ::std::os::raw::c_longlong;
pub type __kernel_old_time_t = __kernel_long_t;
pub type __kernel_time_t = __kernel_long_t;
pub type __kernel_time64_t = ::std::os::raw::c_longlong;
pub type __kernel_clock_t = __kernel_long_t;
pub type __kernel_timer_t = ::std::os::raw::c_int;
pub type __kernel_clockid_t = ::std::os::raw::c_int;
pub type __kernel_caddr_t = *mut ::std::os::raw::c_char;
pub type __kernel_uid16_t = ::std::os::raw::c_ushort;
pub type __kernel_gid16_t = ::std::os::raw::c_ushort;
pub type __le16 = __u16;
pub type __be16 = __u16;
pub type __le32 = __u32;
pub type __be32 = __u32;
pub type __le64 = __u64;
pub type __be64 = __u64;
pub type __sum16 = __u16;
pub type __wsum = __u32;
pub type __poll_t = ::std::os::raw::c_uint;
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 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_insn {
pub code: __u8,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
pub off: __s16,
pub imm: __s32,
}
#[test]
fn bindgen_test_layout_bpf_insn() {
const UNINIT: ::std::mem::MaybeUninit<bpf_insn> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).code) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_insn),
"::",
stringify!(code)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).off) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(bpf_insn),
"::",
stringify!(off)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).imm) as usize - ptr 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]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = 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)]
pub struct bpf_lpm_trie_key {
pub prefixlen: __u32,
pub data: __IncompleteArrayField<__u8>,
}
#[test]
fn bindgen_test_layout_bpf_lpm_trie_key() {
const UNINIT: ::std::mem::MaybeUninit<bpf_lpm_trie_key> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).prefixlen) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_lpm_trie_key),
"::",
stringify!(prefixlen)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_lpm_trie_key),
"::",
stringify!(data)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_cgroup_storage_key {
pub cgroup_inode_id: __u64,
pub attach_type: __u32,
}
#[test]
fn bindgen_test_layout_bpf_cgroup_storage_key() {
const UNINIT: ::std::mem::MaybeUninit<bpf_cgroup_storage_key> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).cgroup_inode_id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_cgroup_storage_key),
"::",
stringify!(cgroup_inode_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_type) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_cgroup_storage_key),
"::",
stringify!(attach_type)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_iter_link_info {
pub map: bpf_iter_link_info__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_iter_link_info__bindgen_ty_1 {
pub map_fd: __u32,
}
#[test]
fn bindgen_test_layout_bpf_iter_link_info__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_iter_link_info__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_iter_link_info__bindgen_ty_1>(),
4usize,
concat!("Size of: ", stringify!(bpf_iter_link_info__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_iter_link_info__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(bpf_iter_link_info__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_iter_link_info__bindgen_ty_1),
"::",
stringify!(map_fd)
)
);
}
#[test]
fn bindgen_test_layout_bpf_iter_link_info() {
const UNINIT: ::std::mem::MaybeUninit<bpf_iter_link_info> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_iter_link_info>(),
4usize,
concat!("Size of: ", stringify!(bpf_iter_link_info))
);
assert_eq!(
::std::mem::align_of::<bpf_iter_link_info>(),
4usize,
concat!("Alignment of ", stringify!(bpf_iter_link_info))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_iter_link_info),
"::",
stringify!(map)
)
);
}
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_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 const bpf_cmd_BPF_BTF_GET_NEXT_ID: bpf_cmd = 23;
pub const bpf_cmd_BPF_MAP_LOOKUP_BATCH: bpf_cmd = 24;
pub const bpf_cmd_BPF_MAP_LOOKUP_AND_DELETE_BATCH: bpf_cmd = 25;
pub const bpf_cmd_BPF_MAP_UPDATE_BATCH: bpf_cmd = 26;
pub const bpf_cmd_BPF_MAP_DELETE_BATCH: bpf_cmd = 27;
pub const bpf_cmd_BPF_LINK_CREATE: bpf_cmd = 28;
pub const bpf_cmd_BPF_LINK_UPDATE: bpf_cmd = 29;
pub const bpf_cmd_BPF_LINK_GET_FD_BY_ID: bpf_cmd = 30;
pub const bpf_cmd_BPF_LINK_GET_NEXT_ID: bpf_cmd = 31;
pub const bpf_cmd_BPF_ENABLE_STATS: bpf_cmd = 32;
pub const bpf_cmd_BPF_ITER_CREATE: bpf_cmd = 33;
pub const bpf_cmd_BPF_LINK_DETACH: bpf_cmd = 34;
pub const bpf_cmd_BPF_PROG_BIND_MAP: bpf_cmd = 35;
pub type bpf_cmd = ::std::os::raw::c_uint;
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 const bpf_map_type_BPF_MAP_TYPE_DEVMAP_HASH: bpf_map_type = 25;
pub const bpf_map_type_BPF_MAP_TYPE_STRUCT_OPS: bpf_map_type = 26;
pub const bpf_map_type_BPF_MAP_TYPE_RINGBUF: bpf_map_type = 27;
pub const bpf_map_type_BPF_MAP_TYPE_INODE_STORAGE: bpf_map_type = 28;
pub const bpf_map_type_BPF_MAP_TYPE_TASK_STORAGE: bpf_map_type = 29;
pub type bpf_map_type = ::std::os::raw::c_uint;
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 const bpf_prog_type_BPF_PROG_TYPE_TRACING: bpf_prog_type = 26;
pub const bpf_prog_type_BPF_PROG_TYPE_STRUCT_OPS: bpf_prog_type = 27;
pub const bpf_prog_type_BPF_PROG_TYPE_EXT: bpf_prog_type = 28;
pub const bpf_prog_type_BPF_PROG_TYPE_LSM: bpf_prog_type = 29;
pub const bpf_prog_type_BPF_PROG_TYPE_SK_LOOKUP: bpf_prog_type = 30;
pub const bpf_prog_type_BPF_PROG_TYPE_SYSCALL: bpf_prog_type = 31;
pub type bpf_prog_type = ::std::os::raw::c_uint;
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_BPF_TRACE_RAW_TP: bpf_attach_type = 23;
pub const bpf_attach_type_BPF_TRACE_FENTRY: bpf_attach_type = 24;
pub const bpf_attach_type_BPF_TRACE_FEXIT: bpf_attach_type = 25;
pub const bpf_attach_type_BPF_MODIFY_RETURN: bpf_attach_type = 26;
pub const bpf_attach_type_BPF_LSM_MAC: bpf_attach_type = 27;
pub const bpf_attach_type_BPF_TRACE_ITER: bpf_attach_type = 28;
pub const bpf_attach_type_BPF_CGROUP_INET4_GETPEERNAME: bpf_attach_type = 29;
pub const bpf_attach_type_BPF_CGROUP_INET6_GETPEERNAME: bpf_attach_type = 30;
pub const bpf_attach_type_BPF_CGROUP_INET4_GETSOCKNAME: bpf_attach_type = 31;
pub const bpf_attach_type_BPF_CGROUP_INET6_GETSOCKNAME: bpf_attach_type = 32;
pub const bpf_attach_type_BPF_XDP_DEVMAP: bpf_attach_type = 33;
pub const bpf_attach_type_BPF_CGROUP_INET_SOCK_RELEASE: bpf_attach_type = 34;
pub const bpf_attach_type_BPF_XDP_CPUMAP: bpf_attach_type = 35;
pub const bpf_attach_type_BPF_SK_LOOKUP: bpf_attach_type = 36;
pub const bpf_attach_type_BPF_XDP: bpf_attach_type = 37;
pub const bpf_attach_type_BPF_SK_SKB_VERDICT: bpf_attach_type = 38;
pub const bpf_attach_type_BPF_SK_REUSEPORT_SELECT: bpf_attach_type = 39;
pub const bpf_attach_type_BPF_SK_REUSEPORT_SELECT_OR_MIGRATE: bpf_attach_type = 40;
pub const bpf_attach_type_BPF_PERF_EVENT: bpf_attach_type = 41;
pub const bpf_attach_type___MAX_BPF_ATTACH_TYPE: bpf_attach_type = 42;
pub type bpf_attach_type = ::std::os::raw::c_uint;
pub const bpf_link_type_BPF_LINK_TYPE_UNSPEC: bpf_link_type = 0;
pub const bpf_link_type_BPF_LINK_TYPE_RAW_TRACEPOINT: bpf_link_type = 1;
pub const bpf_link_type_BPF_LINK_TYPE_TRACING: bpf_link_type = 2;
pub const bpf_link_type_BPF_LINK_TYPE_CGROUP: bpf_link_type = 3;
pub const bpf_link_type_BPF_LINK_TYPE_ITER: bpf_link_type = 4;
pub const bpf_link_type_BPF_LINK_TYPE_NETNS: bpf_link_type = 5;
pub const bpf_link_type_BPF_LINK_TYPE_XDP: bpf_link_type = 6;
pub const bpf_link_type_BPF_LINK_TYPE_PERF_EVENT: bpf_link_type = 7;
pub const bpf_link_type_MAX_BPF_LINK_TYPE: bpf_link_type = 8;
pub type bpf_link_type = ::std::os::raw::c_uint;
pub const BPF_ANY: _bindgen_ty_2 = 0;
pub const BPF_NOEXIST: _bindgen_ty_2 = 1;
pub const BPF_EXIST: _bindgen_ty_2 = 2;
pub const BPF_F_LOCK: _bindgen_ty_2 = 4;
pub type _bindgen_ty_2 = ::std::os::raw::c_uint;
pub const BPF_F_NO_PREALLOC: _bindgen_ty_3 = 1;
pub const BPF_F_NO_COMMON_LRU: _bindgen_ty_3 = 2;
pub const BPF_F_NUMA_NODE: _bindgen_ty_3 = 4;
pub const BPF_F_RDONLY: _bindgen_ty_3 = 8;
pub const BPF_F_WRONLY: _bindgen_ty_3 = 16;
pub const BPF_F_STACK_BUILD_ID: _bindgen_ty_3 = 32;
pub const BPF_F_ZERO_SEED: _bindgen_ty_3 = 64;
pub const BPF_F_RDONLY_PROG: _bindgen_ty_3 = 128;
pub const BPF_F_WRONLY_PROG: _bindgen_ty_3 = 256;
pub const BPF_F_CLONE: _bindgen_ty_3 = 512;
pub const BPF_F_MMAPABLE: _bindgen_ty_3 = 1024;
pub const BPF_F_PRESERVE_ELEMS: _bindgen_ty_3 = 2048;
pub const BPF_F_INNER_MAP: _bindgen_ty_3 = 4096;
pub type _bindgen_ty_3 = ::std::os::raw::c_uint;
pub const bpf_stats_type_BPF_STATS_RUN_TIME: bpf_stats_type = 0;
pub type bpf_stats_type = ::std::os::raw::c_uint;
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 = ::std::os::raw::c_uint;
#[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,
}
#[test]
fn bindgen_test_layout_bpf_stack_build_id__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_stack_build_id__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).offset) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_stack_build_id__bindgen_ty_1),
"::",
stringify!(offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ip) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_stack_build_id__bindgen_ty_1),
"::",
stringify!(ip)
)
);
}
#[test]
fn bindgen_test_layout_bpf_stack_build_id() {
const UNINIT: ::std::mem::MaybeUninit<bpf_stack_build_id> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).status) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_stack_build_id),
"::",
stringify!(status)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).build_id) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_stack_build_id),
"::",
stringify!(build_id)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_attr {
pub __bindgen_anon_1: bpf_attr__bindgen_ty_1,
pub __bindgen_anon_2: bpf_attr__bindgen_ty_2,
pub batch: bpf_attr__bindgen_ty_3,
pub __bindgen_anon_3: bpf_attr__bindgen_ty_4,
pub __bindgen_anon_4: bpf_attr__bindgen_ty_5,
pub __bindgen_anon_5: bpf_attr__bindgen_ty_6,
pub test: bpf_attr__bindgen_ty_7,
pub __bindgen_anon_6: bpf_attr__bindgen_ty_8,
pub info: bpf_attr__bindgen_ty_9,
pub query: bpf_attr__bindgen_ty_10,
pub raw_tracepoint: bpf_attr__bindgen_ty_11,
pub __bindgen_anon_7: bpf_attr__bindgen_ty_12,
pub task_fd_query: bpf_attr__bindgen_ty_13,
pub link_create: bpf_attr__bindgen_ty_14,
pub link_update: bpf_attr__bindgen_ty_15,
pub link_detach: bpf_attr__bindgen_ty_16,
pub enable_stats: bpf_attr__bindgen_ty_17,
pub iter_create: bpf_attr__bindgen_ty_18,
pub prog_bind_map: bpf_attr__bindgen_ty_19,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_1 {
pub map_type: __u32,
pub key_size: __u32,
pub value_size: __u32,
pub max_entries: __u32,
pub map_flags: __u32,
pub inner_map_fd: __u32,
pub numa_node: __u32,
pub map_name: [::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,
pub btf_vmlinux_value_type_id: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_1>(),
64usize,
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::addr_of!((*ptr).map_type) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(map_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).key_size) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(key_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).value_size) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(value_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).max_entries) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(max_entries)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_flags) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(map_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).inner_map_fd) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(inner_map_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).numa_node) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(numa_node)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_name) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(map_name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_ifindex) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(map_ifindex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_fd) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(btf_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_key_type_id) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(btf_key_type_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_value_type_id) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(btf_value_type_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_vmlinux_value_type_id) as usize - ptr as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_1),
"::",
stringify!(btf_vmlinux_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,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_2__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_2__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).value) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(value)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).next_key) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(next_key)
)
);
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).map_fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_2),
"::",
stringify!(map_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_2),
"::",
stringify!(key)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_2),
"::",
stringify!(flags)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_3 {
pub in_batch: __u64,
pub out_batch: __u64,
pub keys: __u64,
pub values: __u64,
pub count: __u32,
pub map_fd: __u32,
pub elem_flags: __u64,
pub flags: __u64,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_3() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_3> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_3>(),
56usize,
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::addr_of!((*ptr).in_batch) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(in_batch)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).out_batch) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(out_batch)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).keys) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(keys)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).values) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(values)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_fd) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(map_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).elem_flags) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(elem_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_3),
"::",
stringify!(flags)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_attr__bindgen_ty_4 {
pub prog_type: __u32,
pub insn_cnt: __u32,
pub insns: __u64,
pub license: __u64,
pub log_level: __u32,
pub log_size: __u32,
pub log_buf: __u64,
pub kern_version: __u32,
pub prog_flags: __u32,
pub prog_name: [::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,
pub attach_btf_id: __u32,
pub __bindgen_anon_1: bpf_attr__bindgen_ty_4__bindgen_ty_1,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
pub fd_array: __u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_attr__bindgen_ty_4__bindgen_ty_1 {
pub attach_prog_fd: __u32,
pub attach_btf_obj_fd: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_4__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_4__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_4__bindgen_ty_1>(),
4usize,
concat!(
"Size of: ",
stringify!(bpf_attr__bindgen_ty_4__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_4__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(bpf_attr__bindgen_ty_4__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_prog_fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4__bindgen_ty_1),
"::",
stringify!(attach_prog_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_btf_obj_fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4__bindgen_ty_1),
"::",
stringify!(attach_btf_obj_fd)
)
);
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_4() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_4> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_4>(),
128usize,
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::addr_of!((*ptr).prog_type) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(prog_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).insn_cnt) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(insn_cnt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).insns) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(insns)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).license) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(license)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).log_level) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(log_level)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).log_size) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(log_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).log_buf) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(log_buf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).kern_version) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(kern_version)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_flags) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(prog_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_name) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(prog_name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_ifindex) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(prog_ifindex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).expected_attach_type) as usize - ptr as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(expected_attach_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_btf_fd) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(prog_btf_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).func_info_rec_size) as usize - ptr as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(func_info_rec_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).func_info) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(func_info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).func_info_cnt) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(func_info_cnt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).line_info_rec_size) as usize - ptr as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(line_info_rec_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).line_info) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(line_info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).line_info_cnt) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(line_info_cnt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_btf_id) as usize - ptr as usize },
108usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(attach_btf_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fd_array) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_4),
"::",
stringify!(fd_array)
)
);
}
impl bpf_attr__bindgen_ty_4 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 4usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_5 {
pub pathname: __u64,
pub bpf_fd: __u32,
pub file_flags: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_5() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_5> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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>(),
8usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_5))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pathname) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_5),
"::",
stringify!(pathname)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpf_fd) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_5),
"::",
stringify!(bpf_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).file_flags) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_5),
"::",
stringify!(file_flags)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_6 {
pub target_fd: __u32,
pub attach_bpf_fd: __u32,
pub attach_type: __u32,
pub attach_flags: __u32,
pub replace_bpf_fd: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_6() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_6> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_6>(),
20usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_6))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_6>(),
4usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_6))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).target_fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(target_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_bpf_fd) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(attach_bpf_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_type) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(attach_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_flags) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(attach_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).replace_bpf_fd) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_6),
"::",
stringify!(replace_bpf_fd)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_7 {
pub prog_fd: __u32,
pub retval: __u32,
pub data_size_in: __u32,
pub data_size_out: __u32,
pub data_in: __u64,
pub data_out: __u64,
pub repeat: __u32,
pub duration: __u32,
pub ctx_size_in: __u32,
pub ctx_size_out: __u32,
pub ctx_in: __u64,
pub ctx_out: __u64,
pub flags: __u32,
pub cpu: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_7() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_7> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_7>(),
72usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_7))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_7>(),
8usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_7))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7),
"::",
stringify!(prog_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).retval) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7),
"::",
stringify!(retval)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_size_in) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7),
"::",
stringify!(data_size_in)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_size_out) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7),
"::",
stringify!(data_size_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_in) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7),
"::",
stringify!(data_in)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_out) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7),
"::",
stringify!(data_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).repeat) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7),
"::",
stringify!(repeat)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).duration) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7),
"::",
stringify!(duration)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ctx_size_in) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7),
"::",
stringify!(ctx_size_in)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ctx_size_out) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7),
"::",
stringify!(ctx_size_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ctx_in) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7),
"::",
stringify!(ctx_in)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ctx_out) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7),
"::",
stringify!(ctx_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cpu) as usize - ptr as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_7),
"::",
stringify!(cpu)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_attr__bindgen_ty_8 {
pub __bindgen_anon_1: bpf_attr__bindgen_ty_8__bindgen_ty_1,
pub next_id: __u32,
pub open_flags: __u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_attr__bindgen_ty_8__bindgen_ty_1 {
pub start_id: __u32,
pub prog_id: __u32,
pub map_id: __u32,
pub btf_id: __u32,
pub link_id: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_8__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_8__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_8__bindgen_ty_1>(),
4usize,
concat!(
"Size of: ",
stringify!(bpf_attr__bindgen_ty_8__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_8__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(bpf_attr__bindgen_ty_8__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).start_id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_8__bindgen_ty_1),
"::",
stringify!(start_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_8__bindgen_ty_1),
"::",
stringify!(prog_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_8__bindgen_ty_1),
"::",
stringify!(map_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_8__bindgen_ty_1),
"::",
stringify!(btf_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).link_id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_8__bindgen_ty_1),
"::",
stringify!(link_id)
)
);
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_8() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_8> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_8>(),
12usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_8))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_8>(),
4usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_8))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).next_id) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_8),
"::",
stringify!(next_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).open_flags) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_8),
"::",
stringify!(open_flags)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_9 {
pub bpf_fd: __u32,
pub info_len: __u32,
pub info: __u64,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_9() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_9> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_9>(),
16usize,
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::addr_of!((*ptr).bpf_fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_9),
"::",
stringify!(bpf_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).info_len) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_9),
"::",
stringify!(info_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).info) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_9),
"::",
stringify!(info)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_10 {
pub target_fd: __u32,
pub attach_type: __u32,
pub query_flags: __u32,
pub attach_flags: __u32,
pub prog_ids: __u64,
pub prog_cnt: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_10() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_10> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_10>(),
32usize,
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::addr_of!((*ptr).target_fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_10),
"::",
stringify!(target_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_type) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_10),
"::",
stringify!(attach_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).query_flags) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_10),
"::",
stringify!(query_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_flags) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_10),
"::",
stringify!(attach_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_ids) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_10),
"::",
stringify!(prog_ids)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_cnt) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_10),
"::",
stringify!(prog_cnt)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_11 {
pub name: __u64,
pub prog_fd: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_11() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_11> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_11>(),
16usize,
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::addr_of!((*ptr).name) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_11),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_fd) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_11),
"::",
stringify!(prog_fd)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_12 {
pub btf: __u64,
pub btf_log_buf: __u64,
pub btf_size: __u32,
pub btf_log_size: __u32,
pub btf_log_level: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_12() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_12> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_12>(),
32usize,
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::addr_of!((*ptr).btf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_12),
"::",
stringify!(btf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_log_buf) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_12),
"::",
stringify!(btf_log_buf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_size) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_12),
"::",
stringify!(btf_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_log_size) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_12),
"::",
stringify!(btf_log_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_log_level) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_12),
"::",
stringify!(btf_log_level)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_13 {
pub pid: __u32,
pub fd: __u32,
pub flags: __u32,
pub buf_len: __u32,
pub buf: __u64,
pub prog_id: __u32,
pub fd_type: __u32,
pub probe_offset: __u64,
pub probe_addr: __u64,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_13() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_13> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_13>(),
48usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_13))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_13>(),
8usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_13))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pid) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_13),
"::",
stringify!(pid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_13),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_13),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buf_len) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_13),
"::",
stringify!(buf_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buf) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_13),
"::",
stringify!(buf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_id) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_13),
"::",
stringify!(prog_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fd_type) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_13),
"::",
stringify!(fd_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).probe_offset) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_13),
"::",
stringify!(probe_offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).probe_addr) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_13),
"::",
stringify!(probe_addr)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_attr__bindgen_ty_14 {
pub prog_fd: __u32,
pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_1,
pub attach_type: __u32,
pub flags: __u32,
pub __bindgen_anon_2: bpf_attr__bindgen_ty_14__bindgen_ty_2,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_attr__bindgen_ty_14__bindgen_ty_1 {
pub target_fd: __u32,
pub target_ifindex: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_14__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_14__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_14__bindgen_ty_1>(),
4usize,
concat!(
"Size of: ",
stringify!(bpf_attr__bindgen_ty_14__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_14__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(bpf_attr__bindgen_ty_14__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).target_fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_14__bindgen_ty_1),
"::",
stringify!(target_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).target_ifindex) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_14__bindgen_ty_1),
"::",
stringify!(target_ifindex)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_attr__bindgen_ty_14__bindgen_ty_2 {
pub target_btf_id: __u32,
pub __bindgen_anon_1: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1,
pub perf_event: bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1 {
pub iter_info: __u64,
pub iter_info_len: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1>(),
16usize,
concat!(
"Size of: ",
stringify!(bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).iter_info) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(iter_info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).iter_info_len) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(iter_info_len)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2 {
pub bpf_cookie: __u64,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2>(),
8usize,
concat!(
"Size of: ",
stringify!(bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2>(),
8usize,
concat!(
"Alignment of ",
stringify!(bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpf_cookie) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_14__bindgen_ty_2__bindgen_ty_2),
"::",
stringify!(bpf_cookie)
)
);
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_14__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_14__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_14__bindgen_ty_2>(),
16usize,
concat!(
"Size of: ",
stringify!(bpf_attr__bindgen_ty_14__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_14__bindgen_ty_2>(),
8usize,
concat!(
"Alignment of ",
stringify!(bpf_attr__bindgen_ty_14__bindgen_ty_2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).target_btf_id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_14__bindgen_ty_2),
"::",
stringify!(target_btf_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).perf_event) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_14__bindgen_ty_2),
"::",
stringify!(perf_event)
)
);
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_14() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_14> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_14>(),
32usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_14))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_14>(),
8usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_14))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_14),
"::",
stringify!(prog_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_type) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_14),
"::",
stringify!(attach_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_14),
"::",
stringify!(flags)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_15 {
pub link_fd: __u32,
pub new_prog_fd: __u32,
pub flags: __u32,
pub old_prog_fd: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_15() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_15> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_15>(),
16usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_15))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_15>(),
4usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_15))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).link_fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_15),
"::",
stringify!(link_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).new_prog_fd) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_15),
"::",
stringify!(new_prog_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_15),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).old_prog_fd) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_15),
"::",
stringify!(old_prog_fd)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_16 {
pub link_fd: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_16() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_16> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_16>(),
4usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_16))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_16>(),
4usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_16))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).link_fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_16),
"::",
stringify!(link_fd)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_17 {
pub type_: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_17() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_17> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_17>(),
4usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_17))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_17>(),
4usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_17))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_17),
"::",
stringify!(type_)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_18 {
pub link_fd: __u32,
pub flags: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_18() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_18> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_18>(),
8usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_18))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_18>(),
4usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_18))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).link_fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_18),
"::",
stringify!(link_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_18),
"::",
stringify!(flags)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_attr__bindgen_ty_19 {
pub prog_fd: __u32,
pub map_fd: __u32,
pub flags: __u32,
}
#[test]
fn bindgen_test_layout_bpf_attr__bindgen_ty_19() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr__bindgen_ty_19> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr__bindgen_ty_19>(),
12usize,
concat!("Size of: ", stringify!(bpf_attr__bindgen_ty_19))
);
assert_eq!(
::std::mem::align_of::<bpf_attr__bindgen_ty_19>(),
4usize,
concat!("Alignment of ", stringify!(bpf_attr__bindgen_ty_19))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_19),
"::",
stringify!(prog_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_fd) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_19),
"::",
stringify!(map_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr__bindgen_ty_19),
"::",
stringify!(flags)
)
);
}
#[test]
fn bindgen_test_layout_bpf_attr() {
const UNINIT: ::std::mem::MaybeUninit<bpf_attr> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_attr>(),
128usize,
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::addr_of!((*ptr).batch) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(batch)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).test) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(test)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).info) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).query) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(query)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).raw_tracepoint) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(raw_tracepoint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).task_fd_query) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(task_fd_query)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).link_create) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(link_create)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).link_update) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(link_update)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).link_detach) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(link_detach)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).enable_stats) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(enable_stats)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).iter_create) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(iter_create)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_bind_map) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_attr),
"::",
stringify!(prog_bind_map)
)
);
}
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_tcp_gen_syncookie: bpf_func_id = 110;
pub const bpf_func_id_BPF_FUNC_skb_output: bpf_func_id = 111;
pub const bpf_func_id_BPF_FUNC_probe_read_user: bpf_func_id = 112;
pub const bpf_func_id_BPF_FUNC_probe_read_kernel: bpf_func_id = 113;
pub const bpf_func_id_BPF_FUNC_probe_read_user_str: bpf_func_id = 114;
pub const bpf_func_id_BPF_FUNC_probe_read_kernel_str: bpf_func_id = 115;
pub const bpf_func_id_BPF_FUNC_tcp_send_ack: bpf_func_id = 116;
pub const bpf_func_id_BPF_FUNC_send_signal_thread: bpf_func_id = 117;
pub const bpf_func_id_BPF_FUNC_jiffies64: bpf_func_id = 118;
pub const bpf_func_id_BPF_FUNC_read_branch_records: bpf_func_id = 119;
pub const bpf_func_id_BPF_FUNC_get_ns_current_pid_tgid: bpf_func_id = 120;
pub const bpf_func_id_BPF_FUNC_xdp_output: bpf_func_id = 121;
pub const bpf_func_id_BPF_FUNC_get_netns_cookie: bpf_func_id = 122;
pub const bpf_func_id_BPF_FUNC_get_current_ancestor_cgroup_id: bpf_func_id = 123;
pub const bpf_func_id_BPF_FUNC_sk_assign: bpf_func_id = 124;
pub const bpf_func_id_BPF_FUNC_ktime_get_boot_ns: bpf_func_id = 125;
pub const bpf_func_id_BPF_FUNC_seq_printf: bpf_func_id = 126;
pub const bpf_func_id_BPF_FUNC_seq_write: bpf_func_id = 127;
pub const bpf_func_id_BPF_FUNC_sk_cgroup_id: bpf_func_id = 128;
pub const bpf_func_id_BPF_FUNC_sk_ancestor_cgroup_id: bpf_func_id = 129;
pub const bpf_func_id_BPF_FUNC_ringbuf_output: bpf_func_id = 130;
pub const bpf_func_id_BPF_FUNC_ringbuf_reserve: bpf_func_id = 131;
pub const bpf_func_id_BPF_FUNC_ringbuf_submit: bpf_func_id = 132;
pub const bpf_func_id_BPF_FUNC_ringbuf_discard: bpf_func_id = 133;
pub const bpf_func_id_BPF_FUNC_ringbuf_query: bpf_func_id = 134;
pub const bpf_func_id_BPF_FUNC_csum_level: bpf_func_id = 135;
pub const bpf_func_id_BPF_FUNC_skc_to_tcp6_sock: bpf_func_id = 136;
pub const bpf_func_id_BPF_FUNC_skc_to_tcp_sock: bpf_func_id = 137;
pub const bpf_func_id_BPF_FUNC_skc_to_tcp_timewait_sock: bpf_func_id = 138;
pub const bpf_func_id_BPF_FUNC_skc_to_tcp_request_sock: bpf_func_id = 139;
pub const bpf_func_id_BPF_FUNC_skc_to_udp6_sock: bpf_func_id = 140;
pub const bpf_func_id_BPF_FUNC_get_task_stack: bpf_func_id = 141;
pub const bpf_func_id_BPF_FUNC_load_hdr_opt: bpf_func_id = 142;
pub const bpf_func_id_BPF_FUNC_store_hdr_opt: bpf_func_id = 143;
pub const bpf_func_id_BPF_FUNC_reserve_hdr_opt: bpf_func_id = 144;
pub const bpf_func_id_BPF_FUNC_inode_storage_get: bpf_func_id = 145;
pub const bpf_func_id_BPF_FUNC_inode_storage_delete: bpf_func_id = 146;
pub const bpf_func_id_BPF_FUNC_d_path: bpf_func_id = 147;
pub const bpf_func_id_BPF_FUNC_copy_from_user: bpf_func_id = 148;
pub const bpf_func_id_BPF_FUNC_snprintf_btf: bpf_func_id = 149;
pub const bpf_func_id_BPF_FUNC_seq_printf_btf: bpf_func_id = 150;
pub const bpf_func_id_BPF_FUNC_skb_cgroup_classid: bpf_func_id = 151;
pub const bpf_func_id_BPF_FUNC_redirect_neigh: bpf_func_id = 152;
pub const bpf_func_id_BPF_FUNC_per_cpu_ptr: bpf_func_id = 153;
pub const bpf_func_id_BPF_FUNC_this_cpu_ptr: bpf_func_id = 154;
pub const bpf_func_id_BPF_FUNC_redirect_peer: bpf_func_id = 155;
pub const bpf_func_id_BPF_FUNC_task_storage_get: bpf_func_id = 156;
pub const bpf_func_id_BPF_FUNC_task_storage_delete: bpf_func_id = 157;
pub const bpf_func_id_BPF_FUNC_get_current_task_btf: bpf_func_id = 158;
pub const bpf_func_id_BPF_FUNC_bprm_opts_set: bpf_func_id = 159;
pub const bpf_func_id_BPF_FUNC_ktime_get_coarse_ns: bpf_func_id = 160;
pub const bpf_func_id_BPF_FUNC_ima_inode_hash: bpf_func_id = 161;
pub const bpf_func_id_BPF_FUNC_sock_from_file: bpf_func_id = 162;
pub const bpf_func_id_BPF_FUNC_check_mtu: bpf_func_id = 163;
pub const bpf_func_id_BPF_FUNC_for_each_map_elem: bpf_func_id = 164;
pub const bpf_func_id_BPF_FUNC_snprintf: bpf_func_id = 165;
pub const bpf_func_id_BPF_FUNC_sys_bpf: bpf_func_id = 166;
pub const bpf_func_id_BPF_FUNC_btf_find_by_name_kind: bpf_func_id = 167;
pub const bpf_func_id_BPF_FUNC_sys_close: bpf_func_id = 168;
pub const bpf_func_id_BPF_FUNC_timer_init: bpf_func_id = 169;
pub const bpf_func_id_BPF_FUNC_timer_set_callback: bpf_func_id = 170;
pub const bpf_func_id_BPF_FUNC_timer_start: bpf_func_id = 171;
pub const bpf_func_id_BPF_FUNC_timer_cancel: bpf_func_id = 172;
pub const bpf_func_id_BPF_FUNC_get_func_ip: bpf_func_id = 173;
pub const bpf_func_id_BPF_FUNC_get_attach_cookie: bpf_func_id = 174;
pub const bpf_func_id_BPF_FUNC_task_pt_regs: bpf_func_id = 175;
pub const bpf_func_id___BPF_FUNC_MAX_ID: bpf_func_id = 176;
pub type bpf_func_id = ::std::os::raw::c_uint;
pub const BPF_F_RECOMPUTE_CSUM: _bindgen_ty_4 = 1;
pub const BPF_F_INVALIDATE_HASH: _bindgen_ty_4 = 2;
pub type _bindgen_ty_4 = ::std::os::raw::c_uint;
pub const BPF_F_HDR_FIELD_MASK: _bindgen_ty_5 = 15;
pub type _bindgen_ty_5 = ::std::os::raw::c_uint;
pub const BPF_F_PSEUDO_HDR: _bindgen_ty_6 = 16;
pub const BPF_F_MARK_MANGLED_0: _bindgen_ty_6 = 32;
pub const BPF_F_MARK_ENFORCE: _bindgen_ty_6 = 64;
pub type _bindgen_ty_6 = ::std::os::raw::c_uint;
pub const BPF_F_INGRESS: _bindgen_ty_7 = 1;
pub type _bindgen_ty_7 = ::std::os::raw::c_uint;
pub const BPF_F_TUNINFO_IPV6: _bindgen_ty_8 = 1;
pub type _bindgen_ty_8 = ::std::os::raw::c_uint;
pub const BPF_F_SKIP_FIELD_MASK: _bindgen_ty_9 = 255;
pub const BPF_F_USER_STACK: _bindgen_ty_9 = 256;
pub const BPF_F_FAST_STACK_CMP: _bindgen_ty_9 = 512;
pub const BPF_F_REUSE_STACKID: _bindgen_ty_9 = 1024;
pub const BPF_F_USER_BUILD_ID: _bindgen_ty_9 = 2048;
pub type _bindgen_ty_9 = ::std::os::raw::c_uint;
pub const BPF_F_ZERO_CSUM_TX: _bindgen_ty_10 = 2;
pub const BPF_F_DONT_FRAGMENT: _bindgen_ty_10 = 4;
pub const BPF_F_SEQ_NUMBER: _bindgen_ty_10 = 8;
pub type _bindgen_ty_10 = ::std::os::raw::c_uint;
pub const BPF_F_INDEX_MASK: _bindgen_ty_11 = 4294967295;
pub const BPF_F_CURRENT_CPU: _bindgen_ty_11 = 4294967295;
pub const BPF_F_CTXLEN_MASK: _bindgen_ty_11 = 4503595332403200;
pub type _bindgen_ty_11 = ::std::os::raw::c_ulong;
pub const BPF_F_CURRENT_NETNS: _bindgen_ty_12 = -1;
pub type _bindgen_ty_12 = ::std::os::raw::c_int;
pub const BPF_CSUM_LEVEL_QUERY: _bindgen_ty_13 = 0;
pub const BPF_CSUM_LEVEL_INC: _bindgen_ty_13 = 1;
pub const BPF_CSUM_LEVEL_DEC: _bindgen_ty_13 = 2;
pub const BPF_CSUM_LEVEL_RESET: _bindgen_ty_13 = 3;
pub type _bindgen_ty_13 = ::std::os::raw::c_uint;
pub const BPF_F_ADJ_ROOM_FIXED_GSO: _bindgen_ty_14 = 1;
pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV4: _bindgen_ty_14 = 2;
pub const BPF_F_ADJ_ROOM_ENCAP_L3_IPV6: _bindgen_ty_14 = 4;
pub const BPF_F_ADJ_ROOM_ENCAP_L4_GRE: _bindgen_ty_14 = 8;
pub const BPF_F_ADJ_ROOM_ENCAP_L4_UDP: _bindgen_ty_14 = 16;
pub const BPF_F_ADJ_ROOM_NO_CSUM_RESET: _bindgen_ty_14 = 32;
pub const BPF_F_ADJ_ROOM_ENCAP_L2_ETH: _bindgen_ty_14 = 64;
pub type _bindgen_ty_14 = ::std::os::raw::c_uint;
pub const BPF_ADJ_ROOM_ENCAP_L2_MASK: _bindgen_ty_15 = 255;
pub const BPF_ADJ_ROOM_ENCAP_L2_SHIFT: _bindgen_ty_15 = 56;
pub type _bindgen_ty_15 = ::std::os::raw::c_uint;
pub const BPF_F_SYSCTL_BASE_NAME: _bindgen_ty_16 = 1;
pub type _bindgen_ty_16 = ::std::os::raw::c_uint;
pub const BPF_LOCAL_STORAGE_GET_F_CREATE: _bindgen_ty_17 = 1;
pub const BPF_SK_STORAGE_GET_F_CREATE: _bindgen_ty_17 = 1;
pub type _bindgen_ty_17 = ::std::os::raw::c_uint;
pub const BPF_F_GET_BRANCH_RECORDS_SIZE: _bindgen_ty_18 = 1;
pub type _bindgen_ty_18 = ::std::os::raw::c_uint;
pub const BPF_RB_NO_WAKEUP: _bindgen_ty_19 = 1;
pub const BPF_RB_FORCE_WAKEUP: _bindgen_ty_19 = 2;
pub type _bindgen_ty_19 = ::std::os::raw::c_uint;
pub const BPF_RB_AVAIL_DATA: _bindgen_ty_20 = 0;
pub const BPF_RB_RING_SIZE: _bindgen_ty_20 = 1;
pub const BPF_RB_CONS_POS: _bindgen_ty_20 = 2;
pub const BPF_RB_PROD_POS: _bindgen_ty_20 = 3;
pub type _bindgen_ty_20 = ::std::os::raw::c_uint;
pub const BPF_RINGBUF_BUSY_BIT: _bindgen_ty_21 = 2147483648;
pub const BPF_RINGBUF_DISCARD_BIT: _bindgen_ty_21 = 1073741824;
pub const BPF_RINGBUF_HDR_SZ: _bindgen_ty_21 = 8;
pub type _bindgen_ty_21 = ::std::os::raw::c_uint;
pub const BPF_SK_LOOKUP_F_REPLACE: _bindgen_ty_22 = 1;
pub const BPF_SK_LOOKUP_F_NO_REUSEPORT: _bindgen_ty_22 = 2;
pub type _bindgen_ty_22 = ::std::os::raw::c_uint;
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 = ::std::os::raw::c_uint;
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 = ::std::os::raw::c_uint;
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 = ::std::os::raw::c_uint;
pub const BPF_F_BPRM_SECUREEXEC: _bindgen_ty_23 = 1;
pub type _bindgen_ty_23 = ::std::os::raw::c_uint;
pub const BPF_F_BROADCAST: _bindgen_ty_24 = 8;
pub const BPF_F_EXCLUDE_INGRESS: _bindgen_ty_24 = 16;
pub type _bindgen_ty_24 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __sk_buff {
pub len: __u32,
pub pkt_type: __u32,
pub mark: __u32,
pub queue_mapping: __u32,
pub protocol: __u32,
pub vlan_present: __u32,
pub vlan_tci: __u32,
pub vlan_proto: __u32,
pub priority: __u32,
pub ingress_ifindex: __u32,
pub ifindex: __u32,
pub tc_index: __u32,
pub cb: [__u32; 5usize],
pub hash: __u32,
pub tc_classid: __u32,
pub data: __u32,
pub data_end: __u32,
pub napi_id: __u32,
pub family: __u32,
pub remote_ip4: __u32,
pub local_ip4: __u32,
pub remote_ip6: [__u32; 4usize],
pub local_ip6: [__u32; 4usize],
pub remote_port: __u32,
pub local_port: __u32,
pub data_meta: __u32,
pub __bindgen_anon_1: __sk_buff__bindgen_ty_1,
pub tstamp: __u64,
pub wire_len: __u32,
pub gso_segs: __u32,
pub __bindgen_anon_2: __sk_buff__bindgen_ty_2,
pub gso_size: __u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __sk_buff__bindgen_ty_1 {
pub flow_keys: *mut bpf_flow_keys,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout___sk_buff__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<__sk_buff__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).flow_keys) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff__bindgen_ty_1),
"::",
stringify!(flow_keys)
)
);
}
impl __sk_buff__bindgen_ty_1 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __sk_buff__bindgen_ty_2 {
pub sk: *mut bpf_sock,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout___sk_buff__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<__sk_buff__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).sk) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff__bindgen_ty_2),
"::",
stringify!(sk)
)
);
}
impl __sk_buff__bindgen_ty_2 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout___sk_buff() {
const UNINIT: ::std::mem::MaybeUninit<__sk_buff> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__sk_buff>(),
184usize,
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::addr_of!((*ptr).len) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pkt_type) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(pkt_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mark) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(mark)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).queue_mapping) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(queue_mapping)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).protocol) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(protocol)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vlan_present) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(vlan_present)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vlan_tci) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(vlan_tci)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vlan_proto) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(vlan_proto)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(priority)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ingress_ifindex) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(ingress_ifindex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ifindex) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(ifindex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tc_index) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(tc_index)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cb) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(cb)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(hash)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tc_classid) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(tc_classid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_end) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(data_end)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).napi_id) as usize - ptr as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(napi_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).family) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(family)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).remote_ip4) as usize - ptr as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(remote_ip4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).local_ip4) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(local_ip4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).remote_ip6) as usize - ptr as usize },
100usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(remote_ip6)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).local_ip6) as usize - ptr as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(local_ip6)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).remote_port) as usize - ptr as usize },
132usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(remote_port)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).local_port) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(local_port)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_meta) as usize - ptr as usize },
140usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(data_meta)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tstamp) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(tstamp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).wire_len) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(wire_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gso_segs) as usize - ptr as usize },
164usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(gso_segs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gso_size) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(__sk_buff),
"::",
stringify!(gso_size)
)
);
}
#[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],
}
#[test]
fn bindgen_test_layout_bpf_tunnel_key__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_tunnel_key__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).remote_ipv4) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_tunnel_key__bindgen_ty_1),
"::",
stringify!(remote_ipv4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).remote_ipv6) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_tunnel_key__bindgen_ty_1),
"::",
stringify!(remote_ipv6)
)
);
}
#[test]
fn bindgen_test_layout_bpf_tunnel_key() {
const UNINIT: ::std::mem::MaybeUninit<bpf_tunnel_key> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).tunnel_id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_tunnel_key),
"::",
stringify!(tunnel_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tunnel_tos) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_tunnel_key),
"::",
stringify!(tunnel_tos)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tunnel_ttl) as usize - ptr as usize },
21usize,
concat!(
"Offset of field: ",
stringify!(bpf_tunnel_key),
"::",
stringify!(tunnel_ttl)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tunnel_ext) as usize - ptr as usize },
22usize,
concat!(
"Offset of field: ",
stringify!(bpf_tunnel_key),
"::",
stringify!(tunnel_ext)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tunnel_label) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_tunnel_key),
"::",
stringify!(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],
}
#[test]
fn bindgen_test_layout_bpf_xfrm_state__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_xfrm_state__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).remote_ipv4) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_xfrm_state__bindgen_ty_1),
"::",
stringify!(remote_ipv4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).remote_ipv6) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_xfrm_state__bindgen_ty_1),
"::",
stringify!(remote_ipv6)
)
);
}
#[test]
fn bindgen_test_layout_bpf_xfrm_state() {
const UNINIT: ::std::mem::MaybeUninit<bpf_xfrm_state> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).reqid) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_xfrm_state),
"::",
stringify!(reqid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).spi) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_xfrm_state),
"::",
stringify!(spi)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).family) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_xfrm_state),
"::",
stringify!(family)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ext) as usize - ptr as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(bpf_xfrm_state),
"::",
stringify!(ext)
)
);
}
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 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_sock {
pub bound_dev_if: __u32,
pub family: __u32,
pub type_: __u32,
pub protocol: __u32,
pub mark: __u32,
pub priority: __u32,
pub src_ip4: __u32,
pub src_ip6: [__u32; 4usize],
pub src_port: __u32,
pub dst_port: __be16,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
pub dst_ip4: __u32,
pub dst_ip6: [__u32; 4usize],
pub state: __u32,
pub rx_queue_mapping: __s32,
}
#[test]
fn bindgen_test_layout_bpf_sock() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sock> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_sock>(),
80usize,
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::addr_of!((*ptr).bound_dev_if) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(bound_dev_if)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).family) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(family)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).protocol) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(protocol)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mark) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(mark)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(priority)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).src_ip4) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(src_ip4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).src_ip6) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(src_ip6)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).src_port) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(src_port)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dst_port) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(dst_port)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dst_ip4) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(dst_ip4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dst_ip6) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(dst_ip6)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_queue_mapping) as usize - ptr as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock),
"::",
stringify!(rx_queue_mapping)
)
);
}
impl bpf_sock {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_tcp_sock {
pub snd_cwnd: __u32,
pub srtt_us: __u32,
pub rtt_min: __u32,
pub snd_ssthresh: __u32,
pub rcv_nxt: __u32,
pub snd_nxt: __u32,
pub snd_una: __u32,
pub mss_cache: __u32,
pub ecn_flags: __u32,
pub rate_delivered: __u32,
pub rate_interval_us: __u32,
pub packets_out: __u32,
pub retrans_out: __u32,
pub total_retrans: __u32,
pub segs_in: __u32,
pub data_segs_in: __u32,
pub segs_out: __u32,
pub data_segs_out: __u32,
pub lost_out: __u32,
pub sacked_out: __u32,
pub bytes_received: __u64,
pub bytes_acked: __u64,
pub dsack_dups: __u32,
pub delivered: __u32,
pub delivered_ce: __u32,
pub icsk_retransmits: __u32,
}
#[test]
fn bindgen_test_layout_bpf_tcp_sock() {
const UNINIT: ::std::mem::MaybeUninit<bpf_tcp_sock> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).snd_cwnd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(snd_cwnd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).srtt_us) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(srtt_us)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rtt_min) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(rtt_min)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).snd_ssthresh) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(snd_ssthresh)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rcv_nxt) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(rcv_nxt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).snd_nxt) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(snd_nxt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).snd_una) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(snd_una)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mss_cache) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(mss_cache)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ecn_flags) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(ecn_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rate_delivered) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(rate_delivered)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rate_interval_us) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(rate_interval_us)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).packets_out) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(packets_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).retrans_out) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(retrans_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).total_retrans) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(total_retrans)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).segs_in) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(segs_in)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_segs_in) as usize - ptr as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(data_segs_in)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).segs_out) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(segs_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_segs_out) as usize - ptr as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(data_segs_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).lost_out) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(lost_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sacked_out) as usize - ptr as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(sacked_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bytes_received) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(bytes_received)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bytes_acked) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(bytes_acked)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dsack_dups) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(dsack_dups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).delivered) as usize - ptr as usize },
100usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(delivered)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).delivered_ce) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(bpf_tcp_sock),
"::",
stringify!(delivered_ce)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).icsk_retransmits) as usize - ptr 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,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1 {
pub saddr: __be32,
pub daddr: __be32,
pub sport: __be16,
pub dport: __be16,
}
#[test]
fn bindgen_test_layout_bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).saddr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(saddr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).daddr) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(daddr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sport) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(sport)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dport) as usize - ptr as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(dport)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2 {
pub saddr: [__be32; 4usize],
pub daddr: [__be32; 4usize],
pub sport: __be16,
pub dport: __be16,
}
#[test]
fn bindgen_test_layout_bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).saddr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(saddr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).daddr) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(daddr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sport) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(sport)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dport) as usize - ptr 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() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sock_tuple__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).ipv4) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1),
"::",
stringify!(ipv4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ipv6) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_tuple__bindgen_ty_1),
"::",
stringify!(ipv6)
)
);
}
#[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))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_xdp_sock {
pub queue_id: __u32,
}
#[test]
fn bindgen_test_layout_bpf_xdp_sock() {
const UNINIT: ::std::mem::MaybeUninit<bpf_xdp_sock> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).queue_id) as usize - ptr 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 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xdp_md {
pub data: __u32,
pub data_end: __u32,
pub data_meta: __u32,
pub ingress_ifindex: __u32,
pub rx_queue_index: __u32,
pub egress_ifindex: __u32,
}
#[test]
fn bindgen_test_layout_xdp_md() {
const UNINIT: ::std::mem::MaybeUninit<xdp_md> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<xdp_md>(),
24usize,
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::addr_of!((*ptr).data) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xdp_md),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_end) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(xdp_md),
"::",
stringify!(data_end)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_meta) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(xdp_md),
"::",
stringify!(data_meta)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ingress_ifindex) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(xdp_md),
"::",
stringify!(ingress_ifindex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_queue_index) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(xdp_md),
"::",
stringify!(rx_queue_index)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).egress_ifindex) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(xdp_md),
"::",
stringify!(egress_ifindex)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_devmap_val {
pub ifindex: __u32,
pub bpf_prog: bpf_devmap_val__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_devmap_val__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub id: __u32,
}
#[test]
fn bindgen_test_layout_bpf_devmap_val__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_devmap_val__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_devmap_val__bindgen_ty_1>(),
4usize,
concat!("Size of: ", stringify!(bpf_devmap_val__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_devmap_val__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(bpf_devmap_val__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_devmap_val__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_devmap_val__bindgen_ty_1),
"::",
stringify!(id)
)
);
}
#[test]
fn bindgen_test_layout_bpf_devmap_val() {
const UNINIT: ::std::mem::MaybeUninit<bpf_devmap_val> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_devmap_val>(),
8usize,
concat!("Size of: ", stringify!(bpf_devmap_val))
);
assert_eq!(
::std::mem::align_of::<bpf_devmap_val>(),
4usize,
concat!("Alignment of ", stringify!(bpf_devmap_val))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ifindex) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_devmap_val),
"::",
stringify!(ifindex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpf_prog) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_devmap_val),
"::",
stringify!(bpf_prog)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_cpumap_val {
pub qsize: __u32,
pub bpf_prog: bpf_cpumap_val__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_cpumap_val__bindgen_ty_1 {
pub fd: ::std::os::raw::c_int,
pub id: __u32,
}
#[test]
fn bindgen_test_layout_bpf_cpumap_val__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_cpumap_val__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_cpumap_val__bindgen_ty_1>(),
4usize,
concat!("Size of: ", stringify!(bpf_cpumap_val__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_cpumap_val__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(bpf_cpumap_val__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_cpumap_val__bindgen_ty_1),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_cpumap_val__bindgen_ty_1),
"::",
stringify!(id)
)
);
}
#[test]
fn bindgen_test_layout_bpf_cpumap_val() {
const UNINIT: ::std::mem::MaybeUninit<bpf_cpumap_val> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_cpumap_val>(),
8usize,
concat!("Size of: ", stringify!(bpf_cpumap_val))
);
assert_eq!(
::std::mem::align_of::<bpf_cpumap_val>(),
4usize,
concat!("Alignment of ", stringify!(bpf_cpumap_val))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).qsize) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_cpumap_val),
"::",
stringify!(qsize)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpf_prog) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_cpumap_val),
"::",
stringify!(bpf_prog)
)
);
}
pub const sk_action_SK_DROP: sk_action = 0;
pub const sk_action_SK_PASS: sk_action = 1;
pub type sk_action = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct sk_msg_md {
pub __bindgen_anon_1: sk_msg_md__bindgen_ty_1,
pub __bindgen_anon_2: sk_msg_md__bindgen_ty_2,
pub family: __u32,
pub remote_ip4: __u32,
pub local_ip4: __u32,
pub remote_ip6: [__u32; 4usize],
pub local_ip6: [__u32; 4usize],
pub remote_port: __u32,
pub local_port: __u32,
pub size: __u32,
pub __bindgen_anon_3: sk_msg_md__bindgen_ty_3,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union sk_msg_md__bindgen_ty_1 {
pub data: *mut ::std::os::raw::c_void,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_sk_msg_md__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<sk_msg_md__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<sk_msg_md__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(sk_msg_md__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<sk_msg_md__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(sk_msg_md__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sk_msg_md__bindgen_ty_1),
"::",
stringify!(data)
)
);
}
impl sk_msg_md__bindgen_ty_1 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union sk_msg_md__bindgen_ty_2 {
pub data_end: *mut ::std::os::raw::c_void,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_sk_msg_md__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<sk_msg_md__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<sk_msg_md__bindgen_ty_2>(),
8usize,
concat!("Size of: ", stringify!(sk_msg_md__bindgen_ty_2))
);
assert_eq!(
::std::mem::align_of::<sk_msg_md__bindgen_ty_2>(),
8usize,
concat!("Alignment of ", stringify!(sk_msg_md__bindgen_ty_2))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_end) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sk_msg_md__bindgen_ty_2),
"::",
stringify!(data_end)
)
);
}
impl sk_msg_md__bindgen_ty_2 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union sk_msg_md__bindgen_ty_3 {
pub sk: *mut bpf_sock,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_sk_msg_md__bindgen_ty_3() {
const UNINIT: ::std::mem::MaybeUninit<sk_msg_md__bindgen_ty_3> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<sk_msg_md__bindgen_ty_3>(),
8usize,
concat!("Size of: ", stringify!(sk_msg_md__bindgen_ty_3))
);
assert_eq!(
::std::mem::align_of::<sk_msg_md__bindgen_ty_3>(),
8usize,
concat!("Alignment of ", stringify!(sk_msg_md__bindgen_ty_3))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sk_msg_md__bindgen_ty_3),
"::",
stringify!(sk)
)
);
}
impl sk_msg_md__bindgen_ty_3 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_sk_msg_md() {
const UNINIT: ::std::mem::MaybeUninit<sk_msg_md> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<sk_msg_md>(),
80usize,
concat!("Size of: ", stringify!(sk_msg_md))
);
assert_eq!(
::std::mem::align_of::<sk_msg_md>(),
8usize,
concat!("Alignment of ", stringify!(sk_msg_md))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).family) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(sk_msg_md),
"::",
stringify!(family)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).remote_ip4) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(sk_msg_md),
"::",
stringify!(remote_ip4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).local_ip4) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(sk_msg_md),
"::",
stringify!(local_ip4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).remote_ip6) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(sk_msg_md),
"::",
stringify!(remote_ip6)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).local_ip6) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(sk_msg_md),
"::",
stringify!(local_ip6)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).remote_port) as usize - ptr as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(sk_msg_md),
"::",
stringify!(remote_port)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).local_port) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(sk_msg_md),
"::",
stringify!(local_port)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(sk_msg_md),
"::",
stringify!(size)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct sk_reuseport_md {
pub __bindgen_anon_1: sk_reuseport_md__bindgen_ty_1,
pub __bindgen_anon_2: sk_reuseport_md__bindgen_ty_2,
pub len: __u32,
pub eth_protocol: __u32,
pub ip_protocol: __u32,
pub bind_inany: __u32,
pub hash: __u32,
pub __bindgen_anon_3: sk_reuseport_md__bindgen_ty_3,
pub __bindgen_anon_4: sk_reuseport_md__bindgen_ty_4,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union sk_reuseport_md__bindgen_ty_1 {
pub data: *mut ::std::os::raw::c_void,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_sk_reuseport_md__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<sk_reuseport_md__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<sk_reuseport_md__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(sk_reuseport_md__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<sk_reuseport_md__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(sk_reuseport_md__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sk_reuseport_md__bindgen_ty_1),
"::",
stringify!(data)
)
);
}
impl sk_reuseport_md__bindgen_ty_1 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union sk_reuseport_md__bindgen_ty_2 {
pub data_end: *mut ::std::os::raw::c_void,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_sk_reuseport_md__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<sk_reuseport_md__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<sk_reuseport_md__bindgen_ty_2>(),
8usize,
concat!("Size of: ", stringify!(sk_reuseport_md__bindgen_ty_2))
);
assert_eq!(
::std::mem::align_of::<sk_reuseport_md__bindgen_ty_2>(),
8usize,
concat!("Alignment of ", stringify!(sk_reuseport_md__bindgen_ty_2))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_end) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sk_reuseport_md__bindgen_ty_2),
"::",
stringify!(data_end)
)
);
}
impl sk_reuseport_md__bindgen_ty_2 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union sk_reuseport_md__bindgen_ty_3 {
pub sk: *mut bpf_sock,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_sk_reuseport_md__bindgen_ty_3() {
const UNINIT: ::std::mem::MaybeUninit<sk_reuseport_md__bindgen_ty_3> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<sk_reuseport_md__bindgen_ty_3>(),
8usize,
concat!("Size of: ", stringify!(sk_reuseport_md__bindgen_ty_3))
);
assert_eq!(
::std::mem::align_of::<sk_reuseport_md__bindgen_ty_3>(),
8usize,
concat!("Alignment of ", stringify!(sk_reuseport_md__bindgen_ty_3))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sk_reuseport_md__bindgen_ty_3),
"::",
stringify!(sk)
)
);
}
impl sk_reuseport_md__bindgen_ty_3 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union sk_reuseport_md__bindgen_ty_4 {
pub migrating_sk: *mut bpf_sock,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_sk_reuseport_md__bindgen_ty_4() {
const UNINIT: ::std::mem::MaybeUninit<sk_reuseport_md__bindgen_ty_4> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<sk_reuseport_md__bindgen_ty_4>(),
8usize,
concat!("Size of: ", stringify!(sk_reuseport_md__bindgen_ty_4))
);
assert_eq!(
::std::mem::align_of::<sk_reuseport_md__bindgen_ty_4>(),
8usize,
concat!("Alignment of ", stringify!(sk_reuseport_md__bindgen_ty_4))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).migrating_sk) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sk_reuseport_md__bindgen_ty_4),
"::",
stringify!(migrating_sk)
)
);
}
impl sk_reuseport_md__bindgen_ty_4 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_sk_reuseport_md() {
const UNINIT: ::std::mem::MaybeUninit<sk_reuseport_md> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<sk_reuseport_md>(),
56usize,
concat!("Size of: ", stringify!(sk_reuseport_md))
);
assert_eq!(
::std::mem::align_of::<sk_reuseport_md>(),
8usize,
concat!("Alignment of ", stringify!(sk_reuseport_md))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(sk_reuseport_md),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).eth_protocol) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(sk_reuseport_md),
"::",
stringify!(eth_protocol)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ip_protocol) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(sk_reuseport_md),
"::",
stringify!(ip_protocol)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bind_inany) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(sk_reuseport_md),
"::",
stringify!(bind_inany)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(sk_reuseport_md),
"::",
stringify!(hash)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_prog_info {
pub type_: __u32,
pub id: __u32,
pub tag: [__u8; 8usize],
pub jited_prog_len: __u32,
pub xlated_prog_len: __u32,
pub jited_prog_insns: __u64,
pub xlated_prog_insns: __u64,
pub load_time: __u64,
pub created_by_uid: __u32,
pub nr_map_ids: __u32,
pub map_ids: __u64,
pub name: [::std::os::raw::c_char; 16usize],
pub ifindex: __u32,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
pub netns_dev: __u64,
pub netns_ino: __u64,
pub nr_jited_ksyms: __u32,
pub nr_jited_func_lens: __u32,
pub jited_ksyms: __u64,
pub jited_func_lens: __u64,
pub btf_id: __u32,
pub func_info_rec_size: __u32,
pub func_info: __u64,
pub nr_func_info: __u32,
pub nr_line_info: __u32,
pub line_info: __u64,
pub jited_line_info: __u64,
pub nr_jited_line_info: __u32,
pub line_info_rec_size: __u32,
pub jited_line_info_rec_size: __u32,
pub nr_prog_tags: __u32,
pub prog_tags: __u64,
pub run_time_ns: __u64,
pub run_cnt: __u64,
pub recursion_misses: __u64,
}
#[test]
fn bindgen_test_layout_bpf_prog_info() {
const UNINIT: ::std::mem::MaybeUninit<bpf_prog_info> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_prog_info>(),
216usize,
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::addr_of!((*ptr).type_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(tag)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).jited_prog_len) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(jited_prog_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xlated_prog_len) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(xlated_prog_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).jited_prog_insns) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(jited_prog_insns)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xlated_prog_insns) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(xlated_prog_insns)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).load_time) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(load_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).created_by_uid) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(created_by_uid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nr_map_ids) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(nr_map_ids)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_ids) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(map_ids)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ifindex) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(ifindex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).netns_dev) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(netns_dev)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).netns_ino) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(netns_ino)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nr_jited_ksyms) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(nr_jited_ksyms)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nr_jited_func_lens) as usize - ptr as usize },
108usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(nr_jited_func_lens)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).jited_ksyms) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(jited_ksyms)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).jited_func_lens) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(jited_func_lens)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_id) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(btf_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).func_info_rec_size) as usize - ptr as usize },
132usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(func_info_rec_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).func_info) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(func_info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nr_func_info) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(nr_func_info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nr_line_info) as usize - ptr as usize },
148usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(nr_line_info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).line_info) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(line_info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).jited_line_info) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(jited_line_info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nr_jited_line_info) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(nr_jited_line_info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).line_info_rec_size) as usize - ptr as usize },
172usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(line_info_rec_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).jited_line_info_rec_size) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(jited_line_info_rec_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nr_prog_tags) as usize - ptr as usize },
180usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(nr_prog_tags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_tags) as usize - ptr as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(prog_tags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).run_time_ns) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(run_time_ns)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).run_cnt) as usize - ptr as usize },
200usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(run_cnt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).recursion_misses) as usize - ptr as usize },
208usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_info),
"::",
stringify!(recursion_misses)
)
);
}
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]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = 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, Copy, Clone)]
pub struct bpf_map_info {
pub type_: __u32,
pub id: __u32,
pub key_size: __u32,
pub value_size: __u32,
pub max_entries: __u32,
pub map_flags: __u32,
pub name: [::std::os::raw::c_char; 16usize],
pub ifindex: __u32,
pub btf_vmlinux_value_type_id: __u32,
pub netns_dev: __u64,
pub netns_ino: __u64,
pub btf_id: __u32,
pub btf_key_type_id: __u32,
pub btf_value_type_id: __u32,
}
#[test]
fn bindgen_test_layout_bpf_map_info() {
const UNINIT: ::std::mem::MaybeUninit<bpf_map_info> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).type_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).key_size) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(key_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).value_size) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(value_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).max_entries) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(max_entries)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_flags) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(map_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ifindex) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(ifindex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_vmlinux_value_type_id) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(btf_vmlinux_value_type_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).netns_dev) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(netns_dev)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).netns_ino) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(netns_ino)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_id) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(btf_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_key_type_id) as usize - ptr as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(btf_key_type_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_value_type_id) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_info),
"::",
stringify!(btf_value_type_id)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_btf_info {
pub btf: __u64,
pub btf_size: __u32,
pub id: __u32,
pub name: __u64,
pub name_len: __u32,
pub kernel_btf: __u32,
}
#[test]
fn bindgen_test_layout_bpf_btf_info() {
const UNINIT: ::std::mem::MaybeUninit<bpf_btf_info> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_btf_info>(),
32usize,
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::addr_of!((*ptr).btf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_btf_info),
"::",
stringify!(btf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_size) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_btf_info),
"::",
stringify!(btf_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_btf_info),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_btf_info),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name_len) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_btf_info),
"::",
stringify!(name_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).kernel_btf) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_btf_info),
"::",
stringify!(kernel_btf)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_link_info {
pub type_: __u32,
pub id: __u32,
pub prog_id: __u32,
pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_link_info__bindgen_ty_1 {
pub raw_tracepoint: bpf_link_info__bindgen_ty_1__bindgen_ty_1,
pub tracing: bpf_link_info__bindgen_ty_1__bindgen_ty_2,
pub cgroup: bpf_link_info__bindgen_ty_1__bindgen_ty_3,
pub iter: bpf_link_info__bindgen_ty_1__bindgen_ty_4,
pub netns: bpf_link_info__bindgen_ty_1__bindgen_ty_5,
pub xdp: bpf_link_info__bindgen_ty_1__bindgen_ty_6,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_1 {
pub tp_name: __u64,
pub tp_name_len: __u32,
}
#[test]
fn bindgen_test_layout_bpf_link_info__bindgen_ty_1__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_link_info__bindgen_ty_1__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_link_info__bindgen_ty_1__bindgen_ty_1>(),
16usize,
concat!(
"Size of: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<bpf_link_info__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tp_name) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(tp_name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tp_name_len) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(tp_name_len)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_2 {
pub attach_type: __u32,
pub target_obj_id: __u32,
pub target_btf_id: __u32,
}
#[test]
fn bindgen_test_layout_bpf_link_info__bindgen_ty_1__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<bpf_link_info__bindgen_ty_1__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_link_info__bindgen_ty_1__bindgen_ty_2>(),
12usize,
concat!(
"Size of: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<bpf_link_info__bindgen_ty_1__bindgen_ty_2>(),
4usize,
concat!(
"Alignment of ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_type) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(attach_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).target_obj_id) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(target_obj_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).target_btf_id) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(target_btf_id)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_3 {
pub cgroup_id: __u64,
pub attach_type: __u32,
}
#[test]
fn bindgen_test_layout_bpf_link_info__bindgen_ty_1__bindgen_ty_3() {
const UNINIT: ::std::mem::MaybeUninit<bpf_link_info__bindgen_ty_1__bindgen_ty_3> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_link_info__bindgen_ty_1__bindgen_ty_3>(),
16usize,
concat!(
"Size of: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
::std::mem::align_of::<bpf_link_info__bindgen_ty_1__bindgen_ty_3>(),
8usize,
concat!(
"Alignment of ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cgroup_id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(cgroup_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_type) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(attach_type)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4 {
pub target_name: __u64,
pub target_name_len: __u32,
pub __bindgen_anon_1: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 {
pub map: bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 {
pub map_id: __u32,
}
#[test]
fn bindgen_test_layout_bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<
bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1,
> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1>(
),
4usize,
concat!(
"Size of: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1>(
),
4usize,
concat!(
"Alignment of ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(map_id)
)
);
}
#[test]
fn bindgen_test_layout_bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1>(),
4usize,
concat!(
"Size of: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1),
"::",
stringify!(map)
)
);
}
#[test]
fn bindgen_test_layout_bpf_link_info__bindgen_ty_1__bindgen_ty_4() {
const UNINIT: ::std::mem::MaybeUninit<bpf_link_info__bindgen_ty_1__bindgen_ty_4> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_link_info__bindgen_ty_1__bindgen_ty_4>(),
16usize,
concat!(
"Size of: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_4)
)
);
assert_eq!(
::std::mem::align_of::<bpf_link_info__bindgen_ty_1__bindgen_ty_4>(),
8usize,
concat!(
"Alignment of ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).target_name) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(target_name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).target_name_len) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_4),
"::",
stringify!(target_name_len)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_5 {
pub netns_ino: __u32,
pub attach_type: __u32,
}
#[test]
fn bindgen_test_layout_bpf_link_info__bindgen_ty_1__bindgen_ty_5() {
const UNINIT: ::std::mem::MaybeUninit<bpf_link_info__bindgen_ty_1__bindgen_ty_5> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_link_info__bindgen_ty_1__bindgen_ty_5>(),
8usize,
concat!(
"Size of: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_5)
)
);
assert_eq!(
::std::mem::align_of::<bpf_link_info__bindgen_ty_1__bindgen_ty_5>(),
4usize,
concat!(
"Alignment of ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_5)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).netns_ino) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(netns_ino)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_type) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_5),
"::",
stringify!(attach_type)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_link_info__bindgen_ty_1__bindgen_ty_6 {
pub ifindex: __u32,
}
#[test]
fn bindgen_test_layout_bpf_link_info__bindgen_ty_1__bindgen_ty_6() {
const UNINIT: ::std::mem::MaybeUninit<bpf_link_info__bindgen_ty_1__bindgen_ty_6> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_link_info__bindgen_ty_1__bindgen_ty_6>(),
4usize,
concat!(
"Size of: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_6)
)
);
assert_eq!(
::std::mem::align_of::<bpf_link_info__bindgen_ty_1__bindgen_ty_6>(),
4usize,
concat!(
"Alignment of ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_6)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ifindex) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1__bindgen_ty_6),
"::",
stringify!(ifindex)
)
);
}
#[test]
fn bindgen_test_layout_bpf_link_info__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_link_info__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_link_info__bindgen_ty_1>(),
16usize,
concat!("Size of: ", stringify!(bpf_link_info__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_link_info__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(bpf_link_info__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).raw_tracepoint) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1),
"::",
stringify!(raw_tracepoint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tracing) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1),
"::",
stringify!(tracing)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cgroup) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1),
"::",
stringify!(cgroup)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).iter) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1),
"::",
stringify!(iter)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).netns) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1),
"::",
stringify!(netns)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xdp) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info__bindgen_ty_1),
"::",
stringify!(xdp)
)
);
}
#[test]
fn bindgen_test_layout_bpf_link_info() {
const UNINIT: ::std::mem::MaybeUninit<bpf_link_info> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_link_info>(),
32usize,
concat!("Size of: ", stringify!(bpf_link_info))
);
assert_eq!(
::std::mem::align_of::<bpf_link_info>(),
8usize,
concat!("Alignment of ", stringify!(bpf_link_info))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_id) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_info),
"::",
stringify!(prog_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_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_bpf_sock_addr__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sock_addr__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).sk) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr__bindgen_ty_1),
"::",
stringify!(sk)
)
);
}
impl bpf_sock_addr__bindgen_ty_1 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_bpf_sock_addr() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sock_addr> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).user_family) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(user_family)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).user_ip4) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(user_ip4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).user_ip6) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(user_ip6)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).user_port) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(user_port)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).family) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(family)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).protocol) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(protocol)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).msg_src_ip4) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(msg_src_ip4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).msg_src_ip6) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_addr),
"::",
stringify!(msg_src_ip6)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_sock_ops {
pub op: __u32,
pub __bindgen_anon_1: bpf_sock_ops__bindgen_ty_1,
pub family: __u32,
pub remote_ip4: __u32,
pub local_ip4: __u32,
pub remote_ip6: [__u32; 4usize],
pub local_ip6: [__u32; 4usize],
pub remote_port: __u32,
pub local_port: __u32,
pub is_fullsock: __u32,
pub snd_cwnd: __u32,
pub srtt_us: __u32,
pub bpf_sock_ops_cb_flags: __u32,
pub state: __u32,
pub rtt_min: __u32,
pub snd_ssthresh: __u32,
pub rcv_nxt: __u32,
pub snd_nxt: __u32,
pub snd_una: __u32,
pub mss_cache: __u32,
pub ecn_flags: __u32,
pub rate_delivered: __u32,
pub rate_interval_us: __u32,
pub packets_out: __u32,
pub retrans_out: __u32,
pub total_retrans: __u32,
pub segs_in: __u32,
pub data_segs_in: __u32,
pub segs_out: __u32,
pub data_segs_out: __u32,
pub lost_out: __u32,
pub sacked_out: __u32,
pub sk_txhash: __u32,
pub bytes_received: __u64,
pub bytes_acked: __u64,
pub __bindgen_anon_2: bpf_sock_ops__bindgen_ty_2,
pub __bindgen_anon_3: bpf_sock_ops__bindgen_ty_3,
pub __bindgen_anon_4: bpf_sock_ops__bindgen_ty_4,
pub skb_len: __u32,
pub skb_tcp_flags: __u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_sock_ops__bindgen_ty_1 {
pub args: [__u32; 4usize],
pub reply: __u32,
pub replylong: [__u32; 4usize],
}
#[test]
fn bindgen_test_layout_bpf_sock_ops__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sock_ops__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).args) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops__bindgen_ty_1),
"::",
stringify!(args)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).reply) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops__bindgen_ty_1),
"::",
stringify!(reply)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).replylong) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops__bindgen_ty_1),
"::",
stringify!(replylong)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_sock_ops__bindgen_ty_2 {
pub sk: *mut bpf_sock,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_bpf_sock_ops__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sock_ops__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).sk) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops__bindgen_ty_2),
"::",
stringify!(sk)
)
);
}
impl bpf_sock_ops__bindgen_ty_2 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_sock_ops__bindgen_ty_3 {
pub skb_data: *mut ::std::os::raw::c_void,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_bpf_sock_ops__bindgen_ty_3() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sock_ops__bindgen_ty_3> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_sock_ops__bindgen_ty_3>(),
8usize,
concat!("Size of: ", stringify!(bpf_sock_ops__bindgen_ty_3))
);
assert_eq!(
::std::mem::align_of::<bpf_sock_ops__bindgen_ty_3>(),
8usize,
concat!("Alignment of ", stringify!(bpf_sock_ops__bindgen_ty_3))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).skb_data) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops__bindgen_ty_3),
"::",
stringify!(skb_data)
)
);
}
impl bpf_sock_ops__bindgen_ty_3 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_sock_ops__bindgen_ty_4 {
pub skb_data_end: *mut ::std::os::raw::c_void,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_bpf_sock_ops__bindgen_ty_4() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sock_ops__bindgen_ty_4> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_sock_ops__bindgen_ty_4>(),
8usize,
concat!("Size of: ", stringify!(bpf_sock_ops__bindgen_ty_4))
);
assert_eq!(
::std::mem::align_of::<bpf_sock_ops__bindgen_ty_4>(),
8usize,
concat!("Alignment of ", stringify!(bpf_sock_ops__bindgen_ty_4))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).skb_data_end) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops__bindgen_ty_4),
"::",
stringify!(skb_data_end)
)
);
}
impl bpf_sock_ops__bindgen_ty_4 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_bpf_sock_ops() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sock_ops> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_sock_ops>(),
216usize,
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::addr_of!((*ptr).op) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(op)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).family) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(family)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).remote_ip4) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(remote_ip4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).local_ip4) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(local_ip4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).remote_ip6) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(remote_ip6)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).local_ip6) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(local_ip6)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).remote_port) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(remote_port)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).local_port) as usize - ptr as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(local_port)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).is_fullsock) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(is_fullsock)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).snd_cwnd) as usize - ptr as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(snd_cwnd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).srtt_us) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(srtt_us)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpf_sock_ops_cb_flags) as usize - ptr as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(bpf_sock_ops_cb_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(state)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rtt_min) as usize - ptr as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(rtt_min)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).snd_ssthresh) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(snd_ssthresh)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rcv_nxt) as usize - ptr as usize },
100usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(rcv_nxt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).snd_nxt) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(snd_nxt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).snd_una) as usize - ptr as usize },
108usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(snd_una)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mss_cache) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(mss_cache)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ecn_flags) as usize - ptr as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(ecn_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rate_delivered) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(rate_delivered)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rate_interval_us) as usize - ptr as usize },
124usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(rate_interval_us)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).packets_out) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(packets_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).retrans_out) as usize - ptr as usize },
132usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(retrans_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).total_retrans) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(total_retrans)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).segs_in) as usize - ptr as usize },
140usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(segs_in)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_segs_in) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(data_segs_in)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).segs_out) as usize - ptr as usize },
148usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(segs_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_segs_out) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(data_segs_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).lost_out) as usize - ptr as usize },
156usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(lost_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sacked_out) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(sacked_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sk_txhash) as usize - ptr as usize },
164usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(sk_txhash)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bytes_received) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(bytes_received)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bytes_acked) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(bytes_acked)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).skb_len) as usize - ptr as usize },
208usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(skb_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).skb_tcp_flags) as usize - ptr as usize },
212usize,
concat!(
"Offset of field: ",
stringify!(bpf_sock_ops),
"::",
stringify!(skb_tcp_flags)
)
);
}
pub const BPF_SOCK_OPS_RTO_CB_FLAG: _bindgen_ty_25 = 1;
pub const BPF_SOCK_OPS_RETRANS_CB_FLAG: _bindgen_ty_25 = 2;
pub const BPF_SOCK_OPS_STATE_CB_FLAG: _bindgen_ty_25 = 4;
pub const BPF_SOCK_OPS_RTT_CB_FLAG: _bindgen_ty_25 = 8;
pub const BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG: _bindgen_ty_25 = 16;
pub const BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG: _bindgen_ty_25 = 32;
pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG: _bindgen_ty_25 = 64;
pub const BPF_SOCK_OPS_ALL_CB_FLAGS: _bindgen_ty_25 = 127;
pub type _bindgen_ty_25 = ::std::os::raw::c_uint;
pub const BPF_SOCK_OPS_VOID: _bindgen_ty_26 = 0;
pub const BPF_SOCK_OPS_TIMEOUT_INIT: _bindgen_ty_26 = 1;
pub const BPF_SOCK_OPS_RWND_INIT: _bindgen_ty_26 = 2;
pub const BPF_SOCK_OPS_TCP_CONNECT_CB: _bindgen_ty_26 = 3;
pub const BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB: _bindgen_ty_26 = 4;
pub const BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: _bindgen_ty_26 = 5;
pub const BPF_SOCK_OPS_NEEDS_ECN: _bindgen_ty_26 = 6;
pub const BPF_SOCK_OPS_BASE_RTT: _bindgen_ty_26 = 7;
pub const BPF_SOCK_OPS_RTO_CB: _bindgen_ty_26 = 8;
pub const BPF_SOCK_OPS_RETRANS_CB: _bindgen_ty_26 = 9;
pub const BPF_SOCK_OPS_STATE_CB: _bindgen_ty_26 = 10;
pub const BPF_SOCK_OPS_TCP_LISTEN_CB: _bindgen_ty_26 = 11;
pub const BPF_SOCK_OPS_RTT_CB: _bindgen_ty_26 = 12;
pub const BPF_SOCK_OPS_PARSE_HDR_OPT_CB: _bindgen_ty_26 = 13;
pub const BPF_SOCK_OPS_HDR_OPT_LEN_CB: _bindgen_ty_26 = 14;
pub const BPF_SOCK_OPS_WRITE_HDR_OPT_CB: _bindgen_ty_26 = 15;
pub type _bindgen_ty_26 = ::std::os::raw::c_uint;
pub const BPF_TCP_ESTABLISHED: _bindgen_ty_27 = 1;
pub const BPF_TCP_SYN_SENT: _bindgen_ty_27 = 2;
pub const BPF_TCP_SYN_RECV: _bindgen_ty_27 = 3;
pub const BPF_TCP_FIN_WAIT1: _bindgen_ty_27 = 4;
pub const BPF_TCP_FIN_WAIT2: _bindgen_ty_27 = 5;
pub const BPF_TCP_TIME_WAIT: _bindgen_ty_27 = 6;
pub const BPF_TCP_CLOSE: _bindgen_ty_27 = 7;
pub const BPF_TCP_CLOSE_WAIT: _bindgen_ty_27 = 8;
pub const BPF_TCP_LAST_ACK: _bindgen_ty_27 = 9;
pub const BPF_TCP_LISTEN: _bindgen_ty_27 = 10;
pub const BPF_TCP_CLOSING: _bindgen_ty_27 = 11;
pub const BPF_TCP_NEW_SYN_RECV: _bindgen_ty_27 = 12;
pub const BPF_TCP_MAX_STATES: _bindgen_ty_27 = 13;
pub type _bindgen_ty_27 = ::std::os::raw::c_uint;
pub const TCP_BPF_IW: _bindgen_ty_28 = 1001;
pub const TCP_BPF_SNDCWND_CLAMP: _bindgen_ty_28 = 1002;
pub const TCP_BPF_DELACK_MAX: _bindgen_ty_28 = 1003;
pub const TCP_BPF_RTO_MIN: _bindgen_ty_28 = 1004;
pub const TCP_BPF_SYN: _bindgen_ty_28 = 1005;
pub const TCP_BPF_SYN_IP: _bindgen_ty_28 = 1006;
pub const TCP_BPF_SYN_MAC: _bindgen_ty_28 = 1007;
pub type _bindgen_ty_28 = ::std::os::raw::c_uint;
pub const BPF_LOAD_HDR_OPT_TCP_SYN: _bindgen_ty_29 = 1;
pub type _bindgen_ty_29 = ::std::os::raw::c_uint;
pub const BPF_WRITE_HDR_TCP_CURRENT_MSS: _bindgen_ty_30 = 1;
pub const BPF_WRITE_HDR_TCP_SYNACK_COOKIE: _bindgen_ty_30 = 2;
pub type _bindgen_ty_30 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_perf_event_value {
pub counter: __u64,
pub enabled: __u64,
pub running: __u64,
}
#[test]
fn bindgen_test_layout_bpf_perf_event_value() {
const UNINIT: ::std::mem::MaybeUninit<bpf_perf_event_value> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).counter) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_perf_event_value),
"::",
stringify!(counter)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).enabled) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_perf_event_value),
"::",
stringify!(enabled)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).running) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_perf_event_value),
"::",
stringify!(running)
)
);
}
pub const BPF_DEVCG_ACC_MKNOD: _bindgen_ty_31 = 1;
pub const BPF_DEVCG_ACC_READ: _bindgen_ty_31 = 2;
pub const BPF_DEVCG_ACC_WRITE: _bindgen_ty_31 = 4;
pub type _bindgen_ty_31 = ::std::os::raw::c_uint;
pub const BPF_DEVCG_DEV_BLOCK: _bindgen_ty_32 = 1;
pub const BPF_DEVCG_DEV_CHAR: _bindgen_ty_32 = 2;
pub type _bindgen_ty_32 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
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() {
const UNINIT: ::std::mem::MaybeUninit<bpf_cgroup_dev_ctx> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).access_type) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_cgroup_dev_ctx),
"::",
stringify!(access_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_cgroup_dev_ctx),
"::",
stringify!(major)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_cgroup_dev_ctx),
"::",
stringify!(minor)
)
);
}
#[repr(C)]
#[derive(Debug)]
pub struct bpf_raw_tracepoint_args {
pub args: __IncompleteArrayField<__u64>,
}
#[test]
fn bindgen_test_layout_bpf_raw_tracepoint_args() {
const UNINIT: ::std::mem::MaybeUninit<bpf_raw_tracepoint_args> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_raw_tracepoint_args>(),
0usize,
concat!("Size of: ", stringify!(bpf_raw_tracepoint_args))
);
assert_eq!(
::std::mem::align_of::<bpf_raw_tracepoint_args>(),
8usize,
concat!("Alignment of ", stringify!(bpf_raw_tracepoint_args))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).args) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_raw_tracepoint_args),
"::",
stringify!(args)
)
);
}
pub const BPF_FIB_LOOKUP_DIRECT: _bindgen_ty_33 = 1;
pub const BPF_FIB_LOOKUP_OUTPUT: _bindgen_ty_33 = 2;
pub type _bindgen_ty_33 = ::std::os::raw::c_uint;
pub const BPF_FIB_LKUP_RET_SUCCESS: _bindgen_ty_34 = 0;
pub const BPF_FIB_LKUP_RET_BLACKHOLE: _bindgen_ty_34 = 1;
pub const BPF_FIB_LKUP_RET_UNREACHABLE: _bindgen_ty_34 = 2;
pub const BPF_FIB_LKUP_RET_PROHIBIT: _bindgen_ty_34 = 3;
pub const BPF_FIB_LKUP_RET_NOT_FWDED: _bindgen_ty_34 = 4;
pub const BPF_FIB_LKUP_RET_FWD_DISABLED: _bindgen_ty_34 = 5;
pub const BPF_FIB_LKUP_RET_UNSUPP_LWT: _bindgen_ty_34 = 6;
pub const BPF_FIB_LKUP_RET_NO_NEIGH: _bindgen_ty_34 = 7;
pub const BPF_FIB_LKUP_RET_FRAG_NEEDED: _bindgen_ty_34 = 8;
pub type _bindgen_ty_34 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_fib_lookup {
pub family: __u8,
pub l4_protocol: __u8,
pub sport: __be16,
pub dport: __be16,
pub __bindgen_anon_1: bpf_fib_lookup__bindgen_ty_1,
pub ifindex: __u32,
pub __bindgen_anon_2: bpf_fib_lookup__bindgen_ty_2,
pub __bindgen_anon_3: bpf_fib_lookup__bindgen_ty_3,
pub __bindgen_anon_4: bpf_fib_lookup__bindgen_ty_4,
pub 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 tot_len: __u16,
pub mtu_result: __u16,
}
#[test]
fn bindgen_test_layout_bpf_fib_lookup__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_fib_lookup__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_fib_lookup__bindgen_ty_1>(),
2usize,
concat!("Size of: ", stringify!(bpf_fib_lookup__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_fib_lookup__bindgen_ty_1>(),
2usize,
concat!("Alignment of ", stringify!(bpf_fib_lookup__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tot_len) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup__bindgen_ty_1),
"::",
stringify!(tot_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mtu_result) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup__bindgen_ty_1),
"::",
stringify!(mtu_result)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_fib_lookup__bindgen_ty_2 {
pub tos: __u8,
pub flowinfo: __be32,
pub rt_metric: __u32,
}
#[test]
fn bindgen_test_layout_bpf_fib_lookup__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<bpf_fib_lookup__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_fib_lookup__bindgen_ty_2>(),
4usize,
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::addr_of!((*ptr).tos) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup__bindgen_ty_2),
"::",
stringify!(tos)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flowinfo) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup__bindgen_ty_2),
"::",
stringify!(flowinfo)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rt_metric) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup__bindgen_ty_2),
"::",
stringify!(rt_metric)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_fib_lookup__bindgen_ty_3 {
pub ipv4_src: __be32,
pub ipv6_src: [__u32; 4usize],
}
#[test]
fn bindgen_test_layout_bpf_fib_lookup__bindgen_ty_3() {
const UNINIT: ::std::mem::MaybeUninit<bpf_fib_lookup__bindgen_ty_3> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).ipv4_src) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup__bindgen_ty_3),
"::",
stringify!(ipv4_src)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ipv6_src) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup__bindgen_ty_3),
"::",
stringify!(ipv6_src)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_fib_lookup__bindgen_ty_4 {
pub ipv4_dst: __be32,
pub ipv6_dst: [__u32; 4usize],
}
#[test]
fn bindgen_test_layout_bpf_fib_lookup__bindgen_ty_4() {
const UNINIT: ::std::mem::MaybeUninit<bpf_fib_lookup__bindgen_ty_4> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_fib_lookup__bindgen_ty_4>(),
16usize,
concat!("Size of: ", stringify!(bpf_fib_lookup__bindgen_ty_4))
);
assert_eq!(
::std::mem::align_of::<bpf_fib_lookup__bindgen_ty_4>(),
4usize,
concat!("Alignment of ", stringify!(bpf_fib_lookup__bindgen_ty_4))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ipv4_dst) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup__bindgen_ty_4),
"::",
stringify!(ipv4_dst)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ipv6_dst) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup__bindgen_ty_4),
"::",
stringify!(ipv6_dst)
)
);
}
#[test]
fn bindgen_test_layout_bpf_fib_lookup() {
const UNINIT: ::std::mem::MaybeUninit<bpf_fib_lookup> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).family) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(family)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).l4_protocol) as usize - ptr as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(l4_protocol)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sport) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(sport)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dport) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(dport)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ifindex) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(ifindex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).h_vlan_proto) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(h_vlan_proto)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).h_vlan_TCI) as usize - ptr as usize },
50usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(h_vlan_TCI)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).smac) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(smac)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dmac) as usize - ptr as usize },
58usize,
concat!(
"Offset of field: ",
stringify!(bpf_fib_lookup),
"::",
stringify!(dmac)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_redir_neigh {
pub nh_family: __u32,
pub __bindgen_anon_1: bpf_redir_neigh__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_redir_neigh__bindgen_ty_1 {
pub ipv4_nh: __be32,
pub ipv6_nh: [__u32; 4usize],
}
#[test]
fn bindgen_test_layout_bpf_redir_neigh__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_redir_neigh__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_redir_neigh__bindgen_ty_1>(),
16usize,
concat!("Size of: ", stringify!(bpf_redir_neigh__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_redir_neigh__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(bpf_redir_neigh__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ipv4_nh) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_redir_neigh__bindgen_ty_1),
"::",
stringify!(ipv4_nh)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ipv6_nh) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_redir_neigh__bindgen_ty_1),
"::",
stringify!(ipv6_nh)
)
);
}
#[test]
fn bindgen_test_layout_bpf_redir_neigh() {
const UNINIT: ::std::mem::MaybeUninit<bpf_redir_neigh> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_redir_neigh>(),
20usize,
concat!("Size of: ", stringify!(bpf_redir_neigh))
);
assert_eq!(
::std::mem::align_of::<bpf_redir_neigh>(),
4usize,
concat!("Alignment of ", stringify!(bpf_redir_neigh))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nh_family) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_redir_neigh),
"::",
stringify!(nh_family)
)
);
}
pub const bpf_check_mtu_flags_BPF_MTU_CHK_SEGS: bpf_check_mtu_flags = 1;
pub type bpf_check_mtu_flags = ::std::os::raw::c_uint;
pub const bpf_check_mtu_ret_BPF_MTU_CHK_RET_SUCCESS: bpf_check_mtu_ret = 0;
pub const bpf_check_mtu_ret_BPF_MTU_CHK_RET_FRAG_NEEDED: bpf_check_mtu_ret = 1;
pub const bpf_check_mtu_ret_BPF_MTU_CHK_RET_SEGS_TOOBIG: bpf_check_mtu_ret = 2;
pub type bpf_check_mtu_ret = ::std::os::raw::c_uint;
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 = ::std::os::raw::c_uint;
pub const BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG: _bindgen_ty_35 = 1;
pub const BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL: _bindgen_ty_35 = 2;
pub const BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP: _bindgen_ty_35 = 4;
pub type _bindgen_ty_35 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_flow_keys {
pub nhoff: __u16,
pub thoff: __u16,
pub addr_proto: __u16,
pub is_frag: __u8,
pub is_first_frag: __u8,
pub is_encap: __u8,
pub ip_proto: __u8,
pub n_proto: __be16,
pub sport: __be16,
pub dport: __be16,
pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1,
pub flags: __u32,
pub flow_label: __be32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_flow_keys__bindgen_ty_1 {
pub __bindgen_anon_1: bpf_flow_keys__bindgen_ty_1__bindgen_ty_1,
pub __bindgen_anon_2: bpf_flow_keys__bindgen_ty_1__bindgen_ty_2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_1 {
pub ipv4_src: __be32,
pub ipv4_dst: __be32,
}
#[test]
fn bindgen_test_layout_bpf_flow_keys__bindgen_ty_1__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_flow_keys__bindgen_ty_1__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).ipv4_src) as usize - ptr 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::addr_of!((*ptr).ipv4_dst) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(ipv4_dst)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_flow_keys__bindgen_ty_1__bindgen_ty_2 {
pub ipv6_src: [__u32; 4usize],
pub ipv6_dst: [__u32; 4usize],
}
#[test]
fn bindgen_test_layout_bpf_flow_keys__bindgen_ty_1__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<bpf_flow_keys__bindgen_ty_1__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).ipv6_src) as usize - ptr 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::addr_of!((*ptr).ipv6_dst) as usize - ptr 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))
);
}
#[test]
fn bindgen_test_layout_bpf_flow_keys() {
const UNINIT: ::std::mem::MaybeUninit<bpf_flow_keys> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_flow_keys>(),
56usize,
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::addr_of!((*ptr).nhoff) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(nhoff)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).thoff) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(thoff)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).addr_proto) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(addr_proto)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).is_frag) as usize - ptr as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(is_frag)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).is_first_frag) as usize - ptr as usize },
7usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(is_first_frag)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).is_encap) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(is_encap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ip_proto) as usize - ptr as usize },
9usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(ip_proto)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).n_proto) as usize - ptr as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(n_proto)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sport) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(sport)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dport) as usize - ptr as usize },
14usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(dport)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flow_label) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(bpf_flow_keys),
"::",
stringify!(flow_label)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_func_info {
pub insn_off: __u32,
pub type_id: __u32,
}
#[test]
fn bindgen_test_layout_bpf_func_info() {
const UNINIT: ::std::mem::MaybeUninit<bpf_func_info> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).insn_off) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_func_info),
"::",
stringify!(insn_off)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_id) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_func_info),
"::",
stringify!(type_id)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_line_info {
pub insn_off: __u32,
pub file_name_off: __u32,
pub line_off: __u32,
pub line_col: __u32,
}
#[test]
fn bindgen_test_layout_bpf_line_info() {
const UNINIT: ::std::mem::MaybeUninit<bpf_line_info> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).insn_off) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_line_info),
"::",
stringify!(insn_off)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).file_name_off) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_line_info),
"::",
stringify!(file_name_off)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).line_off) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_line_info),
"::",
stringify!(line_off)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).line_col) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_line_info),
"::",
stringify!(line_col)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_spin_lock {
pub val: __u32,
}
#[test]
fn bindgen_test_layout_bpf_spin_lock() {
const UNINIT: ::std::mem::MaybeUninit<bpf_spin_lock> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).val) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_spin_lock),
"::",
stringify!(val)
)
);
}
#[repr(C)]
#[repr(align(8))]
#[derive(Debug, Copy, Clone)]
pub struct bpf_timer {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 16usize]>,
}
#[test]
fn bindgen_test_layout_bpf_timer() {
assert_eq!(
::std::mem::size_of::<bpf_timer>(),
16usize,
concat!("Size of: ", stringify!(bpf_timer))
);
assert_eq!(
::std::mem::align_of::<bpf_timer>(),
8usize,
concat!("Alignment of ", stringify!(bpf_timer))
);
}
impl bpf_timer {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 16usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 16usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_sysctl {
pub write: __u32,
pub file_pos: __u32,
}
#[test]
fn bindgen_test_layout_bpf_sysctl() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sysctl> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).write) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sysctl),
"::",
stringify!(write)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).file_pos) as usize - ptr 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_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_bpf_sockopt__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sockopt__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).sk) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sockopt__bindgen_ty_1),
"::",
stringify!(sk)
)
);
}
impl bpf_sockopt__bindgen_ty_1 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_sockopt__bindgen_ty_2 {
pub optval: *mut ::std::os::raw::c_void,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_bpf_sockopt__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sockopt__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).optval) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sockopt__bindgen_ty_2),
"::",
stringify!(optval)
)
);
}
impl bpf_sockopt__bindgen_ty_2 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_sockopt__bindgen_ty_3 {
pub optval_end: *mut ::std::os::raw::c_void,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_bpf_sockopt__bindgen_ty_3() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sockopt__bindgen_ty_3> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).optval_end) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sockopt__bindgen_ty_3),
"::",
stringify!(optval_end)
)
);
}
impl bpf_sockopt__bindgen_ty_3 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_bpf_sockopt() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sockopt> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
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::addr_of!((*ptr).level) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_sockopt),
"::",
stringify!(level)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).optname) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_sockopt),
"::",
stringify!(optname)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).optlen) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_sockopt),
"::",
stringify!(optlen)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).retval) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(bpf_sockopt),
"::",
stringify!(retval)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_pidns_info {
pub pid: __u32,
pub tgid: __u32,
}
#[test]
fn bindgen_test_layout_bpf_pidns_info() {
const UNINIT: ::std::mem::MaybeUninit<bpf_pidns_info> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_pidns_info>(),
8usize,
concat!("Size of: ", stringify!(bpf_pidns_info))
);
assert_eq!(
::std::mem::align_of::<bpf_pidns_info>(),
4usize,
concat!("Alignment of ", stringify!(bpf_pidns_info))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pid) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_pidns_info),
"::",
stringify!(pid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tgid) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_pidns_info),
"::",
stringify!(tgid)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_sk_lookup {
pub __bindgen_anon_1: bpf_sk_lookup__bindgen_ty_1,
pub family: __u32,
pub protocol: __u32,
pub remote_ip4: __u32,
pub remote_ip6: [__u32; 4usize],
pub remote_port: __be16,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
pub local_ip4: __u32,
pub local_ip6: [__u32; 4usize],
pub local_port: __u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_sk_lookup__bindgen_ty_1 {
pub __bindgen_anon_1: bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1,
pub cookie: __u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 {
pub sk: *mut bpf_sock,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sk) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(sk)
)
);
}
impl bpf_sk_lookup__bindgen_ty_1__bindgen_ty_1 {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_bpf_sk_lookup__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sk_lookup__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_sk_lookup__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(bpf_sk_lookup__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_sk_lookup__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(bpf_sk_lookup__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cookie) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_sk_lookup__bindgen_ty_1),
"::",
stringify!(cookie)
)
);
}
#[test]
fn bindgen_test_layout_bpf_sk_lookup() {
const UNINIT: ::std::mem::MaybeUninit<bpf_sk_lookup> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_sk_lookup>(),
64usize,
concat!("Size of: ", stringify!(bpf_sk_lookup))
);
assert_eq!(
::std::mem::align_of::<bpf_sk_lookup>(),
8usize,
concat!("Alignment of ", stringify!(bpf_sk_lookup))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).family) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_sk_lookup),
"::",
stringify!(family)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).protocol) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_sk_lookup),
"::",
stringify!(protocol)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).remote_ip4) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_sk_lookup),
"::",
stringify!(remote_ip4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).remote_ip6) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_sk_lookup),
"::",
stringify!(remote_ip6)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).remote_port) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(bpf_sk_lookup),
"::",
stringify!(remote_port)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).local_ip4) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_sk_lookup),
"::",
stringify!(local_ip4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).local_ip6) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(bpf_sk_lookup),
"::",
stringify!(local_ip6)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).local_port) as usize - ptr as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(bpf_sk_lookup),
"::",
stringify!(local_port)
)
);
}
impl bpf_sk_lookup {
#[inline]
pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 2usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct btf_ptr {
pub ptr: *mut ::std::os::raw::c_void,
pub type_id: __u32,
pub flags: __u32,
}
#[test]
fn bindgen_test_layout_btf_ptr() {
const UNINIT: ::std::mem::MaybeUninit<btf_ptr> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<btf_ptr>(),
16usize,
concat!("Size of: ", stringify!(btf_ptr))
);
assert_eq!(
::std::mem::align_of::<btf_ptr>(),
8usize,
concat!("Alignment of ", stringify!(btf_ptr))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(btf_ptr),
"::",
stringify!(ptr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_id) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(btf_ptr),
"::",
stringify!(type_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(btf_ptr),
"::",
stringify!(flags)
)
);
}
pub const BTF_F_COMPACT: _bindgen_ty_36 = 1;
pub const BTF_F_NONAME: _bindgen_ty_36 = 2;
pub const BTF_F_PTR_RAW: _bindgen_ty_36 = 4;
pub const BTF_F_ZERO: _bindgen_ty_36 = 8;
pub type _bindgen_ty_36 = ::std::os::raw::c_uint;
pub type int_least8_t = __int_least8_t;
pub type int_least16_t = __int_least16_t;
pub type int_least32_t = __int_least32_t;
pub type int_least64_t = __int_least64_t;
pub type uint_least8_t = __uint_least8_t;
pub type uint_least16_t = __uint_least16_t;
pub type uint_least32_t = __uint_least32_t;
pub type uint_least64_t = __uint_least64_t;
pub type int_fast8_t = ::std::os::raw::c_schar;
pub type int_fast16_t = ::std::os::raw::c_long;
pub type int_fast32_t = ::std::os::raw::c_long;
pub type int_fast64_t = ::std::os::raw::c_long;
pub type uint_fast8_t = ::std::os::raw::c_uchar;
pub type uint_fast16_t = ::std::os::raw::c_ulong;
pub type uint_fast32_t = ::std::os::raw::c_ulong;
pub type uint_fast64_t = ::std::os::raw::c_ulong;
pub type intmax_t = __intmax_t;
pub type uintmax_t = __uintmax_t;
pub type u_char = __u_char;
pub type u_short = __u_short;
pub type u_int = __u_int;
pub type u_long = __u_long;
pub type quad_t = __quad_t;
pub type u_quad_t = __u_quad_t;
pub type fsid_t = __fsid_t;
pub type loff_t = __loff_t;
pub type ino_t = __ino_t;
pub type dev_t = __dev_t;
pub type gid_t = __gid_t;
pub type mode_t = __mode_t;
pub type nlink_t = __nlink_t;
pub type uid_t = __uid_t;
pub type pid_t = __pid_t;
pub type id_t = __id_t;
pub type daddr_t = __daddr_t;
pub type caddr_t = __caddr_t;
pub type key_t = __key_t;
pub type clock_t = __clock_t;
pub type clockid_t = __clockid_t;
pub type time_t = __time_t;
pub type timer_t = __timer_t;
pub type ulong = ::std::os::raw::c_ulong;
pub type ushort = ::std::os::raw::c_ushort;
pub type uint = ::std::os::raw::c_uint;
pub type u_int8_t = __uint8_t;
pub type u_int16_t = __uint16_t;
pub type u_int32_t = __uint32_t;
pub type u_int64_t = __uint64_t;
pub type register_t = ::std::os::raw::c_long;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sigset_t {
pub __val: [::std::os::raw::c_ulong; 16usize],
}
#[test]
fn bindgen_test_layout___sigset_t() {
const UNINIT: ::std::mem::MaybeUninit<__sigset_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__sigset_t>(),
128usize,
concat!("Size of: ", stringify!(__sigset_t))
);
assert_eq!(
::std::mem::align_of::<__sigset_t>(),
8usize,
concat!("Alignment of ", stringify!(__sigset_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__sigset_t),
"::",
stringify!(__val)
)
);
}
pub type sigset_t = __sigset_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct timeval {
pub tv_sec: __time_t,
pub tv_usec: __suseconds_t,
}
#[test]
fn bindgen_test_layout_timeval() {
const UNINIT: ::std::mem::MaybeUninit<timeval> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<timeval>(),
16usize,
concat!("Size of: ", stringify!(timeval))
);
assert_eq!(
::std::mem::align_of::<timeval>(),
8usize,
concat!("Alignment of ", stringify!(timeval))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(timeval),
"::",
stringify!(tv_sec)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(timeval),
"::",
stringify!(tv_usec)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct timespec {
pub tv_sec: __time_t,
pub tv_nsec: __syscall_slong_t,
}
#[test]
fn bindgen_test_layout_timespec() {
const UNINIT: ::std::mem::MaybeUninit<timespec> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<timespec>(),
16usize,
concat!("Size of: ", stringify!(timespec))
);
assert_eq!(
::std::mem::align_of::<timespec>(),
8usize,
concat!("Alignment of ", stringify!(timespec))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(timespec),
"::",
stringify!(tv_sec)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(timespec),
"::",
stringify!(tv_nsec)
)
);
}
pub type suseconds_t = __suseconds_t;
pub type __fd_mask = ::std::os::raw::c_long;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct fd_set {
pub __fds_bits: [__fd_mask; 16usize],
}
#[test]
fn bindgen_test_layout_fd_set() {
const UNINIT: ::std::mem::MaybeUninit<fd_set> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<fd_set>(),
128usize,
concat!("Size of: ", stringify!(fd_set))
);
assert_eq!(
::std::mem::align_of::<fd_set>(),
8usize,
concat!("Alignment of ", stringify!(fd_set))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__fds_bits) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(fd_set),
"::",
stringify!(__fds_bits)
)
);
}
pub type fd_mask = __fd_mask;
extern "C" {
pub fn select(
__nfds: ::std::os::raw::c_int,
__readfds: *mut fd_set,
__writefds: *mut fd_set,
__exceptfds: *mut fd_set,
__timeout: *mut timeval,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn pselect(
__nfds: ::std::os::raw::c_int,
__readfds: *mut fd_set,
__writefds: *mut fd_set,
__exceptfds: *mut fd_set,
__timeout: *const timespec,
__sigmask: *const __sigset_t,
) -> ::std::os::raw::c_int;
}
pub type blksize_t = __blksize_t;
pub type blkcnt_t = __blkcnt_t;
pub type fsblkcnt_t = __fsblkcnt_t;
pub type fsfilcnt_t = __fsfilcnt_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub union __atomic_wide_counter {
pub __value64: ::std::os::raw::c_ulonglong,
pub __value32: __atomic_wide_counter__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __atomic_wide_counter__bindgen_ty_1 {
pub __low: ::std::os::raw::c_uint,
pub __high: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout___atomic_wide_counter__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<__atomic_wide_counter__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__atomic_wide_counter__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(__atomic_wide_counter__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<__atomic_wide_counter__bindgen_ty_1>(),
4usize,
concat!(
"Alignment of ",
stringify!(__atomic_wide_counter__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__low) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__atomic_wide_counter__bindgen_ty_1),
"::",
stringify!(__low)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__high) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__atomic_wide_counter__bindgen_ty_1),
"::",
stringify!(__high)
)
);
}
#[test]
fn bindgen_test_layout___atomic_wide_counter() {
const UNINIT: ::std::mem::MaybeUninit<__atomic_wide_counter> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__atomic_wide_counter>(),
8usize,
concat!("Size of: ", stringify!(__atomic_wide_counter))
);
assert_eq!(
::std::mem::align_of::<__atomic_wide_counter>(),
8usize,
concat!("Alignment of ", stringify!(__atomic_wide_counter))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__value64) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__atomic_wide_counter),
"::",
stringify!(__value64)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__value32) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__atomic_wide_counter),
"::",
stringify!(__value32)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_internal_list {
pub __prev: *mut __pthread_internal_list,
pub __next: *mut __pthread_internal_list,
}
#[test]
fn bindgen_test_layout___pthread_internal_list() {
const UNINIT: ::std::mem::MaybeUninit<__pthread_internal_list> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__pthread_internal_list>(),
16usize,
concat!("Size of: ", stringify!(__pthread_internal_list))
);
assert_eq!(
::std::mem::align_of::<__pthread_internal_list>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_internal_list))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__prev) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_internal_list),
"::",
stringify!(__prev)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__next) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__pthread_internal_list),
"::",
stringify!(__next)
)
);
}
pub type __pthread_list_t = __pthread_internal_list;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_internal_slist {
pub __next: *mut __pthread_internal_slist,
}
#[test]
fn bindgen_test_layout___pthread_internal_slist() {
const UNINIT: ::std::mem::MaybeUninit<__pthread_internal_slist> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__pthread_internal_slist>(),
8usize,
concat!("Size of: ", stringify!(__pthread_internal_slist))
);
assert_eq!(
::std::mem::align_of::<__pthread_internal_slist>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_internal_slist))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__next) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_internal_slist),
"::",
stringify!(__next)
)
);
}
pub type __pthread_slist_t = __pthread_internal_slist;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_mutex_s {
pub __lock: ::std::os::raw::c_int,
pub __count: ::std::os::raw::c_uint,
pub __owner: ::std::os::raw::c_int,
pub __nusers: ::std::os::raw::c_uint,
pub __kind: ::std::os::raw::c_int,
pub __spins: ::std::os::raw::c_short,
pub __elision: ::std::os::raw::c_short,
pub __list: __pthread_list_t,
}
#[test]
fn bindgen_test_layout___pthread_mutex_s() {
const UNINIT: ::std::mem::MaybeUninit<__pthread_mutex_s> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__pthread_mutex_s>(),
40usize,
concat!("Size of: ", stringify!(__pthread_mutex_s))
);
assert_eq!(
::std::mem::align_of::<__pthread_mutex_s>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_mutex_s))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__lock) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__lock)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__count) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__owner) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__owner)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__nusers) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__nusers)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__kind) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__kind)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__spins) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__spins)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__elision) as usize - ptr as usize },
22usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__elision)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__list) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(__pthread_mutex_s),
"::",
stringify!(__list)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_rwlock_arch_t {
pub __readers: ::std::os::raw::c_uint,
pub __writers: ::std::os::raw::c_uint,
pub __wrphase_futex: ::std::os::raw::c_uint,
pub __writers_futex: ::std::os::raw::c_uint,
pub __pad3: ::std::os::raw::c_uint,
pub __pad4: ::std::os::raw::c_uint,
pub __cur_writer: ::std::os::raw::c_int,
pub __shared: ::std::os::raw::c_int,
pub __rwelision: ::std::os::raw::c_schar,
pub __pad1: [::std::os::raw::c_uchar; 7usize],
pub __pad2: ::std::os::raw::c_ulong,
pub __flags: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout___pthread_rwlock_arch_t() {
const UNINIT: ::std::mem::MaybeUninit<__pthread_rwlock_arch_t> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__pthread_rwlock_arch_t>(),
56usize,
concat!("Size of: ", stringify!(__pthread_rwlock_arch_t))
);
assert_eq!(
::std::mem::align_of::<__pthread_rwlock_arch_t>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_rwlock_arch_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__readers) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__readers)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__writers) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__writers)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__wrphase_futex) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__wrphase_futex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__writers_futex) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__writers_futex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__pad3) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__pad3)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__pad4) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__pad4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__cur_writer) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__cur_writer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__shared) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__shared)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__rwelision) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__rwelision)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__pad1) as usize - ptr as usize },
33usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__pad1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__pad2) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__pad2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__flags) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(__pthread_rwlock_arch_t),
"::",
stringify!(__flags)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __pthread_cond_s {
pub __wseq: __atomic_wide_counter,
pub __g1_start: __atomic_wide_counter,
pub __g_refs: [::std::os::raw::c_uint; 2usize],
pub __g_size: [::std::os::raw::c_uint; 2usize],
pub __g1_orig_size: ::std::os::raw::c_uint,
pub __wrefs: ::std::os::raw::c_uint,
pub __g_signals: [::std::os::raw::c_uint; 2usize],
}
#[test]
fn bindgen_test_layout___pthread_cond_s() {
const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__pthread_cond_s>(),
48usize,
concat!("Size of: ", stringify!(__pthread_cond_s))
);
assert_eq!(
::std::mem::align_of::<__pthread_cond_s>(),
8usize,
concat!("Alignment of ", stringify!(__pthread_cond_s))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__wseq) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__wseq)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__g1_start) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g1_start)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__g_refs) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g_refs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__g_size) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__g1_orig_size) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g1_orig_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__wrefs) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__wrefs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__g_signals) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(__pthread_cond_s),
"::",
stringify!(__g_signals)
)
);
}
pub type __tss_t = ::std::os::raw::c_uint;
pub type __thrd_t = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __once_flag {
pub __data: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout___once_flag() {
const UNINIT: ::std::mem::MaybeUninit<__once_flag> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__once_flag>(),
4usize,
concat!("Size of: ", stringify!(__once_flag))
);
assert_eq!(
::std::mem::align_of::<__once_flag>(),
4usize,
concat!("Alignment of ", stringify!(__once_flag))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__once_flag),
"::",
stringify!(__data)
)
);
}
pub type pthread_t = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_mutexattr_t {
pub __size: [::std::os::raw::c_char; 4usize],
pub __align: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pthread_mutexattr_t() {
const UNINIT: ::std::mem::MaybeUninit<pthread_mutexattr_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pthread_mutexattr_t>(),
4usize,
concat!("Size of: ", stringify!(pthread_mutexattr_t))
);
assert_eq!(
::std::mem::align_of::<pthread_mutexattr_t>(),
4usize,
concat!("Alignment of ", stringify!(pthread_mutexattr_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutexattr_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutexattr_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_condattr_t {
pub __size: [::std::os::raw::c_char; 4usize],
pub __align: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pthread_condattr_t() {
const UNINIT: ::std::mem::MaybeUninit<pthread_condattr_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pthread_condattr_t>(),
4usize,
concat!("Size of: ", stringify!(pthread_condattr_t))
);
assert_eq!(
::std::mem::align_of::<pthread_condattr_t>(),
4usize,
concat!("Alignment of ", stringify!(pthread_condattr_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_condattr_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_condattr_t),
"::",
stringify!(__align)
)
);
}
pub type pthread_key_t = ::std::os::raw::c_uint;
pub type pthread_once_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_attr_t {
pub __size: [::std::os::raw::c_char; 56usize],
pub __align: ::std::os::raw::c_long,
}
#[test]
fn bindgen_test_layout_pthread_attr_t() {
const UNINIT: ::std::mem::MaybeUninit<pthread_attr_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pthread_attr_t>(),
56usize,
concat!("Size of: ", stringify!(pthread_attr_t))
);
assert_eq!(
::std::mem::align_of::<pthread_attr_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_attr_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_attr_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_attr_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_mutex_t {
pub __data: __pthread_mutex_s,
pub __size: [::std::os::raw::c_char; 40usize],
pub __align: ::std::os::raw::c_long,
}
#[test]
fn bindgen_test_layout_pthread_mutex_t() {
const UNINIT: ::std::mem::MaybeUninit<pthread_mutex_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pthread_mutex_t>(),
40usize,
concat!("Size of: ", stringify!(pthread_mutex_t))
);
assert_eq!(
::std::mem::align_of::<pthread_mutex_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_mutex_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutex_t),
"::",
stringify!(__data)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutex_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_mutex_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_cond_t {
pub __data: __pthread_cond_s,
pub __size: [::std::os::raw::c_char; 48usize],
pub __align: ::std::os::raw::c_longlong,
}
#[test]
fn bindgen_test_layout_pthread_cond_t() {
const UNINIT: ::std::mem::MaybeUninit<pthread_cond_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pthread_cond_t>(),
48usize,
concat!("Size of: ", stringify!(pthread_cond_t))
);
assert_eq!(
::std::mem::align_of::<pthread_cond_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_cond_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_cond_t),
"::",
stringify!(__data)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_cond_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_cond_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_rwlock_t {
pub __data: __pthread_rwlock_arch_t,
pub __size: [::std::os::raw::c_char; 56usize],
pub __align: ::std::os::raw::c_long,
}
#[test]
fn bindgen_test_layout_pthread_rwlock_t() {
const UNINIT: ::std::mem::MaybeUninit<pthread_rwlock_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pthread_rwlock_t>(),
56usize,
concat!("Size of: ", stringify!(pthread_rwlock_t))
);
assert_eq!(
::std::mem::align_of::<pthread_rwlock_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_rwlock_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlock_t),
"::",
stringify!(__data)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlock_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlock_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_rwlockattr_t {
pub __size: [::std::os::raw::c_char; 8usize],
pub __align: ::std::os::raw::c_long,
}
#[test]
fn bindgen_test_layout_pthread_rwlockattr_t() {
const UNINIT: ::std::mem::MaybeUninit<pthread_rwlockattr_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pthread_rwlockattr_t>(),
8usize,
concat!("Size of: ", stringify!(pthread_rwlockattr_t))
);
assert_eq!(
::std::mem::align_of::<pthread_rwlockattr_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_rwlockattr_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlockattr_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_rwlockattr_t),
"::",
stringify!(__align)
)
);
}
pub type pthread_spinlock_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_barrier_t {
pub __size: [::std::os::raw::c_char; 32usize],
pub __align: ::std::os::raw::c_long,
}
#[test]
fn bindgen_test_layout_pthread_barrier_t() {
const UNINIT: ::std::mem::MaybeUninit<pthread_barrier_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pthread_barrier_t>(),
32usize,
concat!("Size of: ", stringify!(pthread_barrier_t))
);
assert_eq!(
::std::mem::align_of::<pthread_barrier_t>(),
8usize,
concat!("Alignment of ", stringify!(pthread_barrier_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_barrier_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_barrier_t),
"::",
stringify!(__align)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_barrierattr_t {
pub __size: [::std::os::raw::c_char; 4usize],
pub __align: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pthread_barrierattr_t() {
const UNINIT: ::std::mem::MaybeUninit<pthread_barrierattr_t> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<pthread_barrierattr_t>(),
4usize,
concat!("Size of: ", stringify!(pthread_barrierattr_t))
);
assert_eq!(
::std::mem::align_of::<pthread_barrierattr_t>(),
4usize,
concat!("Alignment of ", stringify!(pthread_barrierattr_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_barrierattr_t),
"::",
stringify!(__size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(pthread_barrierattr_t),
"::",
stringify!(__align)
)
);
}
extern "C" {
pub fn memcpy(
__dest: *mut ::std::os::raw::c_void,
__src: *const ::std::os::raw::c_void,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn memmove(
__dest: *mut ::std::os::raw::c_void,
__src: *const ::std::os::raw::c_void,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn memccpy(
__dest: *mut ::std::os::raw::c_void,
__src: *const ::std::os::raw::c_void,
__c: ::std::os::raw::c_int,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn memset(
__s: *mut ::std::os::raw::c_void,
__c: ::std::os::raw::c_int,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn memcmp(
__s1: *const ::std::os::raw::c_void,
__s2: *const ::std::os::raw::c_void,
__n: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn __memcmpeq(
__s1: *const ::std::os::raw::c_void,
__s2: *const ::std::os::raw::c_void,
__n: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn memchr(
__s: *const ::std::os::raw::c_void,
__c: ::std::os::raw::c_int,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn strcpy(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn strncpy(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn strcat(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn strncat(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn strcmp(
__s1: *const ::std::os::raw::c_char,
__s2: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn strncmp(
__s1: *const ::std::os::raw::c_char,
__s2: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn strcoll(
__s1: *const ::std::os::raw::c_char,
__s2: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn strxfrm(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_ulong;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __locale_struct {
pub __locales: [*mut __locale_data; 13usize],
pub __ctype_b: *const ::std::os::raw::c_ushort,
pub __ctype_tolower: *const ::std::os::raw::c_int,
pub __ctype_toupper: *const ::std::os::raw::c_int,
pub __names: [*const ::std::os::raw::c_char; 13usize],
}
#[test]
fn bindgen_test_layout___locale_struct() {
const UNINIT: ::std::mem::MaybeUninit<__locale_struct> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__locale_struct>(),
232usize,
concat!("Size of: ", stringify!(__locale_struct))
);
assert_eq!(
::std::mem::align_of::<__locale_struct>(),
8usize,
concat!("Alignment of ", stringify!(__locale_struct))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__locales) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__locale_struct),
"::",
stringify!(__locales)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__ctype_b) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(__locale_struct),
"::",
stringify!(__ctype_b)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__ctype_tolower) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(__locale_struct),
"::",
stringify!(__ctype_tolower)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__ctype_toupper) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(__locale_struct),
"::",
stringify!(__ctype_toupper)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__names) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(__locale_struct),
"::",
stringify!(__names)
)
);
}
pub type __locale_t = *mut __locale_struct;
pub type locale_t = __locale_t;
extern "C" {
pub fn strcoll_l(
__s1: *const ::std::os::raw::c_char,
__s2: *const ::std::os::raw::c_char,
__l: locale_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn strxfrm_l(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
__n: usize,
__l: locale_t,
) -> usize;
}
extern "C" {
pub fn strdup(__s: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn strndup(
__string: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn strchr(
__s: *const ::std::os::raw::c_char,
__c: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn strrchr(
__s: *const ::std::os::raw::c_char,
__c: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn strcspn(
__s: *const ::std::os::raw::c_char,
__reject: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_ulong;
}
extern "C" {
pub fn strspn(
__s: *const ::std::os::raw::c_char,
__accept: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_ulong;
}
extern "C" {
pub fn strpbrk(
__s: *const ::std::os::raw::c_char,
__accept: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn strstr(
__haystack: *const ::std::os::raw::c_char,
__needle: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn strtok(
__s: *mut ::std::os::raw::c_char,
__delim: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn __strtok_r(
__s: *mut ::std::os::raw::c_char,
__delim: *const ::std::os::raw::c_char,
__save_ptr: *mut *mut ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn strtok_r(
__s: *mut ::std::os::raw::c_char,
__delim: *const ::std::os::raw::c_char,
__save_ptr: *mut *mut ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn strlen(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulong;
}
extern "C" {
pub fn strnlen(__string: *const ::std::os::raw::c_char, __maxlen: usize) -> usize;
}
extern "C" {
pub fn strerror(__errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char;
}
extern "C" {
#[link_name = "\u{1}__xpg_strerror_r"]
pub fn strerror_r(
__errnum: ::std::os::raw::c_int,
__buf: *mut ::std::os::raw::c_char,
__buflen: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn strerror_l(
__errnum: ::std::os::raw::c_int,
__l: locale_t,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn bcmp(
__s1: *const ::std::os::raw::c_void,
__s2: *const ::std::os::raw::c_void,
__n: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bcopy(
__src: *const ::std::os::raw::c_void,
__dest: *mut ::std::os::raw::c_void,
__n: usize,
);
}
extern "C" {
pub fn bzero(__s: *mut ::std::os::raw::c_void, __n: ::std::os::raw::c_ulong);
}
extern "C" {
pub fn index(
__s: *const ::std::os::raw::c_char,
__c: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn rindex(
__s: *const ::std::os::raw::c_char,
__c: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn ffs(__i: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ffsl(__l: ::std::os::raw::c_long) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ffsll(__ll: ::std::os::raw::c_longlong) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn strcasecmp(
__s1: *const ::std::os::raw::c_char,
__s2: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn strncasecmp(
__s1: *const ::std::os::raw::c_char,
__s2: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn strcasecmp_l(
__s1: *const ::std::os::raw::c_char,
__s2: *const ::std::os::raw::c_char,
__loc: locale_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn strncasecmp_l(
__s1: *const ::std::os::raw::c_char,
__s2: *const ::std::os::raw::c_char,
__n: usize,
__loc: locale_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn explicit_bzero(__s: *mut ::std::os::raw::c_void, __n: usize);
}
extern "C" {
pub fn strsep(
__stringp: *mut *mut ::std::os::raw::c_char,
__delim: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn strsignal(__sig: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn __stpcpy(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn stpcpy(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn __stpncpy(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
__n: usize,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn stpncpy(
__dest: *mut ::std::os::raw::c_char,
__src: *const ::std::os::raw::c_char,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_char;
}
pub type wchar_t = ::std::os::raw::c_int;
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct max_align_t {
pub __clang_max_align_nonce1: ::std::os::raw::c_longlong,
pub __bindgen_padding_0: u64,
pub __clang_max_align_nonce2: u128,
}
#[test]
fn bindgen_test_layout_max_align_t() {
const UNINIT: ::std::mem::MaybeUninit<max_align_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<max_align_t>(),
32usize,
concat!("Size of: ", stringify!(max_align_t))
);
assert_eq!(
::std::mem::align_of::<max_align_t>(),
16usize,
concat!("Alignment of ", stringify!(max_align_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce1) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(max_align_t),
"::",
stringify!(__clang_max_align_nonce1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce2) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(max_align_t),
"::",
stringify!(__clang_max_align_nonce2)
)
);
}
pub const libbpf_strict_mode_LIBBPF_STRICT_ALL: libbpf_strict_mode = 4294967295;
pub const libbpf_strict_mode_LIBBPF_STRICT_NONE: libbpf_strict_mode = 0;
pub const libbpf_strict_mode_LIBBPF_STRICT_CLEAN_PTRS: libbpf_strict_mode = 1;
pub const libbpf_strict_mode_LIBBPF_STRICT_DIRECT_ERRS: libbpf_strict_mode = 2;
pub const libbpf_strict_mode_LIBBPF_STRICT_SEC_NAME: libbpf_strict_mode = 4;
pub const libbpf_strict_mode_LIBBPF_STRICT_NO_OBJECT_LIST: libbpf_strict_mode = 8;
pub const libbpf_strict_mode_LIBBPF_STRICT_AUTO_RLIMIT_MEMLOCK: libbpf_strict_mode = 16;
pub const libbpf_strict_mode_LIBBPF_STRICT_MAP_DEFINITIONS: libbpf_strict_mode = 32;
pub const libbpf_strict_mode___LIBBPF_STRICT_LAST: libbpf_strict_mode = 33;
pub type libbpf_strict_mode = ::std::os::raw::c_uint;
extern "C" {
pub fn libbpf_set_strict_mode(mode: libbpf_strict_mode) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **libbpf_get_error()** extracts the error code from the passed\n pointer\n @param ptr pointer returned from libbpf API function\n @return error code; or 0 if no error occured\n\n Note, as of libbpf 1.0 this function is not necessary and not recommended\n to be used. Libbpf doesn't return error code embedded into the pointer\n itself. Instead, NULL is returned on error and error code is passed through\n thread-local errno variable. **libbpf_get_error()** is just returning -errno\n value if it receives NULL, which is correct only if errno hasn't been\n modified between libbpf API call and corresponding **libbpf_get_error()**\n call. Prefer to check return for NULL and use errno directly.\n\n This API is left in libbpf 1.0 to allow applications that were 1.0-ready\n before final libbpf 1.0 without needing to change them."]
pub fn libbpf_get_error(ptr: *const ::std::os::raw::c_void) -> ::std::os::raw::c_long;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_program {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_map {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct btf {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct btf_ext {
_unused: [u8; 0],
}
extern "C" {
pub fn libbpf_find_kernel_btf() -> *mut btf;
}
extern "C" {
pub fn bpf_program__get_type(prog: *const bpf_program) -> bpf_prog_type;
}
extern "C" {
pub fn bpf_program__get_expected_attach_type(prog: *const bpf_program) -> bpf_attach_type;
}
extern "C" {
pub fn bpf_map__get_pin_path(map: *const bpf_map) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn btf__get_raw_data(btf: *const btf, size: *mut __u32) -> *const ::std::os::raw::c_void;
}
extern "C" {
pub fn btf_ext__get_raw_data(
btf_ext: *const btf_ext,
size: *mut __u32,
) -> *const ::std::os::raw::c_void;
}
extern "C" {
pub fn libbpf_major_version() -> __u32;
}
extern "C" {
pub fn libbpf_minor_version() -> __u32;
}
extern "C" {
pub fn libbpf_version_string() -> *const ::std::os::raw::c_char;
}
pub const libbpf_errno___LIBBPF_ERRNO__START: libbpf_errno = 4000;
pub const libbpf_errno_LIBBPF_ERRNO__LIBELF: libbpf_errno = 4000;
pub const libbpf_errno_LIBBPF_ERRNO__FORMAT: libbpf_errno = 4001;
pub const libbpf_errno_LIBBPF_ERRNO__KVERSION: libbpf_errno = 4002;
pub const libbpf_errno_LIBBPF_ERRNO__ENDIAN: libbpf_errno = 4003;
pub const libbpf_errno_LIBBPF_ERRNO__INTERNAL: libbpf_errno = 4004;
pub const libbpf_errno_LIBBPF_ERRNO__RELOC: libbpf_errno = 4005;
pub const libbpf_errno_LIBBPF_ERRNO__LOAD: libbpf_errno = 4006;
pub const libbpf_errno_LIBBPF_ERRNO__VERIFY: libbpf_errno = 4007;
pub const libbpf_errno_LIBBPF_ERRNO__PROG2BIG: libbpf_errno = 4008;
pub const libbpf_errno_LIBBPF_ERRNO__KVER: libbpf_errno = 4009;
pub const libbpf_errno_LIBBPF_ERRNO__PROGTYPE: libbpf_errno = 4010;
pub const libbpf_errno_LIBBPF_ERRNO__WRNGPID: libbpf_errno = 4011;
pub const libbpf_errno_LIBBPF_ERRNO__INVSEQ: libbpf_errno = 4012;
pub const libbpf_errno_LIBBPF_ERRNO__NLPARSE: libbpf_errno = 4013;
pub const libbpf_errno___LIBBPF_ERRNO__END: libbpf_errno = 4014;
pub type libbpf_errno = ::std::os::raw::c_uint;
extern "C" {
pub fn libbpf_strerror(
err: ::std::os::raw::c_int,
buf: *mut ::std::os::raw::c_char,
size: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **libbpf_bpf_attach_type_str()** converts the provided attach type\n value into a textual representation.\n @param t The attach type.\n @return Pointer to a static string identifying the attach type. NULL is\n returned for unknown **bpf_attach_type** values."]
pub fn libbpf_bpf_attach_type_str(t: bpf_attach_type) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " @brief **libbpf_bpf_link_type_str()** converts the provided link type value\n into a textual representation.\n @param t The link type.\n @return Pointer to a static string identifying the link type. NULL is\n returned for unknown **bpf_link_type** values."]
pub fn libbpf_bpf_link_type_str(t: bpf_link_type) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " @brief **libbpf_bpf_map_type_str()** converts the provided map type value\n into a textual representation.\n @param t The map type.\n @return Pointer to a static string identifying the map type. NULL is\n returned for unknown **bpf_map_type** values."]
pub fn libbpf_bpf_map_type_str(t: bpf_map_type) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " @brief **libbpf_bpf_prog_type_str()** converts the provided program type\n value into a textual representation.\n @param t The program type.\n @return Pointer to a static string identifying the program type. NULL is\n returned for unknown **bpf_prog_type** values."]
pub fn libbpf_bpf_prog_type_str(t: bpf_prog_type) -> *const ::std::os::raw::c_char;
}
pub const libbpf_print_level_LIBBPF_WARN: libbpf_print_level = 0;
pub const libbpf_print_level_LIBBPF_INFO: libbpf_print_level = 1;
pub const libbpf_print_level_LIBBPF_DEBUG: libbpf_print_level = 2;
pub type libbpf_print_level = ::std::os::raw::c_uint;
pub type libbpf_print_fn_t = ::std::option::Option<
unsafe extern "C" fn(
level: libbpf_print_level,
arg1: *const ::std::os::raw::c_char,
ap: *mut __va_list_tag,
) -> ::std::os::raw::c_int,
>;
extern "C" {
pub fn libbpf_set_print(fn_: libbpf_print_fn_t) -> libbpf_print_fn_t;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_object {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_object_open_opts {
pub sz: usize,
pub object_name: *const ::std::os::raw::c_char,
pub relaxed_maps: bool,
pub pin_root_path: *const ::std::os::raw::c_char,
pub kconfig: *const ::std::os::raw::c_char,
pub btf_custom_path: *const ::std::os::raw::c_char,
pub kernel_log_buf: *mut ::std::os::raw::c_char,
pub kernel_log_size: usize,
pub kernel_log_level: __u32,
}
#[test]
fn bindgen_test_layout_bpf_object_open_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_object_open_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_object_open_opts>(),
72usize,
concat!("Size of: ", stringify!(bpf_object_open_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_object_open_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_object_open_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_open_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).object_name) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_open_opts),
"::",
stringify!(object_name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).relaxed_maps) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_open_opts),
"::",
stringify!(relaxed_maps)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pin_root_path) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_open_opts),
"::",
stringify!(pin_root_path)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).kconfig) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_open_opts),
"::",
stringify!(kconfig)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_custom_path) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_open_opts),
"::",
stringify!(btf_custom_path)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).kernel_log_buf) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_open_opts),
"::",
stringify!(kernel_log_buf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).kernel_log_size) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_open_opts),
"::",
stringify!(kernel_log_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).kernel_log_level) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_open_opts),
"::",
stringify!(kernel_log_level)
)
);
}
extern "C" {
pub fn bpf_object__open(path: *const ::std::os::raw::c_char) -> *mut bpf_object;
}
extern "C" {
#[doc = " @brief **bpf_object__open_file()** creates a bpf_object by opening\n the BPF ELF object file pointed to by the passed path and loading it\n into memory.\n @param path BPF object file path\n @param opts options for how to load the bpf object, this parameter is\n optional and can be set to NULL\n @return pointer to the new bpf_object; or NULL is returned on error,\n error code is stored in errno"]
pub fn bpf_object__open_file(
path: *const ::std::os::raw::c_char,
opts: *const bpf_object_open_opts,
) -> *mut bpf_object;
}
extern "C" {
#[doc = " @brief **bpf_object__open_mem()** creates a bpf_object by reading\n the BPF objects raw bytes from a memory buffer containing a valid\n BPF ELF object file.\n @param obj_buf pointer to the buffer containing ELF file bytes\n @param obj_buf_sz number of bytes in the buffer\n @param opts options for how to load the bpf object\n @return pointer to the new bpf_object; or NULL is returned on error,\n error code is stored in errno"]
pub fn bpf_object__open_mem(
obj_buf: *const ::std::os::raw::c_void,
obj_buf_sz: usize,
opts: *const bpf_object_open_opts,
) -> *mut bpf_object;
}
extern "C" {
pub fn bpf_object__load(obj: *mut bpf_object) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_object__close(object: *mut bpf_object);
}
extern "C" {
pub fn bpf_object__pin_maps(
obj: *mut bpf_object,
path: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_object__unpin_maps(
obj: *mut bpf_object,
path: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_object__pin_programs(
obj: *mut bpf_object,
path: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_object__unpin_programs(
obj: *mut bpf_object,
path: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_object__pin(
object: *mut bpf_object,
path: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_object__name(obj: *const bpf_object) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn bpf_object__kversion(obj: *const bpf_object) -> ::std::os::raw::c_uint;
}
extern "C" {
pub fn bpf_object__set_kversion(
obj: *mut bpf_object,
kern_version: __u32,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_object__btf(obj: *const bpf_object) -> *mut btf;
}
extern "C" {
pub fn bpf_object__btf_fd(obj: *const bpf_object) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_object__find_program_by_name(
obj: *const bpf_object,
name: *const ::std::os::raw::c_char,
) -> *mut bpf_program;
}
extern "C" {
pub fn libbpf_prog_type_by_name(
name: *const ::std::os::raw::c_char,
prog_type: *mut bpf_prog_type,
expected_attach_type: *mut bpf_attach_type,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn libbpf_attach_type_by_name(
name: *const ::std::os::raw::c_char,
attach_type: *mut bpf_attach_type,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn libbpf_find_vmlinux_btf_id(
name: *const ::std::os::raw::c_char,
attach_type: bpf_attach_type,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_object__next_program(
obj: *const bpf_object,
prog: *mut bpf_program,
) -> *mut bpf_program;
}
extern "C" {
pub fn bpf_object__prev_program(
obj: *const bpf_object,
prog: *mut bpf_program,
) -> *mut bpf_program;
}
extern "C" {
pub fn bpf_program__set_ifindex(prog: *mut bpf_program, ifindex: __u32);
}
extern "C" {
pub fn bpf_program__name(prog: *const bpf_program) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn bpf_program__section_name(prog: *const bpf_program) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn bpf_program__autoload(prog: *const bpf_program) -> bool;
}
extern "C" {
pub fn bpf_program__set_autoload(
prog: *mut bpf_program,
autoload: bool,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_program__autoattach(prog: *const bpf_program) -> bool;
}
extern "C" {
pub fn bpf_program__set_autoattach(prog: *mut bpf_program, autoattach: bool);
}
extern "C" {
#[doc = " @brief **bpf_program__insns()** gives read-only access to BPF program's\n underlying BPF instructions.\n @param prog BPF program for which to return instructions\n @return a pointer to an array of BPF instructions that belong to the\n specified BPF program\n\n Returned pointer is always valid and not NULL. Number of `struct bpf_insn`\n pointed to can be fetched using **bpf_program__insn_cnt()** API.\n\n Keep in mind, libbpf can modify and append/delete BPF program's\n instructions as it processes BPF object file and prepares everything for\n uploading into the kernel. So depending on the point in BPF object\n lifetime, **bpf_program__insns()** can return different sets of\n instructions. As an example, during BPF object load phase BPF program\n instructions will be CO-RE-relocated, BPF subprograms instructions will be\n appended, ldimm64 instructions will have FDs embedded, etc. So instructions\n returned before **bpf_object__load()** and after it might be quite\n different."]
pub fn bpf_program__insns(prog: *const bpf_program) -> *const bpf_insn;
}
extern "C" {
#[doc = " @brief **bpf_program__set_insns()** can set BPF program's underlying\n BPF instructions.\n\n WARNING: This is a very advanced libbpf API and users need to know\n what they are doing. This should be used from prog_prepare_load_fn\n callback only.\n\n @param prog BPF program for which to return instructions\n @param new_insns a pointer to an array of BPF instructions\n @param new_insn_cnt number of `struct bpf_insn`'s that form\n specified BPF program\n @return 0, on success; negative error code, otherwise"]
pub fn bpf_program__set_insns(
prog: *mut bpf_program,
new_insns: *mut bpf_insn,
new_insn_cnt: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **bpf_program__insn_cnt()** returns number of `struct bpf_insn`'s\n that form specified BPF program.\n @param prog BPF program for which to return number of BPF instructions\n\n See **bpf_program__insns()** documentation for notes on how libbpf can\n change instructions and their count during different phases of\n **bpf_object** lifetime."]
pub fn bpf_program__insn_cnt(prog: *const bpf_program) -> usize;
}
extern "C" {
pub fn bpf_program__fd(prog: *const bpf_program) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **bpf_program__pin()** pins the BPF program to a file\n in the BPF FS specified by a path. This increments the programs\n reference count, allowing it to stay loaded after the process\n which loaded it has exited.\n\n @param prog BPF program to pin, must already be loaded\n @param path file path in a BPF file system\n @return 0, on success; negative error code, otherwise"]
pub fn bpf_program__pin(
prog: *mut bpf_program,
path: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **bpf_program__unpin()** unpins the BPF program from a file\n in the BPFFS specified by a path. This decrements the programs\n reference count.\n\n The file pinning the BPF program can also be unlinked by a different\n process in which case this function will return an error.\n\n @param prog BPF program to unpin\n @param path file path to the pin in a BPF file system\n @return 0, on success; negative error code, otherwise"]
pub fn bpf_program__unpin(
prog: *mut bpf_program,
path: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_program__unload(prog: *mut bpf_program);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_link {
_unused: [u8; 0],
}
extern "C" {
pub fn bpf_link__open(path: *const ::std::os::raw::c_char) -> *mut bpf_link;
}
extern "C" {
pub fn bpf_link__fd(link: *const bpf_link) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_link__pin_path(link: *const bpf_link) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " @brief **bpf_link__pin()** pins the BPF link to a file\n in the BPF FS specified by a path. This increments the links\n reference count, allowing it to stay loaded after the process\n which loaded it has exited.\n\n @param link BPF link to pin, must already be loaded\n @param path file path in a BPF file system\n @return 0, on success; negative error code, otherwise"]
pub fn bpf_link__pin(
link: *mut bpf_link,
path: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **bpf_link__unpin()** unpins the BPF link from a file\n in the BPFFS specified by a path. This decrements the links\n reference count.\n\n The file pinning the BPF link can also be unlinked by a different\n process in which case this function will return an error.\n\n @param prog BPF program to unpin\n @param path file path to the pin in a BPF file system\n @return 0, on success; negative error code, otherwise"]
pub fn bpf_link__unpin(link: *mut bpf_link) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_link__update_program(
link: *mut bpf_link,
prog: *mut bpf_program,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_link__disconnect(link: *mut bpf_link);
}
extern "C" {
pub fn bpf_link__detach(link: *mut bpf_link) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_link__destroy(link: *mut bpf_link) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **bpf_program__attach()** is a generic function for attaching\n a BPF program based on auto-detection of program type, attach type,\n and extra paremeters, where applicable.\n\n @param prog BPF program to attach\n @return Reference to the newly created BPF link; or NULL is returned on error,\n error code is stored in errno\n\n This is supported for:\n - kprobe/kretprobe (depends on SEC() definition)\n - uprobe/uretprobe (depends on SEC() definition)\n - tracepoint\n - raw tracepoint\n - tracing programs (typed raw TP/fentry/fexit/fmod_ret)"]
pub fn bpf_program__attach(prog: *const bpf_program) -> *mut bpf_link;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_perf_event_opts {
pub sz: usize,
pub bpf_cookie: __u64,
}
#[test]
fn bindgen_test_layout_bpf_perf_event_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_perf_event_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_perf_event_opts>(),
16usize,
concat!("Size of: ", stringify!(bpf_perf_event_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_perf_event_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_perf_event_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_perf_event_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpf_cookie) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_perf_event_opts),
"::",
stringify!(bpf_cookie)
)
);
}
extern "C" {
pub fn bpf_program__attach_perf_event(
prog: *const bpf_program,
pfd: ::std::os::raw::c_int,
) -> *mut bpf_link;
}
extern "C" {
pub fn bpf_program__attach_perf_event_opts(
prog: *const bpf_program,
pfd: ::std::os::raw::c_int,
opts: *const bpf_perf_event_opts,
) -> *mut bpf_link;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_kprobe_opts {
pub sz: usize,
pub bpf_cookie: __u64,
pub offset: usize,
pub retprobe: bool,
}
#[test]
fn bindgen_test_layout_bpf_kprobe_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_kprobe_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_kprobe_opts>(),
32usize,
concat!("Size of: ", stringify!(bpf_kprobe_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_kprobe_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_kprobe_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_kprobe_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpf_cookie) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_kprobe_opts),
"::",
stringify!(bpf_cookie)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_kprobe_opts),
"::",
stringify!(offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).retprobe) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_kprobe_opts),
"::",
stringify!(retprobe)
)
);
}
extern "C" {
pub fn bpf_program__attach_kprobe(
prog: *const bpf_program,
retprobe: bool,
func_name: *const ::std::os::raw::c_char,
) -> *mut bpf_link;
}
extern "C" {
pub fn bpf_program__attach_kprobe_opts(
prog: *const bpf_program,
func_name: *const ::std::os::raw::c_char,
opts: *const bpf_kprobe_opts,
) -> *mut bpf_link;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_kprobe_multi_opts {
pub sz: usize,
pub syms: *mut *const ::std::os::raw::c_char,
pub addrs: *const ::std::os::raw::c_ulong,
pub cookies: *const __u64,
pub cnt: usize,
pub retprobe: bool,
}
#[test]
fn bindgen_test_layout_bpf_kprobe_multi_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_kprobe_multi_opts> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_kprobe_multi_opts>(),
48usize,
concat!("Size of: ", stringify!(bpf_kprobe_multi_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_kprobe_multi_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_kprobe_multi_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_kprobe_multi_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).syms) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_kprobe_multi_opts),
"::",
stringify!(syms)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).addrs) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_kprobe_multi_opts),
"::",
stringify!(addrs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cookies) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_kprobe_multi_opts),
"::",
stringify!(cookies)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cnt) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_kprobe_multi_opts),
"::",
stringify!(cnt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).retprobe) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_kprobe_multi_opts),
"::",
stringify!(retprobe)
)
);
}
extern "C" {
pub fn bpf_program__attach_kprobe_multi_opts(
prog: *const bpf_program,
pattern: *const ::std::os::raw::c_char,
opts: *const bpf_kprobe_multi_opts,
) -> *mut bpf_link;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_ksyscall_opts {
pub sz: usize,
pub bpf_cookie: __u64,
pub retprobe: bool,
}
#[test]
fn bindgen_test_layout_bpf_ksyscall_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_ksyscall_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_ksyscall_opts>(),
24usize,
concat!("Size of: ", stringify!(bpf_ksyscall_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_ksyscall_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_ksyscall_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_ksyscall_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpf_cookie) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_ksyscall_opts),
"::",
stringify!(bpf_cookie)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).retprobe) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_ksyscall_opts),
"::",
stringify!(retprobe)
)
);
}
extern "C" {
#[doc = " @brief **bpf_program__attach_ksyscall()** attaches a BPF program\n to kernel syscall handler of a specified syscall. Optionally it's possible\n to request to install retprobe that will be triggered at syscall exit. It's\n also possible to associate BPF cookie (though options).\n\n Libbpf automatically will determine correct full kernel function name,\n which depending on system architecture and kernel version/configuration\n could be of the form __<arch>_sys_<syscall> or __se_sys_<syscall>, and will\n attach specified program using kprobe/kretprobe mechanism.\n\n **bpf_program__attach_ksyscall()** is an API counterpart of declarative\n **SEC(\"ksyscall/<syscall>\")** annotation of BPF programs.\n\n At the moment **SEC(\"ksyscall\")** and **bpf_program__attach_ksyscall()** do\n not handle all the calling convention quirks for mmap(), clone() and compat\n syscalls. It also only attaches to \"native\" syscall interfaces. If host\n system supports compat syscalls or defines 32-bit syscalls in 64-bit\n kernel, such syscall interfaces won't be attached to by libbpf.\n\n These limitations may or may not change in the future. Therefore it is\n recommended to use SEC(\"kprobe\") for these syscalls or if working with\n compat and 32-bit interfaces is required.\n\n @param prog BPF program to attach\n @param syscall_name Symbolic name of the syscall (e.g., \"bpf\")\n @param opts Additional options (see **struct bpf_ksyscall_opts**)\n @return Reference to the newly created BPF link; or NULL is returned on\n error, error code is stored in errno"]
pub fn bpf_program__attach_ksyscall(
prog: *const bpf_program,
syscall_name: *const ::std::os::raw::c_char,
opts: *const bpf_ksyscall_opts,
) -> *mut bpf_link;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_uprobe_opts {
pub sz: usize,
pub ref_ctr_offset: usize,
pub bpf_cookie: __u64,
pub retprobe: bool,
pub func_name: *const ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_bpf_uprobe_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_uprobe_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_uprobe_opts>(),
40usize,
concat!("Size of: ", stringify!(bpf_uprobe_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_uprobe_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_uprobe_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_uprobe_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ref_ctr_offset) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_uprobe_opts),
"::",
stringify!(ref_ctr_offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpf_cookie) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_uprobe_opts),
"::",
stringify!(bpf_cookie)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).retprobe) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_uprobe_opts),
"::",
stringify!(retprobe)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).func_name) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_uprobe_opts),
"::",
stringify!(func_name)
)
);
}
extern "C" {
#[doc = " @brief **bpf_program__attach_uprobe()** attaches a BPF program\n to the userspace function which is found by binary path and\n offset. You can optionally specify a particular proccess to attach\n to. You can also optionally attach the program to the function\n exit instead of entry.\n\n @param prog BPF program to attach\n @param retprobe Attach to function exit\n @param pid Process ID to attach the uprobe to, 0 for self (own process),\n -1 for all processes\n @param binary_path Path to binary that contains the function symbol\n @param func_offset Offset within the binary of the function symbol\n @return Reference to the newly created BPF link; or NULL is returned on error,\n error code is stored in errno"]
pub fn bpf_program__attach_uprobe(
prog: *const bpf_program,
retprobe: bool,
pid: pid_t,
binary_path: *const ::std::os::raw::c_char,
func_offset: usize,
) -> *mut bpf_link;
}
extern "C" {
#[doc = " @brief **bpf_program__attach_uprobe_opts()** is just like\n bpf_program__attach_uprobe() except with a options struct\n for various configurations.\n\n @param prog BPF program to attach\n @param pid Process ID to attach the uprobe to, 0 for self (own process),\n -1 for all processes\n @param binary_path Path to binary that contains the function symbol\n @param func_offset Offset within the binary of the function symbol\n @param opts Options for altering program attachment\n @return Reference to the newly created BPF link; or NULL is returned on error,\n error code is stored in errno"]
pub fn bpf_program__attach_uprobe_opts(
prog: *const bpf_program,
pid: pid_t,
binary_path: *const ::std::os::raw::c_char,
func_offset: usize,
opts: *const bpf_uprobe_opts,
) -> *mut bpf_link;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_usdt_opts {
pub sz: usize,
pub usdt_cookie: __u64,
}
#[test]
fn bindgen_test_layout_bpf_usdt_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_usdt_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_usdt_opts>(),
16usize,
concat!("Size of: ", stringify!(bpf_usdt_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_usdt_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_usdt_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_usdt_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).usdt_cookie) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_usdt_opts),
"::",
stringify!(usdt_cookie)
)
);
}
extern "C" {
#[doc = " @brief **bpf_program__attach_usdt()** is just like\n bpf_program__attach_uprobe_opts() except it covers USDT (User-space\n Statically Defined Tracepoint) attachment, instead of attaching to\n user-space function entry or exit.\n\n @param prog BPF program to attach\n @param pid Process ID to attach the uprobe to, 0 for self (own process),\n -1 for all processes\n @param binary_path Path to binary that contains provided USDT probe\n @param usdt_provider USDT provider name\n @param usdt_name USDT probe name\n @param opts Options for altering program attachment\n @return Reference to the newly created BPF link; or NULL is returned on error,\n error code is stored in errno"]
pub fn bpf_program__attach_usdt(
prog: *const bpf_program,
pid: pid_t,
binary_path: *const ::std::os::raw::c_char,
usdt_provider: *const ::std::os::raw::c_char,
usdt_name: *const ::std::os::raw::c_char,
opts: *const bpf_usdt_opts,
) -> *mut bpf_link;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_tracepoint_opts {
pub sz: usize,
pub bpf_cookie: __u64,
}
#[test]
fn bindgen_test_layout_bpf_tracepoint_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_tracepoint_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_tracepoint_opts>(),
16usize,
concat!("Size of: ", stringify!(bpf_tracepoint_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_tracepoint_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_tracepoint_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_tracepoint_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpf_cookie) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_tracepoint_opts),
"::",
stringify!(bpf_cookie)
)
);
}
extern "C" {
pub fn bpf_program__attach_tracepoint(
prog: *const bpf_program,
tp_category: *const ::std::os::raw::c_char,
tp_name: *const ::std::os::raw::c_char,
) -> *mut bpf_link;
}
extern "C" {
pub fn bpf_program__attach_tracepoint_opts(
prog: *const bpf_program,
tp_category: *const ::std::os::raw::c_char,
tp_name: *const ::std::os::raw::c_char,
opts: *const bpf_tracepoint_opts,
) -> *mut bpf_link;
}
extern "C" {
pub fn bpf_program__attach_raw_tracepoint(
prog: *const bpf_program,
tp_name: *const ::std::os::raw::c_char,
) -> *mut bpf_link;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_trace_opts {
pub sz: usize,
pub cookie: __u64,
}
#[test]
fn bindgen_test_layout_bpf_trace_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_trace_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_trace_opts>(),
16usize,
concat!("Size of: ", stringify!(bpf_trace_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_trace_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_trace_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_trace_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cookie) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_trace_opts),
"::",
stringify!(cookie)
)
);
}
extern "C" {
pub fn bpf_program__attach_trace(prog: *const bpf_program) -> *mut bpf_link;
}
extern "C" {
pub fn bpf_program__attach_trace_opts(
prog: *const bpf_program,
opts: *const bpf_trace_opts,
) -> *mut bpf_link;
}
extern "C" {
pub fn bpf_program__attach_lsm(prog: *const bpf_program) -> *mut bpf_link;
}
extern "C" {
pub fn bpf_program__attach_cgroup(
prog: *const bpf_program,
cgroup_fd: ::std::os::raw::c_int,
) -> *mut bpf_link;
}
extern "C" {
pub fn bpf_program__attach_netns(
prog: *const bpf_program,
netns_fd: ::std::os::raw::c_int,
) -> *mut bpf_link;
}
extern "C" {
pub fn bpf_program__attach_xdp(
prog: *const bpf_program,
ifindex: ::std::os::raw::c_int,
) -> *mut bpf_link;
}
extern "C" {
pub fn bpf_program__attach_freplace(
prog: *const bpf_program,
target_fd: ::std::os::raw::c_int,
attach_func_name: *const ::std::os::raw::c_char,
) -> *mut bpf_link;
}
extern "C" {
pub fn bpf_map__attach_struct_ops(map: *const bpf_map) -> *mut bpf_link;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_iter_attach_opts {
pub sz: usize,
pub link_info: *mut bpf_iter_link_info,
pub link_info_len: __u32,
}
#[test]
fn bindgen_test_layout_bpf_iter_attach_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_iter_attach_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_iter_attach_opts>(),
24usize,
concat!("Size of: ", stringify!(bpf_iter_attach_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_iter_attach_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_iter_attach_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_iter_attach_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).link_info) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_iter_attach_opts),
"::",
stringify!(link_info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).link_info_len) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_iter_attach_opts),
"::",
stringify!(link_info_len)
)
);
}
extern "C" {
pub fn bpf_program__attach_iter(
prog: *const bpf_program,
opts: *const bpf_iter_attach_opts,
) -> *mut bpf_link;
}
extern "C" {
pub fn bpf_program__type(prog: *const bpf_program) -> bpf_prog_type;
}
extern "C" {
#[doc = " @brief **bpf_program__set_type()** sets the program\n type of the passed BPF program.\n @param prog BPF program to set the program type for\n @param type program type to set the BPF map to have\n @return error code; or 0 if no error. An error occurs\n if the object is already loaded.\n\n This must be called before the BPF object is loaded,\n otherwise it has no effect and an error is returned."]
pub fn bpf_program__set_type(
prog: *mut bpf_program,
type_: bpf_prog_type,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_program__expected_attach_type(prog: *const bpf_program) -> bpf_attach_type;
}
extern "C" {
#[doc = " @brief **bpf_program__set_expected_attach_type()** sets the\n attach type of the passed BPF program. This is used for\n auto-detection of attachment when programs are loaded.\n @param prog BPF program to set the attach type for\n @param type attach type to set the BPF map to have\n @return error code; or 0 if no error. An error occurs\n if the object is already loaded.\n\n This must be called before the BPF object is loaded,\n otherwise it has no effect and an error is returned."]
pub fn bpf_program__set_expected_attach_type(
prog: *mut bpf_program,
type_: bpf_attach_type,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_program__flags(prog: *const bpf_program) -> __u32;
}
extern "C" {
pub fn bpf_program__set_flags(prog: *mut bpf_program, flags: __u32) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_program__log_level(prog: *const bpf_program) -> __u32;
}
extern "C" {
pub fn bpf_program__set_log_level(
prog: *mut bpf_program,
log_level: __u32,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_program__log_buf(
prog: *const bpf_program,
log_size: *mut usize,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn bpf_program__set_log_buf(
prog: *mut bpf_program,
log_buf: *mut ::std::os::raw::c_char,
log_size: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **bpf_program__set_attach_target()** sets BTF-based attach target\n for supported BPF program types:\n - BTF-aware raw tracepoints (tp_btf);\n - fentry/fexit/fmod_ret;\n - lsm;\n - freplace.\n @param prog BPF program to set the attach type for\n @param type attach type to set the BPF map to have\n @return error code; or 0 if no error occurred."]
pub fn bpf_program__set_attach_target(
prog: *mut bpf_program,
attach_prog_fd: ::std::os::raw::c_int,
attach_func_name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **bpf_object__find_map_by_name()** returns BPF map of\n the given name, if it exists within the passed BPF object\n @param obj BPF object\n @param name name of the BPF map\n @return BPF map instance, if such map exists within the BPF object;\n or NULL otherwise."]
pub fn bpf_object__find_map_by_name(
obj: *const bpf_object,
name: *const ::std::os::raw::c_char,
) -> *mut bpf_map;
}
extern "C" {
pub fn bpf_object__find_map_fd_by_name(
obj: *const bpf_object,
name: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_object__next_map(obj: *const bpf_object, map: *const bpf_map) -> *mut bpf_map;
}
extern "C" {
pub fn bpf_object__prev_map(obj: *const bpf_object, map: *const bpf_map) -> *mut bpf_map;
}
extern "C" {
#[doc = " @brief **bpf_map__set_autocreate()** sets whether libbpf has to auto-create\n BPF map during BPF object load phase.\n @param map the BPF map instance\n @param autocreate whether to create BPF map during BPF object load\n @return 0 on success; -EBUSY if BPF object was already loaded\n\n **bpf_map__set_autocreate()** allows to opt-out from libbpf auto-creating\n BPF map. By default, libbpf will attempt to create every single BPF map\n defined in BPF object file using BPF_MAP_CREATE command of bpf() syscall\n and fill in map FD in BPF instructions.\n\n This API allows to opt-out of this process for specific map instance. This\n can be useful if host kernel doesn't support such BPF map type or used\n combination of flags and user application wants to avoid creating such\n a map in the first place. User is still responsible to make sure that their\n BPF-side code that expects to use such missing BPF map is recognized by BPF\n verifier as dead code, otherwise BPF verifier will reject such BPF program."]
pub fn bpf_map__set_autocreate(map: *mut bpf_map, autocreate: bool) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map__autocreate(map: *const bpf_map) -> bool;
}
extern "C" {
#[doc = " @brief **bpf_map__fd()** gets the file descriptor of the passed\n BPF map\n @param map the BPF map instance\n @return the file descriptor; or -EINVAL in case of an error"]
pub fn bpf_map__fd(map: *const bpf_map) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map__reuse_fd(map: *mut bpf_map, fd: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map__name(map: *const bpf_map) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn bpf_map__type(map: *const bpf_map) -> bpf_map_type;
}
extern "C" {
pub fn bpf_map__set_type(map: *mut bpf_map, type_: bpf_map_type) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map__max_entries(map: *const bpf_map) -> __u32;
}
extern "C" {
pub fn bpf_map__set_max_entries(map: *mut bpf_map, max_entries: __u32)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map__map_flags(map: *const bpf_map) -> __u32;
}
extern "C" {
pub fn bpf_map__set_map_flags(map: *mut bpf_map, flags: __u32) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map__numa_node(map: *const bpf_map) -> __u32;
}
extern "C" {
pub fn bpf_map__set_numa_node(map: *mut bpf_map, numa_node: __u32) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map__key_size(map: *const bpf_map) -> __u32;
}
extern "C" {
pub fn bpf_map__set_key_size(map: *mut bpf_map, size: __u32) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map__value_size(map: *const bpf_map) -> __u32;
}
extern "C" {
pub fn bpf_map__set_value_size(map: *mut bpf_map, size: __u32) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map__btf_key_type_id(map: *const bpf_map) -> __u32;
}
extern "C" {
pub fn bpf_map__btf_value_type_id(map: *const bpf_map) -> __u32;
}
extern "C" {
pub fn bpf_map__ifindex(map: *const bpf_map) -> __u32;
}
extern "C" {
pub fn bpf_map__set_ifindex(map: *mut bpf_map, ifindex: __u32) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map__map_extra(map: *const bpf_map) -> __u64;
}
extern "C" {
pub fn bpf_map__set_map_extra(map: *mut bpf_map, map_extra: __u64) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map__set_initial_value(
map: *mut bpf_map,
data: *const ::std::os::raw::c_void,
size: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map__initial_value(
map: *mut bpf_map,
psize: *mut usize,
) -> *const ::std::os::raw::c_void;
}
extern "C" {
#[doc = " @brief **bpf_map__is_internal()** tells the caller whether or not the\n passed map is a special map created by libbpf automatically for things like\n global variables, __ksym externs, Kconfig values, etc\n @param map the bpf_map\n @return true, if the map is an internal map; false, otherwise"]
pub fn bpf_map__is_internal(map: *const bpf_map) -> bool;
}
extern "C" {
pub fn bpf_map__set_pin_path(
map: *mut bpf_map,
path: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map__pin_path(map: *const bpf_map) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn bpf_map__is_pinned(map: *const bpf_map) -> bool;
}
extern "C" {
pub fn bpf_map__pin(
map: *mut bpf_map,
path: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map__unpin(
map: *mut bpf_map,
path: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map__set_inner_map_fd(
map: *mut bpf_map,
fd: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map__inner_map(map: *mut bpf_map) -> *mut bpf_map;
}
extern "C" {
#[doc = " @brief **bpf_map__lookup_elem()** allows to lookup BPF map value\n corresponding to provided key.\n @param map BPF map to lookup element in\n @param key pointer to memory containing bytes of the key used for lookup\n @param key_sz size in bytes of key data, needs to match BPF map definition's **key_size**\n @param value pointer to memory in which looked up value will be stored\n @param value_sz size in byte of value data memory; it has to match BPF map\n definition's **value_size**. For per-CPU BPF maps value size has to be\n a product of BPF map value size and number of possible CPUs in the system\n (could be fetched with **libbpf_num_possible_cpus()**). Note also that for\n per-CPU values value size has to be aligned up to closest 8 bytes for\n alignment reasons, so expected size is: `round_up(value_size, 8)\n * libbpf_num_possible_cpus()`.\n @flags extra flags passed to kernel for this operation\n @return 0, on success; negative error, otherwise\n\n **bpf_map__lookup_elem()** is high-level equivalent of\n **bpf_map_lookup_elem()** API with added check for key and value size."]
pub fn bpf_map__lookup_elem(
map: *const bpf_map,
key: *const ::std::os::raw::c_void,
key_sz: usize,
value: *mut ::std::os::raw::c_void,
value_sz: usize,
flags: __u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **bpf_map__update_elem()** allows to insert or update value in BPF\n map that corresponds to provided key.\n @param map BPF map to insert to or update element in\n @param key pointer to memory containing bytes of the key\n @param key_sz size in bytes of key data, needs to match BPF map definition's **key_size**\n @param value pointer to memory containing bytes of the value\n @param value_sz size in byte of value data memory; it has to match BPF map\n definition's **value_size**. For per-CPU BPF maps value size has to be\n a product of BPF map value size and number of possible CPUs in the system\n (could be fetched with **libbpf_num_possible_cpus()**). Note also that for\n per-CPU values value size has to be aligned up to closest 8 bytes for\n alignment reasons, so expected size is: `round_up(value_size, 8)\n * libbpf_num_possible_cpus()`.\n @flags extra flags passed to kernel for this operation\n @return 0, on success; negative error, otherwise\n\n **bpf_map__update_elem()** is high-level equivalent of\n **bpf_map_update_elem()** API with added check for key and value size."]
pub fn bpf_map__update_elem(
map: *const bpf_map,
key: *const ::std::os::raw::c_void,
key_sz: usize,
value: *const ::std::os::raw::c_void,
value_sz: usize,
flags: __u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **bpf_map__delete_elem()** allows to delete element in BPF map that\n corresponds to provided key.\n @param map BPF map to delete element from\n @param key pointer to memory containing bytes of the key\n @param key_sz size in bytes of key data, needs to match BPF map definition's **key_size**\n @flags extra flags passed to kernel for this operation\n @return 0, on success; negative error, otherwise\n\n **bpf_map__delete_elem()** is high-level equivalent of\n **bpf_map_delete_elem()** API with added check for key size."]
pub fn bpf_map__delete_elem(
map: *const bpf_map,
key: *const ::std::os::raw::c_void,
key_sz: usize,
flags: __u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **bpf_map__lookup_and_delete_elem()** allows to lookup BPF map value\n corresponding to provided key and atomically delete it afterwards.\n @param map BPF map to lookup element in\n @param key pointer to memory containing bytes of the key used for lookup\n @param key_sz size in bytes of key data, needs to match BPF map definition's **key_size**\n @param value pointer to memory in which looked up value will be stored\n @param value_sz size in byte of value data memory; it has to match BPF map\n definition's **value_size**. For per-CPU BPF maps value size has to be\n a product of BPF map value size and number of possible CPUs in the system\n (could be fetched with **libbpf_num_possible_cpus()**). Note also that for\n per-CPU values value size has to be aligned up to closest 8 bytes for\n alignment reasons, so expected size is: `round_up(value_size, 8)\n * libbpf_num_possible_cpus()`.\n @flags extra flags passed to kernel for this operation\n @return 0, on success; negative error, otherwise\n\n **bpf_map__lookup_and_delete_elem()** is high-level equivalent of\n **bpf_map_lookup_and_delete_elem()** API with added check for key and value size."]
pub fn bpf_map__lookup_and_delete_elem(
map: *const bpf_map,
key: *const ::std::os::raw::c_void,
key_sz: usize,
value: *mut ::std::os::raw::c_void,
value_sz: usize,
flags: __u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **bpf_map__get_next_key()** allows to iterate BPF map keys by\n fetching next key that follows current key.\n @param map BPF map to fetch next key from\n @param cur_key pointer to memory containing bytes of current key or NULL to\n fetch the first key\n @param next_key pointer to memory to write next key into\n @param key_sz size in bytes of key data, needs to match BPF map definition's **key_size**\n @return 0, on success; -ENOENT if **cur_key** is the last key in BPF map;\n negative error, otherwise\n\n **bpf_map__get_next_key()** is high-level equivalent of\n **bpf_map_get_next_key()** API with added check for key size."]
pub fn bpf_map__get_next_key(
map: *const bpf_map,
cur_key: *const ::std::os::raw::c_void,
next_key: *mut ::std::os::raw::c_void,
key_sz: usize,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_xdp_set_link_opts {
pub sz: usize,
pub old_fd: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_bpf_xdp_set_link_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_xdp_set_link_opts> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_xdp_set_link_opts>(),
16usize,
concat!("Size of: ", stringify!(bpf_xdp_set_link_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_xdp_set_link_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_xdp_set_link_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_xdp_set_link_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).old_fd) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_xdp_set_link_opts),
"::",
stringify!(old_fd)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_xdp_attach_opts {
pub sz: usize,
pub old_prog_fd: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_bpf_xdp_attach_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_xdp_attach_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_xdp_attach_opts>(),
16usize,
concat!("Size of: ", stringify!(bpf_xdp_attach_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_xdp_attach_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_xdp_attach_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_xdp_attach_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).old_prog_fd) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_xdp_attach_opts),
"::",
stringify!(old_prog_fd)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_xdp_query_opts {
pub sz: usize,
pub prog_id: __u32,
pub drv_prog_id: __u32,
pub hw_prog_id: __u32,
pub skb_prog_id: __u32,
pub attach_mode: __u8,
}
#[test]
fn bindgen_test_layout_bpf_xdp_query_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_xdp_query_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_xdp_query_opts>(),
32usize,
concat!("Size of: ", stringify!(bpf_xdp_query_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_xdp_query_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_xdp_query_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_xdp_query_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_id) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_xdp_query_opts),
"::",
stringify!(prog_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).drv_prog_id) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_xdp_query_opts),
"::",
stringify!(drv_prog_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hw_prog_id) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_xdp_query_opts),
"::",
stringify!(hw_prog_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).skb_prog_id) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_xdp_query_opts),
"::",
stringify!(skb_prog_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_mode) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_xdp_query_opts),
"::",
stringify!(attach_mode)
)
);
}
extern "C" {
pub fn bpf_xdp_attach(
ifindex: ::std::os::raw::c_int,
prog_fd: ::std::os::raw::c_int,
flags: __u32,
opts: *const bpf_xdp_attach_opts,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_xdp_detach(
ifindex: ::std::os::raw::c_int,
flags: __u32,
opts: *const bpf_xdp_attach_opts,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_xdp_query(
ifindex: ::std::os::raw::c_int,
flags: ::std::os::raw::c_int,
opts: *mut bpf_xdp_query_opts,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_xdp_query_id(
ifindex: ::std::os::raw::c_int,
flags: ::std::os::raw::c_int,
prog_id: *mut __u32,
) -> ::std::os::raw::c_int;
}
pub const bpf_tc_attach_point_BPF_TC_INGRESS: bpf_tc_attach_point = 1;
pub const bpf_tc_attach_point_BPF_TC_EGRESS: bpf_tc_attach_point = 2;
pub const bpf_tc_attach_point_BPF_TC_CUSTOM: bpf_tc_attach_point = 4;
pub type bpf_tc_attach_point = ::std::os::raw::c_uint;
pub const bpf_tc_flags_BPF_TC_F_REPLACE: bpf_tc_flags = 1;
pub type bpf_tc_flags = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_tc_hook {
pub sz: usize,
pub ifindex: ::std::os::raw::c_int,
pub attach_point: bpf_tc_attach_point,
pub parent: __u32,
}
#[test]
fn bindgen_test_layout_bpf_tc_hook() {
const UNINIT: ::std::mem::MaybeUninit<bpf_tc_hook> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_tc_hook>(),
24usize,
concat!("Size of: ", stringify!(bpf_tc_hook))
);
assert_eq!(
::std::mem::align_of::<bpf_tc_hook>(),
8usize,
concat!("Alignment of ", stringify!(bpf_tc_hook))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_tc_hook),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ifindex) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_tc_hook),
"::",
stringify!(ifindex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_point) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_tc_hook),
"::",
stringify!(attach_point)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).parent) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_tc_hook),
"::",
stringify!(parent)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_tc_opts {
pub sz: usize,
pub prog_fd: ::std::os::raw::c_int,
pub flags: __u32,
pub prog_id: __u32,
pub handle: __u32,
pub priority: __u32,
}
#[test]
fn bindgen_test_layout_bpf_tc_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_tc_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_tc_opts>(),
32usize,
concat!("Size of: ", stringify!(bpf_tc_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_tc_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_tc_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_tc_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_fd) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_tc_opts),
"::",
stringify!(prog_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_tc_opts),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_id) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_tc_opts),
"::",
stringify!(prog_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_tc_opts),
"::",
stringify!(handle)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_tc_opts),
"::",
stringify!(priority)
)
);
}
extern "C" {
pub fn bpf_tc_hook_create(hook: *mut bpf_tc_hook) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_tc_hook_destroy(hook: *mut bpf_tc_hook) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_tc_attach(hook: *const bpf_tc_hook, opts: *mut bpf_tc_opts)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_tc_detach(
hook: *const bpf_tc_hook,
opts: *const bpf_tc_opts,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_tc_query(hook: *const bpf_tc_hook, opts: *mut bpf_tc_opts) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ring_buffer {
_unused: [u8; 0],
}
pub type ring_buffer_sample_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut ::std::os::raw::c_void,
data: *mut ::std::os::raw::c_void,
size: usize,
) -> ::std::os::raw::c_int,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ring_buffer_opts {
pub sz: usize,
}
#[test]
fn bindgen_test_layout_ring_buffer_opts() {
const UNINIT: ::std::mem::MaybeUninit<ring_buffer_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ring_buffer_opts>(),
8usize,
concat!("Size of: ", stringify!(ring_buffer_opts))
);
assert_eq!(
::std::mem::align_of::<ring_buffer_opts>(),
8usize,
concat!("Alignment of ", stringify!(ring_buffer_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ring_buffer_opts),
"::",
stringify!(sz)
)
);
}
extern "C" {
pub fn ring_buffer__new(
map_fd: ::std::os::raw::c_int,
sample_cb: ring_buffer_sample_fn,
ctx: *mut ::std::os::raw::c_void,
opts: *const ring_buffer_opts,
) -> *mut ring_buffer;
}
extern "C" {
pub fn ring_buffer__free(rb: *mut ring_buffer);
}
extern "C" {
pub fn ring_buffer__add(
rb: *mut ring_buffer,
map_fd: ::std::os::raw::c_int,
sample_cb: ring_buffer_sample_fn,
ctx: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ring_buffer__poll(
rb: *mut ring_buffer,
timeout_ms: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ring_buffer__consume(rb: *mut ring_buffer) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ring_buffer__epoll_fd(rb: *const ring_buffer) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct perf_buffer {
_unused: [u8; 0],
}
pub type perf_buffer_sample_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut ::std::os::raw::c_void,
cpu: ::std::os::raw::c_int,
data: *mut ::std::os::raw::c_void,
size: __u32,
),
>;
pub type perf_buffer_lost_fn = ::std::option::Option<
unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void, cpu: ::std::os::raw::c_int, cnt: __u64),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct perf_buffer_opts {
pub sz: usize,
}
#[test]
fn bindgen_test_layout_perf_buffer_opts() {
const UNINIT: ::std::mem::MaybeUninit<perf_buffer_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<perf_buffer_opts>(),
8usize,
concat!("Size of: ", stringify!(perf_buffer_opts))
);
assert_eq!(
::std::mem::align_of::<perf_buffer_opts>(),
8usize,
concat!("Alignment of ", stringify!(perf_buffer_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(perf_buffer_opts),
"::",
stringify!(sz)
)
);
}
extern "C" {
#[doc = " @brief **perf_buffer__new()** creates BPF perfbuf manager for a specified\n BPF_PERF_EVENT_ARRAY map\n @param map_fd FD of BPF_PERF_EVENT_ARRAY BPF map that will be used by BPF\n code to send data over to user-space\n @param page_cnt number of memory pages allocated for each per-CPU buffer\n @param sample_cb function called on each received data record\n @param lost_cb function called when record loss has occurred\n @param ctx user-provided extra context passed into *sample_cb* and *lost_cb*\n @return a new instance of struct perf_buffer on success, NULL on error with\n *errno* containing an error code"]
pub fn perf_buffer__new(
map_fd: ::std::os::raw::c_int,
page_cnt: usize,
sample_cb: perf_buffer_sample_fn,
lost_cb: perf_buffer_lost_fn,
ctx: *mut ::std::os::raw::c_void,
opts: *const perf_buffer_opts,
) -> *mut perf_buffer;
}
pub const bpf_perf_event_ret_LIBBPF_PERF_EVENT_DONE: bpf_perf_event_ret = 0;
pub const bpf_perf_event_ret_LIBBPF_PERF_EVENT_ERROR: bpf_perf_event_ret = -1;
pub const bpf_perf_event_ret_LIBBPF_PERF_EVENT_CONT: bpf_perf_event_ret = -2;
pub type bpf_perf_event_ret = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct perf_event_header {
_unused: [u8; 0],
}
pub type perf_buffer_event_fn = ::std::option::Option<
unsafe extern "C" fn(
ctx: *mut ::std::os::raw::c_void,
cpu: ::std::os::raw::c_int,
event: *mut perf_event_header,
) -> bpf_perf_event_ret,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct perf_buffer_raw_opts {
pub sz: usize,
pub cpu_cnt: ::std::os::raw::c_int,
pub cpus: *mut ::std::os::raw::c_int,
pub map_keys: *mut ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_perf_buffer_raw_opts() {
const UNINIT: ::std::mem::MaybeUninit<perf_buffer_raw_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<perf_buffer_raw_opts>(),
32usize,
concat!("Size of: ", stringify!(perf_buffer_raw_opts))
);
assert_eq!(
::std::mem::align_of::<perf_buffer_raw_opts>(),
8usize,
concat!("Alignment of ", stringify!(perf_buffer_raw_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(perf_buffer_raw_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cpu_cnt) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(perf_buffer_raw_opts),
"::",
stringify!(cpu_cnt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cpus) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(perf_buffer_raw_opts),
"::",
stringify!(cpus)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_keys) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(perf_buffer_raw_opts),
"::",
stringify!(map_keys)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct perf_event_attr {
_unused: [u8; 0],
}
extern "C" {
pub fn perf_buffer__new_raw(
map_fd: ::std::os::raw::c_int,
page_cnt: usize,
attr: *mut perf_event_attr,
event_cb: perf_buffer_event_fn,
ctx: *mut ::std::os::raw::c_void,
opts: *const perf_buffer_raw_opts,
) -> *mut perf_buffer;
}
extern "C" {
pub fn perf_buffer__free(pb: *mut perf_buffer);
}
extern "C" {
pub fn perf_buffer__epoll_fd(pb: *const perf_buffer) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn perf_buffer__poll(
pb: *mut perf_buffer,
timeout_ms: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn perf_buffer__consume(pb: *mut perf_buffer) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn perf_buffer__consume_buffer(
pb: *mut perf_buffer,
buf_idx: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn perf_buffer__buffer_cnt(pb: *const perf_buffer) -> usize;
}
extern "C" {
pub fn perf_buffer__buffer_fd(pb: *const perf_buffer, buf_idx: usize) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **perf_buffer__buffer()** returns the per-cpu raw mmap()'ed underlying\n memory region of the ring buffer.\n This ring buffer can be used to implement a custom events consumer.\n The ring buffer starts with the *struct perf_event_mmap_page*, which\n holds the ring buffer managment fields, when accessing the header\n structure it's important to be SMP aware.\n You can refer to *perf_event_read_simple* for a simple example.\n @param pb the perf buffer structure\n @param buf_idx the buffer index to retreive\n @param buf (out) gets the base pointer of the mmap()'ed memory\n @param buf_size (out) gets the size of the mmap()'ed region\n @return 0 on success, negative error code for failure"]
pub fn perf_buffer__buffer(
pb: *mut perf_buffer,
buf_idx: ::std::os::raw::c_int,
buf: *mut *mut ::std::os::raw::c_void,
buf_size: *mut usize,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_prog_linfo {
_unused: [u8; 0],
}
extern "C" {
pub fn bpf_prog_linfo__free(prog_linfo: *mut bpf_prog_linfo);
}
extern "C" {
pub fn bpf_prog_linfo__new(info: *const bpf_prog_info) -> *mut bpf_prog_linfo;
}
extern "C" {
pub fn bpf_prog_linfo__lfind_addr_func(
prog_linfo: *const bpf_prog_linfo,
addr: __u64,
func_idx: __u32,
nr_skip: __u32,
) -> *const bpf_line_info;
}
extern "C" {
pub fn bpf_prog_linfo__lfind(
prog_linfo: *const bpf_prog_linfo,
insn_off: __u32,
nr_skip: __u32,
) -> *const bpf_line_info;
}
extern "C" {
#[doc = " @brief **libbpf_probe_bpf_prog_type()** detects if host kernel supports\n BPF programs of a given type.\n @param prog_type BPF program type to detect kernel support for\n @param opts reserved for future extensibility, should be NULL\n @return 1, if given program type is supported; 0, if given program type is\n not supported; negative error code if feature detection failed or can't be\n performed\n\n Make sure the process has required set of CAP_* permissions (or runs as\n root) when performing feature checking."]
pub fn libbpf_probe_bpf_prog_type(
prog_type: bpf_prog_type,
opts: *const ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **libbpf_probe_bpf_map_type()** detects if host kernel supports\n BPF maps of a given type.\n @param map_type BPF map type to detect kernel support for\n @param opts reserved for future extensibility, should be NULL\n @return 1, if given map type is supported; 0, if given map type is\n not supported; negative error code if feature detection failed or can't be\n performed\n\n Make sure the process has required set of CAP_* permissions (or runs as\n root) when performing feature checking."]
pub fn libbpf_probe_bpf_map_type(
map_type: bpf_map_type,
opts: *const ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **libbpf_probe_bpf_helper()** detects if host kernel supports the\n use of a given BPF helper from specified BPF program type.\n @param prog_type BPF program type used to check the support of BPF helper\n @param helper_id BPF helper ID (enum bpf_func_id) to check support for\n @param opts reserved for future extensibility, should be NULL\n @return 1, if given combination of program type and helper is supported; 0,\n if the combination is not supported; negative error code if feature\n detection for provided input arguments failed or can't be performed\n\n Make sure the process has required set of CAP_* permissions (or runs as\n root) when performing feature checking."]
pub fn libbpf_probe_bpf_helper(
prog_type: bpf_prog_type,
helper_id: bpf_func_id,
opts: *const ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **libbpf_num_possible_cpus()** is a helper function to get the\n number of possible CPUs that the host kernel supports and expects.\n @return number of possible CPUs; or error code on failure\n\n Example usage:\n\n int ncpus = libbpf_num_possible_cpus();\n if (ncpus < 0) {\n // error handling\n }\n long values[ncpus];\n bpf_map_lookup_elem(per_cpu_map_fd, key, values);"]
pub fn libbpf_num_possible_cpus() -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_map_skeleton {
pub name: *const ::std::os::raw::c_char,
pub map: *mut *mut bpf_map,
pub mmaped: *mut *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_bpf_map_skeleton() {
const UNINIT: ::std::mem::MaybeUninit<bpf_map_skeleton> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_map_skeleton>(),
24usize,
concat!("Size of: ", stringify!(bpf_map_skeleton))
);
assert_eq!(
::std::mem::align_of::<bpf_map_skeleton>(),
8usize,
concat!("Alignment of ", stringify!(bpf_map_skeleton))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_skeleton),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_skeleton),
"::",
stringify!(map)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mmaped) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_skeleton),
"::",
stringify!(mmaped)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_prog_skeleton {
pub name: *const ::std::os::raw::c_char,
pub prog: *mut *mut bpf_program,
pub link: *mut *mut bpf_link,
}
#[test]
fn bindgen_test_layout_bpf_prog_skeleton() {
const UNINIT: ::std::mem::MaybeUninit<bpf_prog_skeleton> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_prog_skeleton>(),
24usize,
concat!("Size of: ", stringify!(bpf_prog_skeleton))
);
assert_eq!(
::std::mem::align_of::<bpf_prog_skeleton>(),
8usize,
concat!("Alignment of ", stringify!(bpf_prog_skeleton))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_skeleton),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_skeleton),
"::",
stringify!(prog)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).link) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_skeleton),
"::",
stringify!(link)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_object_skeleton {
pub sz: usize,
pub name: *const ::std::os::raw::c_char,
pub data: *const ::std::os::raw::c_void,
pub data_sz: usize,
pub obj: *mut *mut bpf_object,
pub map_cnt: ::std::os::raw::c_int,
pub map_skel_sz: ::std::os::raw::c_int,
pub maps: *mut bpf_map_skeleton,
pub prog_cnt: ::std::os::raw::c_int,
pub prog_skel_sz: ::std::os::raw::c_int,
pub progs: *mut bpf_prog_skeleton,
}
#[test]
fn bindgen_test_layout_bpf_object_skeleton() {
const UNINIT: ::std::mem::MaybeUninit<bpf_object_skeleton> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_object_skeleton>(),
72usize,
concat!("Size of: ", stringify!(bpf_object_skeleton))
);
assert_eq!(
::std::mem::align_of::<bpf_object_skeleton>(),
8usize,
concat!("Alignment of ", stringify!(bpf_object_skeleton))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_skeleton),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_skeleton),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_skeleton),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_sz) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_skeleton),
"::",
stringify!(data_sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).obj) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_skeleton),
"::",
stringify!(obj)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_cnt) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_skeleton),
"::",
stringify!(map_cnt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_skel_sz) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_skeleton),
"::",
stringify!(map_skel_sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).maps) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_skeleton),
"::",
stringify!(maps)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_cnt) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_skeleton),
"::",
stringify!(prog_cnt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_skel_sz) as usize - ptr as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_skeleton),
"::",
stringify!(prog_skel_sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).progs) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_skeleton),
"::",
stringify!(progs)
)
);
}
extern "C" {
pub fn bpf_object__open_skeleton(
s: *mut bpf_object_skeleton,
opts: *const bpf_object_open_opts,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_object__load_skeleton(s: *mut bpf_object_skeleton) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_object__attach_skeleton(s: *mut bpf_object_skeleton) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_object__detach_skeleton(s: *mut bpf_object_skeleton);
}
extern "C" {
pub fn bpf_object__destroy_skeleton(s: *mut bpf_object_skeleton);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_var_skeleton {
pub name: *const ::std::os::raw::c_char,
pub map: *mut *mut bpf_map,
pub addr: *mut *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_bpf_var_skeleton() {
const UNINIT: ::std::mem::MaybeUninit<bpf_var_skeleton> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_var_skeleton>(),
24usize,
concat!("Size of: ", stringify!(bpf_var_skeleton))
);
assert_eq!(
::std::mem::align_of::<bpf_var_skeleton>(),
8usize,
concat!("Alignment of ", stringify!(bpf_var_skeleton))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_var_skeleton),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_var_skeleton),
"::",
stringify!(map)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_var_skeleton),
"::",
stringify!(addr)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_object_subskeleton {
pub sz: usize,
pub obj: *const bpf_object,
pub map_cnt: ::std::os::raw::c_int,
pub map_skel_sz: ::std::os::raw::c_int,
pub maps: *mut bpf_map_skeleton,
pub prog_cnt: ::std::os::raw::c_int,
pub prog_skel_sz: ::std::os::raw::c_int,
pub progs: *mut bpf_prog_skeleton,
pub var_cnt: ::std::os::raw::c_int,
pub var_skel_sz: ::std::os::raw::c_int,
pub vars: *mut bpf_var_skeleton,
}
#[test]
fn bindgen_test_layout_bpf_object_subskeleton() {
const UNINIT: ::std::mem::MaybeUninit<bpf_object_subskeleton> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_object_subskeleton>(),
64usize,
concat!("Size of: ", stringify!(bpf_object_subskeleton))
);
assert_eq!(
::std::mem::align_of::<bpf_object_subskeleton>(),
8usize,
concat!("Alignment of ", stringify!(bpf_object_subskeleton))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_subskeleton),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).obj) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_subskeleton),
"::",
stringify!(obj)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_cnt) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_subskeleton),
"::",
stringify!(map_cnt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_skel_sz) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_subskeleton),
"::",
stringify!(map_skel_sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).maps) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_subskeleton),
"::",
stringify!(maps)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_cnt) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_subskeleton),
"::",
stringify!(prog_cnt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_skel_sz) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_subskeleton),
"::",
stringify!(prog_skel_sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).progs) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_subskeleton),
"::",
stringify!(progs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).var_cnt) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_subskeleton),
"::",
stringify!(var_cnt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).var_skel_sz) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_subskeleton),
"::",
stringify!(var_skel_sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vars) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_object_subskeleton),
"::",
stringify!(vars)
)
);
}
extern "C" {
pub fn bpf_object__open_subskeleton(s: *mut bpf_object_subskeleton) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_object__destroy_subskeleton(s: *mut bpf_object_subskeleton);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gen_loader_opts {
pub sz: usize,
pub data: *const ::std::os::raw::c_char,
pub insns: *const ::std::os::raw::c_char,
pub data_sz: __u32,
pub insns_sz: __u32,
}
#[test]
fn bindgen_test_layout_gen_loader_opts() {
const UNINIT: ::std::mem::MaybeUninit<gen_loader_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<gen_loader_opts>(),
32usize,
concat!("Size of: ", stringify!(gen_loader_opts))
);
assert_eq!(
::std::mem::align_of::<gen_loader_opts>(),
8usize,
concat!("Alignment of ", stringify!(gen_loader_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(gen_loader_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(gen_loader_opts),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).insns) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(gen_loader_opts),
"::",
stringify!(insns)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_sz) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(gen_loader_opts),
"::",
stringify!(data_sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).insns_sz) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(gen_loader_opts),
"::",
stringify!(insns_sz)
)
);
}
extern "C" {
pub fn bpf_object__gen_loader(
obj: *mut bpf_object,
opts: *mut gen_loader_opts,
) -> ::std::os::raw::c_int;
}
pub const libbpf_tristate_TRI_NO: libbpf_tristate = 0;
pub const libbpf_tristate_TRI_YES: libbpf_tristate = 1;
pub const libbpf_tristate_TRI_MODULE: libbpf_tristate = 2;
pub type libbpf_tristate = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_linker_opts {
pub sz: usize,
}
#[test]
fn bindgen_test_layout_bpf_linker_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_linker_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_linker_opts>(),
8usize,
concat!("Size of: ", stringify!(bpf_linker_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_linker_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_linker_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_linker_opts),
"::",
stringify!(sz)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_linker_file_opts {
pub sz: usize,
}
#[test]
fn bindgen_test_layout_bpf_linker_file_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_linker_file_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_linker_file_opts>(),
8usize,
concat!("Size of: ", stringify!(bpf_linker_file_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_linker_file_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_linker_file_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_linker_file_opts),
"::",
stringify!(sz)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_linker {
_unused: [u8; 0],
}
extern "C" {
pub fn bpf_linker__new(
filename: *const ::std::os::raw::c_char,
opts: *mut bpf_linker_opts,
) -> *mut bpf_linker;
}
extern "C" {
pub fn bpf_linker__add_file(
linker: *mut bpf_linker,
filename: *const ::std::os::raw::c_char,
opts: *const bpf_linker_file_opts,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_linker__finalize(linker: *mut bpf_linker) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_linker__free(linker: *mut bpf_linker);
}
pub type libbpf_prog_setup_fn_t = ::std::option::Option<
unsafe extern "C" fn(
prog: *mut bpf_program,
cookie: ::std::os::raw::c_long,
) -> ::std::os::raw::c_int,
>;
pub type libbpf_prog_prepare_load_fn_t = ::std::option::Option<
unsafe extern "C" fn(
prog: *mut bpf_program,
opts: *mut bpf_prog_load_opts,
cookie: ::std::os::raw::c_long,
) -> ::std::os::raw::c_int,
>;
pub type libbpf_prog_attach_fn_t = ::std::option::Option<
unsafe extern "C" fn(
prog: *const bpf_program,
cookie: ::std::os::raw::c_long,
link: *mut *mut bpf_link,
) -> ::std::os::raw::c_int,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct libbpf_prog_handler_opts {
pub sz: usize,
pub cookie: ::std::os::raw::c_long,
pub prog_setup_fn: libbpf_prog_setup_fn_t,
pub prog_prepare_load_fn: libbpf_prog_prepare_load_fn_t,
pub prog_attach_fn: libbpf_prog_attach_fn_t,
}
#[test]
fn bindgen_test_layout_libbpf_prog_handler_opts() {
const UNINIT: ::std::mem::MaybeUninit<libbpf_prog_handler_opts> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<libbpf_prog_handler_opts>(),
40usize,
concat!("Size of: ", stringify!(libbpf_prog_handler_opts))
);
assert_eq!(
::std::mem::align_of::<libbpf_prog_handler_opts>(),
8usize,
concat!("Alignment of ", stringify!(libbpf_prog_handler_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(libbpf_prog_handler_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cookie) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(libbpf_prog_handler_opts),
"::",
stringify!(cookie)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_setup_fn) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(libbpf_prog_handler_opts),
"::",
stringify!(prog_setup_fn)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_prepare_load_fn) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(libbpf_prog_handler_opts),
"::",
stringify!(prog_prepare_load_fn)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_attach_fn) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(libbpf_prog_handler_opts),
"::",
stringify!(prog_attach_fn)
)
);
}
extern "C" {
#[doc = " @brief **libbpf_register_prog_handler()** registers a custom BPF program\n SEC() handler.\n @param sec section prefix for which custom handler is registered\n @param prog_type BPF program type associated with specified section\n @param exp_attach_type Expected BPF attach type associated with specified section\n @param opts optional cookie, callbacks, and other extra options\n @return Non-negative handler ID is returned on success. This handler ID has\n to be passed to *libbpf_unregister_prog_handler()* to unregister such\n custom handler. Negative error code is returned on error.\n\n *sec* defines which SEC() definitions are handled by this custom handler\n registration. *sec* can have few different forms:\n - if *sec* is just a plain string (e.g., \"abc\"), it will match only\n SEC(\"abc\"). If BPF program specifies SEC(\"abc/whatever\") it will result\n in an error;\n - if *sec* is of the form \"abc/\", proper SEC() form is\n SEC(\"abc/something\"), where acceptable \"something\" should be checked by\n *prog_init_fn* callback, if there are additional restrictions;\n - if *sec* is of the form \"abc+\", it will successfully match both\n SEC(\"abc\") and SEC(\"abc/whatever\") forms;\n - if *sec* is NULL, custom handler is registered for any BPF program that\n doesn't match any of the registered (custom or libbpf's own) SEC()\n handlers. There could be only one such generic custom handler registered\n at any given time.\n\n All custom handlers (except the one with *sec* == NULL) are processed\n before libbpf's own SEC() handlers. It is allowed to \"override\" libbpf's\n SEC() handlers by registering custom ones for the same section prefix\n (i.e., it's possible to have custom SEC(\"perf_event/LLC-load-misses\")\n handler).\n\n Note, like much of global libbpf APIs (e.g., libbpf_set_print(),\n libbpf_set_strict_mode(), etc)) these APIs are not thread-safe. User needs\n to ensure synchronization if there is a risk of running this API from\n multiple threads simultaneously."]
pub fn libbpf_register_prog_handler(
sec: *const ::std::os::raw::c_char,
prog_type: bpf_prog_type,
exp_attach_type: bpf_attach_type,
opts: *const libbpf_prog_handler_opts,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief *libbpf_unregister_prog_handler()* unregisters previously registered\n custom BPF program SEC() handler.\n @param handler_id handler ID returned by *libbpf_register_prog_handler()*\n after successful registration\n @return 0 on success, negative error code if handler isn't found\n\n Note, like much of global libbpf APIs (e.g., libbpf_set_print(),\n libbpf_set_strict_mode(), etc)) these APIs are not thread-safe. User needs\n to ensure synchronization if there is a risk of running this API from\n multiple threads simultaneously."]
pub fn libbpf_unregister_prog_handler(
handler_id: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn libbpf_set_memlock_rlim(memlock_bytes: usize) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_map_create_opts {
pub sz: usize,
pub btf_fd: __u32,
pub btf_key_type_id: __u32,
pub btf_value_type_id: __u32,
pub btf_vmlinux_value_type_id: __u32,
pub inner_map_fd: __u32,
pub map_flags: __u32,
pub map_extra: __u64,
pub numa_node: __u32,
pub map_ifindex: __u32,
}
#[test]
fn bindgen_test_layout_bpf_map_create_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_map_create_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_map_create_opts>(),
48usize,
concat!("Size of: ", stringify!(bpf_map_create_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_map_create_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_map_create_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_create_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_fd) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_create_opts),
"::",
stringify!(btf_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_key_type_id) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_create_opts),
"::",
stringify!(btf_key_type_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_value_type_id) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_create_opts),
"::",
stringify!(btf_value_type_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).btf_vmlinux_value_type_id) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_create_opts),
"::",
stringify!(btf_vmlinux_value_type_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).inner_map_fd) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_create_opts),
"::",
stringify!(inner_map_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_flags) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_create_opts),
"::",
stringify!(map_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_extra) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_create_opts),
"::",
stringify!(map_extra)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).numa_node) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_create_opts),
"::",
stringify!(numa_node)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).map_ifindex) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_create_opts),
"::",
stringify!(map_ifindex)
)
);
}
extern "C" {
pub fn bpf_map_create(
map_type: bpf_map_type,
map_name: *const ::std::os::raw::c_char,
key_size: __u32,
value_size: __u32,
max_entries: __u32,
opts: *const bpf_map_create_opts,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_prog_load_opts {
pub sz: usize,
pub attempts: ::std::os::raw::c_int,
pub expected_attach_type: bpf_attach_type,
pub prog_btf_fd: __u32,
pub prog_flags: __u32,
pub prog_ifindex: __u32,
pub kern_version: __u32,
pub attach_btf_id: __u32,
pub attach_prog_fd: __u32,
pub attach_btf_obj_fd: __u32,
pub fd_array: *const ::std::os::raw::c_int,
pub func_info: *const ::std::os::raw::c_void,
pub func_info_cnt: __u32,
pub func_info_rec_size: __u32,
pub line_info: *const ::std::os::raw::c_void,
pub line_info_cnt: __u32,
pub line_info_rec_size: __u32,
pub log_level: __u32,
pub log_size: __u32,
pub log_buf: *mut ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_bpf_prog_load_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_prog_load_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_prog_load_opts>(),
104usize,
concat!("Size of: ", stringify!(bpf_prog_load_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_prog_load_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_prog_load_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attempts) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(attempts)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).expected_attach_type) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(expected_attach_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_btf_fd) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(prog_btf_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_flags) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(prog_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_ifindex) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(prog_ifindex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).kern_version) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(kern_version)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_btf_id) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(attach_btf_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_prog_fd) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(attach_prog_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_btf_obj_fd) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(attach_btf_obj_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fd_array) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(fd_array)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).func_info) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(func_info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).func_info_cnt) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(func_info_cnt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).func_info_rec_size) as usize - ptr as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(func_info_rec_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).line_info) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(line_info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).line_info_cnt) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(line_info_cnt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).line_info_rec_size) as usize - ptr as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(line_info_rec_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).log_level) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(log_level)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).log_size) as usize - ptr as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(log_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).log_buf) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_load_opts),
"::",
stringify!(log_buf)
)
);
}
extern "C" {
pub fn bpf_prog_load(
prog_type: bpf_prog_type,
prog_name: *const ::std::os::raw::c_char,
license: *const ::std::os::raw::c_char,
insns: *const bpf_insn,
insn_cnt: usize,
opts: *const bpf_prog_load_opts,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_btf_load_opts {
pub sz: usize,
pub log_buf: *mut ::std::os::raw::c_char,
pub log_level: __u32,
pub log_size: __u32,
}
#[test]
fn bindgen_test_layout_bpf_btf_load_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_btf_load_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_btf_load_opts>(),
24usize,
concat!("Size of: ", stringify!(bpf_btf_load_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_btf_load_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_btf_load_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_btf_load_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).log_buf) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_btf_load_opts),
"::",
stringify!(log_buf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).log_level) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_btf_load_opts),
"::",
stringify!(log_level)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).log_size) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(bpf_btf_load_opts),
"::",
stringify!(log_size)
)
);
}
extern "C" {
pub fn bpf_btf_load(
btf_data: *const ::std::os::raw::c_void,
btf_size: usize,
opts: *const bpf_btf_load_opts,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map_update_elem(
fd: ::std::os::raw::c_int,
key: *const ::std::os::raw::c_void,
value: *const ::std::os::raw::c_void,
flags: __u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map_lookup_elem(
fd: ::std::os::raw::c_int,
key: *const ::std::os::raw::c_void,
value: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map_lookup_elem_flags(
fd: ::std::os::raw::c_int,
key: *const ::std::os::raw::c_void,
value: *mut ::std::os::raw::c_void,
flags: __u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map_lookup_and_delete_elem(
fd: ::std::os::raw::c_int,
key: *const ::std::os::raw::c_void,
value: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map_lookup_and_delete_elem_flags(
fd: ::std::os::raw::c_int,
key: *const ::std::os::raw::c_void,
value: *mut ::std::os::raw::c_void,
flags: __u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map_delete_elem(
fd: ::std::os::raw::c_int,
key: *const ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map_delete_elem_flags(
fd: ::std::os::raw::c_int,
key: *const ::std::os::raw::c_void,
flags: __u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map_get_next_key(
fd: ::std::os::raw::c_int,
key: *const ::std::os::raw::c_void,
next_key: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_map_freeze(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_map_batch_opts {
pub sz: usize,
pub elem_flags: __u64,
pub flags: __u64,
}
#[test]
fn bindgen_test_layout_bpf_map_batch_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_map_batch_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_map_batch_opts>(),
24usize,
concat!("Size of: ", stringify!(bpf_map_batch_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_map_batch_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_map_batch_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_batch_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).elem_flags) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_batch_opts),
"::",
stringify!(elem_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_map_batch_opts),
"::",
stringify!(flags)
)
);
}
extern "C" {
#[doc = " @brief **bpf_map_delete_batch()** allows for batch deletion of multiple\n elements in a BPF map.\n\n @param fd BPF map file descriptor\n @param keys pointer to an array of *count* keys\n @param count input and output parameter; on input **count** represents the\n number of elements in the map to delete in batch;\n on output if a non-EFAULT error is returned, **count** represents the number of deleted\n elements if the output **count** value is not equal to the input **count** value\n If EFAULT is returned, **count** should not be trusted to be correct.\n @param opts options for configuring the way the batch deletion works\n @return 0, on success; negative error code, otherwise (errno is also set to\n the error code)"]
pub fn bpf_map_delete_batch(
fd: ::std::os::raw::c_int,
keys: *const ::std::os::raw::c_void,
count: *mut __u32,
opts: *const bpf_map_batch_opts,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **bpf_map_lookup_batch()** allows for batch lookup of BPF map elements.\n\n The parameter *in_batch* is the address of the first element in the batch to read.\n *out_batch* is an output parameter that should be passed as *in_batch* to subsequent\n calls to **bpf_map_lookup_batch()**. NULL can be passed for *in_batch* to indicate\n that the batched lookup starts from the beginning of the map.\n\n The *keys* and *values* are output parameters which must point to memory large enough to\n hold *count* items based on the key and value size of the map *map_fd*. The *keys*\n buffer must be of *key_size* * *count*. The *values* buffer must be of\n *value_size* * *count*.\n\n @param fd BPF map file descriptor\n @param in_batch address of the first element in batch to read, can pass NULL to\n indicate that the batched lookup starts from the beginning of the map.\n @param out_batch output parameter that should be passed to next call as *in_batch*\n @param keys pointer to an array large enough for *count* keys\n @param values pointer to an array large enough for *count* values\n @param count input and output parameter; on input it's the number of elements\n in the map to read in batch; on output it's the number of elements that were\n successfully read.\n If a non-EFAULT error is returned, count will be set as the number of elements\n that were read before the error occurred.\n If EFAULT is returned, **count** should not be trusted to be correct.\n @param opts options for configuring the way the batch lookup works\n @return 0, on success; negative error code, otherwise (errno is also set to\n the error code)"]
pub fn bpf_map_lookup_batch(
fd: ::std::os::raw::c_int,
in_batch: *mut ::std::os::raw::c_void,
out_batch: *mut ::std::os::raw::c_void,
keys: *mut ::std::os::raw::c_void,
values: *mut ::std::os::raw::c_void,
count: *mut __u32,
opts: *const bpf_map_batch_opts,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **bpf_map_lookup_and_delete_batch()** allows for batch lookup and deletion\n of BPF map elements where each element is deleted after being retrieved.\n\n @param fd BPF map file descriptor\n @param in_batch address of the first element in batch to read, can pass NULL to\n get address of the first element in *out_batch*\n @param out_batch output parameter that should be passed to next call as *in_batch*\n @param keys pointer to an array of *count* keys\n @param values pointer to an array large enough for *count* values\n @param count input and output parameter; on input it's the number of elements\n in the map to read and delete in batch; on output it represents the number of\n elements that were successfully read and deleted\n If a non-**EFAULT** error code is returned and if the output **count** value\n is not equal to the input **count** value, up to **count** elements may\n have been deleted.\n if **EFAULT** is returned up to *count* elements may have been deleted without\n being returned via the *keys* and *values* output parameters.\n @param opts options for configuring the way the batch lookup and delete works\n @return 0, on success; negative error code, otherwise (errno is also set to\n the error code)"]
pub fn bpf_map_lookup_and_delete_batch(
fd: ::std::os::raw::c_int,
in_batch: *mut ::std::os::raw::c_void,
out_batch: *mut ::std::os::raw::c_void,
keys: *mut ::std::os::raw::c_void,
values: *mut ::std::os::raw::c_void,
count: *mut __u32,
opts: *const bpf_map_batch_opts,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " @brief **bpf_map_update_batch()** updates multiple elements in a map\n by specifying keys and their corresponding values.\n\n The *keys* and *values* parameters must point to memory large enough\n to hold *count* items based on the key and value size of the map.\n\n The *opts* parameter can be used to control how *bpf_map_update_batch()*\n should handle keys that either do or do not already exist in the map.\n In particular the *flags* parameter of *bpf_map_batch_opts* can be\n one of the following:\n\n Note that *count* is an input and output parameter, where on output it\n represents how many elements were successfully updated. Also note that if\n **EFAULT** then *count* should not be trusted to be correct.\n\n **BPF_ANY**\n Create new elements or update existing.\n\n **BPF_NOEXIST**\n Create new elements only if they do not exist.\n\n **BPF_EXIST**\n Update existing elements.\n\n **BPF_F_LOCK**\n Update spin_lock-ed map elements. This must be\n specified if the map value contains a spinlock.\n\n @param fd BPF map file descriptor\n @param keys pointer to an array of *count* keys\n @param values pointer to an array of *count* values\n @param count input and output parameter; on input it's the number of elements\n in the map to update in batch; on output if a non-EFAULT error is returned,\n **count** represents the number of updated elements if the output **count**\n value is not equal to the input **count** value.\n If EFAULT is returned, **count** should not be trusted to be correct.\n @param opts options for configuring the way the batch update works\n @return 0, on success; negative error code, otherwise (errno is also set to\n the error code)"]
pub fn bpf_map_update_batch(
fd: ::std::os::raw::c_int,
keys: *const ::std::os::raw::c_void,
values: *const ::std::os::raw::c_void,
count: *mut __u32,
opts: *const bpf_map_batch_opts,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_obj_get_opts {
pub sz: usize,
pub file_flags: __u32,
}
#[test]
fn bindgen_test_layout_bpf_obj_get_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_obj_get_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_obj_get_opts>(),
16usize,
concat!("Size of: ", stringify!(bpf_obj_get_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_obj_get_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_obj_get_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_obj_get_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).file_flags) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_obj_get_opts),
"::",
stringify!(file_flags)
)
);
}
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_opts(
pathname: *const ::std::os::raw::c_char,
opts: *const bpf_obj_get_opts,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_prog_attach_opts {
pub sz: usize,
pub flags: ::std::os::raw::c_uint,
pub replace_prog_fd: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_bpf_prog_attach_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_prog_attach_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_prog_attach_opts>(),
16usize,
concat!("Size of: ", stringify!(bpf_prog_attach_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_prog_attach_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_prog_attach_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_attach_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_attach_opts),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).replace_prog_fd) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_attach_opts),
"::",
stringify!(replace_prog_fd)
)
);
}
extern "C" {
pub fn bpf_prog_attach(
prog_fd: ::std::os::raw::c_int,
attachable_fd: ::std::os::raw::c_int,
type_: bpf_attach_type,
flags: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_prog_attach_opts(
prog_fd: ::std::os::raw::c_int,
attachable_fd: ::std::os::raw::c_int,
type_: bpf_attach_type,
opts: *const bpf_prog_attach_opts,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_prog_detach(
attachable_fd: ::std::os::raw::c_int,
type_: bpf_attach_type,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_prog_detach2(
prog_fd: ::std::os::raw::c_int,
attachable_fd: ::std::os::raw::c_int,
type_: bpf_attach_type,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bpf_link_create_opts {
pub sz: usize,
pub flags: __u32,
pub iter_info: *mut bpf_iter_link_info,
pub iter_info_len: __u32,
pub target_btf_id: __u32,
pub __bindgen_anon_1: bpf_link_create_opts__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union bpf_link_create_opts__bindgen_ty_1 {
pub perf_event: bpf_link_create_opts__bindgen_ty_1__bindgen_ty_1,
pub kprobe_multi: bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2,
pub tracing: bpf_link_create_opts__bindgen_ty_1__bindgen_ty_3,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_link_create_opts__bindgen_ty_1__bindgen_ty_1 {
pub bpf_cookie: __u64,
}
#[test]
fn bindgen_test_layout_bpf_link_create_opts__bindgen_ty_1__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_link_create_opts__bindgen_ty_1__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_link_create_opts__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(bpf_link_create_opts__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<bpf_link_create_opts__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(bpf_link_create_opts__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bpf_cookie) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_create_opts__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(bpf_cookie)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2 {
pub flags: __u32,
pub cnt: __u32,
pub syms: *mut *const ::std::os::raw::c_char,
pub addrs: *const ::std::os::raw::c_ulong,
pub cookies: *const __u64,
}
#[test]
fn bindgen_test_layout_bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2>(),
32usize,
concat!(
"Size of: ",
stringify!(bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2>(),
8usize,
concat!(
"Alignment of ",
stringify!(bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cnt) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(cnt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).syms) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(syms)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).addrs) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(addrs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cookies) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_create_opts__bindgen_ty_1__bindgen_ty_2),
"::",
stringify!(cookies)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_link_create_opts__bindgen_ty_1__bindgen_ty_3 {
pub cookie: __u64,
}
#[test]
fn bindgen_test_layout_bpf_link_create_opts__bindgen_ty_1__bindgen_ty_3() {
const UNINIT: ::std::mem::MaybeUninit<bpf_link_create_opts__bindgen_ty_1__bindgen_ty_3> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_link_create_opts__bindgen_ty_1__bindgen_ty_3>(),
8usize,
concat!(
"Size of: ",
stringify!(bpf_link_create_opts__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
::std::mem::align_of::<bpf_link_create_opts__bindgen_ty_1__bindgen_ty_3>(),
8usize,
concat!(
"Alignment of ",
stringify!(bpf_link_create_opts__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cookie) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_create_opts__bindgen_ty_1__bindgen_ty_3),
"::",
stringify!(cookie)
)
);
}
#[test]
fn bindgen_test_layout_bpf_link_create_opts__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<bpf_link_create_opts__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_link_create_opts__bindgen_ty_1>(),
32usize,
concat!("Size of: ", stringify!(bpf_link_create_opts__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<bpf_link_create_opts__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(bpf_link_create_opts__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).perf_event) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_create_opts__bindgen_ty_1),
"::",
stringify!(perf_event)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).kprobe_multi) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_create_opts__bindgen_ty_1),
"::",
stringify!(kprobe_multi)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tracing) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_create_opts__bindgen_ty_1),
"::",
stringify!(tracing)
)
);
}
#[test]
fn bindgen_test_layout_bpf_link_create_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_link_create_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_link_create_opts>(),
64usize,
concat!("Size of: ", stringify!(bpf_link_create_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_link_create_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_link_create_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_create_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_create_opts),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).iter_info) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_create_opts),
"::",
stringify!(iter_info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).iter_info_len) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_create_opts),
"::",
stringify!(iter_info_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).target_btf_id) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_create_opts),
"::",
stringify!(target_btf_id)
)
);
}
extern "C" {
pub fn bpf_link_create(
prog_fd: ::std::os::raw::c_int,
target_fd: ::std::os::raw::c_int,
attach_type: bpf_attach_type,
opts: *const bpf_link_create_opts,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_link_detach(link_fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_link_update_opts {
pub sz: usize,
pub flags: __u32,
pub old_prog_fd: __u32,
}
#[test]
fn bindgen_test_layout_bpf_link_update_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_link_update_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_link_update_opts>(),
16usize,
concat!("Size of: ", stringify!(bpf_link_update_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_link_update_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_link_update_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_update_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_update_opts),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).old_prog_fd) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_link_update_opts),
"::",
stringify!(old_prog_fd)
)
);
}
extern "C" {
pub fn bpf_link_update(
link_fd: ::std::os::raw::c_int,
new_prog_fd: ::std::os::raw::c_int,
opts: *const bpf_link_update_opts,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_iter_create(link_fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_prog_test_run_attr {
pub prog_fd: ::std::os::raw::c_int,
pub repeat: ::std::os::raw::c_int,
pub data_in: *const ::std::os::raw::c_void,
pub data_size_in: __u32,
pub data_out: *mut ::std::os::raw::c_void,
pub data_size_out: __u32,
pub retval: __u32,
pub duration: __u32,
pub ctx_in: *const ::std::os::raw::c_void,
pub ctx_size_in: __u32,
pub ctx_out: *mut ::std::os::raw::c_void,
pub ctx_size_out: __u32,
}
#[test]
fn bindgen_test_layout_bpf_prog_test_run_attr() {
const UNINIT: ::std::mem::MaybeUninit<bpf_prog_test_run_attr> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_prog_test_run_attr>(),
80usize,
concat!("Size of: ", stringify!(bpf_prog_test_run_attr))
);
assert_eq!(
::std::mem::align_of::<bpf_prog_test_run_attr>(),
8usize,
concat!("Alignment of ", stringify!(bpf_prog_test_run_attr))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_test_run_attr),
"::",
stringify!(prog_fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).repeat) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_test_run_attr),
"::",
stringify!(repeat)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_in) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_test_run_attr),
"::",
stringify!(data_in)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_size_in) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_test_run_attr),
"::",
stringify!(data_size_in)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_out) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_test_run_attr),
"::",
stringify!(data_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_size_out) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_test_run_attr),
"::",
stringify!(data_size_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).retval) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_test_run_attr),
"::",
stringify!(retval)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).duration) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_test_run_attr),
"::",
stringify!(duration)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ctx_in) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_test_run_attr),
"::",
stringify!(ctx_in)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ctx_size_in) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_test_run_attr),
"::",
stringify!(ctx_size_in)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ctx_out) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_test_run_attr),
"::",
stringify!(ctx_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ctx_size_out) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_test_run_attr),
"::",
stringify!(ctx_size_out)
)
);
}
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_map_get_next_id(start_id: __u32, next_id: *mut __u32) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_btf_get_next_id(start_id: __u32, next_id: *mut __u32) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_link_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_btf_get_fd_by_id(id: __u32) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_link_get_fd_by_id(id: __u32) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_obj_get_info_by_fd(
bpf_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)]
pub struct bpf_prog_query_opts {
pub sz: usize,
pub query_flags: __u32,
pub attach_flags: __u32,
pub prog_ids: *mut __u32,
pub prog_cnt: __u32,
pub prog_attach_flags: *mut __u32,
}
#[test]
fn bindgen_test_layout_bpf_prog_query_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_prog_query_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_prog_query_opts>(),
40usize,
concat!("Size of: ", stringify!(bpf_prog_query_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_prog_query_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_prog_query_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_query_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).query_flags) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_query_opts),
"::",
stringify!(query_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).attach_flags) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_query_opts),
"::",
stringify!(attach_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_ids) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_query_opts),
"::",
stringify!(prog_ids)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_cnt) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_query_opts),
"::",
stringify!(prog_cnt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_attach_flags) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_query_opts),
"::",
stringify!(prog_attach_flags)
)
);
}
extern "C" {
pub fn bpf_prog_query_opts(
target_fd: ::std::os::raw::c_int,
type_: bpf_attach_type,
opts: *mut bpf_prog_query_opts,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_prog_query(
target_fd: ::std::os::raw::c_int,
type_: bpf_attach_type,
query_flags: __u32,
attach_flags: *mut __u32,
prog_ids: *mut __u32,
prog_cnt: *mut __u32,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_raw_tracepoint_open(
name: *const ::std::os::raw::c_char,
prog_fd: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_task_fd_query(
pid: ::std::os::raw::c_int,
fd: ::std::os::raw::c_int,
flags: __u32,
buf: *mut ::std::os::raw::c_char,
buf_len: *mut __u32,
prog_id: *mut __u32,
fd_type: *mut __u32,
probe_offset: *mut __u64,
probe_addr: *mut __u64,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bpf_enable_stats(type_: bpf_stats_type) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_prog_bind_opts {
pub sz: usize,
pub flags: __u32,
}
#[test]
fn bindgen_test_layout_bpf_prog_bind_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_prog_bind_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_prog_bind_opts>(),
16usize,
concat!("Size of: ", stringify!(bpf_prog_bind_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_prog_bind_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_prog_bind_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_bind_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_prog_bind_opts),
"::",
stringify!(flags)
)
);
}
extern "C" {
pub fn bpf_prog_bind_map(
prog_fd: ::std::os::raw::c_int,
map_fd: ::std::os::raw::c_int,
opts: *const bpf_prog_bind_opts,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct bpf_test_run_opts {
pub sz: usize,
pub data_in: *const ::std::os::raw::c_void,
pub data_out: *mut ::std::os::raw::c_void,
pub data_size_in: __u32,
pub data_size_out: __u32,
pub ctx_in: *const ::std::os::raw::c_void,
pub ctx_out: *mut ::std::os::raw::c_void,
pub ctx_size_in: __u32,
pub ctx_size_out: __u32,
pub retval: __u32,
pub repeat: ::std::os::raw::c_int,
pub duration: __u32,
pub flags: __u32,
pub cpu: __u32,
pub batch_size: __u32,
}
#[test]
fn bindgen_test_layout_bpf_test_run_opts() {
const UNINIT: ::std::mem::MaybeUninit<bpf_test_run_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<bpf_test_run_opts>(),
80usize,
concat!("Size of: ", stringify!(bpf_test_run_opts))
);
assert_eq!(
::std::mem::align_of::<bpf_test_run_opts>(),
8usize,
concat!("Alignment of ", stringify!(bpf_test_run_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(bpf_test_run_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_in) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(bpf_test_run_opts),
"::",
stringify!(data_in)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_out) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(bpf_test_run_opts),
"::",
stringify!(data_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_size_in) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(bpf_test_run_opts),
"::",
stringify!(data_size_in)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).data_size_out) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(bpf_test_run_opts),
"::",
stringify!(data_size_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ctx_in) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(bpf_test_run_opts),
"::",
stringify!(ctx_in)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ctx_out) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(bpf_test_run_opts),
"::",
stringify!(ctx_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ctx_size_in) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(bpf_test_run_opts),
"::",
stringify!(ctx_size_in)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ctx_size_out) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(bpf_test_run_opts),
"::",
stringify!(ctx_size_out)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).retval) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(bpf_test_run_opts),
"::",
stringify!(retval)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).repeat) as usize - ptr as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(bpf_test_run_opts),
"::",
stringify!(repeat)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).duration) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(bpf_test_run_opts),
"::",
stringify!(duration)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(bpf_test_run_opts),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cpu) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(bpf_test_run_opts),
"::",
stringify!(cpu)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).batch_size) as usize - ptr as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(bpf_test_run_opts),
"::",
stringify!(batch_size)
)
);
}
extern "C" {
pub fn bpf_prog_test_run_opts(
prog_fd: ::std::os::raw::c_int,
opts: *mut bpf_test_run_opts,
) -> ::std::os::raw::c_int;
}
pub const xdp_attach_mode_XDP_MODE_UNSPEC: xdp_attach_mode = 0;
pub const xdp_attach_mode_XDP_MODE_NATIVE: xdp_attach_mode = 1;
pub const xdp_attach_mode_XDP_MODE_SKB: xdp_attach_mode = 2;
pub const xdp_attach_mode_XDP_MODE_HW: xdp_attach_mode = 3;
pub type xdp_attach_mode = ::std::os::raw::c_uint;
pub const libxdp_print_level_LIBXDP_WARN: libxdp_print_level = 0;
pub const libxdp_print_level_LIBXDP_INFO: libxdp_print_level = 1;
pub const libxdp_print_level_LIBXDP_DEBUG: libxdp_print_level = 2;
pub type libxdp_print_level = ::std::os::raw::c_uint;
pub type libxdp_print_fn_t = ::std::option::Option<
unsafe extern "C" fn(
level: libxdp_print_level,
arg1: *const ::std::os::raw::c_char,
ap: *mut __va_list_tag,
) -> ::std::os::raw::c_int,
>;
extern "C" {
pub fn libxdp_set_print(fn_: libxdp_print_fn_t) -> libxdp_print_fn_t;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xdp_program {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xdp_multiprog {
_unused: [u8; 0],
}
extern "C" {
pub fn libxdp_get_error(ptr: *const ::std::os::raw::c_void) -> ::std::os::raw::c_long;
}
extern "C" {
pub fn libxdp_strerror(
err: ::std::os::raw::c_int,
buf: *mut ::std::os::raw::c_char,
size: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn libxdp_clean_references(ifindex: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xdp_program__from_bpf_obj(
obj: *mut bpf_object,
section_name: *const ::std::os::raw::c_char,
) -> *mut xdp_program;
}
extern "C" {
pub fn xdp_program__find_file(
filename: *const ::std::os::raw::c_char,
section_name: *const ::std::os::raw::c_char,
opts: *mut bpf_object_open_opts,
) -> *mut xdp_program;
}
extern "C" {
pub fn xdp_program__open_file(
filename: *const ::std::os::raw::c_char,
section_name: *const ::std::os::raw::c_char,
opts: *mut bpf_object_open_opts,
) -> *mut xdp_program;
}
extern "C" {
pub fn xdp_program__from_fd(fd: ::std::os::raw::c_int) -> *mut xdp_program;
}
extern "C" {
pub fn xdp_program__from_id(prog_id: __u32) -> *mut xdp_program;
}
extern "C" {
pub fn xdp_program__from_pin(pin_path: *const ::std::os::raw::c_char) -> *mut xdp_program;
}
extern "C" {
pub fn xdp_program__clone(
xdp_prog: *mut xdp_program,
flags: ::std::os::raw::c_uint,
) -> *mut xdp_program;
}
extern "C" {
pub fn xdp_program__close(xdp_prog: *mut xdp_program);
}
extern "C" {
pub fn xdp_program__test_run(
xdp_prog: *mut xdp_program,
opts: *mut bpf_test_run_opts,
flags: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xdp_program__is_attached(
xdp_prog: *const xdp_program,
ifindex: ::std::os::raw::c_int,
) -> xdp_attach_mode;
}
extern "C" {
pub fn xdp_program__name(xdp_prog: *const xdp_program) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn xdp_program__tag(xdp_prog: *const xdp_program) -> *const ::std::os::raw::c_uchar;
}
extern "C" {
pub fn xdp_program__bpf_obj(xdp_prog: *mut xdp_program) -> *mut bpf_object;
}
extern "C" {
pub fn xdp_program__btf(xdp_prog: *mut xdp_program) -> *const btf;
}
extern "C" {
pub fn xdp_program__id(xdp_prog: *const xdp_program) -> u32;
}
extern "C" {
pub fn xdp_program__fd(xdp_prog: *const xdp_program) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xdp_program__run_prio(xdp_prog: *const xdp_program) -> ::std::os::raw::c_uint;
}
extern "C" {
pub fn xdp_program__set_run_prio(
xdp_prog: *mut xdp_program,
run_prio: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xdp_program__chain_call_enabled(
xdp_prog: *const xdp_program,
action: xdp_action,
) -> bool;
}
extern "C" {
pub fn xdp_program__set_chain_call_enabled(
prog: *mut xdp_program,
action: ::std::os::raw::c_uint,
enabled: bool,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xdp_program__print_chain_call_actions(
prog: *const xdp_program,
buf: *mut ::std::os::raw::c_char,
buf_len: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xdp_program__xdp_frags_support(prog: *const xdp_program) -> bool;
}
extern "C" {
pub fn xdp_program__set_xdp_frags_support(
prog: *mut xdp_program,
frags: bool,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xdp_program__pin(
xdp_prog: *mut xdp_program,
pin_path: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xdp_program__attach(
xdp_prog: *mut xdp_program,
ifindex: ::std::os::raw::c_int,
mode: xdp_attach_mode,
flags: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xdp_program__attach_multi(
progs: *mut *mut xdp_program,
num_progs: usize,
ifindex: ::std::os::raw::c_int,
mode: xdp_attach_mode,
flags: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xdp_program__detach(
xdp_prog: *mut xdp_program,
ifindex: ::std::os::raw::c_int,
mode: xdp_attach_mode,
flags: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xdp_program__detach_multi(
progs: *mut *mut xdp_program,
num_progs: usize,
ifindex: ::std::os::raw::c_int,
mode: xdp_attach_mode,
flags: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xdp_multiprog__get_from_ifindex(ifindex: ::std::os::raw::c_int) -> *mut xdp_multiprog;
}
extern "C" {
pub fn xdp_multiprog__next_prog(
prog: *const xdp_program,
mp: *const xdp_multiprog,
) -> *mut xdp_program;
}
extern "C" {
pub fn xdp_multiprog__close(mp: *mut xdp_multiprog);
}
extern "C" {
pub fn xdp_multiprog__detach(mp: *mut xdp_multiprog) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xdp_multiprog__attach_mode(mp: *const xdp_multiprog) -> xdp_attach_mode;
}
extern "C" {
pub fn xdp_multiprog__main_prog(mp: *const xdp_multiprog) -> *mut xdp_program;
}
extern "C" {
pub fn xdp_multiprog__hw_prog(mp: *const xdp_multiprog) -> *mut xdp_program;
}
extern "C" {
pub fn xdp_multiprog__is_legacy(mp: *const xdp_multiprog) -> bool;
}
extern "C" {
pub fn xdp_multiprog__program_count(mp: *const xdp_multiprog) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xdp_multiprog__xdp_frags_support(mp: *const xdp_multiprog) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xdp_program_opts {
pub sz: usize,
pub obj: *mut bpf_object,
pub opts: *mut bpf_object_open_opts,
pub prog_name: *const ::std::os::raw::c_char,
pub find_filename: *const ::std::os::raw::c_char,
pub open_filename: *const ::std::os::raw::c_char,
pub pin_path: *const ::std::os::raw::c_char,
pub id: __u32,
pub fd: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_xdp_program_opts() {
const UNINIT: ::std::mem::MaybeUninit<xdp_program_opts> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<xdp_program_opts>(),
64usize,
concat!("Size of: ", stringify!(xdp_program_opts))
);
assert_eq!(
::std::mem::align_of::<xdp_program_opts>(),
8usize,
concat!("Alignment of ", stringify!(xdp_program_opts))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sz) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xdp_program_opts),
"::",
stringify!(sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).obj) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(xdp_program_opts),
"::",
stringify!(obj)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).opts) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(xdp_program_opts),
"::",
stringify!(opts)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prog_name) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(xdp_program_opts),
"::",
stringify!(prog_name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).find_filename) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(xdp_program_opts),
"::",
stringify!(find_filename)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).open_filename) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(xdp_program_opts),
"::",
stringify!(open_filename)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pin_path) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(xdp_program_opts),
"::",
stringify!(pin_path)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(xdp_program_opts),
"::",
stringify!(id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(xdp_program_opts),
"::",
stringify!(fd)
)
);
}
extern "C" {
pub fn xdp_program__create(opts: *mut xdp_program_opts) -> *mut xdp_program;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xdp_dispatcher_config {
pub magic: __u8,
pub dispatcher_version: __u8,
pub num_progs_enabled: __u8,
pub is_xdp_frags: __u8,
pub chain_call_actions: [__u32; 10usize],
pub run_prios: [__u32; 10usize],
pub program_flags: [__u32; 10usize],
}
#[test]
fn bindgen_test_layout_xdp_dispatcher_config() {
const UNINIT: ::std::mem::MaybeUninit<xdp_dispatcher_config> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<xdp_dispatcher_config>(),
124usize,
concat!("Size of: ", stringify!(xdp_dispatcher_config))
);
assert_eq!(
::std::mem::align_of::<xdp_dispatcher_config>(),
4usize,
concat!("Alignment of ", stringify!(xdp_dispatcher_config))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xdp_dispatcher_config),
"::",
stringify!(magic)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dispatcher_version) as usize - ptr as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(xdp_dispatcher_config),
"::",
stringify!(dispatcher_version)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).num_progs_enabled) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(xdp_dispatcher_config),
"::",
stringify!(num_progs_enabled)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).is_xdp_frags) as usize - ptr as usize },
3usize,
concat!(
"Offset of field: ",
stringify!(xdp_dispatcher_config),
"::",
stringify!(is_xdp_frags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).chain_call_actions) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(xdp_dispatcher_config),
"::",
stringify!(chain_call_actions)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).run_prios) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(xdp_dispatcher_config),
"::",
stringify!(run_prios)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).program_flags) as usize - ptr as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(xdp_dispatcher_config),
"::",
stringify!(program_flags)
)
);
}
#[repr(C)]
#[repr(align(64))]
#[derive(Copy, Clone)]
pub struct datarec {
pub processed: usize,
pub dropped: usize,
pub issue: usize,
pub __bindgen_anon_1: datarec__bindgen_ty_1,
pub xdp_drop: usize,
pub xdp_redirect: usize,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union datarec__bindgen_ty_1 {
pub xdp_pass: usize,
pub info: usize,
}
#[test]
fn bindgen_test_layout_datarec__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<datarec__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<datarec__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(datarec__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<datarec__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(datarec__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xdp_pass) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(datarec__bindgen_ty_1),
"::",
stringify!(xdp_pass)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).info) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(datarec__bindgen_ty_1),
"::",
stringify!(info)
)
);
}
#[test]
fn bindgen_test_layout_datarec() {
const UNINIT: ::std::mem::MaybeUninit<datarec> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<datarec>(),
64usize,
concat!("Size of: ", stringify!(datarec))
);
assert_eq!(
::std::mem::align_of::<datarec>(),
64usize,
concat!("Alignment of ", stringify!(datarec))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).processed) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(datarec),
"::",
stringify!(processed)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dropped) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(datarec),
"::",
stringify!(dropped)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).issue) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(datarec),
"::",
stringify!(issue)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xdp_drop) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(datarec),
"::",
stringify!(xdp_drop)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xdp_redirect) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(datarec),
"::",
stringify!(xdp_redirect)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct xdp_stats_record {
pub __bindgen_anon_1: xdp_stats_record__bindgen_ty_1,
pub __bindgen_anon_2: xdp_stats_record__bindgen_ty_2,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union xdp_stats_record__bindgen_ty_1 {
pub packets: __u64,
pub rx_packets: __u64,
}
#[test]
fn bindgen_test_layout_xdp_stats_record__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<xdp_stats_record__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<xdp_stats_record__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(xdp_stats_record__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<xdp_stats_record__bindgen_ty_1>(),
8usize,
concat!("Alignment of ", stringify!(xdp_stats_record__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).packets) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xdp_stats_record__bindgen_ty_1),
"::",
stringify!(packets)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_packets) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xdp_stats_record__bindgen_ty_1),
"::",
stringify!(rx_packets)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union xdp_stats_record__bindgen_ty_2 {
pub bytes: __u64,
pub rx_bytes: __u64,
}
#[test]
fn bindgen_test_layout_xdp_stats_record__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<xdp_stats_record__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<xdp_stats_record__bindgen_ty_2>(),
8usize,
concat!("Size of: ", stringify!(xdp_stats_record__bindgen_ty_2))
);
assert_eq!(
::std::mem::align_of::<xdp_stats_record__bindgen_ty_2>(),
8usize,
concat!("Alignment of ", stringify!(xdp_stats_record__bindgen_ty_2))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bytes) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xdp_stats_record__bindgen_ty_2),
"::",
stringify!(bytes)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_bytes) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xdp_stats_record__bindgen_ty_2),
"::",
stringify!(rx_bytes)
)
);
}
#[test]
fn bindgen_test_layout_xdp_stats_record() {
assert_eq!(
::std::mem::size_of::<xdp_stats_record>(),
16usize,
concat!("Size of: ", stringify!(xdp_stats_record))
);
assert_eq!(
::std::mem::align_of::<xdp_stats_record>(),
8usize,
concat!("Alignment of ", stringify!(xdp_stats_record))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sockaddr_xdp {
pub sxdp_family: __u16,
pub sxdp_flags: __u16,
pub sxdp_ifindex: __u32,
pub sxdp_queue_id: __u32,
pub sxdp_shared_umem_fd: __u32,
}
#[test]
fn bindgen_test_layout_sockaddr_xdp() {
const UNINIT: ::std::mem::MaybeUninit<sockaddr_xdp> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<sockaddr_xdp>(),
16usize,
concat!("Size of: ", stringify!(sockaddr_xdp))
);
assert_eq!(
::std::mem::align_of::<sockaddr_xdp>(),
4usize,
concat!("Alignment of ", stringify!(sockaddr_xdp))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sxdp_family) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_xdp),
"::",
stringify!(sxdp_family)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sxdp_flags) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_xdp),
"::",
stringify!(sxdp_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sxdp_ifindex) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_xdp),
"::",
stringify!(sxdp_ifindex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sxdp_queue_id) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_xdp),
"::",
stringify!(sxdp_queue_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sxdp_shared_umem_fd) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_xdp),
"::",
stringify!(sxdp_shared_umem_fd)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xdp_ring_offset {
pub producer: __u64,
pub consumer: __u64,
pub desc: __u64,
pub flags: __u64,
}
#[test]
fn bindgen_test_layout_xdp_ring_offset() {
const UNINIT: ::std::mem::MaybeUninit<xdp_ring_offset> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<xdp_ring_offset>(),
32usize,
concat!("Size of: ", stringify!(xdp_ring_offset))
);
assert_eq!(
::std::mem::align_of::<xdp_ring_offset>(),
8usize,
concat!("Alignment of ", stringify!(xdp_ring_offset))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).producer) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xdp_ring_offset),
"::",
stringify!(producer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).consumer) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(xdp_ring_offset),
"::",
stringify!(consumer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(xdp_ring_offset),
"::",
stringify!(desc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(xdp_ring_offset),
"::",
stringify!(flags)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xdp_mmap_offsets {
pub rx: xdp_ring_offset,
pub tx: xdp_ring_offset,
pub fr: xdp_ring_offset,
pub cr: xdp_ring_offset,
}
#[test]
fn bindgen_test_layout_xdp_mmap_offsets() {
const UNINIT: ::std::mem::MaybeUninit<xdp_mmap_offsets> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<xdp_mmap_offsets>(),
128usize,
concat!("Size of: ", stringify!(xdp_mmap_offsets))
);
assert_eq!(
::std::mem::align_of::<xdp_mmap_offsets>(),
8usize,
concat!("Alignment of ", stringify!(xdp_mmap_offsets))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xdp_mmap_offsets),
"::",
stringify!(rx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(xdp_mmap_offsets),
"::",
stringify!(tx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fr) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(xdp_mmap_offsets),
"::",
stringify!(fr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cr) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(xdp_mmap_offsets),
"::",
stringify!(cr)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xdp_umem_reg {
pub addr: __u64,
pub len: __u64,
pub chunk_size: __u32,
pub headroom: __u32,
pub flags: __u32,
}
#[test]
fn bindgen_test_layout_xdp_umem_reg() {
const UNINIT: ::std::mem::MaybeUninit<xdp_umem_reg> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<xdp_umem_reg>(),
32usize,
concat!("Size of: ", stringify!(xdp_umem_reg))
);
assert_eq!(
::std::mem::align_of::<xdp_umem_reg>(),
8usize,
concat!("Alignment of ", stringify!(xdp_umem_reg))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xdp_umem_reg),
"::",
stringify!(addr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(xdp_umem_reg),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).chunk_size) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(xdp_umem_reg),
"::",
stringify!(chunk_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).headroom) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(xdp_umem_reg),
"::",
stringify!(headroom)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(xdp_umem_reg),
"::",
stringify!(flags)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xdp_statistics {
pub rx_dropped: __u64,
pub rx_invalid_descs: __u64,
pub tx_invalid_descs: __u64,
pub rx_ring_full: __u64,
pub rx_fill_ring_empty_descs: __u64,
pub tx_ring_empty_descs: __u64,
}
#[test]
fn bindgen_test_layout_xdp_statistics() {
const UNINIT: ::std::mem::MaybeUninit<xdp_statistics> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<xdp_statistics>(),
48usize,
concat!("Size of: ", stringify!(xdp_statistics))
);
assert_eq!(
::std::mem::align_of::<xdp_statistics>(),
8usize,
concat!("Alignment of ", stringify!(xdp_statistics))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_dropped) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xdp_statistics),
"::",
stringify!(rx_dropped)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_invalid_descs) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(xdp_statistics),
"::",
stringify!(rx_invalid_descs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_invalid_descs) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(xdp_statistics),
"::",
stringify!(tx_invalid_descs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_ring_full) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(xdp_statistics),
"::",
stringify!(rx_ring_full)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_fill_ring_empty_descs) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(xdp_statistics),
"::",
stringify!(rx_fill_ring_empty_descs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_ring_empty_descs) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(xdp_statistics),
"::",
stringify!(tx_ring_empty_descs)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xdp_options {
pub flags: __u32,
}
#[test]
fn bindgen_test_layout_xdp_options() {
const UNINIT: ::std::mem::MaybeUninit<xdp_options> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<xdp_options>(),
4usize,
concat!("Size of: ", stringify!(xdp_options))
);
assert_eq!(
::std::mem::align_of::<xdp_options>(),
4usize,
concat!("Alignment of ", stringify!(xdp_options))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xdp_options),
"::",
stringify!(flags)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xdp_desc {
pub addr: __u64,
pub len: __u32,
pub options: __u32,
}
#[test]
fn bindgen_test_layout_xdp_desc() {
const UNINIT: ::std::mem::MaybeUninit<xdp_desc> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<xdp_desc>(),
16usize,
concat!("Size of: ", stringify!(xdp_desc))
);
assert_eq!(
::std::mem::align_of::<xdp_desc>(),
8usize,
concat!("Alignment of ", stringify!(xdp_desc))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xdp_desc),
"::",
stringify!(addr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(xdp_desc),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).options) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(xdp_desc),
"::",
stringify!(options)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xsk_ring_prod {
pub cached_prod: __u32,
pub cached_cons: __u32,
pub mask: __u32,
pub size: __u32,
pub producer: *mut __u32,
pub consumer: *mut __u32,
pub ring: *mut ::std::os::raw::c_void,
pub flags: *mut __u32,
}
#[test]
fn bindgen_test_layout_xsk_ring_prod() {
const UNINIT: ::std::mem::MaybeUninit<xsk_ring_prod> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<xsk_ring_prod>(),
48usize,
concat!("Size of: ", stringify!(xsk_ring_prod))
);
assert_eq!(
::std::mem::align_of::<xsk_ring_prod>(),
8usize,
concat!("Alignment of ", stringify!(xsk_ring_prod))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cached_prod) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xsk_ring_prod),
"::",
stringify!(cached_prod)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cached_cons) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(xsk_ring_prod),
"::",
stringify!(cached_cons)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mask) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(xsk_ring_prod),
"::",
stringify!(mask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(xsk_ring_prod),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).producer) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(xsk_ring_prod),
"::",
stringify!(producer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).consumer) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(xsk_ring_prod),
"::",
stringify!(consumer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ring) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(xsk_ring_prod),
"::",
stringify!(ring)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(xsk_ring_prod),
"::",
stringify!(flags)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xsk_ring_cons {
pub cached_prod: __u32,
pub cached_cons: __u32,
pub mask: __u32,
pub size: __u32,
pub producer: *mut __u32,
pub consumer: *mut __u32,
pub ring: *mut ::std::os::raw::c_void,
pub flags: *mut __u32,
}
#[test]
fn bindgen_test_layout_xsk_ring_cons() {
const UNINIT: ::std::mem::MaybeUninit<xsk_ring_cons> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<xsk_ring_cons>(),
48usize,
concat!("Size of: ", stringify!(xsk_ring_cons))
);
assert_eq!(
::std::mem::align_of::<xsk_ring_cons>(),
8usize,
concat!("Alignment of ", stringify!(xsk_ring_cons))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cached_prod) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xsk_ring_cons),
"::",
stringify!(cached_prod)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cached_cons) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(xsk_ring_cons),
"::",
stringify!(cached_cons)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mask) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(xsk_ring_cons),
"::",
stringify!(mask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(xsk_ring_cons),
"::",
stringify!(size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).producer) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(xsk_ring_cons),
"::",
stringify!(producer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).consumer) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(xsk_ring_cons),
"::",
stringify!(consumer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ring) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(xsk_ring_cons),
"::",
stringify!(ring)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(xsk_ring_cons),
"::",
stringify!(flags)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xsk_umem {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xsk_socket {
_unused: [u8; 0],
}
extern "C" {
pub fn xsk_ring_prod__fill_addr(fill: *mut xsk_ring_prod, idx: __u32) -> *mut __u64;
}
extern "C" {
pub fn xsk_ring_cons__comp_addr(comp: *const xsk_ring_cons, idx: __u32) -> *const __u64;
}
extern "C" {
pub fn xsk_ring_prod__tx_desc(tx: *mut xsk_ring_prod, idx: __u32) -> *mut xdp_desc;
}
extern "C" {
pub fn xsk_ring_cons__rx_desc(rx: *const xsk_ring_cons, idx: __u32) -> *const xdp_desc;
}
extern "C" {
pub fn xsk_ring_prod__needs_wakeup(r: *const xsk_ring_prod) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xsk_prod_nb_free(r: *mut xsk_ring_prod, nb: __u32) -> __u32;
}
extern "C" {
pub fn xsk_cons_nb_avail(r: *mut xsk_ring_cons, nb: __u32) -> __u32;
}
extern "C" {
pub fn xsk_ring_prod__reserve(prod: *mut xsk_ring_prod, nb: __u32, idx: *mut __u32) -> __u32;
}
extern "C" {
pub fn xsk_ring_prod__submit(prod: *mut xsk_ring_prod, nb: __u32);
}
extern "C" {
pub fn xsk_ring_cons__peek(cons: *mut xsk_ring_cons, nb: __u32, idx: *mut __u32) -> __u32;
}
extern "C" {
pub fn xsk_ring_cons__cancel(cons: *mut xsk_ring_cons, nb: __u32);
}
extern "C" {
pub fn xsk_ring_cons__release(cons: *mut xsk_ring_cons, nb: __u32);
}
extern "C" {
pub fn xsk_umem__get_data(
umem_area: *mut ::std::os::raw::c_void,
addr: __u64,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn xsk_umem__extract_addr(addr: __u64) -> __u64;
}
extern "C" {
pub fn xsk_umem__extract_offset(addr: __u64) -> __u64;
}
extern "C" {
pub fn xsk_umem__add_offset_to_addr(addr: __u64) -> __u64;
}
extern "C" {
pub fn xsk_umem__fd(umem: *const xsk_umem) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xsk_socket__fd(xsk: *const xsk_socket) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xsk_umem_config {
pub fill_size: __u32,
pub comp_size: __u32,
pub frame_size: __u32,
pub frame_headroom: __u32,
pub flags: __u32,
}
#[test]
fn bindgen_test_layout_xsk_umem_config() {
const UNINIT: ::std::mem::MaybeUninit<xsk_umem_config> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<xsk_umem_config>(),
20usize,
concat!("Size of: ", stringify!(xsk_umem_config))
);
assert_eq!(
::std::mem::align_of::<xsk_umem_config>(),
4usize,
concat!("Alignment of ", stringify!(xsk_umem_config))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fill_size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xsk_umem_config),
"::",
stringify!(fill_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).comp_size) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(xsk_umem_config),
"::",
stringify!(comp_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).frame_size) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(xsk_umem_config),
"::",
stringify!(frame_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).frame_headroom) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(xsk_umem_config),
"::",
stringify!(frame_headroom)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(xsk_umem_config),
"::",
stringify!(flags)
)
);
}
extern "C" {
pub fn xsk_setup_xdp_prog(
ifindex: ::std::os::raw::c_int,
xsks_map_fd: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xsk_socket__update_xskmap(
xsk: *mut xsk_socket,
xsks_map_fd: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct xsk_socket_config {
pub rx_size: __u32,
pub tx_size: __u32,
pub __bindgen_anon_1: xsk_socket_config__bindgen_ty_1,
pub xdp_flags: __u32,
pub bind_flags: __u16,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union xsk_socket_config__bindgen_ty_1 {
pub libbpf_flags: __u32,
pub libxdp_flags: __u32,
}
#[test]
fn bindgen_test_layout_xsk_socket_config__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<xsk_socket_config__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<xsk_socket_config__bindgen_ty_1>(),
4usize,
concat!("Size of: ", stringify!(xsk_socket_config__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<xsk_socket_config__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(xsk_socket_config__bindgen_ty_1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).libbpf_flags) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xsk_socket_config__bindgen_ty_1),
"::",
stringify!(libbpf_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).libxdp_flags) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xsk_socket_config__bindgen_ty_1),
"::",
stringify!(libxdp_flags)
)
);
}
#[test]
fn bindgen_test_layout_xsk_socket_config() {
const UNINIT: ::std::mem::MaybeUninit<xsk_socket_config> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<xsk_socket_config>(),
20usize,
concat!("Size of: ", stringify!(xsk_socket_config))
);
assert_eq!(
::std::mem::align_of::<xsk_socket_config>(),
4usize,
concat!("Alignment of ", stringify!(xsk_socket_config))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(xsk_socket_config),
"::",
stringify!(rx_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_size) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(xsk_socket_config),
"::",
stringify!(tx_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xdp_flags) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(xsk_socket_config),
"::",
stringify!(xdp_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bind_flags) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(xsk_socket_config),
"::",
stringify!(bind_flags)
)
);
}
extern "C" {
pub fn xsk_umem__create(
umem: *mut *mut xsk_umem,
umem_area: *mut ::std::os::raw::c_void,
size: __u64,
fill: *mut xsk_ring_prod,
comp: *mut xsk_ring_cons,
config: *const xsk_umem_config,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xsk_socket__create(
xsk: *mut *mut xsk_socket,
ifname: *const ::std::os::raw::c_char,
queue_id: __u32,
umem: *mut xsk_umem,
rx: *mut xsk_ring_cons,
tx: *mut xsk_ring_prod,
config: *const xsk_socket_config,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xsk_socket__create_shared(
xsk_ptr: *mut *mut xsk_socket,
ifname: *const ::std::os::raw::c_char,
queue_id: __u32,
umem: *mut xsk_umem,
rx: *mut xsk_ring_cons,
tx: *mut xsk_ring_prod,
fill: *mut xsk_ring_prod,
comp: *mut xsk_ring_cons,
config: *const xsk_socket_config,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xsk_umem__delete(umem: *mut xsk_umem) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn xsk_socket__delete(xsk: *mut xsk_socket);
}
pub type __kernel_sa_family_t = ::std::os::raw::c_ushort;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __kernel_sockaddr_storage {
pub __bindgen_anon_1: __kernel_sockaddr_storage__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __kernel_sockaddr_storage__bindgen_ty_1 {
pub __bindgen_anon_1: __kernel_sockaddr_storage__bindgen_ty_1__bindgen_ty_1,
pub __align: *mut ::std::os::raw::c_void,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __kernel_sockaddr_storage__bindgen_ty_1__bindgen_ty_1 {
pub ss_family: __kernel_sa_family_t,
pub __data: [::std::os::raw::c_char; 126usize],
}
#[test]
fn bindgen_test_layout___kernel_sockaddr_storage__bindgen_ty_1__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<__kernel_sockaddr_storage__bindgen_ty_1__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__kernel_sockaddr_storage__bindgen_ty_1__bindgen_ty_1>(),
128usize,
concat!(
"Size of: ",
stringify!(__kernel_sockaddr_storage__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<__kernel_sockaddr_storage__bindgen_ty_1__bindgen_ty_1>(),
2usize,
concat!(
"Alignment of ",
stringify!(__kernel_sockaddr_storage__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ss_family) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__kernel_sockaddr_storage__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(ss_family)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(__kernel_sockaddr_storage__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(__data)
)
);
}
#[test]
fn bindgen_test_layout___kernel_sockaddr_storage__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<__kernel_sockaddr_storage__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__kernel_sockaddr_storage__bindgen_ty_1>(),
128usize,
concat!(
"Size of: ",
stringify!(__kernel_sockaddr_storage__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<__kernel_sockaddr_storage__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(__kernel_sockaddr_storage__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__kernel_sockaddr_storage__bindgen_ty_1),
"::",
stringify!(__align)
)
);
}
#[test]
fn bindgen_test_layout___kernel_sockaddr_storage() {
assert_eq!(
::std::mem::size_of::<__kernel_sockaddr_storage>(),
128usize,
concat!("Size of: ", stringify!(__kernel_sockaddr_storage))
);
assert_eq!(
::std::mem::align_of::<__kernel_sockaddr_storage>(),
8usize,
concat!("Alignment of ", stringify!(__kernel_sockaddr_storage))
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sockaddr_nl {
pub nl_family: __kernel_sa_family_t,
pub nl_pad: ::std::os::raw::c_ushort,
pub nl_pid: __u32,
pub nl_groups: __u32,
}
#[test]
fn bindgen_test_layout_sockaddr_nl() {
const UNINIT: ::std::mem::MaybeUninit<sockaddr_nl> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<sockaddr_nl>(),
12usize,
concat!("Size of: ", stringify!(sockaddr_nl))
);
assert_eq!(
::std::mem::align_of::<sockaddr_nl>(),
4usize,
concat!("Alignment of ", stringify!(sockaddr_nl))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nl_family) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_nl),
"::",
stringify!(nl_family)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nl_pad) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_nl),
"::",
stringify!(nl_pad)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nl_pid) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_nl),
"::",
stringify!(nl_pid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nl_groups) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(sockaddr_nl),
"::",
stringify!(nl_groups)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nlmsghdr {
pub nlmsg_len: __u32,
pub nlmsg_type: __u16,
pub nlmsg_flags: __u16,
pub nlmsg_seq: __u32,
pub nlmsg_pid: __u32,
}
#[test]
fn bindgen_test_layout_nlmsghdr() {
const UNINIT: ::std::mem::MaybeUninit<nlmsghdr> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<nlmsghdr>(),
16usize,
concat!("Size of: ", stringify!(nlmsghdr))
);
assert_eq!(
::std::mem::align_of::<nlmsghdr>(),
4usize,
concat!("Alignment of ", stringify!(nlmsghdr))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nlmsg_len) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(nlmsghdr),
"::",
stringify!(nlmsg_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nlmsg_type) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(nlmsghdr),
"::",
stringify!(nlmsg_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nlmsg_flags) as usize - ptr as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(nlmsghdr),
"::",
stringify!(nlmsg_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nlmsg_seq) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(nlmsghdr),
"::",
stringify!(nlmsg_seq)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nlmsg_pid) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(nlmsghdr),
"::",
stringify!(nlmsg_pid)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nlmsgerr {
pub error: ::std::os::raw::c_int,
pub msg: nlmsghdr,
}
#[test]
fn bindgen_test_layout_nlmsgerr() {
const UNINIT: ::std::mem::MaybeUninit<nlmsgerr> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<nlmsgerr>(),
20usize,
concat!("Size of: ", stringify!(nlmsgerr))
);
assert_eq!(
::std::mem::align_of::<nlmsgerr>(),
4usize,
concat!("Alignment of ", stringify!(nlmsgerr))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).error) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(nlmsgerr),
"::",
stringify!(error)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).msg) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(nlmsgerr),
"::",
stringify!(msg)
)
);
}
pub const nlmsgerr_attrs_NLMSGERR_ATTR_UNUSED: nlmsgerr_attrs = 0;
pub const nlmsgerr_attrs_NLMSGERR_ATTR_MSG: nlmsgerr_attrs = 1;
pub const nlmsgerr_attrs_NLMSGERR_ATTR_OFFS: nlmsgerr_attrs = 2;
pub const nlmsgerr_attrs_NLMSGERR_ATTR_COOKIE: nlmsgerr_attrs = 3;
pub const nlmsgerr_attrs_NLMSGERR_ATTR_POLICY: nlmsgerr_attrs = 4;
pub const nlmsgerr_attrs___NLMSGERR_ATTR_MAX: nlmsgerr_attrs = 5;
pub const nlmsgerr_attrs_NLMSGERR_ATTR_MAX: nlmsgerr_attrs = 4;
pub type nlmsgerr_attrs = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nl_pktinfo {
pub group: __u32,
}
#[test]
fn bindgen_test_layout_nl_pktinfo() {
const UNINIT: ::std::mem::MaybeUninit<nl_pktinfo> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<nl_pktinfo>(),
4usize,
concat!("Size of: ", stringify!(nl_pktinfo))
);
assert_eq!(
::std::mem::align_of::<nl_pktinfo>(),
4usize,
concat!("Alignment of ", stringify!(nl_pktinfo))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).group) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(nl_pktinfo),
"::",
stringify!(group)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nl_mmap_req {
pub nm_block_size: ::std::os::raw::c_uint,
pub nm_block_nr: ::std::os::raw::c_uint,
pub nm_frame_size: ::std::os::raw::c_uint,
pub nm_frame_nr: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_nl_mmap_req() {
const UNINIT: ::std::mem::MaybeUninit<nl_mmap_req> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<nl_mmap_req>(),
16usize,
concat!("Size of: ", stringify!(nl_mmap_req))
);
assert_eq!(
::std::mem::align_of::<nl_mmap_req>(),
4usize,
concat!("Alignment of ", stringify!(nl_mmap_req))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nm_block_size) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(nl_mmap_req),
"::",
stringify!(nm_block_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nm_block_nr) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(nl_mmap_req),
"::",
stringify!(nm_block_nr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nm_frame_size) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(nl_mmap_req),
"::",
stringify!(nm_frame_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nm_frame_nr) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(nl_mmap_req),
"::",
stringify!(nm_frame_nr)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nl_mmap_hdr {
pub nm_status: ::std::os::raw::c_uint,
pub nm_len: ::std::os::raw::c_uint,
pub nm_group: __u32,
pub nm_pid: __u32,
pub nm_uid: __u32,
pub nm_gid: __u32,
}
#[test]
fn bindgen_test_layout_nl_mmap_hdr() {
const UNINIT: ::std::mem::MaybeUninit<nl_mmap_hdr> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<nl_mmap_hdr>(),
24usize,
concat!("Size of: ", stringify!(nl_mmap_hdr))
);
assert_eq!(
::std::mem::align_of::<nl_mmap_hdr>(),
4usize,
concat!("Alignment of ", stringify!(nl_mmap_hdr))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nm_status) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(nl_mmap_hdr),
"::",
stringify!(nm_status)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nm_len) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(nl_mmap_hdr),
"::",
stringify!(nm_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nm_group) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(nl_mmap_hdr),
"::",
stringify!(nm_group)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nm_pid) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(nl_mmap_hdr),
"::",
stringify!(nm_pid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nm_uid) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(nl_mmap_hdr),
"::",
stringify!(nm_uid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nm_gid) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(nl_mmap_hdr),
"::",
stringify!(nm_gid)
)
);
}
pub const nl_mmap_status_NL_MMAP_STATUS_UNUSED: nl_mmap_status = 0;
pub const nl_mmap_status_NL_MMAP_STATUS_RESERVED: nl_mmap_status = 1;
pub const nl_mmap_status_NL_MMAP_STATUS_VALID: nl_mmap_status = 2;
pub const nl_mmap_status_NL_MMAP_STATUS_COPY: nl_mmap_status = 3;
pub const nl_mmap_status_NL_MMAP_STATUS_SKIP: nl_mmap_status = 4;
pub type nl_mmap_status = ::std::os::raw::c_uint;
pub const NETLINK_UNCONNECTED: _bindgen_ty_37 = 0;
pub const NETLINK_CONNECTED: _bindgen_ty_37 = 1;
pub type _bindgen_ty_37 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nlattr {
pub nla_len: __u16,
pub nla_type: __u16,
}
#[test]
fn bindgen_test_layout_nlattr() {
const UNINIT: ::std::mem::MaybeUninit<nlattr> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<nlattr>(),
4usize,
concat!("Size of: ", stringify!(nlattr))
);
assert_eq!(
::std::mem::align_of::<nlattr>(),
2usize,
concat!("Alignment of ", stringify!(nlattr))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nla_len) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(nlattr),
"::",
stringify!(nla_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nla_type) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(nlattr),
"::",
stringify!(nla_type)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nla_bitfield32 {
pub value: __u32,
pub selector: __u32,
}
#[test]
fn bindgen_test_layout_nla_bitfield32() {
const UNINIT: ::std::mem::MaybeUninit<nla_bitfield32> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<nla_bitfield32>(),
8usize,
concat!("Size of: ", stringify!(nla_bitfield32))
);
assert_eq!(
::std::mem::align_of::<nla_bitfield32>(),
4usize,
concat!("Alignment of ", stringify!(nla_bitfield32))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(nla_bitfield32),
"::",
stringify!(value)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).selector) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(nla_bitfield32),
"::",
stringify!(selector)
)
);
}
pub const netlink_attribute_type_NL_ATTR_TYPE_INVALID: netlink_attribute_type = 0;
pub const netlink_attribute_type_NL_ATTR_TYPE_FLAG: netlink_attribute_type = 1;
pub const netlink_attribute_type_NL_ATTR_TYPE_U8: netlink_attribute_type = 2;
pub const netlink_attribute_type_NL_ATTR_TYPE_U16: netlink_attribute_type = 3;
pub const netlink_attribute_type_NL_ATTR_TYPE_U32: netlink_attribute_type = 4;
pub const netlink_attribute_type_NL_ATTR_TYPE_U64: netlink_attribute_type = 5;
pub const netlink_attribute_type_NL_ATTR_TYPE_S8: netlink_attribute_type = 6;
pub const netlink_attribute_type_NL_ATTR_TYPE_S16: netlink_attribute_type = 7;
pub const netlink_attribute_type_NL_ATTR_TYPE_S32: netlink_attribute_type = 8;
pub const netlink_attribute_type_NL_ATTR_TYPE_S64: netlink_attribute_type = 9;
pub const netlink_attribute_type_NL_ATTR_TYPE_BINARY: netlink_attribute_type = 10;
pub const netlink_attribute_type_NL_ATTR_TYPE_STRING: netlink_attribute_type = 11;
pub const netlink_attribute_type_NL_ATTR_TYPE_NUL_STRING: netlink_attribute_type = 12;
pub const netlink_attribute_type_NL_ATTR_TYPE_NESTED: netlink_attribute_type = 13;
pub const netlink_attribute_type_NL_ATTR_TYPE_NESTED_ARRAY: netlink_attribute_type = 14;
pub const netlink_attribute_type_NL_ATTR_TYPE_BITFIELD32: netlink_attribute_type = 15;
pub type netlink_attribute_type = ::std::os::raw::c_uint;
pub const netlink_policy_type_attr_NL_POLICY_TYPE_ATTR_UNSPEC: netlink_policy_type_attr = 0;
pub const netlink_policy_type_attr_NL_POLICY_TYPE_ATTR_TYPE: netlink_policy_type_attr = 1;
pub const netlink_policy_type_attr_NL_POLICY_TYPE_ATTR_MIN_VALUE_S: netlink_policy_type_attr = 2;
pub const netlink_policy_type_attr_NL_POLICY_TYPE_ATTR_MAX_VALUE_S: netlink_policy_type_attr = 3;
pub const netlink_policy_type_attr_NL_POLICY_TYPE_ATTR_MIN_VALUE_U: netlink_policy_type_attr = 4;
pub const netlink_policy_type_attr_NL_POLICY_TYPE_ATTR_MAX_VALUE_U: netlink_policy_type_attr = 5;
pub const netlink_policy_type_attr_NL_POLICY_TYPE_ATTR_MIN_LENGTH: netlink_policy_type_attr = 6;
pub const netlink_policy_type_attr_NL_POLICY_TYPE_ATTR_MAX_LENGTH: netlink_policy_type_attr = 7;
pub const netlink_policy_type_attr_NL_POLICY_TYPE_ATTR_POLICY_IDX: netlink_policy_type_attr = 8;
pub const netlink_policy_type_attr_NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE: netlink_policy_type_attr = 9;
pub const netlink_policy_type_attr_NL_POLICY_TYPE_ATTR_BITFIELD32_MASK: netlink_policy_type_attr =
10;
pub const netlink_policy_type_attr_NL_POLICY_TYPE_ATTR_PAD: netlink_policy_type_attr = 11;
pub const netlink_policy_type_attr_NL_POLICY_TYPE_ATTR_MASK: netlink_policy_type_attr = 12;
pub const netlink_policy_type_attr___NL_POLICY_TYPE_ATTR_MAX: netlink_policy_type_attr = 13;
pub const netlink_policy_type_attr_NL_POLICY_TYPE_ATTR_MAX: netlink_policy_type_attr = 12;
pub type netlink_policy_type_attr = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rtnl_link_stats {
pub rx_packets: __u32,
pub tx_packets: __u32,
pub rx_bytes: __u32,
pub tx_bytes: __u32,
pub rx_errors: __u32,
pub tx_errors: __u32,
pub rx_dropped: __u32,
pub tx_dropped: __u32,
pub multicast: __u32,
pub collisions: __u32,
pub rx_length_errors: __u32,
pub rx_over_errors: __u32,
pub rx_crc_errors: __u32,
pub rx_frame_errors: __u32,
pub rx_fifo_errors: __u32,
pub rx_missed_errors: __u32,
pub tx_aborted_errors: __u32,
pub tx_carrier_errors: __u32,
pub tx_fifo_errors: __u32,
pub tx_heartbeat_errors: __u32,
pub tx_window_errors: __u32,
pub rx_compressed: __u32,
pub tx_compressed: __u32,
pub rx_nohandler: __u32,
}
#[test]
fn bindgen_test_layout_rtnl_link_stats() {
const UNINIT: ::std::mem::MaybeUninit<rtnl_link_stats> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<rtnl_link_stats>(),
96usize,
concat!("Size of: ", stringify!(rtnl_link_stats))
);
assert_eq!(
::std::mem::align_of::<rtnl_link_stats>(),
4usize,
concat!("Alignment of ", stringify!(rtnl_link_stats))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_packets) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(rx_packets)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_packets) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(tx_packets)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_bytes) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(rx_bytes)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_bytes) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(tx_bytes)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_errors) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(rx_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_errors) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(tx_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_dropped) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(rx_dropped)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_dropped) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(tx_dropped)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).multicast) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(multicast)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).collisions) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(collisions)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_length_errors) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(rx_length_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_over_errors) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(rx_over_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_crc_errors) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(rx_crc_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_frame_errors) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(rx_frame_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_fifo_errors) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(rx_fifo_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_missed_errors) as usize - ptr as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(rx_missed_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_aborted_errors) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(tx_aborted_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_carrier_errors) as usize - ptr as usize },
68usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(tx_carrier_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_fifo_errors) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(tx_fifo_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_heartbeat_errors) as usize - ptr as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(tx_heartbeat_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_window_errors) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(tx_window_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_compressed) as usize - ptr as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(rx_compressed)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_compressed) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(tx_compressed)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_nohandler) as usize - ptr as usize },
92usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats),
"::",
stringify!(rx_nohandler)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rtnl_link_stats64 {
pub rx_packets: __u64,
pub tx_packets: __u64,
pub rx_bytes: __u64,
pub tx_bytes: __u64,
pub rx_errors: __u64,
pub tx_errors: __u64,
pub rx_dropped: __u64,
pub tx_dropped: __u64,
pub multicast: __u64,
pub collisions: __u64,
pub rx_length_errors: __u64,
pub rx_over_errors: __u64,
pub rx_crc_errors: __u64,
pub rx_frame_errors: __u64,
pub rx_fifo_errors: __u64,
pub rx_missed_errors: __u64,
pub tx_aborted_errors: __u64,
pub tx_carrier_errors: __u64,
pub tx_fifo_errors: __u64,
pub tx_heartbeat_errors: __u64,
pub tx_window_errors: __u64,
pub rx_compressed: __u64,
pub tx_compressed: __u64,
pub rx_nohandler: __u64,
}
#[test]
fn bindgen_test_layout_rtnl_link_stats64() {
const UNINIT: ::std::mem::MaybeUninit<rtnl_link_stats64> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<rtnl_link_stats64>(),
192usize,
concat!("Size of: ", stringify!(rtnl_link_stats64))
);
assert_eq!(
::std::mem::align_of::<rtnl_link_stats64>(),
8usize,
concat!("Alignment of ", stringify!(rtnl_link_stats64))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_packets) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(rx_packets)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_packets) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(tx_packets)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_bytes) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(rx_bytes)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_bytes) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(tx_bytes)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_errors) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(rx_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_errors) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(tx_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_dropped) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(rx_dropped)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_dropped) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(tx_dropped)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).multicast) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(multicast)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).collisions) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(collisions)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_length_errors) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(rx_length_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_over_errors) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(rx_over_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_crc_errors) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(rx_crc_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_frame_errors) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(rx_frame_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_fifo_errors) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(rx_fifo_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_missed_errors) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(rx_missed_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_aborted_errors) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(tx_aborted_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_carrier_errors) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(tx_carrier_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_fifo_errors) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(tx_fifo_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_heartbeat_errors) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(tx_heartbeat_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_window_errors) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(tx_window_errors)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_compressed) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(rx_compressed)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tx_compressed) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(tx_compressed)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rx_nohandler) as usize - ptr as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_stats64),
"::",
stringify!(rx_nohandler)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rtnl_link_ifmap {
pub mem_start: __u64,
pub mem_end: __u64,
pub base_addr: __u64,
pub irq: __u16,
pub dma: __u8,
pub port: __u8,
}
#[test]
fn bindgen_test_layout_rtnl_link_ifmap() {
const UNINIT: ::std::mem::MaybeUninit<rtnl_link_ifmap> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<rtnl_link_ifmap>(),
32usize,
concat!("Size of: ", stringify!(rtnl_link_ifmap))
);
assert_eq!(
::std::mem::align_of::<rtnl_link_ifmap>(),
8usize,
concat!("Alignment of ", stringify!(rtnl_link_ifmap))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mem_start) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_ifmap),
"::",
stringify!(mem_start)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mem_end) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_ifmap),
"::",
stringify!(mem_end)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).base_addr) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_ifmap),
"::",
stringify!(base_addr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).irq) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_ifmap),
"::",
stringify!(irq)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dma) as usize - ptr as usize },
26usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_ifmap),
"::",
stringify!(dma)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).port) as usize - ptr as usize },
27usize,
concat!(
"Offset of field: ",
stringify!(rtnl_link_ifmap),
"::",
stringify!(port)
)
);
}
pub const IFLA_UNSPEC: _bindgen_ty_38 = 0;
pub const IFLA_ADDRESS: _bindgen_ty_38 = 1;
pub const IFLA_BROADCAST: _bindgen_ty_38 = 2;
pub const IFLA_IFNAME: _bindgen_ty_38 = 3;
pub const IFLA_MTU: _bindgen_ty_38 = 4;
pub const IFLA_LINK: _bindgen_ty_38 = 5;
pub const IFLA_QDISC: _bindgen_ty_38 = 6;
pub const IFLA_STATS: _bindgen_ty_38 = 7;
pub const IFLA_COST: _bindgen_ty_38 = 8;
pub const IFLA_PRIORITY: _bindgen_ty_38 = 9;
pub const IFLA_MASTER: _bindgen_ty_38 = 10;
pub const IFLA_WIRELESS: _bindgen_ty_38 = 11;
pub const IFLA_PROTINFO: _bindgen_ty_38 = 12;
pub const IFLA_TXQLEN: _bindgen_ty_38 = 13;
pub const IFLA_MAP: _bindgen_ty_38 = 14;
pub const IFLA_WEIGHT: _bindgen_ty_38 = 15;
pub const IFLA_OPERSTATE: _bindgen_ty_38 = 16;
pub const IFLA_LINKMODE: _bindgen_ty_38 = 17;
pub const IFLA_LINKINFO: _bindgen_ty_38 = 18;
pub const IFLA_NET_NS_PID: _bindgen_ty_38 = 19;
pub const IFLA_IFALIAS: _bindgen_ty_38 = 20;
pub const IFLA_NUM_VF: _bindgen_ty_38 = 21;
pub const IFLA_VFINFO_LIST: _bindgen_ty_38 = 22;
pub const IFLA_STATS64: _bindgen_ty_38 = 23;
pub const IFLA_VF_PORTS: _bindgen_ty_38 = 24;
pub const IFLA_PORT_SELF: _bindgen_ty_38 = 25;
pub const IFLA_AF_SPEC: _bindgen_ty_38 = 26;
pub const IFLA_GROUP: _bindgen_ty_38 = 27;
pub const IFLA_NET_NS_FD: _bindgen_ty_38 = 28;
pub const IFLA_EXT_MASK: _bindgen_ty_38 = 29;
pub const IFLA_PROMISCUITY: _bindgen_ty_38 = 30;
pub const IFLA_NUM_TX_QUEUES: _bindgen_ty_38 = 31;
pub const IFLA_NUM_RX_QUEUES: _bindgen_ty_38 = 32;
pub const IFLA_CARRIER: _bindgen_ty_38 = 33;
pub const IFLA_PHYS_PORT_ID: _bindgen_ty_38 = 34;
pub const IFLA_CARRIER_CHANGES: _bindgen_ty_38 = 35;
pub const IFLA_PHYS_SWITCH_ID: _bindgen_ty_38 = 36;
pub const IFLA_LINK_NETNSID: _bindgen_ty_38 = 37;
pub const IFLA_PHYS_PORT_NAME: _bindgen_ty_38 = 38;
pub const IFLA_PROTO_DOWN: _bindgen_ty_38 = 39;
pub const IFLA_GSO_MAX_SEGS: _bindgen_ty_38 = 40;
pub const IFLA_GSO_MAX_SIZE: _bindgen_ty_38 = 41;
pub const IFLA_PAD: _bindgen_ty_38 = 42;
pub const IFLA_XDP: _bindgen_ty_38 = 43;
pub const IFLA_EVENT: _bindgen_ty_38 = 44;
pub const IFLA_NEW_NETNSID: _bindgen_ty_38 = 45;
pub const IFLA_IF_NETNSID: _bindgen_ty_38 = 46;
pub const IFLA_TARGET_NETNSID: _bindgen_ty_38 = 46;
pub const IFLA_CARRIER_UP_COUNT: _bindgen_ty_38 = 47;
pub const IFLA_CARRIER_DOWN_COUNT: _bindgen_ty_38 = 48;
pub const IFLA_NEW_IFINDEX: _bindgen_ty_38 = 49;
pub const IFLA_MIN_MTU: _bindgen_ty_38 = 50;
pub const IFLA_MAX_MTU: _bindgen_ty_38 = 51;
pub const IFLA_PROP_LIST: _bindgen_ty_38 = 52;
pub const IFLA_ALT_IFNAME: _bindgen_ty_38 = 53;
pub const IFLA_PERM_ADDRESS: _bindgen_ty_38 = 54;
pub const IFLA_PROTO_DOWN_REASON: _bindgen_ty_38 = 55;
pub const IFLA_PARENT_DEV_NAME: _bindgen_ty_38 = 56;
pub const IFLA_PARENT_DEV_BUS_NAME: _bindgen_ty_38 = 57;
pub const __IFLA_MAX: _bindgen_ty_38 = 58;
pub type _bindgen_ty_38 = ::std::os::raw::c_uint;
pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_39 = 0;
pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_39 = 1;
pub const IFLA_PROTO_DOWN_REASON_VALUE: _bindgen_ty_39 = 2;
pub const __IFLA_PROTO_DOWN_REASON_CNT: _bindgen_ty_39 = 3;
pub const IFLA_PROTO_DOWN_REASON_MAX: _bindgen_ty_39 = 2;
pub type _bindgen_ty_39 = ::std::os::raw::c_uint;
pub const IFLA_INET_UNSPEC: _bindgen_ty_40 = 0;
pub const IFLA_INET_CONF: _bindgen_ty_40 = 1;
pub const __IFLA_INET_MAX: _bindgen_ty_40 = 2;
pub type _bindgen_ty_40 = ::std::os::raw::c_uint;
pub const IFLA_INET6_UNSPEC: _bindgen_ty_41 = 0;
pub const IFLA_INET6_FLAGS: _bindgen_ty_41 = 1;
pub const IFLA_INET6_CONF: _bindgen_ty_41 = 2;
pub const IFLA_INET6_STATS: _bindgen_ty_41 = 3;
pub const IFLA_INET6_MCAST: _bindgen_ty_41 = 4;
pub const IFLA_INET6_CACHEINFO: _bindgen_ty_41 = 5;
pub const IFLA_INET6_ICMP6STATS: _bindgen_ty_41 = 6;
pub const IFLA_INET6_TOKEN: _bindgen_ty_41 = 7;
pub const IFLA_INET6_ADDR_GEN_MODE: _bindgen_ty_41 = 8;
pub const IFLA_INET6_RA_MTU: _bindgen_ty_41 = 9;
pub const __IFLA_INET6_MAX: _bindgen_ty_41 = 10;
pub type _bindgen_ty_41 = ::std::os::raw::c_uint;
pub const in6_addr_gen_mode_IN6_ADDR_GEN_MODE_EUI64: in6_addr_gen_mode = 0;
pub const in6_addr_gen_mode_IN6_ADDR_GEN_MODE_NONE: in6_addr_gen_mode = 1;
pub const in6_addr_gen_mode_IN6_ADDR_GEN_MODE_STABLE_PRIVACY: in6_addr_gen_mode = 2;
pub const in6_addr_gen_mode_IN6_ADDR_GEN_MODE_RANDOM: in6_addr_gen_mode = 3;
pub type in6_addr_gen_mode = ::std::os::raw::c_uint;
pub const IFLA_BR_UNSPEC: _bindgen_ty_42 = 0;
pub const IFLA_BR_FORWARD_DELAY: _bindgen_ty_42 = 1;
pub const IFLA_BR_HELLO_TIME: _bindgen_ty_42 = 2;
pub const IFLA_BR_MAX_AGE: _bindgen_ty_42 = 3;
pub const IFLA_BR_AGEING_TIME: _bindgen_ty_42 = 4;
pub const IFLA_BR_STP_STATE: _bindgen_ty_42 = 5;
pub const IFLA_BR_PRIORITY: _bindgen_ty_42 = 6;
pub const IFLA_BR_VLAN_FILTERING: _bindgen_ty_42 = 7;
pub const IFLA_BR_VLAN_PROTOCOL: _bindgen_ty_42 = 8;
pub const IFLA_BR_GROUP_FWD_MASK: _bindgen_ty_42 = 9;
pub const IFLA_BR_ROOT_ID: _bindgen_ty_42 = 10;
pub const IFLA_BR_BRIDGE_ID: _bindgen_ty_42 = 11;
pub const IFLA_BR_ROOT_PORT: _bindgen_ty_42 = 12;
pub const IFLA_BR_ROOT_PATH_COST: _bindgen_ty_42 = 13;
pub const IFLA_BR_TOPOLOGY_CHANGE: _bindgen_ty_42 = 14;
pub const IFLA_BR_TOPOLOGY_CHANGE_DETECTED: _bindgen_ty_42 = 15;
pub const IFLA_BR_HELLO_TIMER: _bindgen_ty_42 = 16;
pub const IFLA_BR_TCN_TIMER: _bindgen_ty_42 = 17;
pub const IFLA_BR_TOPOLOGY_CHANGE_TIMER: _bindgen_ty_42 = 18;
pub const IFLA_BR_GC_TIMER: _bindgen_ty_42 = 19;
pub const IFLA_BR_GROUP_ADDR: _bindgen_ty_42 = 20;
pub const IFLA_BR_FDB_FLUSH: _bindgen_ty_42 = 21;
pub const IFLA_BR_MCAST_ROUTER: _bindgen_ty_42 = 22;
pub const IFLA_BR_MCAST_SNOOPING: _bindgen_ty_42 = 23;
pub const IFLA_BR_MCAST_QUERY_USE_IFADDR: _bindgen_ty_42 = 24;
pub const IFLA_BR_MCAST_QUERIER: _bindgen_ty_42 = 25;
pub const IFLA_BR_MCAST_HASH_ELASTICITY: _bindgen_ty_42 = 26;
pub const IFLA_BR_MCAST_HASH_MAX: _bindgen_ty_42 = 27;
pub const IFLA_BR_MCAST_LAST_MEMBER_CNT: _bindgen_ty_42 = 28;
pub const IFLA_BR_MCAST_STARTUP_QUERY_CNT: _bindgen_ty_42 = 29;
pub const IFLA_BR_MCAST_LAST_MEMBER_INTVL: _bindgen_ty_42 = 30;
pub const IFLA_BR_MCAST_MEMBERSHIP_INTVL: _bindgen_ty_42 = 31;
pub const IFLA_BR_MCAST_QUERIER_INTVL: _bindgen_ty_42 = 32;
pub const IFLA_BR_MCAST_QUERY_INTVL: _bindgen_ty_42 = 33;
pub const IFLA_BR_MCAST_QUERY_RESPONSE_INTVL: _bindgen_ty_42 = 34;
pub const IFLA_BR_MCAST_STARTUP_QUERY_INTVL: _bindgen_ty_42 = 35;
pub const IFLA_BR_NF_CALL_IPTABLES: _bindgen_ty_42 = 36;
pub const IFLA_BR_NF_CALL_IP6TABLES: _bindgen_ty_42 = 37;
pub const IFLA_BR_NF_CALL_ARPTABLES: _bindgen_ty_42 = 38;
pub const IFLA_BR_VLAN_DEFAULT_PVID: _bindgen_ty_42 = 39;
pub const IFLA_BR_PAD: _bindgen_ty_42 = 40;
pub const IFLA_BR_VLAN_STATS_ENABLED: _bindgen_ty_42 = 41;
pub const IFLA_BR_MCAST_STATS_ENABLED: _bindgen_ty_42 = 42;
pub const IFLA_BR_MCAST_IGMP_VERSION: _bindgen_ty_42 = 43;
pub const IFLA_BR_MCAST_MLD_VERSION: _bindgen_ty_42 = 44;
pub const IFLA_BR_VLAN_STATS_PER_PORT: _bindgen_ty_42 = 45;
pub const IFLA_BR_MULTI_BOOLOPT: _bindgen_ty_42 = 46;
pub const IFLA_BR_MCAST_QUERIER_STATE: _bindgen_ty_42 = 47;
pub const __IFLA_BR_MAX: _bindgen_ty_42 = 48;
pub type _bindgen_ty_42 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_bridge_id {
pub prio: [__u8; 2usize],
pub addr: [__u8; 6usize],
}
#[test]
fn bindgen_test_layout_ifla_bridge_id() {
const UNINIT: ::std::mem::MaybeUninit<ifla_bridge_id> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_bridge_id>(),
8usize,
concat!("Size of: ", stringify!(ifla_bridge_id))
);
assert_eq!(
::std::mem::align_of::<ifla_bridge_id>(),
1usize,
concat!("Alignment of ", stringify!(ifla_bridge_id))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).prio) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_bridge_id),
"::",
stringify!(prio)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ifla_bridge_id),
"::",
stringify!(addr)
)
);
}
pub const BRIDGE_MODE_UNSPEC: _bindgen_ty_43 = 0;
pub const BRIDGE_MODE_HAIRPIN: _bindgen_ty_43 = 1;
pub type _bindgen_ty_43 = ::std::os::raw::c_uint;
pub const IFLA_BRPORT_UNSPEC: _bindgen_ty_44 = 0;
pub const IFLA_BRPORT_STATE: _bindgen_ty_44 = 1;
pub const IFLA_BRPORT_PRIORITY: _bindgen_ty_44 = 2;
pub const IFLA_BRPORT_COST: _bindgen_ty_44 = 3;
pub const IFLA_BRPORT_MODE: _bindgen_ty_44 = 4;
pub const IFLA_BRPORT_GUARD: _bindgen_ty_44 = 5;
pub const IFLA_BRPORT_PROTECT: _bindgen_ty_44 = 6;
pub const IFLA_BRPORT_FAST_LEAVE: _bindgen_ty_44 = 7;
pub const IFLA_BRPORT_LEARNING: _bindgen_ty_44 = 8;
pub const IFLA_BRPORT_UNICAST_FLOOD: _bindgen_ty_44 = 9;
pub const IFLA_BRPORT_PROXYARP: _bindgen_ty_44 = 10;
pub const IFLA_BRPORT_LEARNING_SYNC: _bindgen_ty_44 = 11;
pub const IFLA_BRPORT_PROXYARP_WIFI: _bindgen_ty_44 = 12;
pub const IFLA_BRPORT_ROOT_ID: _bindgen_ty_44 = 13;
pub const IFLA_BRPORT_BRIDGE_ID: _bindgen_ty_44 = 14;
pub const IFLA_BRPORT_DESIGNATED_PORT: _bindgen_ty_44 = 15;
pub const IFLA_BRPORT_DESIGNATED_COST: _bindgen_ty_44 = 16;
pub const IFLA_BRPORT_ID: _bindgen_ty_44 = 17;
pub const IFLA_BRPORT_NO: _bindgen_ty_44 = 18;
pub const IFLA_BRPORT_TOPOLOGY_CHANGE_ACK: _bindgen_ty_44 = 19;
pub const IFLA_BRPORT_CONFIG_PENDING: _bindgen_ty_44 = 20;
pub const IFLA_BRPORT_MESSAGE_AGE_TIMER: _bindgen_ty_44 = 21;
pub const IFLA_BRPORT_FORWARD_DELAY_TIMER: _bindgen_ty_44 = 22;
pub const IFLA_BRPORT_HOLD_TIMER: _bindgen_ty_44 = 23;
pub const IFLA_BRPORT_FLUSH: _bindgen_ty_44 = 24;
pub const IFLA_BRPORT_MULTICAST_ROUTER: _bindgen_ty_44 = 25;
pub const IFLA_BRPORT_PAD: _bindgen_ty_44 = 26;
pub const IFLA_BRPORT_MCAST_FLOOD: _bindgen_ty_44 = 27;
pub const IFLA_BRPORT_MCAST_TO_UCAST: _bindgen_ty_44 = 28;
pub const IFLA_BRPORT_VLAN_TUNNEL: _bindgen_ty_44 = 29;
pub const IFLA_BRPORT_BCAST_FLOOD: _bindgen_ty_44 = 30;
pub const IFLA_BRPORT_GROUP_FWD_MASK: _bindgen_ty_44 = 31;
pub const IFLA_BRPORT_NEIGH_SUPPRESS: _bindgen_ty_44 = 32;
pub const IFLA_BRPORT_ISOLATED: _bindgen_ty_44 = 33;
pub const IFLA_BRPORT_BACKUP_PORT: _bindgen_ty_44 = 34;
pub const IFLA_BRPORT_MRP_RING_OPEN: _bindgen_ty_44 = 35;
pub const IFLA_BRPORT_MRP_IN_OPEN: _bindgen_ty_44 = 36;
pub const IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT: _bindgen_ty_44 = 37;
pub const IFLA_BRPORT_MCAST_EHT_HOSTS_CNT: _bindgen_ty_44 = 38;
pub const __IFLA_BRPORT_MAX: _bindgen_ty_44 = 39;
pub type _bindgen_ty_44 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_cacheinfo {
pub max_reasm_len: __u32,
pub tstamp: __u32,
pub reachable_time: __u32,
pub retrans_time: __u32,
}
#[test]
fn bindgen_test_layout_ifla_cacheinfo() {
const UNINIT: ::std::mem::MaybeUninit<ifla_cacheinfo> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_cacheinfo>(),
16usize,
concat!("Size of: ", stringify!(ifla_cacheinfo))
);
assert_eq!(
::std::mem::align_of::<ifla_cacheinfo>(),
4usize,
concat!("Alignment of ", stringify!(ifla_cacheinfo))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).max_reasm_len) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_cacheinfo),
"::",
stringify!(max_reasm_len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tstamp) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ifla_cacheinfo),
"::",
stringify!(tstamp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).reachable_time) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ifla_cacheinfo),
"::",
stringify!(reachable_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).retrans_time) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(ifla_cacheinfo),
"::",
stringify!(retrans_time)
)
);
}
pub const IFLA_INFO_UNSPEC: _bindgen_ty_45 = 0;
pub const IFLA_INFO_KIND: _bindgen_ty_45 = 1;
pub const IFLA_INFO_DATA: _bindgen_ty_45 = 2;
pub const IFLA_INFO_XSTATS: _bindgen_ty_45 = 3;
pub const IFLA_INFO_SLAVE_KIND: _bindgen_ty_45 = 4;
pub const IFLA_INFO_SLAVE_DATA: _bindgen_ty_45 = 5;
pub const __IFLA_INFO_MAX: _bindgen_ty_45 = 6;
pub type _bindgen_ty_45 = ::std::os::raw::c_uint;
pub const IFLA_VLAN_UNSPEC: _bindgen_ty_46 = 0;
pub const IFLA_VLAN_ID: _bindgen_ty_46 = 1;
pub const IFLA_VLAN_FLAGS: _bindgen_ty_46 = 2;
pub const IFLA_VLAN_EGRESS_QOS: _bindgen_ty_46 = 3;
pub const IFLA_VLAN_INGRESS_QOS: _bindgen_ty_46 = 4;
pub const IFLA_VLAN_PROTOCOL: _bindgen_ty_46 = 5;
pub const __IFLA_VLAN_MAX: _bindgen_ty_46 = 6;
pub type _bindgen_ty_46 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_vlan_flags {
pub flags: __u32,
pub mask: __u32,
}
#[test]
fn bindgen_test_layout_ifla_vlan_flags() {
const UNINIT: ::std::mem::MaybeUninit<ifla_vlan_flags> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_vlan_flags>(),
8usize,
concat!("Size of: ", stringify!(ifla_vlan_flags))
);
assert_eq!(
::std::mem::align_of::<ifla_vlan_flags>(),
4usize,
concat!("Alignment of ", stringify!(ifla_vlan_flags))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_vlan_flags),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mask) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ifla_vlan_flags),
"::",
stringify!(mask)
)
);
}
pub const IFLA_VLAN_QOS_UNSPEC: _bindgen_ty_47 = 0;
pub const IFLA_VLAN_QOS_MAPPING: _bindgen_ty_47 = 1;
pub const __IFLA_VLAN_QOS_MAX: _bindgen_ty_47 = 2;
pub type _bindgen_ty_47 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_vlan_qos_mapping {
pub from: __u32,
pub to: __u32,
}
#[test]
fn bindgen_test_layout_ifla_vlan_qos_mapping() {
const UNINIT: ::std::mem::MaybeUninit<ifla_vlan_qos_mapping> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_vlan_qos_mapping>(),
8usize,
concat!("Size of: ", stringify!(ifla_vlan_qos_mapping))
);
assert_eq!(
::std::mem::align_of::<ifla_vlan_qos_mapping>(),
4usize,
concat!("Alignment of ", stringify!(ifla_vlan_qos_mapping))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).from) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_vlan_qos_mapping),
"::",
stringify!(from)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).to) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ifla_vlan_qos_mapping),
"::",
stringify!(to)
)
);
}
pub const IFLA_MACVLAN_UNSPEC: _bindgen_ty_48 = 0;
pub const IFLA_MACVLAN_MODE: _bindgen_ty_48 = 1;
pub const IFLA_MACVLAN_FLAGS: _bindgen_ty_48 = 2;
pub const IFLA_MACVLAN_MACADDR_MODE: _bindgen_ty_48 = 3;
pub const IFLA_MACVLAN_MACADDR: _bindgen_ty_48 = 4;
pub const IFLA_MACVLAN_MACADDR_DATA: _bindgen_ty_48 = 5;
pub const IFLA_MACVLAN_MACADDR_COUNT: _bindgen_ty_48 = 6;
pub const IFLA_MACVLAN_BC_QUEUE_LEN: _bindgen_ty_48 = 7;
pub const IFLA_MACVLAN_BC_QUEUE_LEN_USED: _bindgen_ty_48 = 8;
pub const __IFLA_MACVLAN_MAX: _bindgen_ty_48 = 9;
pub type _bindgen_ty_48 = ::std::os::raw::c_uint;
pub const macvlan_mode_MACVLAN_MODE_PRIVATE: macvlan_mode = 1;
pub const macvlan_mode_MACVLAN_MODE_VEPA: macvlan_mode = 2;
pub const macvlan_mode_MACVLAN_MODE_BRIDGE: macvlan_mode = 4;
pub const macvlan_mode_MACVLAN_MODE_PASSTHRU: macvlan_mode = 8;
pub const macvlan_mode_MACVLAN_MODE_SOURCE: macvlan_mode = 16;
pub type macvlan_mode = ::std::os::raw::c_uint;
pub const macvlan_macaddr_mode_MACVLAN_MACADDR_ADD: macvlan_macaddr_mode = 0;
pub const macvlan_macaddr_mode_MACVLAN_MACADDR_DEL: macvlan_macaddr_mode = 1;
pub const macvlan_macaddr_mode_MACVLAN_MACADDR_FLUSH: macvlan_macaddr_mode = 2;
pub const macvlan_macaddr_mode_MACVLAN_MACADDR_SET: macvlan_macaddr_mode = 3;
pub type macvlan_macaddr_mode = ::std::os::raw::c_uint;
pub const IFLA_VRF_UNSPEC: _bindgen_ty_49 = 0;
pub const IFLA_VRF_TABLE: _bindgen_ty_49 = 1;
pub const __IFLA_VRF_MAX: _bindgen_ty_49 = 2;
pub type _bindgen_ty_49 = ::std::os::raw::c_uint;
pub const IFLA_VRF_PORT_UNSPEC: _bindgen_ty_50 = 0;
pub const IFLA_VRF_PORT_TABLE: _bindgen_ty_50 = 1;
pub const __IFLA_VRF_PORT_MAX: _bindgen_ty_50 = 2;
pub type _bindgen_ty_50 = ::std::os::raw::c_uint;
pub const IFLA_MACSEC_UNSPEC: _bindgen_ty_51 = 0;
pub const IFLA_MACSEC_SCI: _bindgen_ty_51 = 1;
pub const IFLA_MACSEC_PORT: _bindgen_ty_51 = 2;
pub const IFLA_MACSEC_ICV_LEN: _bindgen_ty_51 = 3;
pub const IFLA_MACSEC_CIPHER_SUITE: _bindgen_ty_51 = 4;
pub const IFLA_MACSEC_WINDOW: _bindgen_ty_51 = 5;
pub const IFLA_MACSEC_ENCODING_SA: _bindgen_ty_51 = 6;
pub const IFLA_MACSEC_ENCRYPT: _bindgen_ty_51 = 7;
pub const IFLA_MACSEC_PROTECT: _bindgen_ty_51 = 8;
pub const IFLA_MACSEC_INC_SCI: _bindgen_ty_51 = 9;
pub const IFLA_MACSEC_ES: _bindgen_ty_51 = 10;
pub const IFLA_MACSEC_SCB: _bindgen_ty_51 = 11;
pub const IFLA_MACSEC_REPLAY_PROTECT: _bindgen_ty_51 = 12;
pub const IFLA_MACSEC_VALIDATION: _bindgen_ty_51 = 13;
pub const IFLA_MACSEC_PAD: _bindgen_ty_51 = 14;
pub const IFLA_MACSEC_OFFLOAD: _bindgen_ty_51 = 15;
pub const __IFLA_MACSEC_MAX: _bindgen_ty_51 = 16;
pub type _bindgen_ty_51 = ::std::os::raw::c_uint;
pub const IFLA_XFRM_UNSPEC: _bindgen_ty_52 = 0;
pub const IFLA_XFRM_LINK: _bindgen_ty_52 = 1;
pub const IFLA_XFRM_IF_ID: _bindgen_ty_52 = 2;
pub const __IFLA_XFRM_MAX: _bindgen_ty_52 = 3;
pub type _bindgen_ty_52 = ::std::os::raw::c_uint;
pub const macsec_validation_type_MACSEC_VALIDATE_DISABLED: macsec_validation_type = 0;
pub const macsec_validation_type_MACSEC_VALIDATE_CHECK: macsec_validation_type = 1;
pub const macsec_validation_type_MACSEC_VALIDATE_STRICT: macsec_validation_type = 2;
pub const macsec_validation_type___MACSEC_VALIDATE_END: macsec_validation_type = 3;
pub const macsec_validation_type_MACSEC_VALIDATE_MAX: macsec_validation_type = 2;
pub type macsec_validation_type = ::std::os::raw::c_uint;
pub const macsec_offload_MACSEC_OFFLOAD_OFF: macsec_offload = 0;
pub const macsec_offload_MACSEC_OFFLOAD_PHY: macsec_offload = 1;
pub const macsec_offload_MACSEC_OFFLOAD_MAC: macsec_offload = 2;
pub const macsec_offload___MACSEC_OFFLOAD_END: macsec_offload = 3;
pub const macsec_offload_MACSEC_OFFLOAD_MAX: macsec_offload = 2;
pub type macsec_offload = ::std::os::raw::c_uint;
pub const IFLA_IPVLAN_UNSPEC: _bindgen_ty_53 = 0;
pub const IFLA_IPVLAN_MODE: _bindgen_ty_53 = 1;
pub const IFLA_IPVLAN_FLAGS: _bindgen_ty_53 = 2;
pub const __IFLA_IPVLAN_MAX: _bindgen_ty_53 = 3;
pub type _bindgen_ty_53 = ::std::os::raw::c_uint;
pub const ipvlan_mode_IPVLAN_MODE_L2: ipvlan_mode = 0;
pub const ipvlan_mode_IPVLAN_MODE_L3: ipvlan_mode = 1;
pub const ipvlan_mode_IPVLAN_MODE_L3S: ipvlan_mode = 2;
pub const ipvlan_mode_IPVLAN_MODE_MAX: ipvlan_mode = 3;
pub type ipvlan_mode = ::std::os::raw::c_uint;
pub const IFLA_VXLAN_UNSPEC: _bindgen_ty_54 = 0;
pub const IFLA_VXLAN_ID: _bindgen_ty_54 = 1;
pub const IFLA_VXLAN_GROUP: _bindgen_ty_54 = 2;
pub const IFLA_VXLAN_LINK: _bindgen_ty_54 = 3;
pub const IFLA_VXLAN_LOCAL: _bindgen_ty_54 = 4;
pub const IFLA_VXLAN_TTL: _bindgen_ty_54 = 5;
pub const IFLA_VXLAN_TOS: _bindgen_ty_54 = 6;
pub const IFLA_VXLAN_LEARNING: _bindgen_ty_54 = 7;
pub const IFLA_VXLAN_AGEING: _bindgen_ty_54 = 8;
pub const IFLA_VXLAN_LIMIT: _bindgen_ty_54 = 9;
pub const IFLA_VXLAN_PORT_RANGE: _bindgen_ty_54 = 10;
pub const IFLA_VXLAN_PROXY: _bindgen_ty_54 = 11;
pub const IFLA_VXLAN_RSC: _bindgen_ty_54 = 12;
pub const IFLA_VXLAN_L2MISS: _bindgen_ty_54 = 13;
pub const IFLA_VXLAN_L3MISS: _bindgen_ty_54 = 14;
pub const IFLA_VXLAN_PORT: _bindgen_ty_54 = 15;
pub const IFLA_VXLAN_GROUP6: _bindgen_ty_54 = 16;
pub const IFLA_VXLAN_LOCAL6: _bindgen_ty_54 = 17;
pub const IFLA_VXLAN_UDP_CSUM: _bindgen_ty_54 = 18;
pub const IFLA_VXLAN_UDP_ZERO_CSUM6_TX: _bindgen_ty_54 = 19;
pub const IFLA_VXLAN_UDP_ZERO_CSUM6_RX: _bindgen_ty_54 = 20;
pub const IFLA_VXLAN_REMCSUM_TX: _bindgen_ty_54 = 21;
pub const IFLA_VXLAN_REMCSUM_RX: _bindgen_ty_54 = 22;
pub const IFLA_VXLAN_GBP: _bindgen_ty_54 = 23;
pub const IFLA_VXLAN_REMCSUM_NOPARTIAL: _bindgen_ty_54 = 24;
pub const IFLA_VXLAN_COLLECT_METADATA: _bindgen_ty_54 = 25;
pub const IFLA_VXLAN_LABEL: _bindgen_ty_54 = 26;
pub const IFLA_VXLAN_GPE: _bindgen_ty_54 = 27;
pub const IFLA_VXLAN_TTL_INHERIT: _bindgen_ty_54 = 28;
pub const IFLA_VXLAN_DF: _bindgen_ty_54 = 29;
pub const IFLA_VXLAN_FAN_MAP: _bindgen_ty_54 = 33;
pub const __IFLA_VXLAN_MAX: _bindgen_ty_54 = 34;
pub type _bindgen_ty_54 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_vxlan_port_range {
pub low: __be16,
pub high: __be16,
}
#[test]
fn bindgen_test_layout_ifla_vxlan_port_range() {
const UNINIT: ::std::mem::MaybeUninit<ifla_vxlan_port_range> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_vxlan_port_range>(),
4usize,
concat!("Size of: ", stringify!(ifla_vxlan_port_range))
);
assert_eq!(
::std::mem::align_of::<ifla_vxlan_port_range>(),
2usize,
concat!("Alignment of ", stringify!(ifla_vxlan_port_range))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).low) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_vxlan_port_range),
"::",
stringify!(low)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).high) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(ifla_vxlan_port_range),
"::",
stringify!(high)
)
);
}
pub const ifla_vxlan_df_VXLAN_DF_UNSET: ifla_vxlan_df = 0;
pub const ifla_vxlan_df_VXLAN_DF_SET: ifla_vxlan_df = 1;
pub const ifla_vxlan_df_VXLAN_DF_INHERIT: ifla_vxlan_df = 2;
pub const ifla_vxlan_df___VXLAN_DF_END: ifla_vxlan_df = 3;
pub const ifla_vxlan_df_VXLAN_DF_MAX: ifla_vxlan_df = 2;
pub type ifla_vxlan_df = ::std::os::raw::c_uint;
pub const IFLA_GENEVE_UNSPEC: _bindgen_ty_55 = 0;
pub const IFLA_GENEVE_ID: _bindgen_ty_55 = 1;
pub const IFLA_GENEVE_REMOTE: _bindgen_ty_55 = 2;
pub const IFLA_GENEVE_TTL: _bindgen_ty_55 = 3;
pub const IFLA_GENEVE_TOS: _bindgen_ty_55 = 4;
pub const IFLA_GENEVE_PORT: _bindgen_ty_55 = 5;
pub const IFLA_GENEVE_COLLECT_METADATA: _bindgen_ty_55 = 6;
pub const IFLA_GENEVE_REMOTE6: _bindgen_ty_55 = 7;
pub const IFLA_GENEVE_UDP_CSUM: _bindgen_ty_55 = 8;
pub const IFLA_GENEVE_UDP_ZERO_CSUM6_TX: _bindgen_ty_55 = 9;
pub const IFLA_GENEVE_UDP_ZERO_CSUM6_RX: _bindgen_ty_55 = 10;
pub const IFLA_GENEVE_LABEL: _bindgen_ty_55 = 11;
pub const IFLA_GENEVE_TTL_INHERIT: _bindgen_ty_55 = 12;
pub const IFLA_GENEVE_DF: _bindgen_ty_55 = 13;
pub const __IFLA_GENEVE_MAX: _bindgen_ty_55 = 14;
pub type _bindgen_ty_55 = ::std::os::raw::c_uint;
pub const ifla_geneve_df_GENEVE_DF_UNSET: ifla_geneve_df = 0;
pub const ifla_geneve_df_GENEVE_DF_SET: ifla_geneve_df = 1;
pub const ifla_geneve_df_GENEVE_DF_INHERIT: ifla_geneve_df = 2;
pub const ifla_geneve_df___GENEVE_DF_END: ifla_geneve_df = 3;
pub const ifla_geneve_df_GENEVE_DF_MAX: ifla_geneve_df = 2;
pub type ifla_geneve_df = ::std::os::raw::c_uint;
pub const IFLA_BAREUDP_UNSPEC: _bindgen_ty_56 = 0;
pub const IFLA_BAREUDP_PORT: _bindgen_ty_56 = 1;
pub const IFLA_BAREUDP_ETHERTYPE: _bindgen_ty_56 = 2;
pub const IFLA_BAREUDP_SRCPORT_MIN: _bindgen_ty_56 = 3;
pub const IFLA_BAREUDP_MULTIPROTO_MODE: _bindgen_ty_56 = 4;
pub const __IFLA_BAREUDP_MAX: _bindgen_ty_56 = 5;
pub type _bindgen_ty_56 = ::std::os::raw::c_uint;
pub const IFLA_PPP_UNSPEC: _bindgen_ty_57 = 0;
pub const IFLA_PPP_DEV_FD: _bindgen_ty_57 = 1;
pub const __IFLA_PPP_MAX: _bindgen_ty_57 = 2;
pub type _bindgen_ty_57 = ::std::os::raw::c_uint;
pub const ifla_gtp_role_GTP_ROLE_GGSN: ifla_gtp_role = 0;
pub const ifla_gtp_role_GTP_ROLE_SGSN: ifla_gtp_role = 1;
pub type ifla_gtp_role = ::std::os::raw::c_uint;
pub const IFLA_GTP_UNSPEC: _bindgen_ty_58 = 0;
pub const IFLA_GTP_FD0: _bindgen_ty_58 = 1;
pub const IFLA_GTP_FD1: _bindgen_ty_58 = 2;
pub const IFLA_GTP_PDP_HASHSIZE: _bindgen_ty_58 = 3;
pub const IFLA_GTP_ROLE: _bindgen_ty_58 = 4;
pub const __IFLA_GTP_MAX: _bindgen_ty_58 = 5;
pub type _bindgen_ty_58 = ::std::os::raw::c_uint;
pub const IFLA_BOND_UNSPEC: _bindgen_ty_59 = 0;
pub const IFLA_BOND_MODE: _bindgen_ty_59 = 1;
pub const IFLA_BOND_ACTIVE_SLAVE: _bindgen_ty_59 = 2;
pub const IFLA_BOND_MIIMON: _bindgen_ty_59 = 3;
pub const IFLA_BOND_UPDELAY: _bindgen_ty_59 = 4;
pub const IFLA_BOND_DOWNDELAY: _bindgen_ty_59 = 5;
pub const IFLA_BOND_USE_CARRIER: _bindgen_ty_59 = 6;
pub const IFLA_BOND_ARP_INTERVAL: _bindgen_ty_59 = 7;
pub const IFLA_BOND_ARP_IP_TARGET: _bindgen_ty_59 = 8;
pub const IFLA_BOND_ARP_VALIDATE: _bindgen_ty_59 = 9;
pub const IFLA_BOND_ARP_ALL_TARGETS: _bindgen_ty_59 = 10;
pub const IFLA_BOND_PRIMARY: _bindgen_ty_59 = 11;
pub const IFLA_BOND_PRIMARY_RESELECT: _bindgen_ty_59 = 12;
pub const IFLA_BOND_FAIL_OVER_MAC: _bindgen_ty_59 = 13;
pub const IFLA_BOND_XMIT_HASH_POLICY: _bindgen_ty_59 = 14;
pub const IFLA_BOND_RESEND_IGMP: _bindgen_ty_59 = 15;
pub const IFLA_BOND_NUM_PEER_NOTIF: _bindgen_ty_59 = 16;
pub const IFLA_BOND_ALL_SLAVES_ACTIVE: _bindgen_ty_59 = 17;
pub const IFLA_BOND_MIN_LINKS: _bindgen_ty_59 = 18;
pub const IFLA_BOND_LP_INTERVAL: _bindgen_ty_59 = 19;
pub const IFLA_BOND_PACKETS_PER_SLAVE: _bindgen_ty_59 = 20;
pub const IFLA_BOND_AD_LACP_RATE: _bindgen_ty_59 = 21;
pub const IFLA_BOND_AD_SELECT: _bindgen_ty_59 = 22;
pub const IFLA_BOND_AD_INFO: _bindgen_ty_59 = 23;
pub const IFLA_BOND_AD_ACTOR_SYS_PRIO: _bindgen_ty_59 = 24;
pub const IFLA_BOND_AD_USER_PORT_KEY: _bindgen_ty_59 = 25;
pub const IFLA_BOND_AD_ACTOR_SYSTEM: _bindgen_ty_59 = 26;
pub const IFLA_BOND_TLB_DYNAMIC_LB: _bindgen_ty_59 = 27;
pub const IFLA_BOND_PEER_NOTIF_DELAY: _bindgen_ty_59 = 28;
pub const IFLA_BOND_AD_LACP_ACTIVE: _bindgen_ty_59 = 29;
pub const IFLA_BOND_MISSED_MAX: _bindgen_ty_59 = 30;
pub const __IFLA_BOND_MAX: _bindgen_ty_59 = 31;
pub type _bindgen_ty_59 = ::std::os::raw::c_uint;
pub const IFLA_BOND_AD_INFO_UNSPEC: _bindgen_ty_60 = 0;
pub const IFLA_BOND_AD_INFO_AGGREGATOR: _bindgen_ty_60 = 1;
pub const IFLA_BOND_AD_INFO_NUM_PORTS: _bindgen_ty_60 = 2;
pub const IFLA_BOND_AD_INFO_ACTOR_KEY: _bindgen_ty_60 = 3;
pub const IFLA_BOND_AD_INFO_PARTNER_KEY: _bindgen_ty_60 = 4;
pub const IFLA_BOND_AD_INFO_PARTNER_MAC: _bindgen_ty_60 = 5;
pub const __IFLA_BOND_AD_INFO_MAX: _bindgen_ty_60 = 6;
pub type _bindgen_ty_60 = ::std::os::raw::c_uint;
pub const IFLA_BOND_SLAVE_UNSPEC: _bindgen_ty_61 = 0;
pub const IFLA_BOND_SLAVE_STATE: _bindgen_ty_61 = 1;
pub const IFLA_BOND_SLAVE_MII_STATUS: _bindgen_ty_61 = 2;
pub const IFLA_BOND_SLAVE_LINK_FAILURE_COUNT: _bindgen_ty_61 = 3;
pub const IFLA_BOND_SLAVE_PERM_HWADDR: _bindgen_ty_61 = 4;
pub const IFLA_BOND_SLAVE_QUEUE_ID: _bindgen_ty_61 = 5;
pub const IFLA_BOND_SLAVE_AD_AGGREGATOR_ID: _bindgen_ty_61 = 6;
pub const IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE: _bindgen_ty_61 = 7;
pub const IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE: _bindgen_ty_61 = 8;
pub const __IFLA_BOND_SLAVE_MAX: _bindgen_ty_61 = 9;
pub type _bindgen_ty_61 = ::std::os::raw::c_uint;
pub const IFLA_VF_INFO_UNSPEC: _bindgen_ty_62 = 0;
pub const IFLA_VF_INFO: _bindgen_ty_62 = 1;
pub const __IFLA_VF_INFO_MAX: _bindgen_ty_62 = 2;
pub type _bindgen_ty_62 = ::std::os::raw::c_uint;
pub const IFLA_VF_UNSPEC: _bindgen_ty_63 = 0;
pub const IFLA_VF_MAC: _bindgen_ty_63 = 1;
pub const IFLA_VF_VLAN: _bindgen_ty_63 = 2;
pub const IFLA_VF_TX_RATE: _bindgen_ty_63 = 3;
pub const IFLA_VF_SPOOFCHK: _bindgen_ty_63 = 4;
pub const IFLA_VF_LINK_STATE: _bindgen_ty_63 = 5;
pub const IFLA_VF_RATE: _bindgen_ty_63 = 6;
pub const IFLA_VF_RSS_QUERY_EN: _bindgen_ty_63 = 7;
pub const IFLA_VF_STATS: _bindgen_ty_63 = 8;
pub const IFLA_VF_TRUST: _bindgen_ty_63 = 9;
pub const IFLA_VF_IB_NODE_GUID: _bindgen_ty_63 = 10;
pub const IFLA_VF_IB_PORT_GUID: _bindgen_ty_63 = 11;
pub const IFLA_VF_VLAN_LIST: _bindgen_ty_63 = 12;
pub const IFLA_VF_BROADCAST: _bindgen_ty_63 = 13;
pub const __IFLA_VF_MAX: _bindgen_ty_63 = 14;
pub type _bindgen_ty_63 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_vf_mac {
pub vf: __u32,
pub mac: [__u8; 32usize],
}
#[test]
fn bindgen_test_layout_ifla_vf_mac() {
const UNINIT: ::std::mem::MaybeUninit<ifla_vf_mac> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_vf_mac>(),
36usize,
concat!("Size of: ", stringify!(ifla_vf_mac))
);
assert_eq!(
::std::mem::align_of::<ifla_vf_mac>(),
4usize,
concat!("Alignment of ", stringify!(ifla_vf_mac))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_mac),
"::",
stringify!(vf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mac) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_mac),
"::",
stringify!(mac)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_vf_broadcast {
pub broadcast: [__u8; 32usize],
}
#[test]
fn bindgen_test_layout_ifla_vf_broadcast() {
const UNINIT: ::std::mem::MaybeUninit<ifla_vf_broadcast> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_vf_broadcast>(),
32usize,
concat!("Size of: ", stringify!(ifla_vf_broadcast))
);
assert_eq!(
::std::mem::align_of::<ifla_vf_broadcast>(),
1usize,
concat!("Alignment of ", stringify!(ifla_vf_broadcast))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).broadcast) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_broadcast),
"::",
stringify!(broadcast)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_vf_vlan {
pub vf: __u32,
pub vlan: __u32,
pub qos: __u32,
}
#[test]
fn bindgen_test_layout_ifla_vf_vlan() {
const UNINIT: ::std::mem::MaybeUninit<ifla_vf_vlan> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_vf_vlan>(),
12usize,
concat!("Size of: ", stringify!(ifla_vf_vlan))
);
assert_eq!(
::std::mem::align_of::<ifla_vf_vlan>(),
4usize,
concat!("Alignment of ", stringify!(ifla_vf_vlan))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_vlan),
"::",
stringify!(vf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vlan) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_vlan),
"::",
stringify!(vlan)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).qos) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_vlan),
"::",
stringify!(qos)
)
);
}
pub const IFLA_VF_VLAN_INFO_UNSPEC: _bindgen_ty_64 = 0;
pub const IFLA_VF_VLAN_INFO: _bindgen_ty_64 = 1;
pub const __IFLA_VF_VLAN_INFO_MAX: _bindgen_ty_64 = 2;
pub type _bindgen_ty_64 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_vf_vlan_info {
pub vf: __u32,
pub vlan: __u32,
pub qos: __u32,
pub vlan_proto: __be16,
}
#[test]
fn bindgen_test_layout_ifla_vf_vlan_info() {
const UNINIT: ::std::mem::MaybeUninit<ifla_vf_vlan_info> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_vf_vlan_info>(),
16usize,
concat!("Size of: ", stringify!(ifla_vf_vlan_info))
);
assert_eq!(
::std::mem::align_of::<ifla_vf_vlan_info>(),
4usize,
concat!("Alignment of ", stringify!(ifla_vf_vlan_info))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_vlan_info),
"::",
stringify!(vf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vlan) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_vlan_info),
"::",
stringify!(vlan)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).qos) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_vlan_info),
"::",
stringify!(qos)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vlan_proto) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_vlan_info),
"::",
stringify!(vlan_proto)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_vf_tx_rate {
pub vf: __u32,
pub rate: __u32,
}
#[test]
fn bindgen_test_layout_ifla_vf_tx_rate() {
const UNINIT: ::std::mem::MaybeUninit<ifla_vf_tx_rate> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_vf_tx_rate>(),
8usize,
concat!("Size of: ", stringify!(ifla_vf_tx_rate))
);
assert_eq!(
::std::mem::align_of::<ifla_vf_tx_rate>(),
4usize,
concat!("Alignment of ", stringify!(ifla_vf_tx_rate))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_tx_rate),
"::",
stringify!(vf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rate) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_tx_rate),
"::",
stringify!(rate)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_vf_rate {
pub vf: __u32,
pub min_tx_rate: __u32,
pub max_tx_rate: __u32,
}
#[test]
fn bindgen_test_layout_ifla_vf_rate() {
const UNINIT: ::std::mem::MaybeUninit<ifla_vf_rate> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_vf_rate>(),
12usize,
concat!("Size of: ", stringify!(ifla_vf_rate))
);
assert_eq!(
::std::mem::align_of::<ifla_vf_rate>(),
4usize,
concat!("Alignment of ", stringify!(ifla_vf_rate))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_rate),
"::",
stringify!(vf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).min_tx_rate) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_rate),
"::",
stringify!(min_tx_rate)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).max_tx_rate) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_rate),
"::",
stringify!(max_tx_rate)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_vf_spoofchk {
pub vf: __u32,
pub setting: __u32,
}
#[test]
fn bindgen_test_layout_ifla_vf_spoofchk() {
const UNINIT: ::std::mem::MaybeUninit<ifla_vf_spoofchk> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_vf_spoofchk>(),
8usize,
concat!("Size of: ", stringify!(ifla_vf_spoofchk))
);
assert_eq!(
::std::mem::align_of::<ifla_vf_spoofchk>(),
4usize,
concat!("Alignment of ", stringify!(ifla_vf_spoofchk))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_spoofchk),
"::",
stringify!(vf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).setting) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_spoofchk),
"::",
stringify!(setting)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_vf_guid {
pub vf: __u32,
pub guid: __u64,
}
#[test]
fn bindgen_test_layout_ifla_vf_guid() {
const UNINIT: ::std::mem::MaybeUninit<ifla_vf_guid> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_vf_guid>(),
16usize,
concat!("Size of: ", stringify!(ifla_vf_guid))
);
assert_eq!(
::std::mem::align_of::<ifla_vf_guid>(),
8usize,
concat!("Alignment of ", stringify!(ifla_vf_guid))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_guid),
"::",
stringify!(vf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).guid) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_guid),
"::",
stringify!(guid)
)
);
}
pub const IFLA_VF_LINK_STATE_AUTO: _bindgen_ty_65 = 0;
pub const IFLA_VF_LINK_STATE_ENABLE: _bindgen_ty_65 = 1;
pub const IFLA_VF_LINK_STATE_DISABLE: _bindgen_ty_65 = 2;
pub const __IFLA_VF_LINK_STATE_MAX: _bindgen_ty_65 = 3;
pub type _bindgen_ty_65 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_vf_link_state {
pub vf: __u32,
pub link_state: __u32,
}
#[test]
fn bindgen_test_layout_ifla_vf_link_state() {
const UNINIT: ::std::mem::MaybeUninit<ifla_vf_link_state> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_vf_link_state>(),
8usize,
concat!("Size of: ", stringify!(ifla_vf_link_state))
);
assert_eq!(
::std::mem::align_of::<ifla_vf_link_state>(),
4usize,
concat!("Alignment of ", stringify!(ifla_vf_link_state))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_link_state),
"::",
stringify!(vf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).link_state) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_link_state),
"::",
stringify!(link_state)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_vf_rss_query_en {
pub vf: __u32,
pub setting: __u32,
}
#[test]
fn bindgen_test_layout_ifla_vf_rss_query_en() {
const UNINIT: ::std::mem::MaybeUninit<ifla_vf_rss_query_en> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_vf_rss_query_en>(),
8usize,
concat!("Size of: ", stringify!(ifla_vf_rss_query_en))
);
assert_eq!(
::std::mem::align_of::<ifla_vf_rss_query_en>(),
4usize,
concat!("Alignment of ", stringify!(ifla_vf_rss_query_en))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_rss_query_en),
"::",
stringify!(vf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).setting) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_rss_query_en),
"::",
stringify!(setting)
)
);
}
pub const IFLA_VF_STATS_RX_PACKETS: _bindgen_ty_66 = 0;
pub const IFLA_VF_STATS_TX_PACKETS: _bindgen_ty_66 = 1;
pub const IFLA_VF_STATS_RX_BYTES: _bindgen_ty_66 = 2;
pub const IFLA_VF_STATS_TX_BYTES: _bindgen_ty_66 = 3;
pub const IFLA_VF_STATS_BROADCAST: _bindgen_ty_66 = 4;
pub const IFLA_VF_STATS_MULTICAST: _bindgen_ty_66 = 5;
pub const IFLA_VF_STATS_PAD: _bindgen_ty_66 = 6;
pub const IFLA_VF_STATS_RX_DROPPED: _bindgen_ty_66 = 7;
pub const IFLA_VF_STATS_TX_DROPPED: _bindgen_ty_66 = 8;
pub const __IFLA_VF_STATS_MAX: _bindgen_ty_66 = 9;
pub type _bindgen_ty_66 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_vf_trust {
pub vf: __u32,
pub setting: __u32,
}
#[test]
fn bindgen_test_layout_ifla_vf_trust() {
const UNINIT: ::std::mem::MaybeUninit<ifla_vf_trust> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_vf_trust>(),
8usize,
concat!("Size of: ", stringify!(ifla_vf_trust))
);
assert_eq!(
::std::mem::align_of::<ifla_vf_trust>(),
4usize,
concat!("Alignment of ", stringify!(ifla_vf_trust))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_trust),
"::",
stringify!(vf)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).setting) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ifla_vf_trust),
"::",
stringify!(setting)
)
);
}
pub const IFLA_VF_PORT_UNSPEC: _bindgen_ty_67 = 0;
pub const IFLA_VF_PORT: _bindgen_ty_67 = 1;
pub const __IFLA_VF_PORT_MAX: _bindgen_ty_67 = 2;
pub type _bindgen_ty_67 = ::std::os::raw::c_uint;
pub const IFLA_PORT_UNSPEC: _bindgen_ty_68 = 0;
pub const IFLA_PORT_VF: _bindgen_ty_68 = 1;
pub const IFLA_PORT_PROFILE: _bindgen_ty_68 = 2;
pub const IFLA_PORT_VSI_TYPE: _bindgen_ty_68 = 3;
pub const IFLA_PORT_INSTANCE_UUID: _bindgen_ty_68 = 4;
pub const IFLA_PORT_HOST_UUID: _bindgen_ty_68 = 5;
pub const IFLA_PORT_REQUEST: _bindgen_ty_68 = 6;
pub const IFLA_PORT_RESPONSE: _bindgen_ty_68 = 7;
pub const __IFLA_PORT_MAX: _bindgen_ty_68 = 8;
pub type _bindgen_ty_68 = ::std::os::raw::c_uint;
pub const PORT_REQUEST_PREASSOCIATE: _bindgen_ty_69 = 0;
pub const PORT_REQUEST_PREASSOCIATE_RR: _bindgen_ty_69 = 1;
pub const PORT_REQUEST_ASSOCIATE: _bindgen_ty_69 = 2;
pub const PORT_REQUEST_DISASSOCIATE: _bindgen_ty_69 = 3;
pub type _bindgen_ty_69 = ::std::os::raw::c_uint;
pub const PORT_VDP_RESPONSE_SUCCESS: _bindgen_ty_70 = 0;
pub const PORT_VDP_RESPONSE_INVALID_FORMAT: _bindgen_ty_70 = 1;
pub const PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES: _bindgen_ty_70 = 2;
pub const PORT_VDP_RESPONSE_UNUSED_VTID: _bindgen_ty_70 = 3;
pub const PORT_VDP_RESPONSE_VTID_VIOLATION: _bindgen_ty_70 = 4;
pub const PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION: _bindgen_ty_70 = 5;
pub const PORT_VDP_RESPONSE_OUT_OF_SYNC: _bindgen_ty_70 = 6;
pub const PORT_PROFILE_RESPONSE_SUCCESS: _bindgen_ty_70 = 256;
pub const PORT_PROFILE_RESPONSE_INPROGRESS: _bindgen_ty_70 = 257;
pub const PORT_PROFILE_RESPONSE_INVALID: _bindgen_ty_70 = 258;
pub const PORT_PROFILE_RESPONSE_BADSTATE: _bindgen_ty_70 = 259;
pub const PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES: _bindgen_ty_70 = 260;
pub const PORT_PROFILE_RESPONSE_ERROR: _bindgen_ty_70 = 261;
pub type _bindgen_ty_70 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_port_vsi {
pub vsi_mgr_id: __u8,
pub vsi_type_id: [__u8; 3usize],
pub vsi_type_version: __u8,
pub pad: [__u8; 3usize],
}
#[test]
fn bindgen_test_layout_ifla_port_vsi() {
const UNINIT: ::std::mem::MaybeUninit<ifla_port_vsi> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_port_vsi>(),
8usize,
concat!("Size of: ", stringify!(ifla_port_vsi))
);
assert_eq!(
::std::mem::align_of::<ifla_port_vsi>(),
1usize,
concat!("Alignment of ", stringify!(ifla_port_vsi))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vsi_mgr_id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_port_vsi),
"::",
stringify!(vsi_mgr_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vsi_type_id) as usize - ptr as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(ifla_port_vsi),
"::",
stringify!(vsi_type_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vsi_type_version) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ifla_port_vsi),
"::",
stringify!(vsi_type_version)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize },
5usize,
concat!(
"Offset of field: ",
stringify!(ifla_port_vsi),
"::",
stringify!(pad)
)
);
}
pub const IFLA_IPOIB_UNSPEC: _bindgen_ty_71 = 0;
pub const IFLA_IPOIB_PKEY: _bindgen_ty_71 = 1;
pub const IFLA_IPOIB_MODE: _bindgen_ty_71 = 2;
pub const IFLA_IPOIB_UMCAST: _bindgen_ty_71 = 3;
pub const __IFLA_IPOIB_MAX: _bindgen_ty_71 = 4;
pub type _bindgen_ty_71 = ::std::os::raw::c_uint;
pub const IPOIB_MODE_DATAGRAM: _bindgen_ty_72 = 0;
pub const IPOIB_MODE_CONNECTED: _bindgen_ty_72 = 1;
pub type _bindgen_ty_72 = ::std::os::raw::c_uint;
pub const HSR_PROTOCOL_HSR: _bindgen_ty_73 = 0;
pub const HSR_PROTOCOL_PRP: _bindgen_ty_73 = 1;
pub const HSR_PROTOCOL_MAX: _bindgen_ty_73 = 2;
pub type _bindgen_ty_73 = ::std::os::raw::c_uint;
pub const IFLA_HSR_UNSPEC: _bindgen_ty_74 = 0;
pub const IFLA_HSR_SLAVE1: _bindgen_ty_74 = 1;
pub const IFLA_HSR_SLAVE2: _bindgen_ty_74 = 2;
pub const IFLA_HSR_MULTICAST_SPEC: _bindgen_ty_74 = 3;
pub const IFLA_HSR_SUPERVISION_ADDR: _bindgen_ty_74 = 4;
pub const IFLA_HSR_SEQ_NR: _bindgen_ty_74 = 5;
pub const IFLA_HSR_VERSION: _bindgen_ty_74 = 6;
pub const IFLA_HSR_PROTOCOL: _bindgen_ty_74 = 7;
pub const __IFLA_HSR_MAX: _bindgen_ty_74 = 8;
pub type _bindgen_ty_74 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct if_stats_msg {
pub family: __u8,
pub pad1: __u8,
pub pad2: __u16,
pub ifindex: __u32,
pub filter_mask: __u32,
}
#[test]
fn bindgen_test_layout_if_stats_msg() {
const UNINIT: ::std::mem::MaybeUninit<if_stats_msg> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<if_stats_msg>(),
12usize,
concat!("Size of: ", stringify!(if_stats_msg))
);
assert_eq!(
::std::mem::align_of::<if_stats_msg>(),
4usize,
concat!("Alignment of ", stringify!(if_stats_msg))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).family) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(if_stats_msg),
"::",
stringify!(family)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pad1) as usize - ptr as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(if_stats_msg),
"::",
stringify!(pad1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pad2) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(if_stats_msg),
"::",
stringify!(pad2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ifindex) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(if_stats_msg),
"::",
stringify!(ifindex)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).filter_mask) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(if_stats_msg),
"::",
stringify!(filter_mask)
)
);
}
pub const IFLA_STATS_UNSPEC: _bindgen_ty_75 = 0;
pub const IFLA_STATS_LINK_64: _bindgen_ty_75 = 1;
pub const IFLA_STATS_LINK_XSTATS: _bindgen_ty_75 = 2;
pub const IFLA_STATS_LINK_XSTATS_SLAVE: _bindgen_ty_75 = 3;
pub const IFLA_STATS_LINK_OFFLOAD_XSTATS: _bindgen_ty_75 = 4;
pub const IFLA_STATS_AF_SPEC: _bindgen_ty_75 = 5;
pub const __IFLA_STATS_MAX: _bindgen_ty_75 = 6;
pub type _bindgen_ty_75 = ::std::os::raw::c_uint;
pub const LINK_XSTATS_TYPE_UNSPEC: _bindgen_ty_76 = 0;
pub const LINK_XSTATS_TYPE_BRIDGE: _bindgen_ty_76 = 1;
pub const LINK_XSTATS_TYPE_BOND: _bindgen_ty_76 = 2;
pub const __LINK_XSTATS_TYPE_MAX: _bindgen_ty_76 = 3;
pub type _bindgen_ty_76 = ::std::os::raw::c_uint;
pub const IFLA_OFFLOAD_XSTATS_UNSPEC: _bindgen_ty_77 = 0;
pub const IFLA_OFFLOAD_XSTATS_CPU_HIT: _bindgen_ty_77 = 1;
pub const __IFLA_OFFLOAD_XSTATS_MAX: _bindgen_ty_77 = 2;
pub type _bindgen_ty_77 = ::std::os::raw::c_uint;
pub const XDP_ATTACHED_NONE: _bindgen_ty_78 = 0;
pub const XDP_ATTACHED_DRV: _bindgen_ty_78 = 1;
pub const XDP_ATTACHED_SKB: _bindgen_ty_78 = 2;
pub const XDP_ATTACHED_HW: _bindgen_ty_78 = 3;
pub const XDP_ATTACHED_MULTI: _bindgen_ty_78 = 4;
pub type _bindgen_ty_78 = ::std::os::raw::c_uint;
pub const IFLA_XDP_UNSPEC: _bindgen_ty_79 = 0;
pub const IFLA_XDP_FD: _bindgen_ty_79 = 1;
pub const IFLA_XDP_ATTACHED: _bindgen_ty_79 = 2;
pub const IFLA_XDP_FLAGS: _bindgen_ty_79 = 3;
pub const IFLA_XDP_PROG_ID: _bindgen_ty_79 = 4;
pub const IFLA_XDP_DRV_PROG_ID: _bindgen_ty_79 = 5;
pub const IFLA_XDP_SKB_PROG_ID: _bindgen_ty_79 = 6;
pub const IFLA_XDP_HW_PROG_ID: _bindgen_ty_79 = 7;
pub const IFLA_XDP_EXPECTED_FD: _bindgen_ty_79 = 8;
pub const __IFLA_XDP_MAX: _bindgen_ty_79 = 9;
pub type _bindgen_ty_79 = ::std::os::raw::c_uint;
pub const IFLA_EVENT_NONE: _bindgen_ty_80 = 0;
pub const IFLA_EVENT_REBOOT: _bindgen_ty_80 = 1;
pub const IFLA_EVENT_FEATURES: _bindgen_ty_80 = 2;
pub const IFLA_EVENT_BONDING_FAILOVER: _bindgen_ty_80 = 3;
pub const IFLA_EVENT_NOTIFY_PEERS: _bindgen_ty_80 = 4;
pub const IFLA_EVENT_IGMP_RESEND: _bindgen_ty_80 = 5;
pub const IFLA_EVENT_BONDING_OPTIONS: _bindgen_ty_80 = 6;
pub type _bindgen_ty_80 = ::std::os::raw::c_uint;
pub const IFLA_TUN_UNSPEC: _bindgen_ty_81 = 0;
pub const IFLA_TUN_OWNER: _bindgen_ty_81 = 1;
pub const IFLA_TUN_GROUP: _bindgen_ty_81 = 2;
pub const IFLA_TUN_TYPE: _bindgen_ty_81 = 3;
pub const IFLA_TUN_PI: _bindgen_ty_81 = 4;
pub const IFLA_TUN_VNET_HDR: _bindgen_ty_81 = 5;
pub const IFLA_TUN_PERSIST: _bindgen_ty_81 = 6;
pub const IFLA_TUN_MULTI_QUEUE: _bindgen_ty_81 = 7;
pub const IFLA_TUN_NUM_QUEUES: _bindgen_ty_81 = 8;
pub const IFLA_TUN_NUM_DISABLED_QUEUES: _bindgen_ty_81 = 9;
pub const __IFLA_TUN_MAX: _bindgen_ty_81 = 10;
pub type _bindgen_ty_81 = ::std::os::raw::c_uint;
pub const IFLA_RMNET_UNSPEC: _bindgen_ty_82 = 0;
pub const IFLA_RMNET_MUX_ID: _bindgen_ty_82 = 1;
pub const IFLA_RMNET_FLAGS: _bindgen_ty_82 = 2;
pub const __IFLA_RMNET_MAX: _bindgen_ty_82 = 3;
pub type _bindgen_ty_82 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ifla_rmnet_flags {
pub flags: __u32,
pub mask: __u32,
}
#[test]
fn bindgen_test_layout_ifla_rmnet_flags() {
const UNINIT: ::std::mem::MaybeUninit<ifla_rmnet_flags> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ifla_rmnet_flags>(),
8usize,
concat!("Size of: ", stringify!(ifla_rmnet_flags))
);
assert_eq!(
::std::mem::align_of::<ifla_rmnet_flags>(),
4usize,
concat!("Alignment of ", stringify!(ifla_rmnet_flags))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ifla_rmnet_flags),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).mask) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(ifla_rmnet_flags),
"::",
stringify!(mask)
)
);
}
pub const IFLA_MCTP_UNSPEC: _bindgen_ty_83 = 0;
pub const IFLA_MCTP_NET: _bindgen_ty_83 = 1;
pub const __IFLA_MCTP_MAX: _bindgen_ty_83 = 2;
pub type _bindgen_ty_83 = ::std::os::raw::c_uint;
pub type __builtin_va_list = [__va_list_tag; 1usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __va_list_tag {
pub gp_offset: ::std::os::raw::c_uint,
pub fp_offset: ::std::os::raw::c_uint,
pub overflow_arg_area: *mut ::std::os::raw::c_void,
pub reg_save_area: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout___va_list_tag() {
const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__va_list_tag>(),
24usize,
concat!("Size of: ", stringify!(__va_list_tag))
);
assert_eq!(
::std::mem::align_of::<__va_list_tag>(),
8usize,
concat!("Alignment of ", stringify!(__va_list_tag))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__va_list_tag),
"::",
stringify!(gp_offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__va_list_tag),
"::",
stringify!(fp_offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__va_list_tag),
"::",
stringify!(overflow_arg_area)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__va_list_tag),
"::",
stringify!(reg_save_area)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __locale_data {
pub _address: u8,
}