From 58f8d07e9ef0c0d5ebf024f05b022d6cb4e6577d Mon Sep 17 00:00:00 2001 From: Federico Maria Morrone Date: Wed, 12 Feb 2025 15:55:53 +0100 Subject: [PATCH] Update kernel version and bindgen Signed-off-by: Federico Maria Morrone --- gen/Cargo.toml | 4 +- gen/src/main.rs | 2 +- src/aarch64/bootparam.rs | 2 +- src/aarch64/btrfs.rs | 26 +- src/aarch64/elf_uapi.rs | 4 +- src/aarch64/errno.rs | 2 +- src/aarch64/general.rs | 162 +++++++++++- src/aarch64/if_arp.rs | 23 +- src/aarch64/if_ether.rs | 2 +- src/aarch64/if_packet.rs | 2 +- src/aarch64/io_uring.rs | 104 +++++++- src/aarch64/ioctl.rs | 2 +- src/aarch64/landlock.rs | 2 +- src/aarch64/loop_device.rs | 2 +- src/aarch64/mempolicy.rs | 2 +- src/aarch64/net.rs | 450 ++++++++++++++++++++++++++++++++- src/aarch64/netlink.rs | 23 +- src/aarch64/prctl.rs | 10 +- src/aarch64/ptrace.rs | 10 +- src/aarch64/system.rs | 2 +- src/aarch64/xdp.rs | 2 +- src/arm/bootparam.rs | 2 +- src/arm/btrfs.rs | 26 +- src/arm/elf_uapi.rs | 4 +- src/arm/errno.rs | 2 +- src/arm/general.rs | 162 +++++++++++- src/arm/if_arp.rs | 23 +- src/arm/if_ether.rs | 2 +- src/arm/if_packet.rs | 2 +- src/arm/io_uring.rs | 104 +++++++- src/arm/ioctl.rs | 2 +- src/arm/landlock.rs | 2 +- src/arm/loop_device.rs | 2 +- src/arm/mempolicy.rs | 2 +- src/arm/net.rs | 450 ++++++++++++++++++++++++++++++++- src/arm/netlink.rs | 23 +- src/arm/prctl.rs | 10 +- src/arm/ptrace.rs | 2 +- src/arm/system.rs | 2 +- src/arm/xdp.rs | 2 +- src/csky/bootparam.rs | 2 +- src/csky/btrfs.rs | 26 +- src/csky/elf_uapi.rs | 4 +- src/csky/errno.rs | 2 +- src/csky/general.rs | 163 +++++++++++- src/csky/if_arp.rs | 23 +- src/csky/if_ether.rs | 2 +- src/csky/if_packet.rs | 2 +- src/csky/io_uring.rs | 104 +++++++- src/csky/ioctl.rs | 2 +- src/csky/landlock.rs | 2 +- src/csky/loop_device.rs | 2 +- src/csky/mempolicy.rs | 2 +- src/csky/net.rs | 450 ++++++++++++++++++++++++++++++++- src/csky/netlink.rs | 23 +- src/csky/prctl.rs | 10 +- src/csky/ptrace.rs | 2 +- src/csky/system.rs | 2 +- src/csky/xdp.rs | 2 +- src/loongarch64/bootparam.rs | 2 +- src/loongarch64/btrfs.rs | 26 +- src/loongarch64/elf_uapi.rs | 4 +- src/loongarch64/errno.rs | 2 +- src/loongarch64/general.rs | 162 +++++++++++- src/loongarch64/if_arp.rs | 23 +- src/loongarch64/if_ether.rs | 2 +- src/loongarch64/if_packet.rs | 2 +- src/loongarch64/io_uring.rs | 104 +++++++- src/loongarch64/ioctl.rs | 2 +- src/loongarch64/landlock.rs | 2 +- src/loongarch64/loop_device.rs | 2 +- src/loongarch64/mempolicy.rs | 2 +- src/loongarch64/net.rs | 450 ++++++++++++++++++++++++++++++++- src/loongarch64/netlink.rs | 23 +- src/loongarch64/prctl.rs | 10 +- src/loongarch64/ptrace.rs | 2 +- src/loongarch64/system.rs | 2 +- src/loongarch64/xdp.rs | 2 +- src/mips/bootparam.rs | 2 +- src/mips/btrfs.rs | 26 +- src/mips/elf_uapi.rs | 4 +- src/mips/errno.rs | 2 +- src/mips/general.rs | 160 +++++++++++- src/mips/if_arp.rs | 23 +- src/mips/if_ether.rs | 2 +- src/mips/if_packet.rs | 2 +- src/mips/io_uring.rs | 104 +++++++- src/mips/ioctl.rs | 2 +- src/mips/landlock.rs | 2 +- src/mips/loop_device.rs | 2 +- src/mips/mempolicy.rs | 2 +- src/mips/net.rs | 450 ++++++++++++++++++++++++++++++++- src/mips/netlink.rs | 23 +- src/mips/prctl.rs | 10 +- src/mips/ptrace.rs | 2 +- src/mips/system.rs | 2 +- src/mips/xdp.rs | 2 +- src/mips32r6/bootparam.rs | 2 +- src/mips32r6/btrfs.rs | 26 +- src/mips32r6/elf_uapi.rs | 4 +- src/mips32r6/errno.rs | 2 +- src/mips32r6/general.rs | 160 +++++++++++- src/mips32r6/if_arp.rs | 23 +- src/mips32r6/if_ether.rs | 2 +- src/mips32r6/if_packet.rs | 2 +- src/mips32r6/io_uring.rs | 104 +++++++- src/mips32r6/ioctl.rs | 2 +- src/mips32r6/landlock.rs | 2 +- src/mips32r6/loop_device.rs | 2 +- src/mips32r6/mempolicy.rs | 2 +- src/mips32r6/net.rs | 450 ++++++++++++++++++++++++++++++++- src/mips32r6/netlink.rs | 23 +- src/mips32r6/prctl.rs | 10 +- src/mips32r6/ptrace.rs | 2 +- src/mips32r6/system.rs | 2 +- src/mips32r6/xdp.rs | 2 +- src/mips64/bootparam.rs | 2 +- src/mips64/btrfs.rs | 26 +- src/mips64/elf_uapi.rs | 4 +- src/mips64/errno.rs | 2 +- src/mips64/general.rs | 160 +++++++++++- src/mips64/if_arp.rs | 23 +- src/mips64/if_ether.rs | 2 +- src/mips64/if_packet.rs | 2 +- src/mips64/io_uring.rs | 104 +++++++- src/mips64/ioctl.rs | 2 +- src/mips64/landlock.rs | 2 +- src/mips64/loop_device.rs | 2 +- src/mips64/mempolicy.rs | 2 +- src/mips64/net.rs | 450 ++++++++++++++++++++++++++++++++- src/mips64/netlink.rs | 23 +- src/mips64/prctl.rs | 10 +- src/mips64/ptrace.rs | 2 +- src/mips64/system.rs | 2 +- src/mips64/xdp.rs | 2 +- src/mips64r6/bootparam.rs | 2 +- src/mips64r6/btrfs.rs | 26 +- src/mips64r6/elf_uapi.rs | 4 +- src/mips64r6/errno.rs | 2 +- src/mips64r6/general.rs | 160 +++++++++++- src/mips64r6/if_arp.rs | 23 +- src/mips64r6/if_ether.rs | 2 +- src/mips64r6/if_packet.rs | 2 +- src/mips64r6/io_uring.rs | 104 +++++++- src/mips64r6/ioctl.rs | 2 +- src/mips64r6/landlock.rs | 2 +- src/mips64r6/loop_device.rs | 2 +- src/mips64r6/mempolicy.rs | 2 +- src/mips64r6/net.rs | 450 ++++++++++++++++++++++++++++++++- src/mips64r6/netlink.rs | 23 +- src/mips64r6/prctl.rs | 10 +- src/mips64r6/ptrace.rs | 2 +- src/mips64r6/system.rs | 2 +- src/mips64r6/xdp.rs | 2 +- src/powerpc/bootparam.rs | 2 +- src/powerpc/btrfs.rs | 26 +- src/powerpc/elf_uapi.rs | 4 +- src/powerpc/errno.rs | 2 +- src/powerpc/general.rs | 160 +++++++++++- src/powerpc/if_arp.rs | 23 +- src/powerpc/if_ether.rs | 2 +- src/powerpc/if_packet.rs | 2 +- src/powerpc/io_uring.rs | 104 +++++++- src/powerpc/ioctl.rs | 2 +- src/powerpc/landlock.rs | 2 +- src/powerpc/loop_device.rs | 2 +- src/powerpc/mempolicy.rs | 2 +- src/powerpc/net.rs | 450 ++++++++++++++++++++++++++++++++- src/powerpc/netlink.rs | 23 +- src/powerpc/prctl.rs | 10 +- src/powerpc/ptrace.rs | 2 +- src/powerpc/system.rs | 2 +- src/powerpc/xdp.rs | 2 +- src/powerpc64/bootparam.rs | 2 +- src/powerpc64/btrfs.rs | 26 +- src/powerpc64/elf_uapi.rs | 4 +- src/powerpc64/errno.rs | 2 +- src/powerpc64/general.rs | 160 +++++++++++- src/powerpc64/if_arp.rs | 23 +- src/powerpc64/if_ether.rs | 2 +- src/powerpc64/if_packet.rs | 2 +- src/powerpc64/io_uring.rs | 104 +++++++- src/powerpc64/ioctl.rs | 2 +- src/powerpc64/landlock.rs | 2 +- src/powerpc64/loop_device.rs | 2 +- src/powerpc64/mempolicy.rs | 2 +- src/powerpc64/net.rs | 450 ++++++++++++++++++++++++++++++++- src/powerpc64/netlink.rs | 23 +- src/powerpc64/prctl.rs | 10 +- src/powerpc64/ptrace.rs | 2 +- src/powerpc64/system.rs | 2 +- src/powerpc64/xdp.rs | 2 +- src/riscv32/bootparam.rs | 2 +- src/riscv32/btrfs.rs | 26 +- src/riscv32/elf_uapi.rs | 4 +- src/riscv32/errno.rs | 2 +- src/riscv32/general.rs | 162 +++++++++++- src/riscv32/if_arp.rs | 23 +- src/riscv32/if_ether.rs | 2 +- src/riscv32/if_packet.rs | 2 +- src/riscv32/io_uring.rs | 104 +++++++- src/riscv32/ioctl.rs | 2 +- src/riscv32/landlock.rs | 2 +- src/riscv32/loop_device.rs | 2 +- src/riscv32/mempolicy.rs | 2 +- src/riscv32/net.rs | 450 ++++++++++++++++++++++++++++++++- src/riscv32/netlink.rs | 23 +- src/riscv32/prctl.rs | 10 +- src/riscv32/ptrace.rs | 2 +- src/riscv32/system.rs | 2 +- src/riscv32/xdp.rs | 2 +- src/riscv64/bootparam.rs | 2 +- src/riscv64/btrfs.rs | 26 +- src/riscv64/elf_uapi.rs | 4 +- src/riscv64/errno.rs | 2 +- src/riscv64/general.rs | 162 +++++++++++- src/riscv64/if_arp.rs | 23 +- src/riscv64/if_ether.rs | 2 +- src/riscv64/if_packet.rs | 2 +- src/riscv64/io_uring.rs | 104 +++++++- src/riscv64/ioctl.rs | 2 +- src/riscv64/landlock.rs | 2 +- src/riscv64/loop_device.rs | 2 +- src/riscv64/mempolicy.rs | 2 +- src/riscv64/net.rs | 450 ++++++++++++++++++++++++++++++++- src/riscv64/netlink.rs | 23 +- src/riscv64/prctl.rs | 10 +- src/riscv64/ptrace.rs | 2 +- src/riscv64/system.rs | 2 +- src/riscv64/xdp.rs | 2 +- src/s390x/bootparam.rs | 2 +- src/s390x/btrfs.rs | 26 +- src/s390x/elf_uapi.rs | 4 +- src/s390x/errno.rs | 2 +- src/s390x/general.rs | 162 +++++++++++- src/s390x/if_arp.rs | 23 +- src/s390x/if_ether.rs | 2 +- src/s390x/if_packet.rs | 2 +- src/s390x/io_uring.rs | 104 +++++++- src/s390x/ioctl.rs | 2 +- src/s390x/landlock.rs | 2 +- src/s390x/loop_device.rs | 2 +- src/s390x/mempolicy.rs | 2 +- src/s390x/net.rs | 450 ++++++++++++++++++++++++++++++++- src/s390x/netlink.rs | 23 +- src/s390x/prctl.rs | 10 +- src/s390x/ptrace.rs | 306 +++++++++++++++++++++- src/s390x/system.rs | 2 +- src/s390x/xdp.rs | 2 +- src/sparc/bootparam.rs | 2 +- src/sparc/btrfs.rs | 26 +- src/sparc/elf_uapi.rs | 4 +- src/sparc/errno.rs | 2 +- src/sparc/general.rs | 160 +++++++++++- src/sparc/if_arp.rs | 23 +- src/sparc/if_ether.rs | 2 +- src/sparc/if_packet.rs | 2 +- src/sparc/io_uring.rs | 104 +++++++- src/sparc/ioctl.rs | 2 +- src/sparc/landlock.rs | 2 +- src/sparc/loop_device.rs | 2 +- src/sparc/mempolicy.rs | 2 +- src/sparc/net.rs | 450 ++++++++++++++++++++++++++++++++- src/sparc/netlink.rs | 23 +- src/sparc/prctl.rs | 10 +- src/sparc/ptrace.rs | 2 +- src/sparc/system.rs | 2 +- src/sparc/xdp.rs | 2 +- src/sparc64/bootparam.rs | 2 +- src/sparc64/btrfs.rs | 26 +- src/sparc64/elf_uapi.rs | 4 +- src/sparc64/errno.rs | 2 +- src/sparc64/general.rs | 160 +++++++++++- src/sparc64/if_arp.rs | 23 +- src/sparc64/if_ether.rs | 2 +- src/sparc64/if_packet.rs | 2 +- src/sparc64/io_uring.rs | 104 +++++++- src/sparc64/ioctl.rs | 2 +- src/sparc64/landlock.rs | 2 +- src/sparc64/loop_device.rs | 2 +- src/sparc64/mempolicy.rs | 2 +- src/sparc64/net.rs | 450 ++++++++++++++++++++++++++++++++- src/sparc64/netlink.rs | 23 +- src/sparc64/prctl.rs | 10 +- src/sparc64/ptrace.rs | 2 +- src/sparc64/system.rs | 2 +- src/sparc64/xdp.rs | 2 +- src/x32/bootparam.rs | 2 +- src/x32/btrfs.rs | 26 +- src/x32/elf_uapi.rs | 4 +- src/x32/errno.rs | 2 +- src/x32/general.rs | 174 ++++++++++++- src/x32/if_arp.rs | 23 +- src/x32/if_ether.rs | 2 +- src/x32/if_packet.rs | 2 +- src/x32/io_uring.rs | 104 +++++++- src/x32/ioctl.rs | 2 +- src/x32/landlock.rs | 2 +- src/x32/loop_device.rs | 2 +- src/x32/mempolicy.rs | 2 +- src/x32/net.rs | 450 ++++++++++++++++++++++++++++++++- src/x32/netlink.rs | 23 +- src/x32/prctl.rs | 10 +- src/x32/ptrace.rs | 2 +- src/x32/system.rs | 2 +- src/x32/xdp.rs | 2 +- src/x86/bootparam.rs | 2 +- src/x86/btrfs.rs | 26 +- src/x86/elf_uapi.rs | 4 +- src/x86/errno.rs | 2 +- src/x86/general.rs | 164 +++++++++++- src/x86/if_arp.rs | 23 +- src/x86/if_ether.rs | 2 +- src/x86/if_packet.rs | 2 +- src/x86/io_uring.rs | 104 +++++++- src/x86/ioctl.rs | 2 +- src/x86/landlock.rs | 2 +- src/x86/loop_device.rs | 2 +- src/x86/mempolicy.rs | 2 +- src/x86/net.rs | 450 ++++++++++++++++++++++++++++++++- src/x86/netlink.rs | 23 +- src/x86/prctl.rs | 10 +- src/x86/ptrace.rs | 2 +- src/x86/system.rs | 2 +- src/x86/xdp.rs | 2 +- src/x86_64/bootparam.rs | 2 +- src/x86_64/btrfs.rs | 26 +- src/x86_64/elf_uapi.rs | 4 +- src/x86_64/errno.rs | 2 +- src/x86_64/general.rs | 174 ++++++++++++- src/x86_64/if_arp.rs | 23 +- src/x86_64/if_ether.rs | 2 +- src/x86_64/if_packet.rs | 2 +- src/x86_64/io_uring.rs | 104 +++++++- src/x86_64/ioctl.rs | 2 +- src/x86_64/landlock.rs | 2 +- src/x86_64/loop_device.rs | 2 +- src/x86_64/mempolicy.rs | 2 +- src/x86_64/net.rs | 450 ++++++++++++++++++++++++++++++++- src/x86_64/netlink.rs | 23 +- src/x86_64/prctl.rs | 10 +- src/x86_64/ptrace.rs | 2 +- src/x86_64/system.rs | 2 +- src/x86_64/xdp.rs | 2 +- 344 files changed, 14266 insertions(+), 895 deletions(-) diff --git a/gen/Cargo.toml b/gen/Cargo.toml index 64abadbc..fa98787f 100644 --- a/gen/Cargo.toml +++ b/gen/Cargo.toml @@ -5,5 +5,5 @@ edition = "2021" publish = false [dependencies] -bindgen = { version = "0.70.1", default-features = false } -tempfile = "3.12.0" +bindgen = { version = "0.71.1", default-features = false } +tempfile = "3.16.0" diff --git a/gen/src/main.rs b/gen/src/main.rs index 4d388f86..e8070241 100644 --- a/gen/src/main.rs +++ b/gen/src/main.rs @@ -10,7 +10,7 @@ use std::process::Command; use std::{env, fs}; #[allow(unused_doc_comments)] -const LINUX_VERSION: &str = "v6.12"; +const LINUX_VERSION: &str = "v6.13"; /// Some commonly used features. const DEFAULT_FEATURES: &str = "\"general\", \"errno\""; diff --git a/src/aarch64/bootparam.rs b/src/aarch64/bootparam.rs index 4f4f6fab..609ea889 100644 --- a/src/aarch64/bootparam.rs +++ b/src/aarch64/bootparam.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/aarch64/btrfs.rs b/src/aarch64/btrfs.rs index b2bff075..7c0ee937 100644 --- a/src/aarch64/btrfs.rs +++ b/src/aarch64/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -157,7 +157,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -709,6 +715,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1326,6 +1339,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1528,6 +1545,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/aarch64/elf_uapi.rs b/src/aarch64/elf_uapi.rs index 2873c3c2..bc3262c6 100644 --- a/src/aarch64/elf_uapi.rs +++ b/src/aarch64/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -491,6 +491,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -498,6 +499,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/aarch64/errno.rs b/src/aarch64/errno.rs index b7766e1c..5b018a26 100644 --- a/src/aarch64/errno.rs +++ b/src/aarch64/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/aarch64/general.rs b/src/aarch64/general.rs index 85c6e023..085c857a 100644 --- a/src/aarch64/general.rs +++ b/src/aarch64/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -271,7 +271,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -803,6 +809,13 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1013,9 +1026,9 @@ pub sa_flags: crate::ctypes::c_ulong, pub sa_restorer: __sigrestore_t, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_SYSINFO_EHDR: u32 = 33; pub const AT_MINSIGSTKSZ: u32 = 51; @@ -1229,6 +1242,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 524288; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1405,6 +1419,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1704,6 +1722,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -1716,6 +1736,8 @@ pub const MAP_NORESERVE: u32 = 16384; pub const MCL_CURRENT: u32 = 1; pub const MCL_FUTURE: u32 = 2; pub const MCL_ONFAULT: u32 = 4; +pub const SHADOW_STACK_SET_TOKEN: u32 = 1; +pub const SHADOW_STACK_SET_MARKER: u32 = 2; pub const PROT_BTI: u32 = 16; pub const PROT_MTE: u32 = 32; pub const PKEY_DISABLE_EXECUTE: u32 = 4; @@ -2574,6 +2596,10 @@ pub const __NR_lsm_get_self_attr: u32 = 459; pub const __NR_lsm_set_self_attr: u32 = 460; pub const __NR_lsm_list_modules: u32 = 461; pub const __NR_mseal: u32 = 462; +pub const __NR_setxattrat: u32 = 463; +pub const __NR_getxattrat: u32 = 464; +pub const __NR_listxattrat: u32 = 465; +pub const __NR_removexattrat: u32 = 466; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WSTOPPED: u32 = 2; @@ -2870,26 +2896,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2906,6 +2954,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2917,6 +2979,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2961,6 +3035,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -2972,6 +3057,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2983,6 +3079,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2994,6 +3101,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3005,6 +3123,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3016,6 +3145,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/aarch64/if_arp.rs b/src/aarch64/if_arp.rs index 36b3e3d6..f214bb12 100644 --- a/src/aarch64/if_arp.rs +++ b/src/aarch64/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1109,6 +1109,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1294,6 +1295,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1584,6 +1587,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -1790,7 +1794,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2118,6 +2123,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2125,7 +2137,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2623,7 +2637,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/aarch64/if_ether.rs b/src/aarch64/if_ether.rs index c2838e19..c4510559 100644 --- a/src/aarch64/if_ether.rs +++ b/src/aarch64/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/aarch64/if_packet.rs b/src/aarch64/if_packet.rs index 6b90f54d..45937547 100644 --- a/src/aarch64/if_packet.rs +++ b/src/aarch64/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/aarch64/io_uring.rs b/src/aarch64/io_uring.rs index 842952f4..e4844b6d 100644 --- a/src/aarch64/io_uring.rs +++ b/src/aarch64/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -159,7 +159,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -423,6 +429,23 @@ pub fds: __u64, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { pub nr: __u32, pub flags: __u32, @@ -483,7 +506,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -541,8 +567,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -735,6 +774,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -837,6 +880,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -873,6 +917,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -895,6 +942,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -914,7 +962,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1058,7 +1110,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1072,7 +1127,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1084,6 +1152,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1094,6 +1178,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/aarch64/ioctl.rs b/src/aarch64/ioctl.rs index 2c9a4cb6..69ddad36 100644 --- a/src/aarch64/ioctl.rs +++ b/src/aarch64/ioctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const FIONREAD: u32 = 21531; pub const FIONBIO: u32 = 21537; diff --git a/src/aarch64/landlock.rs b/src/aarch64/landlock.rs index 0dbe7d3b..12360208 100644 --- a/src/aarch64/landlock.rs +++ b/src/aarch64/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/aarch64/loop_device.rs b/src/aarch64/loop_device.rs index 69b9f239..e15f2e80 100644 --- a/src/aarch64/loop_device.rs +++ b/src/aarch64/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_old_uid_t = crate::ctypes::c_ushort; pub type __kernel_old_gid_t = crate::ctypes::c_ushort; diff --git a/src/aarch64/mempolicy.rs b/src/aarch64/mempolicy.rs index a24915cc..ad4957c5 100644 --- a/src/aarch64/mempolicy.rs +++ b/src/aarch64/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/aarch64/net.rs b/src/aarch64/net.rs index f1edee3a..cae9df63 100644 --- a/src/aarch64/net.rs +++ b/src/aarch64/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1200,6 +1200,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 78; pub const SO_DEVMEM_DMABUF: u32 = 79; pub const SCM_DEVMEM_DMABUF: u32 = 79; pub const SO_DEVMEM_DONTNEED: u32 = 80; +pub const SCM_TS_OPT_ID: u32 = 81; pub const SO_TIMESTAMP: u32 = 29; pub const SO_TIMESTAMPNS: u32 = 35; pub const SO_TIMESTAMPING: u32 = 37; @@ -2163,26 +2164,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2199,6 +2222,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2210,6 +2247,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2292,6 +2341,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2303,6 +2363,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(ihl: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2329,6 +2400,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2340,6 +2422,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(priority: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2366,6 +2459,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn doff(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2377,6 +2481,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2388,6 +2503,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2399,6 +2525,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2410,6 +2547,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2421,6 +2569,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2432,6 +2591,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2443,6 +2613,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2454,6 +2635,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2465,6 +2657,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(res1: __u16, doff: __u16, fin: __u16, syn: __u16, rst: __u16, psh: __u16, ack: __u16, urg: __u16, ece: __u16, cwr: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2523,6 +2726,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2534,6 +2748,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2545,6 +2770,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2556,6 +2792,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2590,6 +2837,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2601,6 +2859,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2612,6 +2881,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2642,6 +2922,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2653,6 +2944,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2664,6 +2966,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2675,6 +2988,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2709,6 +3033,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2720,6 +3055,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2731,6 +3077,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2742,6 +3099,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2753,6 +3121,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2764,6 +3143,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2806,6 +3196,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2817,6 +3218,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2828,6 +3240,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -2839,6 +3262,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/aarch64/netlink.rs b/src/aarch64/netlink.rs index b02523f7..6abe0a49 100644 --- a/src/aarch64/netlink.rs +++ b/src/aarch64/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -824,6 +824,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1009,6 +1010,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1299,6 +1302,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1653,7 +1657,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1981,6 +1986,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1988,7 +2000,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2486,7 +2500,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/aarch64/prctl.rs b/src/aarch64/prctl.rs index 03490849..31fc2428 100644 --- a/src/aarch64/prctl.rs +++ b/src/aarch64/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -194,6 +194,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -252,3 +254,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/aarch64/ptrace.rs b/src/aarch64/ptrace.rs index a032965f..aaf6080b 100644 --- a/src/aarch64/ptrace.rs +++ b/src/aarch64/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -243,6 +243,13 @@ pub __reserved: __u16, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct user_gcs { +pub features_enabled: __u64, +pub features_locked: __u64, +pub gcspr_el0: __u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct seccomp_data { pub nr: crate::ctypes::c_int, pub arch: __u32, @@ -788,6 +795,7 @@ pub const HWCAP_SSBS: u32 = 268435456; pub const HWCAP_SB: u32 = 536870912; pub const HWCAP_PACA: u32 = 1073741824; pub const HWCAP_PACG: u32 = 2147483648; +pub const HWCAP_GCS: u64 = 4294967296; pub const HWCAP2_DCPODP: u32 = 1; pub const HWCAP2_SVE2: u32 = 2; pub const HWCAP2_SVEAES: u32 = 4; diff --git a/src/aarch64/system.rs b/src/aarch64/system.rs index fdf35631..454f7e61 100644 --- a/src/aarch64/system.rs +++ b/src/aarch64/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/aarch64/xdp.rs b/src/aarch64/xdp.rs index 4112483e..90b1c362 100644 --- a/src/aarch64/xdp.rs +++ b/src/aarch64/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/arm/bootparam.rs b/src/arm/bootparam.rs index 4f4f6fab..609ea889 100644 --- a/src/arm/bootparam.rs +++ b/src/arm/bootparam.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/arm/btrfs.rs b/src/arm/btrfs.rs index bae9836f..60a5d057 100644 --- a/src/arm/btrfs.rs +++ b/src/arm/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -155,7 +155,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -707,6 +713,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1324,6 +1337,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1526,6 +1543,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/arm/elf_uapi.rs b/src/arm/elf_uapi.rs index 291b86b1..187f123d 100644 --- a/src/arm/elf_uapi.rs +++ b/src/arm/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -489,6 +489,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -496,6 +497,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/arm/errno.rs b/src/arm/errno.rs index b7766e1c..5b018a26 100644 --- a/src/arm/errno.rs +++ b/src/arm/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/arm/general.rs b/src/arm/general.rs index f60f2455..fef9c970 100644 --- a/src/arm/general.rs +++ b/src/arm/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -269,7 +269,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -796,6 +802,13 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1042,9 +1055,9 @@ pub sa_flags: crate::ctypes::c_ulong, pub sa_restorer: __sigrestore_t, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_SYSINFO_EHDR: u32 = 33; pub const AT_NULL: u32 = 0; @@ -1260,6 +1273,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 524288; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1436,6 +1450,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1735,6 +1753,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -1747,6 +1767,8 @@ pub const MAP_NORESERVE: u32 = 16384; pub const MCL_CURRENT: u32 = 1; pub const MCL_FUTURE: u32 = 2; pub const MCL_ONFAULT: u32 = 4; +pub const SHADOW_STACK_SET_TOKEN: u32 = 1; +pub const SHADOW_STACK_SET_MARKER: u32 = 2; pub const HUGETLB_FLAG_ENCODE_SHIFT: u32 = 26; pub const HUGETLB_FLAG_ENCODE_MASK: u32 = 63; pub const HUGETLB_FLAG_ENCODE_16KB: u32 = 939524096; @@ -2700,6 +2722,10 @@ pub const __NR_lsm_get_self_attr: u32 = 459; pub const __NR_lsm_set_self_attr: u32 = 460; pub const __NR_lsm_list_modules: u32 = 461; pub const __NR_mseal: u32 = 462; +pub const __NR_setxattrat: u32 = 463; +pub const __NR_getxattrat: u32 = 464; +pub const __NR_listxattrat: u32 = 465; +pub const __NR_removexattrat: u32 = 466; pub const __NR_sync_file_range2: u32 = 341; pub const __ARM_NR_BASE: u32 = 983040; pub const __ARM_NR_breakpoint: u32 = 983041; @@ -3011,26 +3037,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -3047,6 +3095,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -3058,6 +3120,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -3102,6 +3176,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -3113,6 +3198,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -3124,6 +3220,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -3135,6 +3242,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3146,6 +3264,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3157,6 +3286,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/arm/if_arp.rs b/src/arm/if_arp.rs index b3de2df6..19895deb 100644 --- a/src/arm/if_arp.rs +++ b/src/arm/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1107,6 +1107,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1292,6 +1293,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1582,6 +1585,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -1788,7 +1792,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2116,6 +2121,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2123,7 +2135,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2621,7 +2635,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/arm/if_ether.rs b/src/arm/if_ether.rs index b17170ca..d337ab84 100644 --- a/src/arm/if_ether.rs +++ b/src/arm/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/arm/if_packet.rs b/src/arm/if_packet.rs index b6c1112d..29495eef 100644 --- a/src/arm/if_packet.rs +++ b/src/arm/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/arm/io_uring.rs b/src/arm/io_uring.rs index 1da8cfb4..bb2b74b6 100644 --- a/src/arm/io_uring.rs +++ b/src/arm/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -157,7 +157,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -421,6 +427,23 @@ pub fds: __u64, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { pub nr: __u32, pub flags: __u32, @@ -481,7 +504,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -539,8 +565,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -733,6 +772,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -835,6 +878,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -871,6 +915,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -893,6 +940,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -912,7 +960,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1056,7 +1108,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1070,7 +1125,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1082,6 +1150,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1092,6 +1176,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/arm/ioctl.rs b/src/arm/ioctl.rs index ebefd6ec..b90f7c24 100644 --- a/src/arm/ioctl.rs +++ b/src/arm/ioctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const FIONREAD: u32 = 21531; pub const FIONBIO: u32 = 21537; diff --git a/src/arm/landlock.rs b/src/arm/landlock.rs index bd7fed57..422350cd 100644 --- a/src/arm/landlock.rs +++ b/src/arm/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/arm/loop_device.rs b/src/arm/loop_device.rs index 15368a84..4178e49e 100644 --- a/src/arm/loop_device.rs +++ b/src/arm/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_mode_t = crate::ctypes::c_ushort; pub type __kernel_ipc_pid_t = crate::ctypes::c_ushort; diff --git a/src/arm/mempolicy.rs b/src/arm/mempolicy.rs index a24915cc..ad4957c5 100644 --- a/src/arm/mempolicy.rs +++ b/src/arm/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/arm/net.rs b/src/arm/net.rs index 82048866..8b42b910 100644 --- a/src/arm/net.rs +++ b/src/arm/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1200,6 +1200,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 78; pub const SO_DEVMEM_DMABUF: u32 = 79; pub const SCM_DEVMEM_DMABUF: u32 = 79; pub const SO_DEVMEM_DONTNEED: u32 = 80; +pub const SCM_TS_OPT_ID: u32 = 81; pub const SYS_SOCKET: u32 = 1; pub const SYS_BIND: u32 = 2; pub const SYS_CONNECT: u32 = 3; @@ -2155,26 +2156,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2191,6 +2214,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2202,6 +2239,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2284,6 +2333,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2295,6 +2355,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(ihl: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2321,6 +2392,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2332,6 +2414,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(priority: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2358,6 +2451,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn doff(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2369,6 +2473,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2380,6 +2495,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2391,6 +2517,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2402,6 +2539,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2413,6 +2561,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2424,6 +2583,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2435,6 +2605,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2446,6 +2627,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2457,6 +2649,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(res1: __u16, doff: __u16, fin: __u16, syn: __u16, rst: __u16, psh: __u16, ack: __u16, urg: __u16, ece: __u16, cwr: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2515,6 +2718,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2526,6 +2740,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2537,6 +2762,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2548,6 +2784,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2582,6 +2829,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2593,6 +2851,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2604,6 +2873,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2634,6 +2914,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2645,6 +2936,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2656,6 +2958,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2667,6 +2980,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2701,6 +3025,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2712,6 +3047,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2723,6 +3069,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2734,6 +3091,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2745,6 +3113,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2756,6 +3135,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2798,6 +3188,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2809,6 +3210,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2820,6 +3232,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -2831,6 +3254,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/arm/netlink.rs b/src/arm/netlink.rs index d50632d6..08aeeaaf 100644 --- a/src/arm/netlink.rs +++ b/src/arm/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -822,6 +822,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1007,6 +1008,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1297,6 +1300,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1651,7 +1655,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1979,6 +1984,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1986,7 +1998,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2484,7 +2498,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/arm/prctl.rs b/src/arm/prctl.rs index 6cb3e050..fc0bf893 100644 --- a/src/arm/prctl.rs +++ b/src/arm/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -192,6 +192,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -250,3 +252,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/arm/ptrace.rs b/src/arm/ptrace.rs index 68b6618d..0860d6e5 100644 --- a/src/arm/ptrace.rs +++ b/src/arm/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/arm/system.rs b/src/arm/system.rs index 744cab75..e1f9f194 100644 --- a/src/arm/system.rs +++ b/src/arm/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/arm/xdp.rs b/src/arm/xdp.rs index 250f0eef..875b5f91 100644 --- a/src/arm/xdp.rs +++ b/src/arm/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/csky/bootparam.rs b/src/csky/bootparam.rs index 4f4f6fab..609ea889 100644 --- a/src/csky/bootparam.rs +++ b/src/csky/bootparam.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/csky/btrfs.rs b/src/csky/btrfs.rs index 0a402bbf..2e88fe21 100644 --- a/src/csky/btrfs.rs +++ b/src/csky/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -155,7 +155,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -707,6 +713,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1324,6 +1337,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1526,6 +1543,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/csky/elf_uapi.rs b/src/csky/elf_uapi.rs index 08932345..713e9d22 100644 --- a/src/csky/elf_uapi.rs +++ b/src/csky/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -489,6 +489,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -496,6 +497,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/csky/errno.rs b/src/csky/errno.rs index b7766e1c..5b018a26 100644 --- a/src/csky/errno.rs +++ b/src/csky/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/csky/general.rs b/src/csky/general.rs index 121d8706..c5734508 100644 --- a/src/csky/general.rs +++ b/src/csky/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -269,7 +269,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -801,6 +807,14 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[repr(align(8))] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1034,9 +1048,9 @@ pub sa_handler_kernel: __kernel_sighandler_t, pub sa_flags: crate::ctypes::c_ulong, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_NULL: u32 = 0; pub const AT_IGNORE: u32 = 1; @@ -1251,6 +1265,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 524288; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1427,6 +1442,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1726,6 +1745,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -1738,6 +1759,8 @@ pub const MAP_NORESERVE: u32 = 16384; pub const MCL_CURRENT: u32 = 1; pub const MCL_FUTURE: u32 = 2; pub const MCL_ONFAULT: u32 = 4; +pub const SHADOW_STACK_SET_TOKEN: u32 = 1; +pub const SHADOW_STACK_SET_MARKER: u32 = 2; pub const HUGETLB_FLAG_ENCODE_SHIFT: u32 = 26; pub const HUGETLB_FLAG_ENCODE_MASK: u32 = 63; pub const HUGETLB_FLAG_ENCODE_16KB: u32 = 939524096; @@ -2609,6 +2632,10 @@ pub const __NR_lsm_get_self_attr: u32 = 459; pub const __NR_lsm_set_self_attr: u32 = 460; pub const __NR_lsm_list_modules: u32 = 461; pub const __NR_mseal: u32 = 462; +pub const __NR_setxattrat: u32 = 463; +pub const __NR_getxattrat: u32 = 464; +pub const __NR_listxattrat: u32 = 465; +pub const __NR_removexattrat: u32 = 466; pub const __NR_sync_file_range2: u32 = 84; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; @@ -2906,26 +2933,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2942,6 +2991,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2953,6 +3016,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2997,6 +3072,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -3008,6 +3094,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -3019,6 +3116,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -3030,6 +3138,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3041,6 +3160,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3052,6 +3182,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/csky/if_arp.rs b/src/csky/if_arp.rs index 6db3a04e..e04c2175 100644 --- a/src/csky/if_arp.rs +++ b/src/csky/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1109,6 +1109,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1294,6 +1295,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1584,6 +1587,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -1790,7 +1794,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2118,6 +2123,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2125,7 +2137,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2623,7 +2637,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/csky/if_ether.rs b/src/csky/if_ether.rs index 80635f17..877dce71 100644 --- a/src/csky/if_ether.rs +++ b/src/csky/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/csky/if_packet.rs b/src/csky/if_packet.rs index 11a422fc..a201d9b6 100644 --- a/src/csky/if_packet.rs +++ b/src/csky/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/csky/io_uring.rs b/src/csky/io_uring.rs index 9abb6125..241e6556 100644 --- a/src/csky/io_uring.rs +++ b/src/csky/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -157,7 +157,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -421,6 +427,23 @@ pub resv: __u32, pub fds: __u64, } #[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] #[repr(align(8))] #[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { @@ -485,7 +508,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -543,8 +569,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -737,6 +776,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -839,6 +882,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -875,6 +919,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -897,6 +944,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -916,7 +964,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1060,7 +1112,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1074,7 +1129,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1086,6 +1154,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1096,6 +1180,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/csky/ioctl.rs b/src/csky/ioctl.rs index c2971e30..5887ebf7 100644 --- a/src/csky/ioctl.rs +++ b/src/csky/ioctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const FIONREAD: u32 = 21531; pub const FIONBIO: u32 = 21537; diff --git a/src/csky/landlock.rs b/src/csky/landlock.rs index 39df5113..4200c773 100644 --- a/src/csky/landlock.rs +++ b/src/csky/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/csky/loop_device.rs b/src/csky/loop_device.rs index 3f308094..65db5352 100644 --- a/src/csky/loop_device.rs +++ b/src/csky/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_long_t = crate::ctypes::c_long; pub type __kernel_ulong_t = crate::ctypes::c_ulong; diff --git a/src/csky/mempolicy.rs b/src/csky/mempolicy.rs index a24915cc..ad4957c5 100644 --- a/src/csky/mempolicy.rs +++ b/src/csky/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/csky/net.rs b/src/csky/net.rs index 9975da6a..4d2d9348 100644 --- a/src/csky/net.rs +++ b/src/csky/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1202,6 +1202,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 78; pub const SO_DEVMEM_DMABUF: u32 = 79; pub const SCM_DEVMEM_DMABUF: u32 = 79; pub const SO_DEVMEM_DONTNEED: u32 = 80; +pub const SCM_TS_OPT_ID: u32 = 81; pub const SYS_SOCKET: u32 = 1; pub const SYS_BIND: u32 = 2; pub const SYS_CONNECT: u32 = 3; @@ -2157,26 +2158,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2193,6 +2216,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2204,6 +2241,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2286,6 +2335,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2297,6 +2357,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(ihl: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2323,6 +2394,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2334,6 +2416,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(priority: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2360,6 +2453,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn doff(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2371,6 +2475,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2382,6 +2497,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2393,6 +2519,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2404,6 +2541,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2415,6 +2563,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2426,6 +2585,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2437,6 +2607,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2448,6 +2629,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2459,6 +2651,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(res1: __u16, doff: __u16, fin: __u16, syn: __u16, rst: __u16, psh: __u16, ack: __u16, urg: __u16, ece: __u16, cwr: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2517,6 +2720,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2528,6 +2742,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2539,6 +2764,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2550,6 +2786,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2584,6 +2831,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2595,6 +2853,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2606,6 +2875,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2636,6 +2916,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2647,6 +2938,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2658,6 +2960,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2669,6 +2982,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2703,6 +3027,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2714,6 +3049,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2725,6 +3071,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2736,6 +3093,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2747,6 +3115,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2758,6 +3137,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2800,6 +3190,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2811,6 +3212,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2822,6 +3234,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -2833,6 +3256,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/csky/netlink.rs b/src/csky/netlink.rs index 54c2bd2c..3ef9b03a 100644 --- a/src/csky/netlink.rs +++ b/src/csky/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -822,6 +822,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1007,6 +1008,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1297,6 +1300,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1651,7 +1655,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1979,6 +1984,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1986,7 +1998,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2484,7 +2498,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/csky/prctl.rs b/src/csky/prctl.rs index bc2ae74d..338cbf9f 100644 --- a/src/csky/prctl.rs +++ b/src/csky/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -192,6 +192,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -250,3 +252,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/csky/ptrace.rs b/src/csky/ptrace.rs index a3a2bfac..7c196b5c 100644 --- a/src/csky/ptrace.rs +++ b/src/csky/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/csky/system.rs b/src/csky/system.rs index 8ea2b8f6..62eb2547 100644 --- a/src/csky/system.rs +++ b/src/csky/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/csky/xdp.rs b/src/csky/xdp.rs index 9c1bfbef..d161d5fd 100644 --- a/src/csky/xdp.rs +++ b/src/csky/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/loongarch64/bootparam.rs b/src/loongarch64/bootparam.rs index 4f4f6fab..609ea889 100644 --- a/src/loongarch64/bootparam.rs +++ b/src/loongarch64/bootparam.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/loongarch64/btrfs.rs b/src/loongarch64/btrfs.rs index 5332ee54..941a4a21 100644 --- a/src/loongarch64/btrfs.rs +++ b/src/loongarch64/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -157,7 +157,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -709,6 +715,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1326,6 +1339,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1528,6 +1545,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/loongarch64/elf_uapi.rs b/src/loongarch64/elf_uapi.rs index 2e5517d6..d1e4a9fe 100644 --- a/src/loongarch64/elf_uapi.rs +++ b/src/loongarch64/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -491,6 +491,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -498,6 +499,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/loongarch64/errno.rs b/src/loongarch64/errno.rs index b7766e1c..5b018a26 100644 --- a/src/loongarch64/errno.rs +++ b/src/loongarch64/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/loongarch64/general.rs b/src/loongarch64/general.rs index 96188f5e..837e26f4 100644 --- a/src/loongarch64/general.rs +++ b/src/loongarch64/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -271,7 +271,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -802,6 +808,13 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1011,9 +1024,9 @@ pub sa_handler_kernel: __kernel_sighandler_t, pub sa_flags: crate::ctypes::c_ulong, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_SYSINFO_EHDR: u32 = 33; pub const AT_VECTOR_SIZE_ARCH: u32 = 1; @@ -1227,6 +1240,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 524288; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1403,6 +1417,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1702,6 +1720,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -1714,6 +1734,8 @@ pub const MAP_NORESERVE: u32 = 16384; pub const MCL_CURRENT: u32 = 1; pub const MCL_FUTURE: u32 = 2; pub const MCL_ONFAULT: u32 = 4; +pub const SHADOW_STACK_SET_TOKEN: u32 = 1; +pub const SHADOW_STACK_SET_MARKER: u32 = 2; pub const HUGETLB_FLAG_ENCODE_SHIFT: u32 = 26; pub const HUGETLB_FLAG_ENCODE_MASK: u32 = 63; pub const HUGETLB_FLAG_ENCODE_16KB: u32 = 939524096; @@ -2561,6 +2583,10 @@ pub const __NR_lsm_get_self_attr: u32 = 459; pub const __NR_lsm_set_self_attr: u32 = 460; pub const __NR_lsm_list_modules: u32 = 461; pub const __NR_mseal: u32 = 462; +pub const __NR_setxattrat: u32 = 463; +pub const __NR_getxattrat: u32 = 464; +pub const __NR_listxattrat: u32 = 465; +pub const __NR_removexattrat: u32 = 466; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WSTOPPED: u32 = 2; @@ -2857,26 +2883,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2893,6 +2941,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2904,6 +2966,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2948,6 +3022,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -2959,6 +3044,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2970,6 +3066,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2981,6 +3088,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -2992,6 +3110,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3003,6 +3132,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/loongarch64/if_arp.rs b/src/loongarch64/if_arp.rs index 9dbf9b47..fcb2f485 100644 --- a/src/loongarch64/if_arp.rs +++ b/src/loongarch64/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1109,6 +1109,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1294,6 +1295,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1584,6 +1587,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -1790,7 +1794,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2118,6 +2123,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2125,7 +2137,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2623,7 +2637,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/loongarch64/if_ether.rs b/src/loongarch64/if_ether.rs index dd96d8b0..c1f4e6d6 100644 --- a/src/loongarch64/if_ether.rs +++ b/src/loongarch64/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/loongarch64/if_packet.rs b/src/loongarch64/if_packet.rs index f5b63d7f..76a0a3eb 100644 --- a/src/loongarch64/if_packet.rs +++ b/src/loongarch64/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/loongarch64/io_uring.rs b/src/loongarch64/io_uring.rs index 2518db22..0558dcba 100644 --- a/src/loongarch64/io_uring.rs +++ b/src/loongarch64/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -159,7 +159,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -423,6 +429,23 @@ pub fds: __u64, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { pub nr: __u32, pub flags: __u32, @@ -483,7 +506,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -541,8 +567,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -735,6 +774,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -837,6 +880,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -873,6 +917,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -895,6 +942,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -914,7 +962,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1058,7 +1110,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1072,7 +1127,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1084,6 +1152,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1094,6 +1178,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/loongarch64/ioctl.rs b/src/loongarch64/ioctl.rs index 41d62cd8..b64fa0f1 100644 --- a/src/loongarch64/ioctl.rs +++ b/src/loongarch64/ioctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const FIONREAD: u32 = 21531; pub const FIONBIO: u32 = 21537; diff --git a/src/loongarch64/landlock.rs b/src/loongarch64/landlock.rs index 35f92124..0548e2dc 100644 --- a/src/loongarch64/landlock.rs +++ b/src/loongarch64/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/loongarch64/loop_device.rs b/src/loongarch64/loop_device.rs index 7fdd5cf0..754d71e8 100644 --- a/src/loongarch64/loop_device.rs +++ b/src/loongarch64/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_long_t = crate::ctypes::c_long; pub type __kernel_ulong_t = crate::ctypes::c_ulong; diff --git a/src/loongarch64/mempolicy.rs b/src/loongarch64/mempolicy.rs index a24915cc..ad4957c5 100644 --- a/src/loongarch64/mempolicy.rs +++ b/src/loongarch64/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/loongarch64/net.rs b/src/loongarch64/net.rs index 5a96657b..f3459422 100644 --- a/src/loongarch64/net.rs +++ b/src/loongarch64/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1200,6 +1200,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 78; pub const SO_DEVMEM_DMABUF: u32 = 79; pub const SCM_DEVMEM_DMABUF: u32 = 79; pub const SO_DEVMEM_DONTNEED: u32 = 80; +pub const SCM_TS_OPT_ID: u32 = 81; pub const SO_TIMESTAMP: u32 = 29; pub const SO_TIMESTAMPNS: u32 = 35; pub const SO_TIMESTAMPING: u32 = 37; @@ -2163,26 +2164,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2199,6 +2222,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2210,6 +2247,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2292,6 +2341,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2303,6 +2363,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(ihl: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2329,6 +2400,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2340,6 +2422,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(priority: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2366,6 +2459,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn doff(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2377,6 +2481,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2388,6 +2503,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2399,6 +2525,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2410,6 +2547,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2421,6 +2569,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2432,6 +2591,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2443,6 +2613,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2454,6 +2635,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2465,6 +2657,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(res1: __u16, doff: __u16, fin: __u16, syn: __u16, rst: __u16, psh: __u16, ack: __u16, urg: __u16, ece: __u16, cwr: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2523,6 +2726,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2534,6 +2748,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2545,6 +2770,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2556,6 +2792,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2590,6 +2837,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2601,6 +2859,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2612,6 +2881,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2642,6 +2922,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2653,6 +2944,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2664,6 +2966,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2675,6 +2988,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2709,6 +3033,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2720,6 +3055,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2731,6 +3077,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2742,6 +3099,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2753,6 +3121,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2764,6 +3143,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2806,6 +3196,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2817,6 +3218,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2828,6 +3240,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -2839,6 +3262,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/loongarch64/netlink.rs b/src/loongarch64/netlink.rs index 8624280f..0fafa7ac 100644 --- a/src/loongarch64/netlink.rs +++ b/src/loongarch64/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -824,6 +824,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1009,6 +1010,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1299,6 +1302,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1653,7 +1657,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1981,6 +1986,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1988,7 +2000,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2486,7 +2500,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/loongarch64/prctl.rs b/src/loongarch64/prctl.rs index 11c5b54a..cccf5ccd 100644 --- a/src/loongarch64/prctl.rs +++ b/src/loongarch64/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -194,6 +194,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -252,3 +254,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/loongarch64/ptrace.rs b/src/loongarch64/ptrace.rs index 7bf06ebe..e36f555f 100644 --- a/src/loongarch64/ptrace.rs +++ b/src/loongarch64/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/loongarch64/system.rs b/src/loongarch64/system.rs index 9343a1a6..dd95fee7 100644 --- a/src/loongarch64/system.rs +++ b/src/loongarch64/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/loongarch64/xdp.rs b/src/loongarch64/xdp.rs index af56500b..132f82cd 100644 --- a/src/loongarch64/xdp.rs +++ b/src/loongarch64/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips/bootparam.rs b/src/mips/bootparam.rs index 4f4f6fab..609ea889 100644 --- a/src/mips/bootparam.rs +++ b/src/mips/bootparam.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/mips/btrfs.rs b/src/mips/btrfs.rs index 00332911..221cfc2f 100644 --- a/src/mips/btrfs.rs +++ b/src/mips/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -155,7 +155,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -707,6 +713,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1334,6 +1347,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1536,6 +1553,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/mips/elf_uapi.rs b/src/mips/elf_uapi.rs index b3556d05..58a860e5 100644 --- a/src/mips/elf_uapi.rs +++ b/src/mips/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -499,6 +499,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -506,6 +507,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/mips/errno.rs b/src/mips/errno.rs index 28351176..0f7ab95a 100644 --- a/src/mips/errno.rs +++ b/src/mips/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/mips/general.rs b/src/mips/general.rs index 31c736b7..6bc39d8c 100644 --- a/src/mips/general.rs +++ b/src/mips/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -272,7 +272,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -832,6 +838,13 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1049,9 +1062,9 @@ pub sa_handler_kernel: __kernel_sighandler_t, pub sa_flags: crate::ctypes::c_ulong, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_SYSINFO_EHDR: u32 = 33; pub const AT_VECTOR_SIZE_ARCH: u32 = 1; @@ -1278,6 +1291,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 524288; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1454,6 +1468,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1762,6 +1780,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -2874,6 +2894,10 @@ pub const __NR_lsm_get_self_attr: u32 = 4459; pub const __NR_lsm_set_self_attr: u32 = 4460; pub const __NR_lsm_list_modules: u32 = 4461; pub const __NR_mseal: u32 = 4462; +pub const __NR_setxattrat: u32 = 4463; +pub const __NR_getxattrat: u32 = 4464; +pub const __NR_listxattrat: u32 = 4465; +pub const __NR_removexattrat: u32 = 4466; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WSTOPPED: u32 = 2; @@ -3174,26 +3198,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -3210,6 +3256,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -3221,6 +3281,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -3265,6 +3337,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -3276,6 +3359,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -3287,6 +3381,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -3298,6 +3403,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3309,6 +3425,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3320,6 +3447,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/mips/if_arp.rs b/src/mips/if_arp.rs index 411d12b1..8f2e3e26 100644 --- a/src/mips/if_arp.rs +++ b/src/mips/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1117,6 +1117,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1302,6 +1303,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1592,6 +1595,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -1798,7 +1802,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2126,6 +2131,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2133,7 +2145,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2631,7 +2645,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/mips/if_ether.rs b/src/mips/if_ether.rs index ff8dbc63..94ef74cf 100644 --- a/src/mips/if_ether.rs +++ b/src/mips/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips/if_packet.rs b/src/mips/if_packet.rs index 9a5585cc..2c41fcbf 100644 --- a/src/mips/if_packet.rs +++ b/src/mips/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips/io_uring.rs b/src/mips/io_uring.rs index 1f49f030..aa544944 100644 --- a/src/mips/io_uring.rs +++ b/src/mips/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -157,7 +157,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -421,6 +427,23 @@ pub fds: __u64, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { pub nr: __u32, pub flags: __u32, @@ -481,7 +504,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -539,8 +565,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -743,6 +782,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -845,6 +888,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -881,6 +925,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -903,6 +950,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -922,7 +970,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1066,7 +1118,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1080,7 +1135,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1092,6 +1160,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1102,6 +1186,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/mips/ioctl.rs b/src/mips/ioctl.rs index 972f7c9f..4aa05954 100644 --- a/src/mips/ioctl.rs +++ b/src/mips/ioctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const FIONREAD: u32 = 18047; pub const FIONBIO: u32 = 26238; diff --git a/src/mips/landlock.rs b/src/mips/landlock.rs index 85365e8d..6349a9d7 100644 --- a/src/mips/landlock.rs +++ b/src/mips/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips/loop_device.rs b/src/mips/loop_device.rs index 0d512ae0..b52ca709 100644 --- a/src/mips/loop_device.rs +++ b/src/mips/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_daddr_t = crate::ctypes::c_long; pub type __kernel_long_t = crate::ctypes::c_long; diff --git a/src/mips/mempolicy.rs b/src/mips/mempolicy.rs index 97bfe6af..62d469be 100644 --- a/src/mips/mempolicy.rs +++ b/src/mips/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/mips/net.rs b/src/mips/net.rs index d9352636..84080082 100644 --- a/src/mips/net.rs +++ b/src/mips/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1231,6 +1231,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 78; pub const SO_DEVMEM_DMABUF: u32 = 79; pub const SCM_DEVMEM_DMABUF: u32 = 79; pub const SO_DEVMEM_DONTNEED: u32 = 80; +pub const SCM_TS_OPT_ID: u32 = 81; pub const SYS_SOCKET: u32 = 1; pub const SYS_BIND: u32 = 2; pub const SYS_CONNECT: u32 = 3; @@ -2186,26 +2187,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2222,6 +2245,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2233,6 +2270,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2315,6 +2364,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn ihl(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2326,6 +2386,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, ihl: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2352,6 +2423,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn priority(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2363,6 +2445,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, priority: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2389,6 +2482,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn res1(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2400,6 +2504,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2411,6 +2526,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2422,6 +2548,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2433,6 +2570,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2444,6 +2592,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2455,6 +2614,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2466,6 +2636,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2477,6 +2658,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2488,6 +2680,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(doff: __u16, res1: __u16, cwr: __u16, ece: __u16, urg: __u16, ack: __u16, psh: __u16, rst: __u16, syn: __u16, fin: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2546,6 +2749,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2557,6 +2771,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2568,6 +2793,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2579,6 +2815,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2613,6 +2860,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2624,6 +2882,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2635,6 +2904,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2665,6 +2945,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2676,6 +2967,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2687,6 +2989,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2698,6 +3011,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2732,6 +3056,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2743,6 +3078,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2754,6 +3100,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2765,6 +3122,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2776,6 +3144,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2787,6 +3166,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2829,6 +3219,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2840,6 +3241,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2851,6 +3263,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -2862,6 +3285,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/mips/netlink.rs b/src/mips/netlink.rs index f6838e7c..58bc1bab 100644 --- a/src/mips/netlink.rs +++ b/src/mips/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -832,6 +832,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1017,6 +1018,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1307,6 +1310,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1661,7 +1665,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1989,6 +1994,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1996,7 +2008,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2494,7 +2508,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/mips/prctl.rs b/src/mips/prctl.rs index 7196a028..62fe1e1a 100644 --- a/src/mips/prctl.rs +++ b/src/mips/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -202,6 +202,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -260,3 +262,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/mips/ptrace.rs b/src/mips/ptrace.rs index 936294c6..55cee2e4 100644 --- a/src/mips/ptrace.rs +++ b/src/mips/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips/system.rs b/src/mips/system.rs index e470555d..71c40472 100644 --- a/src/mips/system.rs +++ b/src/mips/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips/xdp.rs b/src/mips/xdp.rs index 79e7271c..257df9d8 100644 --- a/src/mips/xdp.rs +++ b/src/mips/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips32r6/bootparam.rs b/src/mips32r6/bootparam.rs index 4f4f6fab..609ea889 100644 --- a/src/mips32r6/bootparam.rs +++ b/src/mips32r6/bootparam.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/mips32r6/btrfs.rs b/src/mips32r6/btrfs.rs index 00332911..221cfc2f 100644 --- a/src/mips32r6/btrfs.rs +++ b/src/mips32r6/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -155,7 +155,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -707,6 +713,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1334,6 +1347,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1536,6 +1553,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/mips32r6/elf_uapi.rs b/src/mips32r6/elf_uapi.rs index b3556d05..58a860e5 100644 --- a/src/mips32r6/elf_uapi.rs +++ b/src/mips32r6/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -499,6 +499,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -506,6 +507,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/mips32r6/errno.rs b/src/mips32r6/errno.rs index 28351176..0f7ab95a 100644 --- a/src/mips32r6/errno.rs +++ b/src/mips32r6/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/mips32r6/general.rs b/src/mips32r6/general.rs index 31c736b7..6bc39d8c 100644 --- a/src/mips32r6/general.rs +++ b/src/mips32r6/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -272,7 +272,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -832,6 +838,13 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1049,9 +1062,9 @@ pub sa_handler_kernel: __kernel_sighandler_t, pub sa_flags: crate::ctypes::c_ulong, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_SYSINFO_EHDR: u32 = 33; pub const AT_VECTOR_SIZE_ARCH: u32 = 1; @@ -1278,6 +1291,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 524288; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1454,6 +1468,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1762,6 +1780,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -2874,6 +2894,10 @@ pub const __NR_lsm_get_self_attr: u32 = 4459; pub const __NR_lsm_set_self_attr: u32 = 4460; pub const __NR_lsm_list_modules: u32 = 4461; pub const __NR_mseal: u32 = 4462; +pub const __NR_setxattrat: u32 = 4463; +pub const __NR_getxattrat: u32 = 4464; +pub const __NR_listxattrat: u32 = 4465; +pub const __NR_removexattrat: u32 = 4466; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WSTOPPED: u32 = 2; @@ -3174,26 +3198,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -3210,6 +3256,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -3221,6 +3281,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -3265,6 +3337,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -3276,6 +3359,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -3287,6 +3381,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -3298,6 +3403,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3309,6 +3425,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3320,6 +3447,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/mips32r6/if_arp.rs b/src/mips32r6/if_arp.rs index 411d12b1..8f2e3e26 100644 --- a/src/mips32r6/if_arp.rs +++ b/src/mips32r6/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1117,6 +1117,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1302,6 +1303,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1592,6 +1595,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -1798,7 +1802,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2126,6 +2131,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2133,7 +2145,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2631,7 +2645,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/mips32r6/if_ether.rs b/src/mips32r6/if_ether.rs index ff8dbc63..94ef74cf 100644 --- a/src/mips32r6/if_ether.rs +++ b/src/mips32r6/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips32r6/if_packet.rs b/src/mips32r6/if_packet.rs index 9a5585cc..2c41fcbf 100644 --- a/src/mips32r6/if_packet.rs +++ b/src/mips32r6/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips32r6/io_uring.rs b/src/mips32r6/io_uring.rs index 1f49f030..aa544944 100644 --- a/src/mips32r6/io_uring.rs +++ b/src/mips32r6/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -157,7 +157,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -421,6 +427,23 @@ pub fds: __u64, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { pub nr: __u32, pub flags: __u32, @@ -481,7 +504,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -539,8 +565,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -743,6 +782,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -845,6 +888,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -881,6 +925,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -903,6 +950,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -922,7 +970,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1066,7 +1118,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1080,7 +1135,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1092,6 +1160,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1102,6 +1186,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/mips32r6/ioctl.rs b/src/mips32r6/ioctl.rs index 972f7c9f..4aa05954 100644 --- a/src/mips32r6/ioctl.rs +++ b/src/mips32r6/ioctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const FIONREAD: u32 = 18047; pub const FIONBIO: u32 = 26238; diff --git a/src/mips32r6/landlock.rs b/src/mips32r6/landlock.rs index 85365e8d..6349a9d7 100644 --- a/src/mips32r6/landlock.rs +++ b/src/mips32r6/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips32r6/loop_device.rs b/src/mips32r6/loop_device.rs index 0d512ae0..b52ca709 100644 --- a/src/mips32r6/loop_device.rs +++ b/src/mips32r6/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_daddr_t = crate::ctypes::c_long; pub type __kernel_long_t = crate::ctypes::c_long; diff --git a/src/mips32r6/mempolicy.rs b/src/mips32r6/mempolicy.rs index 97bfe6af..62d469be 100644 --- a/src/mips32r6/mempolicy.rs +++ b/src/mips32r6/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/mips32r6/net.rs b/src/mips32r6/net.rs index d9352636..84080082 100644 --- a/src/mips32r6/net.rs +++ b/src/mips32r6/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1231,6 +1231,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 78; pub const SO_DEVMEM_DMABUF: u32 = 79; pub const SCM_DEVMEM_DMABUF: u32 = 79; pub const SO_DEVMEM_DONTNEED: u32 = 80; +pub const SCM_TS_OPT_ID: u32 = 81; pub const SYS_SOCKET: u32 = 1; pub const SYS_BIND: u32 = 2; pub const SYS_CONNECT: u32 = 3; @@ -2186,26 +2187,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2222,6 +2245,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2233,6 +2270,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2315,6 +2364,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn ihl(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2326,6 +2386,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, ihl: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2352,6 +2423,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn priority(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2363,6 +2445,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, priority: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2389,6 +2482,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn res1(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2400,6 +2504,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2411,6 +2526,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2422,6 +2548,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2433,6 +2570,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2444,6 +2592,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2455,6 +2614,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2466,6 +2636,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2477,6 +2658,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2488,6 +2680,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(doff: __u16, res1: __u16, cwr: __u16, ece: __u16, urg: __u16, ack: __u16, psh: __u16, rst: __u16, syn: __u16, fin: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2546,6 +2749,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2557,6 +2771,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2568,6 +2793,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2579,6 +2815,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2613,6 +2860,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2624,6 +2882,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2635,6 +2904,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2665,6 +2945,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2676,6 +2967,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2687,6 +2989,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2698,6 +3011,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2732,6 +3056,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2743,6 +3078,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2754,6 +3100,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2765,6 +3122,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2776,6 +3144,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2787,6 +3166,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2829,6 +3219,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2840,6 +3241,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2851,6 +3263,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -2862,6 +3285,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/mips32r6/netlink.rs b/src/mips32r6/netlink.rs index f6838e7c..58bc1bab 100644 --- a/src/mips32r6/netlink.rs +++ b/src/mips32r6/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -832,6 +832,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1017,6 +1018,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1307,6 +1310,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1661,7 +1665,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1989,6 +1994,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1996,7 +2008,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2494,7 +2508,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/mips32r6/prctl.rs b/src/mips32r6/prctl.rs index 7196a028..62fe1e1a 100644 --- a/src/mips32r6/prctl.rs +++ b/src/mips32r6/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -202,6 +202,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -260,3 +262,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/mips32r6/ptrace.rs b/src/mips32r6/ptrace.rs index 936294c6..55cee2e4 100644 --- a/src/mips32r6/ptrace.rs +++ b/src/mips32r6/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips32r6/system.rs b/src/mips32r6/system.rs index e470555d..71c40472 100644 --- a/src/mips32r6/system.rs +++ b/src/mips32r6/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips32r6/xdp.rs b/src/mips32r6/xdp.rs index 79e7271c..257df9d8 100644 --- a/src/mips32r6/xdp.rs +++ b/src/mips32r6/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips64/bootparam.rs b/src/mips64/bootparam.rs index 4f4f6fab..609ea889 100644 --- a/src/mips64/bootparam.rs +++ b/src/mips64/bootparam.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/mips64/btrfs.rs b/src/mips64/btrfs.rs index c464c2fc..d28a05c9 100644 --- a/src/mips64/btrfs.rs +++ b/src/mips64/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -157,7 +157,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -709,6 +715,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1336,6 +1349,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1538,6 +1555,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/mips64/elf_uapi.rs b/src/mips64/elf_uapi.rs index 3e0ae8d3..8b44e678 100644 --- a/src/mips64/elf_uapi.rs +++ b/src/mips64/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -501,6 +501,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -508,6 +509,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/mips64/errno.rs b/src/mips64/errno.rs index 28351176..0f7ab95a 100644 --- a/src/mips64/errno.rs +++ b/src/mips64/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/mips64/general.rs b/src/mips64/general.rs index bef4c8bb..327926c6 100644 --- a/src/mips64/general.rs +++ b/src/mips64/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -272,7 +272,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -832,6 +838,13 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1041,9 +1054,9 @@ pub sa_handler_kernel: __kernel_sighandler_t, pub sa_flags: crate::ctypes::c_ulong, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_SYSINFO_EHDR: u32 = 33; pub const AT_VECTOR_SIZE_ARCH: u32 = 1; @@ -1267,6 +1280,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 524288; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1443,6 +1457,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1751,6 +1769,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -2793,6 +2813,10 @@ pub const __NR_lsm_get_self_attr: u32 = 5459; pub const __NR_lsm_set_self_attr: u32 = 5460; pub const __NR_lsm_list_modules: u32 = 5461; pub const __NR_mseal: u32 = 5462; +pub const __NR_setxattrat: u32 = 5463; +pub const __NR_getxattrat: u32 = 5464; +pub const __NR_listxattrat: u32 = 5465; +pub const __NR_removexattrat: u32 = 5466; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WSTOPPED: u32 = 2; @@ -3093,26 +3117,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -3129,6 +3175,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -3140,6 +3200,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -3184,6 +3256,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -3195,6 +3278,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -3206,6 +3300,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -3217,6 +3322,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3228,6 +3344,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3239,6 +3366,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/mips64/if_arp.rs b/src/mips64/if_arp.rs index c8c7be8a..39b6dc5c 100644 --- a/src/mips64/if_arp.rs +++ b/src/mips64/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1119,6 +1119,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1304,6 +1305,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1594,6 +1597,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -1800,7 +1804,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2128,6 +2133,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2135,7 +2147,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2633,7 +2647,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/mips64/if_ether.rs b/src/mips64/if_ether.rs index 86dcdc81..e6be97f9 100644 --- a/src/mips64/if_ether.rs +++ b/src/mips64/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips64/if_packet.rs b/src/mips64/if_packet.rs index 94639d9f..5ffa4a33 100644 --- a/src/mips64/if_packet.rs +++ b/src/mips64/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips64/io_uring.rs b/src/mips64/io_uring.rs index 5bdcca75..752ad21c 100644 --- a/src/mips64/io_uring.rs +++ b/src/mips64/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -159,7 +159,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -423,6 +429,23 @@ pub fds: __u64, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { pub nr: __u32, pub flags: __u32, @@ -483,7 +506,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -541,8 +567,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -745,6 +784,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -847,6 +890,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -883,6 +927,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -905,6 +952,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -924,7 +972,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1068,7 +1120,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1082,7 +1137,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1094,6 +1162,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1104,6 +1188,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/mips64/ioctl.rs b/src/mips64/ioctl.rs index 74049dd5..b1b61bb9 100644 --- a/src/mips64/ioctl.rs +++ b/src/mips64/ioctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const FIONREAD: u32 = 18047; pub const FIONBIO: u32 = 26238; diff --git a/src/mips64/landlock.rs b/src/mips64/landlock.rs index af3cc928..5dcfce12 100644 --- a/src/mips64/landlock.rs +++ b/src/mips64/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips64/loop_device.rs b/src/mips64/loop_device.rs index 1acf5706..48aca935 100644 --- a/src/mips64/loop_device.rs +++ b/src/mips64/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_daddr_t = crate::ctypes::c_long; pub type __kernel_long_t = crate::ctypes::c_long; diff --git a/src/mips64/mempolicy.rs b/src/mips64/mempolicy.rs index 97bfe6af..62d469be 100644 --- a/src/mips64/mempolicy.rs +++ b/src/mips64/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/mips64/net.rs b/src/mips64/net.rs index b2e61441..f918e598 100644 --- a/src/mips64/net.rs +++ b/src/mips64/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1231,6 +1231,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 78; pub const SO_DEVMEM_DMABUF: u32 = 79; pub const SCM_DEVMEM_DMABUF: u32 = 79; pub const SO_DEVMEM_DONTNEED: u32 = 80; +pub const SCM_TS_OPT_ID: u32 = 81; pub const SO_TIMESTAMP: u32 = 29; pub const SO_TIMESTAMPNS: u32 = 35; pub const SO_TIMESTAMPING: u32 = 37; @@ -2194,26 +2195,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2230,6 +2253,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2241,6 +2278,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2323,6 +2372,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn ihl(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2334,6 +2394,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, ihl: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2360,6 +2431,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn priority(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2371,6 +2453,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, priority: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2397,6 +2490,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn res1(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2408,6 +2512,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2419,6 +2534,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2430,6 +2556,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2441,6 +2578,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2452,6 +2600,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2463,6 +2622,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2474,6 +2644,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2485,6 +2666,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2496,6 +2688,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(doff: __u16, res1: __u16, cwr: __u16, ece: __u16, urg: __u16, ack: __u16, psh: __u16, rst: __u16, syn: __u16, fin: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2554,6 +2757,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2565,6 +2779,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2576,6 +2801,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2587,6 +2823,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2621,6 +2868,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2632,6 +2890,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2643,6 +2912,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2673,6 +2953,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2684,6 +2975,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2695,6 +2997,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2706,6 +3019,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2740,6 +3064,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2751,6 +3086,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2762,6 +3108,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2773,6 +3130,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2784,6 +3152,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2795,6 +3174,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2837,6 +3227,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2848,6 +3249,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2859,6 +3271,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -2870,6 +3293,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/mips64/netlink.rs b/src/mips64/netlink.rs index cab1f72c..2a34d259 100644 --- a/src/mips64/netlink.rs +++ b/src/mips64/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -834,6 +834,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1019,6 +1020,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1309,6 +1312,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1663,7 +1667,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1991,6 +1996,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1998,7 +2010,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2496,7 +2510,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/mips64/prctl.rs b/src/mips64/prctl.rs index 4f450fb7..d0121f8b 100644 --- a/src/mips64/prctl.rs +++ b/src/mips64/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -204,6 +204,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -262,3 +264,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/mips64/ptrace.rs b/src/mips64/ptrace.rs index 4fa4fe49..75c836b6 100644 --- a/src/mips64/ptrace.rs +++ b/src/mips64/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips64/system.rs b/src/mips64/system.rs index acfd2dee..b7a8d4d5 100644 --- a/src/mips64/system.rs +++ b/src/mips64/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips64/xdp.rs b/src/mips64/xdp.rs index 8e9b6f8b..6ea92c8f 100644 --- a/src/mips64/xdp.rs +++ b/src/mips64/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips64r6/bootparam.rs b/src/mips64r6/bootparam.rs index 4f4f6fab..609ea889 100644 --- a/src/mips64r6/bootparam.rs +++ b/src/mips64r6/bootparam.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/mips64r6/btrfs.rs b/src/mips64r6/btrfs.rs index c464c2fc..d28a05c9 100644 --- a/src/mips64r6/btrfs.rs +++ b/src/mips64r6/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -157,7 +157,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -709,6 +715,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1336,6 +1349,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1538,6 +1555,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/mips64r6/elf_uapi.rs b/src/mips64r6/elf_uapi.rs index 3e0ae8d3..8b44e678 100644 --- a/src/mips64r6/elf_uapi.rs +++ b/src/mips64r6/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -501,6 +501,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -508,6 +509,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/mips64r6/errno.rs b/src/mips64r6/errno.rs index 28351176..0f7ab95a 100644 --- a/src/mips64r6/errno.rs +++ b/src/mips64r6/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/mips64r6/general.rs b/src/mips64r6/general.rs index bef4c8bb..327926c6 100644 --- a/src/mips64r6/general.rs +++ b/src/mips64r6/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -272,7 +272,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -832,6 +838,13 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1041,9 +1054,9 @@ pub sa_handler_kernel: __kernel_sighandler_t, pub sa_flags: crate::ctypes::c_ulong, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_SYSINFO_EHDR: u32 = 33; pub const AT_VECTOR_SIZE_ARCH: u32 = 1; @@ -1267,6 +1280,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 524288; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1443,6 +1457,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1751,6 +1769,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -2793,6 +2813,10 @@ pub const __NR_lsm_get_self_attr: u32 = 5459; pub const __NR_lsm_set_self_attr: u32 = 5460; pub const __NR_lsm_list_modules: u32 = 5461; pub const __NR_mseal: u32 = 5462; +pub const __NR_setxattrat: u32 = 5463; +pub const __NR_getxattrat: u32 = 5464; +pub const __NR_listxattrat: u32 = 5465; +pub const __NR_removexattrat: u32 = 5466; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WSTOPPED: u32 = 2; @@ -3093,26 +3117,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -3129,6 +3175,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -3140,6 +3200,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -3184,6 +3256,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -3195,6 +3278,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -3206,6 +3300,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -3217,6 +3322,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3228,6 +3344,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3239,6 +3366,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/mips64r6/if_arp.rs b/src/mips64r6/if_arp.rs index c8c7be8a..39b6dc5c 100644 --- a/src/mips64r6/if_arp.rs +++ b/src/mips64r6/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1119,6 +1119,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1304,6 +1305,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1594,6 +1597,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -1800,7 +1804,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2128,6 +2133,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2135,7 +2147,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2633,7 +2647,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/mips64r6/if_ether.rs b/src/mips64r6/if_ether.rs index 86dcdc81..e6be97f9 100644 --- a/src/mips64r6/if_ether.rs +++ b/src/mips64r6/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips64r6/if_packet.rs b/src/mips64r6/if_packet.rs index 94639d9f..5ffa4a33 100644 --- a/src/mips64r6/if_packet.rs +++ b/src/mips64r6/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips64r6/io_uring.rs b/src/mips64r6/io_uring.rs index 5bdcca75..752ad21c 100644 --- a/src/mips64r6/io_uring.rs +++ b/src/mips64r6/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -159,7 +159,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -423,6 +429,23 @@ pub fds: __u64, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { pub nr: __u32, pub flags: __u32, @@ -483,7 +506,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -541,8 +567,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -745,6 +784,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -847,6 +890,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -883,6 +927,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -905,6 +952,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -924,7 +972,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1068,7 +1120,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1082,7 +1137,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1094,6 +1162,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1104,6 +1188,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/mips64r6/ioctl.rs b/src/mips64r6/ioctl.rs index 74049dd5..b1b61bb9 100644 --- a/src/mips64r6/ioctl.rs +++ b/src/mips64r6/ioctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const FIONREAD: u32 = 18047; pub const FIONBIO: u32 = 26238; diff --git a/src/mips64r6/landlock.rs b/src/mips64r6/landlock.rs index af3cc928..5dcfce12 100644 --- a/src/mips64r6/landlock.rs +++ b/src/mips64r6/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips64r6/loop_device.rs b/src/mips64r6/loop_device.rs index 1acf5706..48aca935 100644 --- a/src/mips64r6/loop_device.rs +++ b/src/mips64r6/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_daddr_t = crate::ctypes::c_long; pub type __kernel_long_t = crate::ctypes::c_long; diff --git a/src/mips64r6/mempolicy.rs b/src/mips64r6/mempolicy.rs index 97bfe6af..62d469be 100644 --- a/src/mips64r6/mempolicy.rs +++ b/src/mips64r6/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/mips64r6/net.rs b/src/mips64r6/net.rs index b2e61441..f918e598 100644 --- a/src/mips64r6/net.rs +++ b/src/mips64r6/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1231,6 +1231,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 78; pub const SO_DEVMEM_DMABUF: u32 = 79; pub const SCM_DEVMEM_DMABUF: u32 = 79; pub const SO_DEVMEM_DONTNEED: u32 = 80; +pub const SCM_TS_OPT_ID: u32 = 81; pub const SO_TIMESTAMP: u32 = 29; pub const SO_TIMESTAMPNS: u32 = 35; pub const SO_TIMESTAMPING: u32 = 37; @@ -2194,26 +2195,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2230,6 +2253,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2241,6 +2278,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2323,6 +2372,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn ihl(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2334,6 +2394,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, ihl: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2360,6 +2431,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn priority(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2371,6 +2453,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, priority: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2397,6 +2490,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn res1(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2408,6 +2512,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2419,6 +2534,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2430,6 +2556,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2441,6 +2578,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2452,6 +2600,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2463,6 +2622,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2474,6 +2644,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2485,6 +2666,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2496,6 +2688,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(doff: __u16, res1: __u16, cwr: __u16, ece: __u16, urg: __u16, ack: __u16, psh: __u16, rst: __u16, syn: __u16, fin: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2554,6 +2757,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2565,6 +2779,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2576,6 +2801,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2587,6 +2823,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2621,6 +2868,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2632,6 +2890,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2643,6 +2912,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2673,6 +2953,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2684,6 +2975,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2695,6 +2997,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2706,6 +3019,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2740,6 +3064,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2751,6 +3086,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2762,6 +3108,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2773,6 +3130,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2784,6 +3152,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2795,6 +3174,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2837,6 +3227,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2848,6 +3249,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2859,6 +3271,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -2870,6 +3293,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/mips64r6/netlink.rs b/src/mips64r6/netlink.rs index cab1f72c..2a34d259 100644 --- a/src/mips64r6/netlink.rs +++ b/src/mips64r6/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -834,6 +834,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1019,6 +1020,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1309,6 +1312,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1663,7 +1667,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1991,6 +1996,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1998,7 +2010,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2496,7 +2510,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/mips64r6/prctl.rs b/src/mips64r6/prctl.rs index 4f450fb7..d0121f8b 100644 --- a/src/mips64r6/prctl.rs +++ b/src/mips64r6/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -204,6 +204,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -262,3 +264,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/mips64r6/ptrace.rs b/src/mips64r6/ptrace.rs index 4fa4fe49..75c836b6 100644 --- a/src/mips64r6/ptrace.rs +++ b/src/mips64r6/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips64r6/system.rs b/src/mips64r6/system.rs index acfd2dee..b7a8d4d5 100644 --- a/src/mips64r6/system.rs +++ b/src/mips64r6/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/mips64r6/xdp.rs b/src/mips64r6/xdp.rs index 8e9b6f8b..6ea92c8f 100644 --- a/src/mips64r6/xdp.rs +++ b/src/mips64r6/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/powerpc/bootparam.rs b/src/powerpc/bootparam.rs index 4f4f6fab..609ea889 100644 --- a/src/powerpc/bootparam.rs +++ b/src/powerpc/bootparam.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/powerpc/btrfs.rs b/src/powerpc/btrfs.rs index f8ac4908..6962b74e 100644 --- a/src/powerpc/btrfs.rs +++ b/src/powerpc/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -161,7 +161,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -713,6 +719,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1330,6 +1343,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1532,6 +1549,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/powerpc/elf_uapi.rs b/src/powerpc/elf_uapi.rs index 08288977..91576e43 100644 --- a/src/powerpc/elf_uapi.rs +++ b/src/powerpc/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -495,6 +495,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -502,6 +503,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/powerpc/errno.rs b/src/powerpc/errno.rs index b7766e1c..5b018a26 100644 --- a/src/powerpc/errno.rs +++ b/src/powerpc/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/powerpc/general.rs b/src/powerpc/general.rs index f12668ef..289f8de6 100644 --- a/src/powerpc/general.rs +++ b/src/powerpc/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -276,7 +276,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -841,6 +847,13 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1087,9 +1100,9 @@ pub sa_flags: crate::ctypes::c_ulong, pub sa_restorer: __sigrestore_t, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_DCACHEBSIZE: u32 = 19; pub const AT_ICACHEBSIZE: u32 = 20; @@ -1318,6 +1331,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 524288; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1494,6 +1508,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1793,6 +1811,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -2801,6 +2821,10 @@ pub const __NR_lsm_get_self_attr: u32 = 459; pub const __NR_lsm_set_self_attr: u32 = 460; pub const __NR_lsm_list_modules: u32 = 461; pub const __NR_mseal: u32 = 462; +pub const __NR_setxattrat: u32 = 463; +pub const __NR_getxattrat: u32 = 464; +pub const __NR_listxattrat: u32 = 465; +pub const __NR_removexattrat: u32 = 466; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WSTOPPED: u32 = 2; @@ -3097,26 +3121,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -3133,6 +3179,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -3144,6 +3204,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -3188,6 +3260,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -3199,6 +3282,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -3210,6 +3304,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -3221,6 +3326,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3232,6 +3348,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3243,6 +3370,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/powerpc/if_arp.rs b/src/powerpc/if_arp.rs index 11133538..05a75ec3 100644 --- a/src/powerpc/if_arp.rs +++ b/src/powerpc/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1113,6 +1113,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1298,6 +1299,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1588,6 +1591,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -1794,7 +1798,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2122,6 +2127,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2129,7 +2141,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2627,7 +2641,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/powerpc/if_ether.rs b/src/powerpc/if_ether.rs index 091252cc..796bee0c 100644 --- a/src/powerpc/if_ether.rs +++ b/src/powerpc/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/powerpc/if_packet.rs b/src/powerpc/if_packet.rs index 7f2a8402..e328557a 100644 --- a/src/powerpc/if_packet.rs +++ b/src/powerpc/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/powerpc/io_uring.rs b/src/powerpc/io_uring.rs index fa49afc1..645b64da 100644 --- a/src/powerpc/io_uring.rs +++ b/src/powerpc/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -163,7 +163,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -427,6 +433,23 @@ pub fds: __u64, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { pub nr: __u32, pub flags: __u32, @@ -487,7 +510,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -545,8 +571,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -739,6 +778,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -841,6 +884,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -877,6 +921,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -899,6 +946,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -918,7 +966,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1062,7 +1114,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1076,7 +1131,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1088,6 +1156,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1098,6 +1182,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/powerpc/ioctl.rs b/src/powerpc/ioctl.rs index d10aab58..aac874fb 100644 --- a/src/powerpc/ioctl.rs +++ b/src/powerpc/ioctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const FIONREAD: u32 = 1074030207; pub const FIONBIO: u32 = 2147772030; diff --git a/src/powerpc/landlock.rs b/src/powerpc/landlock.rs index 9b99057f..fcdd724c 100644 --- a/src/powerpc/landlock.rs +++ b/src/powerpc/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/powerpc/loop_device.rs b/src/powerpc/loop_device.rs index d724f5ee..bb39cfd8 100644 --- a/src/powerpc/loop_device.rs +++ b/src/powerpc/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_ipc_pid_t = crate::ctypes::c_short; pub type __kernel_long_t = crate::ctypes::c_long; diff --git a/src/powerpc/mempolicy.rs b/src/powerpc/mempolicy.rs index a24915cc..ad4957c5 100644 --- a/src/powerpc/mempolicy.rs +++ b/src/powerpc/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/powerpc/net.rs b/src/powerpc/net.rs index 1daaf500..f64d1d25 100644 --- a/src/powerpc/net.rs +++ b/src/powerpc/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1206,6 +1206,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 78; pub const SO_DEVMEM_DMABUF: u32 = 79; pub const SCM_DEVMEM_DMABUF: u32 = 79; pub const SO_DEVMEM_DONTNEED: u32 = 80; +pub const SCM_TS_OPT_ID: u32 = 81; pub const SYS_SOCKET: u32 = 1; pub const SYS_BIND: u32 = 2; pub const SYS_CONNECT: u32 = 3; @@ -2161,26 +2162,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2197,6 +2220,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2208,6 +2245,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2290,6 +2339,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn ihl(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2301,6 +2361,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, ihl: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2327,6 +2398,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn priority(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2338,6 +2420,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, priority: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2364,6 +2457,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn res1(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2375,6 +2479,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2386,6 +2501,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2397,6 +2523,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2408,6 +2545,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2419,6 +2567,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2430,6 +2589,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2441,6 +2611,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2452,6 +2633,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2463,6 +2655,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(doff: __u16, res1: __u16, cwr: __u16, ece: __u16, urg: __u16, ack: __u16, psh: __u16, rst: __u16, syn: __u16, fin: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2521,6 +2724,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2532,6 +2746,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2543,6 +2768,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2554,6 +2790,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2588,6 +2835,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2599,6 +2857,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2610,6 +2879,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2640,6 +2920,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2651,6 +2942,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2662,6 +2964,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2673,6 +2986,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2707,6 +3031,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2718,6 +3053,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2729,6 +3075,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2740,6 +3097,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2751,6 +3119,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2762,6 +3141,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2804,6 +3194,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2815,6 +3216,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2826,6 +3238,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -2837,6 +3260,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/powerpc/netlink.rs b/src/powerpc/netlink.rs index 138c7d7a..51324606 100644 --- a/src/powerpc/netlink.rs +++ b/src/powerpc/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -828,6 +828,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1013,6 +1014,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1303,6 +1306,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1657,7 +1661,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1985,6 +1990,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1992,7 +2004,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2490,7 +2504,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/powerpc/prctl.rs b/src/powerpc/prctl.rs index 10a53998..0cc78031 100644 --- a/src/powerpc/prctl.rs +++ b/src/powerpc/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -198,6 +198,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -256,3 +258,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/powerpc/ptrace.rs b/src/powerpc/ptrace.rs index 0c3817f0..ead32699 100644 --- a/src/powerpc/ptrace.rs +++ b/src/powerpc/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/powerpc/system.rs b/src/powerpc/system.rs index 6fa8c2c0..c7fa9cbe 100644 --- a/src/powerpc/system.rs +++ b/src/powerpc/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/powerpc/xdp.rs b/src/powerpc/xdp.rs index 155666a6..f48ccc73 100644 --- a/src/powerpc/xdp.rs +++ b/src/powerpc/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/powerpc64/bootparam.rs b/src/powerpc64/bootparam.rs index 4f4f6fab..609ea889 100644 --- a/src/powerpc64/bootparam.rs +++ b/src/powerpc64/bootparam.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/powerpc64/btrfs.rs b/src/powerpc64/btrfs.rs index fb0aafd7..099b9541 100644 --- a/src/powerpc64/btrfs.rs +++ b/src/powerpc64/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -163,7 +163,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -715,6 +721,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1332,6 +1345,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1534,6 +1551,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/powerpc64/elf_uapi.rs b/src/powerpc64/elf_uapi.rs index c88e5cce..495c30cc 100644 --- a/src/powerpc64/elf_uapi.rs +++ b/src/powerpc64/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -497,6 +497,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -504,6 +505,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/powerpc64/errno.rs b/src/powerpc64/errno.rs index b7766e1c..5b018a26 100644 --- a/src/powerpc64/errno.rs +++ b/src/powerpc64/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/powerpc64/general.rs b/src/powerpc64/general.rs index 458168ef..cc4d96f2 100644 --- a/src/powerpc64/general.rs +++ b/src/powerpc64/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -278,7 +278,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -837,6 +843,13 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1069,9 +1082,9 @@ pub sa_flags: crate::ctypes::c_ulong, pub sa_restorer: __sigrestore_t, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_DCACHEBSIZE: u32 = 19; pub const AT_ICACHEBSIZE: u32 = 20; @@ -1297,6 +1310,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 524288; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1473,6 +1487,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1772,6 +1790,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -2750,6 +2770,10 @@ pub const __NR_lsm_get_self_attr: u32 = 459; pub const __NR_lsm_set_self_attr: u32 = 460; pub const __NR_lsm_list_modules: u32 = 461; pub const __NR_mseal: u32 = 462; +pub const __NR_setxattrat: u32 = 463; +pub const __NR_getxattrat: u32 = 464; +pub const __NR_listxattrat: u32 = 465; +pub const __NR_removexattrat: u32 = 466; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WSTOPPED: u32 = 2; @@ -3046,26 +3070,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -3082,6 +3128,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -3093,6 +3153,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -3137,6 +3209,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -3148,6 +3231,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -3159,6 +3253,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -3170,6 +3275,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3181,6 +3297,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3192,6 +3319,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/powerpc64/if_arp.rs b/src/powerpc64/if_arp.rs index 52b1d37f..2ce5a623 100644 --- a/src/powerpc64/if_arp.rs +++ b/src/powerpc64/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1115,6 +1115,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1300,6 +1301,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1590,6 +1593,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -1796,7 +1800,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2124,6 +2129,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2131,7 +2143,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2629,7 +2643,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/powerpc64/if_ether.rs b/src/powerpc64/if_ether.rs index 8d878d12..24ad295e 100644 --- a/src/powerpc64/if_ether.rs +++ b/src/powerpc64/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/powerpc64/if_packet.rs b/src/powerpc64/if_packet.rs index c6374d84..568ddd92 100644 --- a/src/powerpc64/if_packet.rs +++ b/src/powerpc64/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/powerpc64/io_uring.rs b/src/powerpc64/io_uring.rs index 99088cda..915a81a9 100644 --- a/src/powerpc64/io_uring.rs +++ b/src/powerpc64/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -165,7 +165,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -429,6 +435,23 @@ pub fds: __u64, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { pub nr: __u32, pub flags: __u32, @@ -489,7 +512,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -547,8 +573,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -741,6 +780,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -843,6 +886,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -879,6 +923,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -901,6 +948,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -920,7 +968,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1064,7 +1116,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1078,7 +1133,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1090,6 +1158,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1100,6 +1184,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/powerpc64/ioctl.rs b/src/powerpc64/ioctl.rs index d10aab58..aac874fb 100644 --- a/src/powerpc64/ioctl.rs +++ b/src/powerpc64/ioctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const FIONREAD: u32 = 1074030207; pub const FIONBIO: u32 = 2147772030; diff --git a/src/powerpc64/landlock.rs b/src/powerpc64/landlock.rs index a5be6307..578a88ac 100644 --- a/src/powerpc64/landlock.rs +++ b/src/powerpc64/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/powerpc64/loop_device.rs b/src/powerpc64/loop_device.rs index 89e4679f..b3923378 100644 --- a/src/powerpc64/loop_device.rs +++ b/src/powerpc64/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_old_dev_t = crate::ctypes::c_ulong; pub type __kernel_long_t = crate::ctypes::c_long; diff --git a/src/powerpc64/mempolicy.rs b/src/powerpc64/mempolicy.rs index a24915cc..ad4957c5 100644 --- a/src/powerpc64/mempolicy.rs +++ b/src/powerpc64/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/powerpc64/net.rs b/src/powerpc64/net.rs index fe4692c5..0cbcb81b 100644 --- a/src/powerpc64/net.rs +++ b/src/powerpc64/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1206,6 +1206,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 78; pub const SO_DEVMEM_DMABUF: u32 = 79; pub const SCM_DEVMEM_DMABUF: u32 = 79; pub const SO_DEVMEM_DONTNEED: u32 = 80; +pub const SCM_TS_OPT_ID: u32 = 81; pub const SO_TIMESTAMP: u32 = 29; pub const SO_TIMESTAMPNS: u32 = 35; pub const SO_TIMESTAMPING: u32 = 37; @@ -2169,26 +2170,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2205,6 +2228,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2216,6 +2253,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2298,6 +2347,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn ihl(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2309,6 +2369,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, ihl: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2335,6 +2406,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn priority(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2346,6 +2428,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, priority: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2372,6 +2465,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn res1(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2383,6 +2487,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2394,6 +2509,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2405,6 +2531,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2416,6 +2553,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2427,6 +2575,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2438,6 +2597,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2449,6 +2619,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2460,6 +2641,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2471,6 +2663,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(doff: __u16, res1: __u16, cwr: __u16, ece: __u16, urg: __u16, ack: __u16, psh: __u16, rst: __u16, syn: __u16, fin: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2529,6 +2732,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2540,6 +2754,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2551,6 +2776,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2562,6 +2798,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2596,6 +2843,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2607,6 +2865,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2618,6 +2887,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2648,6 +2928,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2659,6 +2950,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2670,6 +2972,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2681,6 +2994,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2715,6 +3039,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2726,6 +3061,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2737,6 +3083,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2748,6 +3105,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2759,6 +3127,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2770,6 +3149,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2812,6 +3202,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2823,6 +3224,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2834,6 +3246,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -2845,6 +3268,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/powerpc64/netlink.rs b/src/powerpc64/netlink.rs index 9c343730..3a703fe1 100644 --- a/src/powerpc64/netlink.rs +++ b/src/powerpc64/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -830,6 +830,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1015,6 +1016,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1305,6 +1308,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1659,7 +1663,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1987,6 +1992,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1994,7 +2006,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2492,7 +2506,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/powerpc64/prctl.rs b/src/powerpc64/prctl.rs index f2bf1273..5b4435ac 100644 --- a/src/powerpc64/prctl.rs +++ b/src/powerpc64/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -200,6 +200,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -258,3 +260,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/powerpc64/ptrace.rs b/src/powerpc64/ptrace.rs index daba7b0b..70861450 100644 --- a/src/powerpc64/ptrace.rs +++ b/src/powerpc64/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/powerpc64/system.rs b/src/powerpc64/system.rs index c32ac766..d88dee22 100644 --- a/src/powerpc64/system.rs +++ b/src/powerpc64/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/powerpc64/xdp.rs b/src/powerpc64/xdp.rs index bd6650b3..6f311fe0 100644 --- a/src/powerpc64/xdp.rs +++ b/src/powerpc64/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/riscv32/bootparam.rs b/src/riscv32/bootparam.rs index 4f4f6fab..609ea889 100644 --- a/src/riscv32/bootparam.rs +++ b/src/riscv32/bootparam.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/riscv32/btrfs.rs b/src/riscv32/btrfs.rs index 0a402bbf..2e88fe21 100644 --- a/src/riscv32/btrfs.rs +++ b/src/riscv32/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -155,7 +155,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -707,6 +713,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1324,6 +1337,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1526,6 +1543,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/riscv32/elf_uapi.rs b/src/riscv32/elf_uapi.rs index 08932345..713e9d22 100644 --- a/src/riscv32/elf_uapi.rs +++ b/src/riscv32/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -489,6 +489,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -496,6 +497,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/riscv32/errno.rs b/src/riscv32/errno.rs index b7766e1c..5b018a26 100644 --- a/src/riscv32/errno.rs +++ b/src/riscv32/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/riscv32/general.rs b/src/riscv32/general.rs index e1189a7e..7c2f7537 100644 --- a/src/riscv32/general.rs +++ b/src/riscv32/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -269,7 +269,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -800,6 +806,13 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1033,9 +1046,9 @@ pub sa_handler_kernel: __kernel_sighandler_t, pub sa_flags: crate::ctypes::c_ulong, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_SYSINFO_EHDR: u32 = 33; pub const AT_L1I_CACHESIZE: u32 = 40; @@ -1260,6 +1273,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 524288; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1436,6 +1450,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1735,6 +1753,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -1747,6 +1767,8 @@ pub const MAP_NORESERVE: u32 = 16384; pub const MCL_CURRENT: u32 = 1; pub const MCL_FUTURE: u32 = 2; pub const MCL_ONFAULT: u32 = 4; +pub const SHADOW_STACK_SET_TOKEN: u32 = 1; +pub const SHADOW_STACK_SET_MARKER: u32 = 2; pub const HUGETLB_FLAG_ENCODE_SHIFT: u32 = 26; pub const HUGETLB_FLAG_ENCODE_MASK: u32 = 63; pub const HUGETLB_FLAG_ENCODE_16KB: u32 = 939524096; @@ -2589,6 +2611,10 @@ pub const __NR_lsm_get_self_attr: u32 = 459; pub const __NR_lsm_set_self_attr: u32 = 460; pub const __NR_lsm_list_modules: u32 = 461; pub const __NR_mseal: u32 = 462; +pub const __NR_setxattrat: u32 = 463; +pub const __NR_getxattrat: u32 = 464; +pub const __NR_listxattrat: u32 = 465; +pub const __NR_removexattrat: u32 = 466; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WSTOPPED: u32 = 2; @@ -2885,26 +2911,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2921,6 +2969,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2932,6 +2994,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2976,6 +3050,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -2987,6 +3072,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2998,6 +3094,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -3009,6 +3116,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3020,6 +3138,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3031,6 +3160,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/riscv32/if_arp.rs b/src/riscv32/if_arp.rs index 2fceb3cd..ee7947f6 100644 --- a/src/riscv32/if_arp.rs +++ b/src/riscv32/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1107,6 +1107,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1292,6 +1293,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1582,6 +1585,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -1788,7 +1792,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2116,6 +2121,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2123,7 +2135,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2621,7 +2635,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/riscv32/if_ether.rs b/src/riscv32/if_ether.rs index 80635f17..877dce71 100644 --- a/src/riscv32/if_ether.rs +++ b/src/riscv32/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/riscv32/if_packet.rs b/src/riscv32/if_packet.rs index d2334155..d69c7633 100644 --- a/src/riscv32/if_packet.rs +++ b/src/riscv32/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/riscv32/io_uring.rs b/src/riscv32/io_uring.rs index 5fd58aca..2f81a093 100644 --- a/src/riscv32/io_uring.rs +++ b/src/riscv32/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -157,7 +157,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -421,6 +427,23 @@ pub fds: __u64, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { pub nr: __u32, pub flags: __u32, @@ -481,7 +504,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -539,8 +565,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -733,6 +772,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -835,6 +878,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -871,6 +915,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -893,6 +940,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -912,7 +960,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1056,7 +1108,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1070,7 +1125,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1082,6 +1150,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1092,6 +1176,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/riscv32/ioctl.rs b/src/riscv32/ioctl.rs index 6eac00b4..5e393608 100644 --- a/src/riscv32/ioctl.rs +++ b/src/riscv32/ioctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const FIONREAD: u32 = 21531; pub const FIONBIO: u32 = 21537; diff --git a/src/riscv32/landlock.rs b/src/riscv32/landlock.rs index 39df5113..4200c773 100644 --- a/src/riscv32/landlock.rs +++ b/src/riscv32/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/riscv32/loop_device.rs b/src/riscv32/loop_device.rs index 3f308094..65db5352 100644 --- a/src/riscv32/loop_device.rs +++ b/src/riscv32/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_long_t = crate::ctypes::c_long; pub type __kernel_ulong_t = crate::ctypes::c_ulong; diff --git a/src/riscv32/mempolicy.rs b/src/riscv32/mempolicy.rs index a24915cc..ad4957c5 100644 --- a/src/riscv32/mempolicy.rs +++ b/src/riscv32/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/riscv32/net.rs b/src/riscv32/net.rs index a777903c..116d8aa5 100644 --- a/src/riscv32/net.rs +++ b/src/riscv32/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1200,6 +1200,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 78; pub const SO_DEVMEM_DMABUF: u32 = 79; pub const SCM_DEVMEM_DMABUF: u32 = 79; pub const SO_DEVMEM_DONTNEED: u32 = 80; +pub const SCM_TS_OPT_ID: u32 = 81; pub const SYS_SOCKET: u32 = 1; pub const SYS_BIND: u32 = 2; pub const SYS_CONNECT: u32 = 3; @@ -2155,26 +2156,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2191,6 +2214,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2202,6 +2239,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2284,6 +2333,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2295,6 +2355,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(ihl: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2321,6 +2392,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2332,6 +2414,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(priority: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2358,6 +2451,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn doff(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2369,6 +2473,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2380,6 +2495,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2391,6 +2517,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2402,6 +2539,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2413,6 +2561,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2424,6 +2583,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2435,6 +2605,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2446,6 +2627,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2457,6 +2649,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(res1: __u16, doff: __u16, fin: __u16, syn: __u16, rst: __u16, psh: __u16, ack: __u16, urg: __u16, ece: __u16, cwr: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2515,6 +2718,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2526,6 +2740,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2537,6 +2762,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2548,6 +2784,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2582,6 +2829,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2593,6 +2851,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2604,6 +2873,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2634,6 +2914,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2645,6 +2936,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2656,6 +2958,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2667,6 +2980,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2701,6 +3025,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2712,6 +3047,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2723,6 +3069,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2734,6 +3091,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2745,6 +3113,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2756,6 +3135,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2798,6 +3188,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2809,6 +3210,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2820,6 +3232,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -2831,6 +3254,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/riscv32/netlink.rs b/src/riscv32/netlink.rs index 54c2bd2c..3ef9b03a 100644 --- a/src/riscv32/netlink.rs +++ b/src/riscv32/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -822,6 +822,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1007,6 +1008,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1297,6 +1300,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1651,7 +1655,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1979,6 +1984,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1986,7 +1998,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2484,7 +2498,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/riscv32/prctl.rs b/src/riscv32/prctl.rs index bc2ae74d..338cbf9f 100644 --- a/src/riscv32/prctl.rs +++ b/src/riscv32/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -192,6 +192,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -250,3 +252,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/riscv32/ptrace.rs b/src/riscv32/ptrace.rs index 00222815..8a7059b6 100644 --- a/src/riscv32/ptrace.rs +++ b/src/riscv32/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/riscv32/system.rs b/src/riscv32/system.rs index 8ea2b8f6..62eb2547 100644 --- a/src/riscv32/system.rs +++ b/src/riscv32/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/riscv32/xdp.rs b/src/riscv32/xdp.rs index 9c1bfbef..d161d5fd 100644 --- a/src/riscv32/xdp.rs +++ b/src/riscv32/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/riscv64/bootparam.rs b/src/riscv64/bootparam.rs index 4f4f6fab..609ea889 100644 --- a/src/riscv64/bootparam.rs +++ b/src/riscv64/bootparam.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/riscv64/btrfs.rs b/src/riscv64/btrfs.rs index 5332ee54..941a4a21 100644 --- a/src/riscv64/btrfs.rs +++ b/src/riscv64/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -157,7 +157,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -709,6 +715,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1326,6 +1339,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1528,6 +1545,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/riscv64/elf_uapi.rs b/src/riscv64/elf_uapi.rs index 2e5517d6..d1e4a9fe 100644 --- a/src/riscv64/elf_uapi.rs +++ b/src/riscv64/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -491,6 +491,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -498,6 +499,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/riscv64/errno.rs b/src/riscv64/errno.rs index b7766e1c..5b018a26 100644 --- a/src/riscv64/errno.rs +++ b/src/riscv64/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/riscv64/general.rs b/src/riscv64/general.rs index 6da84582..3420adfb 100644 --- a/src/riscv64/general.rs +++ b/src/riscv64/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -271,7 +271,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -802,6 +808,13 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1011,9 +1024,9 @@ pub sa_handler_kernel: __kernel_sighandler_t, pub sa_flags: crate::ctypes::c_ulong, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_SYSINFO_EHDR: u32 = 33; pub const AT_L1I_CACHESIZE: u32 = 40; @@ -1235,6 +1248,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 524288; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1411,6 +1425,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1710,6 +1728,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -1722,6 +1742,8 @@ pub const MAP_NORESERVE: u32 = 16384; pub const MCL_CURRENT: u32 = 1; pub const MCL_FUTURE: u32 = 2; pub const MCL_ONFAULT: u32 = 4; +pub const SHADOW_STACK_SET_TOKEN: u32 = 1; +pub const SHADOW_STACK_SET_MARKER: u32 = 2; pub const HUGETLB_FLAG_ENCODE_SHIFT: u32 = 26; pub const HUGETLB_FLAG_ENCODE_MASK: u32 = 63; pub const HUGETLB_FLAG_ENCODE_16KB: u32 = 939524096; @@ -2574,6 +2596,10 @@ pub const __NR_lsm_get_self_attr: u32 = 459; pub const __NR_lsm_set_self_attr: u32 = 460; pub const __NR_lsm_list_modules: u32 = 461; pub const __NR_mseal: u32 = 462; +pub const __NR_setxattrat: u32 = 463; +pub const __NR_getxattrat: u32 = 464; +pub const __NR_listxattrat: u32 = 465; +pub const __NR_removexattrat: u32 = 466; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WSTOPPED: u32 = 2; @@ -2870,26 +2896,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2906,6 +2954,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2917,6 +2979,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2961,6 +3035,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -2972,6 +3057,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2983,6 +3079,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2994,6 +3101,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3005,6 +3123,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3016,6 +3145,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/riscv64/if_arp.rs b/src/riscv64/if_arp.rs index 9dbf9b47..fcb2f485 100644 --- a/src/riscv64/if_arp.rs +++ b/src/riscv64/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1109,6 +1109,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1294,6 +1295,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1584,6 +1587,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -1790,7 +1794,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2118,6 +2123,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2125,7 +2137,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2623,7 +2637,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/riscv64/if_ether.rs b/src/riscv64/if_ether.rs index dd96d8b0..c1f4e6d6 100644 --- a/src/riscv64/if_ether.rs +++ b/src/riscv64/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/riscv64/if_packet.rs b/src/riscv64/if_packet.rs index f5b63d7f..76a0a3eb 100644 --- a/src/riscv64/if_packet.rs +++ b/src/riscv64/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/riscv64/io_uring.rs b/src/riscv64/io_uring.rs index 2518db22..0558dcba 100644 --- a/src/riscv64/io_uring.rs +++ b/src/riscv64/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -159,7 +159,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -423,6 +429,23 @@ pub fds: __u64, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { pub nr: __u32, pub flags: __u32, @@ -483,7 +506,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -541,8 +567,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -735,6 +774,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -837,6 +880,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -873,6 +917,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -895,6 +942,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -914,7 +962,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1058,7 +1110,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1072,7 +1127,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1084,6 +1152,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1094,6 +1178,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/riscv64/ioctl.rs b/src/riscv64/ioctl.rs index 058ff46c..63131c97 100644 --- a/src/riscv64/ioctl.rs +++ b/src/riscv64/ioctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const FIONREAD: u32 = 21531; pub const FIONBIO: u32 = 21537; diff --git a/src/riscv64/landlock.rs b/src/riscv64/landlock.rs index 35f92124..0548e2dc 100644 --- a/src/riscv64/landlock.rs +++ b/src/riscv64/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/riscv64/loop_device.rs b/src/riscv64/loop_device.rs index 7fdd5cf0..754d71e8 100644 --- a/src/riscv64/loop_device.rs +++ b/src/riscv64/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_long_t = crate::ctypes::c_long; pub type __kernel_ulong_t = crate::ctypes::c_ulong; diff --git a/src/riscv64/mempolicy.rs b/src/riscv64/mempolicy.rs index a24915cc..ad4957c5 100644 --- a/src/riscv64/mempolicy.rs +++ b/src/riscv64/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/riscv64/net.rs b/src/riscv64/net.rs index 5a96657b..f3459422 100644 --- a/src/riscv64/net.rs +++ b/src/riscv64/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1200,6 +1200,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 78; pub const SO_DEVMEM_DMABUF: u32 = 79; pub const SCM_DEVMEM_DMABUF: u32 = 79; pub const SO_DEVMEM_DONTNEED: u32 = 80; +pub const SCM_TS_OPT_ID: u32 = 81; pub const SO_TIMESTAMP: u32 = 29; pub const SO_TIMESTAMPNS: u32 = 35; pub const SO_TIMESTAMPING: u32 = 37; @@ -2163,26 +2164,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2199,6 +2222,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2210,6 +2247,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2292,6 +2341,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2303,6 +2363,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(ihl: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2329,6 +2400,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2340,6 +2422,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(priority: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2366,6 +2459,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn doff(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2377,6 +2481,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2388,6 +2503,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2399,6 +2525,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2410,6 +2547,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2421,6 +2569,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2432,6 +2591,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2443,6 +2613,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2454,6 +2635,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2465,6 +2657,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(res1: __u16, doff: __u16, fin: __u16, syn: __u16, rst: __u16, psh: __u16, ack: __u16, urg: __u16, ece: __u16, cwr: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2523,6 +2726,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2534,6 +2748,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2545,6 +2770,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2556,6 +2792,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2590,6 +2837,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2601,6 +2859,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2612,6 +2881,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2642,6 +2922,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2653,6 +2944,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2664,6 +2966,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2675,6 +2988,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2709,6 +3033,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2720,6 +3055,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2731,6 +3077,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2742,6 +3099,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2753,6 +3121,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2764,6 +3143,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2806,6 +3196,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2817,6 +3218,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2828,6 +3240,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -2839,6 +3262,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/riscv64/netlink.rs b/src/riscv64/netlink.rs index 8624280f..0fafa7ac 100644 --- a/src/riscv64/netlink.rs +++ b/src/riscv64/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -824,6 +824,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1009,6 +1010,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1299,6 +1302,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1653,7 +1657,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1981,6 +1986,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1988,7 +2000,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2486,7 +2500,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/riscv64/prctl.rs b/src/riscv64/prctl.rs index 11c5b54a..cccf5ccd 100644 --- a/src/riscv64/prctl.rs +++ b/src/riscv64/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -194,6 +194,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -252,3 +254,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/riscv64/ptrace.rs b/src/riscv64/ptrace.rs index 21dc9491..9894ccf3 100644 --- a/src/riscv64/ptrace.rs +++ b/src/riscv64/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/riscv64/system.rs b/src/riscv64/system.rs index 9343a1a6..dd95fee7 100644 --- a/src/riscv64/system.rs +++ b/src/riscv64/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/riscv64/xdp.rs b/src/riscv64/xdp.rs index af56500b..132f82cd 100644 --- a/src/riscv64/xdp.rs +++ b/src/riscv64/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/s390x/bootparam.rs b/src/s390x/bootparam.rs index 4f4f6fab..609ea889 100644 --- a/src/s390x/bootparam.rs +++ b/src/s390x/bootparam.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/s390x/btrfs.rs b/src/s390x/btrfs.rs index fab87733..b1083053 100644 --- a/src/s390x/btrfs.rs +++ b/src/s390x/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -171,7 +171,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -723,6 +729,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1340,6 +1353,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1542,6 +1559,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/s390x/elf_uapi.rs b/src/s390x/elf_uapi.rs index 8b31501f..ccaf20bf 100644 --- a/src/s390x/elf_uapi.rs +++ b/src/s390x/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -505,6 +505,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -512,6 +513,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/s390x/errno.rs b/src/s390x/errno.rs index b7766e1c..5b018a26 100644 --- a/src/s390x/errno.rs +++ b/src/s390x/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/s390x/general.rs b/src/s390x/general.rs index 0053a098..8e807304 100644 --- a/src/s390x/general.rs +++ b/src/s390x/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -286,7 +286,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -818,6 +824,13 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1010,9 +1023,9 @@ pub sa_flags: crate::ctypes::c_ulong, pub sa_restorer: __sigrestore_t, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_SYSINFO_EHDR: u32 = 33; pub const AT_VECTOR_SIZE_ARCH: u32 = 1; @@ -1226,6 +1239,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 524288; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1402,6 +1416,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1701,6 +1719,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -1713,6 +1733,8 @@ pub const MAP_NORESERVE: u32 = 16384; pub const MCL_CURRENT: u32 = 1; pub const MCL_FUTURE: u32 = 2; pub const MCL_ONFAULT: u32 = 4; +pub const SHADOW_STACK_SET_TOKEN: u32 = 1; +pub const SHADOW_STACK_SET_MARKER: u32 = 2; pub const HUGETLB_FLAG_ENCODE_SHIFT: u32 = 26; pub const HUGETLB_FLAG_ENCODE_MASK: u32 = 63; pub const HUGETLB_FLAG_ENCODE_16KB: u32 = 939524096; @@ -2627,6 +2649,10 @@ pub const __NR_lsm_get_self_attr: u32 = 459; pub const __NR_lsm_set_self_attr: u32 = 460; pub const __NR_lsm_list_modules: u32 = 461; pub const __NR_mseal: u32 = 462; +pub const __NR_setxattrat: u32 = 463; +pub const __NR_getxattrat: u32 = 464; +pub const __NR_listxattrat: u32 = 465; +pub const __NR_removexattrat: u32 = 466; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WSTOPPED: u32 = 2; @@ -2936,26 +2962,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2972,6 +3020,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2983,6 +3045,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -3027,6 +3101,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -3038,6 +3123,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -3049,6 +3145,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -3060,6 +3167,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3071,6 +3189,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3082,6 +3211,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/s390x/if_arp.rs b/src/s390x/if_arp.rs index 2deef98f..f513feec 100644 --- a/src/s390x/if_arp.rs +++ b/src/s390x/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1123,6 +1123,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1308,6 +1309,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1598,6 +1601,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -1804,7 +1808,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2132,6 +2137,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2139,7 +2151,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2637,7 +2651,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/s390x/if_ether.rs b/src/s390x/if_ether.rs index e3a7597f..03ebba78 100644 --- a/src/s390x/if_ether.rs +++ b/src/s390x/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/s390x/if_packet.rs b/src/s390x/if_packet.rs index be996dfa..571ba77f 100644 --- a/src/s390x/if_packet.rs +++ b/src/s390x/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/s390x/io_uring.rs b/src/s390x/io_uring.rs index 22dbcd6c..00764184 100644 --- a/src/s390x/io_uring.rs +++ b/src/s390x/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -173,7 +173,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -437,6 +443,23 @@ pub fds: __u64, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { pub nr: __u32, pub flags: __u32, @@ -497,7 +520,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -555,8 +581,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -749,6 +788,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -851,6 +894,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -887,6 +931,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -909,6 +956,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -928,7 +976,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1072,7 +1124,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1086,7 +1141,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1098,6 +1166,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1108,6 +1192,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/s390x/ioctl.rs b/src/s390x/ioctl.rs index 40ff22c2..1e96b25f 100644 --- a/src/s390x/ioctl.rs +++ b/src/s390x/ioctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const FIONREAD: u32 = 21531; pub const FIONBIO: u32 = 21537; diff --git a/src/s390x/landlock.rs b/src/s390x/landlock.rs index c2ee0bd1..d06925dc 100644 --- a/src/s390x/landlock.rs +++ b/src/s390x/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/s390x/loop_device.rs b/src/s390x/loop_device.rs index 6faa9a2f..5690fb8c 100644 --- a/src/s390x/loop_device.rs +++ b/src/s390x/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_size_t = crate::ctypes::c_ulong; pub type __kernel_ssize_t = crate::ctypes::c_long; diff --git a/src/s390x/mempolicy.rs b/src/s390x/mempolicy.rs index a24915cc..ad4957c5 100644 --- a/src/s390x/mempolicy.rs +++ b/src/s390x/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/s390x/net.rs b/src/s390x/net.rs index fce1ce0a..e0aa3911 100644 --- a/src/s390x/net.rs +++ b/src/s390x/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1214,6 +1214,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 78; pub const SO_DEVMEM_DMABUF: u32 = 79; pub const SCM_DEVMEM_DMABUF: u32 = 79; pub const SO_DEVMEM_DONTNEED: u32 = 80; +pub const SCM_TS_OPT_ID: u32 = 81; pub const SO_TIMESTAMP: u32 = 29; pub const SO_TIMESTAMPNS: u32 = 35; pub const SO_TIMESTAMPING: u32 = 37; @@ -2183,26 +2184,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2219,6 +2242,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2230,6 +2267,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2312,6 +2361,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn ihl(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2323,6 +2383,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, ihl: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2349,6 +2420,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn priority(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2360,6 +2442,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, priority: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2386,6 +2479,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn res1(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2397,6 +2501,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2408,6 +2523,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2419,6 +2545,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2430,6 +2567,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2441,6 +2589,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2452,6 +2611,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2463,6 +2633,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2474,6 +2655,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2485,6 +2677,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(doff: __u16, res1: __u16, cwr: __u16, ece: __u16, urg: __u16, ack: __u16, psh: __u16, rst: __u16, syn: __u16, fin: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2543,6 +2746,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2554,6 +2768,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2565,6 +2790,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2576,6 +2812,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2610,6 +2857,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2621,6 +2879,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2632,6 +2901,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2662,6 +2942,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2673,6 +2964,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2684,6 +2986,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2695,6 +3008,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2729,6 +3053,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2740,6 +3075,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2751,6 +3097,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2762,6 +3119,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2773,6 +3141,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2784,6 +3163,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2826,6 +3216,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2837,6 +3238,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2848,6 +3260,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -2859,6 +3282,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/s390x/netlink.rs b/src/s390x/netlink.rs index a4c22dff..b2cabbb5 100644 --- a/src/s390x/netlink.rs +++ b/src/s390x/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -838,6 +838,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1023,6 +1024,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1313,6 +1316,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1667,7 +1671,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1995,6 +2000,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2002,7 +2014,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2500,7 +2514,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/s390x/prctl.rs b/src/s390x/prctl.rs index 63fd1f0c..6f4c20f1 100644 --- a/src/s390x/prctl.rs +++ b/src/s390x/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -208,6 +208,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -266,6 +268,12 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; #[repr(C)] #[derive(Copy, Clone)] pub union __vector128__bindgen_ty_1 { diff --git a/src/s390x/ptrace.rs b/src/s390x/ptrace.rs index af6eb49d..2148d8d0 100644 --- a/src/s390x/ptrace.rs +++ b/src/s390x/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1013,26 +1013,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -1049,6 +1071,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -1060,6 +1096,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -1101,6 +1149,17 @@ self._bitfield_1.set(32usize, 1u8, val as u64) } } #[inline] +pub unsafe fn em_branching_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 32usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_em_branching_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 32usize, 1u8, val as u64) +} +} +#[inline] pub fn em_instruction_fetch(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u32) } } @@ -1112,6 +1171,17 @@ self._bitfield_1.set(33usize, 1u8, val as u64) } } #[inline] +pub unsafe fn em_instruction_fetch_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 33usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_em_instruction_fetch_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 33usize, 1u8, val as u64) +} +} +#[inline] pub fn em_storage_alteration(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u32) } } @@ -1123,6 +1193,17 @@ self._bitfield_1.set(34usize, 1u8, val as u64) } } #[inline] +pub unsafe fn em_storage_alteration_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 34usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_em_storage_alteration_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 34usize, 1u8, val as u64) +} +} +#[inline] pub fn em_gpr_alt_unused(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u32) } } @@ -1134,6 +1215,17 @@ self._bitfield_1.set(35usize, 1u8, val as u64) } } #[inline] +pub unsafe fn em_gpr_alt_unused_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 35usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_em_gpr_alt_unused_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 35usize, 1u8, val as u64) +} +} +#[inline] pub fn em_store_real_address(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u32) } } @@ -1145,6 +1237,17 @@ self._bitfield_1.set(36usize, 1u8, val as u64) } } #[inline] +pub unsafe fn em_store_real_address_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 36usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_em_store_real_address_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 36usize, 1u8, val as u64) +} +} +#[inline] pub fn branch_addr_ctl(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(40usize, 1u8) as u32) } } @@ -1156,6 +1259,17 @@ self._bitfield_1.set(40usize, 1u8, val as u64) } } #[inline] +pub unsafe fn branch_addr_ctl_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 40usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_branch_addr_ctl_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 40usize, 1u8, val as u64) +} +} +#[inline] pub fn storage_alt_space_ctl(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(42usize, 1u8) as u32) } } @@ -1167,6 +1281,17 @@ self._bitfield_1.set(42usize, 1u8, val as u64) } } #[inline] +pub unsafe fn storage_alt_space_ctl_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 42usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_storage_alt_space_ctl_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 42usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(em_branching: crate::ctypes::c_uint, em_instruction_fetch: crate::ctypes::c_uint, em_storage_alteration: crate::ctypes::c_uint, em_gpr_alt_unused: crate::ctypes::c_uint, em_store_real_address: crate::ctypes::c_uint, branch_addr_ctl: crate::ctypes::c_uint, storage_alt_space_ctl: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 8usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); __bindgen_bitfield_unit.set(32usize, 1u8, { @@ -1213,6 +1338,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn perc_branching_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_perc_branching_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn perc_instruction_fetch(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -1224,6 +1360,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn perc_instruction_fetch_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_perc_instruction_fetch_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn perc_storage_alteration(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -1235,6 +1382,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn perc_storage_alteration_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_perc_storage_alteration_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn perc_gpr_alt_unused(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -1246,6 +1404,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn perc_gpr_alt_unused_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_perc_gpr_alt_unused_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn perc_store_real_address(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -1257,6 +1426,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn perc_store_real_address_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_perc_store_real_address_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn atmid_psw_bit_31(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } } @@ -1268,6 +1448,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn atmid_psw_bit_31_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_atmid_psw_bit_31_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn atmid_validity_bit(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } } @@ -1279,6 +1470,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn atmid_validity_bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_atmid_validity_bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn atmid_psw_bit_32(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } } @@ -1290,6 +1492,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn atmid_psw_bit_32_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_atmid_psw_bit_32_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn atmid_psw_bit_5(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } } @@ -1301,6 +1514,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn atmid_psw_bit_5_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_atmid_psw_bit_5_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn atmid_psw_bit_16(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } } @@ -1312,6 +1536,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn atmid_psw_bit_16_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_atmid_psw_bit_16_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn atmid_psw_bit_17(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } } @@ -1323,6 +1558,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn atmid_psw_bit_17_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_atmid_psw_bit_17_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn si(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 2u8) as u32) } } @@ -1334,6 +1580,17 @@ self._bitfield_1.set(14usize, 2u8, val as u64) } } #[inline] +pub unsafe fn si_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_si_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1( perc_branching: crate::ctypes::c_uint, perc_instruction_fetch: crate::ctypes::c_uint, @@ -1411,6 +1668,17 @@ self._bitfield_2.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn access_id_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_2), 4usize, 4u8) as u32) } +} +#[inline] +pub unsafe fn set_access_id_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_2), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_2(access_id: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(4usize, 4u8, { @@ -1433,6 +1701,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn single_step_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_single_step_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn instruction_fetch(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -1444,6 +1723,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn instruction_fetch_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_instruction_fetch_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(single_step: crate::ctypes::c_uint, instruction_fetch: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/s390x/system.rs b/src/s390x/system.rs index 9b4cf522..e3947a4d 100644 --- a/src/s390x/system.rs +++ b/src/s390x/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/s390x/xdp.rs b/src/s390x/xdp.rs index 14893012..6b9bf800 100644 --- a/src/s390x/xdp.rs +++ b/src/s390x/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/sparc/bootparam.rs b/src/sparc/bootparam.rs index 4f4f6fab..609ea889 100644 --- a/src/sparc/bootparam.rs +++ b/src/sparc/bootparam.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/sparc/btrfs.rs b/src/sparc/btrfs.rs index 89ab0e73..e95c606b 100644 --- a/src/sparc/btrfs.rs +++ b/src/sparc/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -155,7 +155,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -707,6 +713,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1325,6 +1338,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1527,6 +1544,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/sparc/elf_uapi.rs b/src/sparc/elf_uapi.rs index 635f0dd7..8cef9670 100644 --- a/src/sparc/elf_uapi.rs +++ b/src/sparc/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -489,6 +489,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -496,6 +497,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/sparc/errno.rs b/src/sparc/errno.rs index 07992749..994fb91e 100644 --- a/src/sparc/errno.rs +++ b/src/sparc/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/sparc/general.rs b/src/sparc/general.rs index f3d25c21..5d011004 100644 --- a/src/sparc/general.rs +++ b/src/sparc/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -271,7 +271,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -817,6 +823,13 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1047,9 +1060,9 @@ pub sa_handler_kernel: __kernel_sighandler_t, pub sa_flags: crate::ctypes::c_ulong, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_SYSINFO_EHDR: u32 = 33; pub const AT_ADI_BLKSZ: u32 = 48; @@ -1269,6 +1282,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 4194304; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1446,6 +1460,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1745,6 +1763,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -2759,6 +2779,10 @@ pub const __NR_lsm_get_self_attr: u32 = 459; pub const __NR_lsm_set_self_attr: u32 = 460; pub const __NR_lsm_list_modules: u32 = 461; pub const __NR_mseal: u32 = 462; +pub const __NR_setxattrat: u32 = 463; +pub const __NR_getxattrat: u32 = 464; +pub const __NR_listxattrat: u32 = 465; +pub const __NR_removexattrat: u32 = 466; pub const KERN_FEATURE_MIXED_MODE_STACK: u32 = 1; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; @@ -3056,26 +3080,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -3092,6 +3138,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -3103,6 +3163,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -3147,6 +3219,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -3158,6 +3241,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -3169,6 +3263,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -3180,6 +3285,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3191,6 +3307,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3202,6 +3329,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/sparc/if_arp.rs b/src/sparc/if_arp.rs index 36249f83..14a7a5a6 100644 --- a/src/sparc/if_arp.rs +++ b/src/sparc/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1323,6 +1323,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1508,6 +1509,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1798,6 +1801,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -2004,7 +2008,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2332,6 +2337,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2339,7 +2351,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2837,7 +2851,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/sparc/if_ether.rs b/src/sparc/if_ether.rs index bc18a24a..530c646c 100644 --- a/src/sparc/if_ether.rs +++ b/src/sparc/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/sparc/if_packet.rs b/src/sparc/if_packet.rs index 2278e5cd..efdbb660 100644 --- a/src/sparc/if_packet.rs +++ b/src/sparc/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/sparc/io_uring.rs b/src/sparc/io_uring.rs index a26070cf..db4174b7 100644 --- a/src/sparc/io_uring.rs +++ b/src/sparc/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -157,7 +157,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -421,6 +427,23 @@ pub fds: __u64, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { pub nr: __u32, pub flags: __u32, @@ -481,7 +504,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -539,8 +565,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -734,6 +773,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -836,6 +879,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -872,6 +916,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -894,6 +941,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -913,7 +961,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1057,7 +1109,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1071,7 +1126,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1083,6 +1151,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1093,6 +1177,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/sparc/ioctl.rs b/src/sparc/ioctl.rs index 4f4f6fab..609ea889 100644 --- a/src/sparc/ioctl.rs +++ b/src/sparc/ioctl.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/sparc/landlock.rs b/src/sparc/landlock.rs index 051e9922..fb2f6795 100644 --- a/src/sparc/landlock.rs +++ b/src/sparc/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/sparc/loop_device.rs b/src/sparc/loop_device.rs index e6d7ff78..de73aea0 100644 --- a/src/sparc/loop_device.rs +++ b/src/sparc/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_size_t = crate::ctypes::c_uint; pub type __kernel_ssize_t = crate::ctypes::c_int; diff --git a/src/sparc/mempolicy.rs b/src/sparc/mempolicy.rs index 4f6c3944..b26dbf96 100644 --- a/src/sparc/mempolicy.rs +++ b/src/sparc/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/sparc/net.rs b/src/sparc/net.rs index 889c5cc9..79fe97a8 100644 --- a/src/sparc/net.rs +++ b/src/sparc/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1416,6 +1416,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 87; pub const SO_DEVMEM_DMABUF: u32 = 88; pub const SCM_DEVMEM_DMABUF: u32 = 88; pub const SO_DEVMEM_DONTNEED: u32 = 89; +pub const SCM_TS_OPT_ID: u32 = 90; pub const SYS_SOCKET: u32 = 1; pub const SYS_BIND: u32 = 2; pub const SYS_CONNECT: u32 = 3; @@ -2371,26 +2372,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2407,6 +2430,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2418,6 +2455,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2500,6 +2549,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn ihl(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2511,6 +2571,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, ihl: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2537,6 +2608,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn priority(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2548,6 +2630,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, priority: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2574,6 +2667,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn res1(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2585,6 +2689,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2596,6 +2711,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2607,6 +2733,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2618,6 +2755,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2629,6 +2777,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2640,6 +2799,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2651,6 +2821,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2662,6 +2843,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2673,6 +2865,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(doff: __u16, res1: __u16, cwr: __u16, ece: __u16, urg: __u16, ack: __u16, psh: __u16, rst: __u16, syn: __u16, fin: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2731,6 +2934,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2742,6 +2956,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2753,6 +2978,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2764,6 +3000,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2798,6 +3045,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2809,6 +3067,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2820,6 +3089,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2850,6 +3130,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2861,6 +3152,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2872,6 +3174,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2883,6 +3196,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2917,6 +3241,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2928,6 +3263,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2939,6 +3285,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2950,6 +3307,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2961,6 +3329,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2972,6 +3351,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -3014,6 +3404,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -3025,6 +3426,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -3036,6 +3448,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -3047,6 +3470,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/sparc/netlink.rs b/src/sparc/netlink.rs index 5e9e7341..ae0f359d 100644 --- a/src/sparc/netlink.rs +++ b/src/sparc/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -822,6 +822,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1007,6 +1008,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1297,6 +1300,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1651,7 +1655,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1979,6 +1984,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1986,7 +1998,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2484,7 +2498,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/sparc/prctl.rs b/src/sparc/prctl.rs index 100ef89a..0f3f1cad 100644 --- a/src/sparc/prctl.rs +++ b/src/sparc/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -192,6 +192,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -250,3 +252,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/sparc/ptrace.rs b/src/sparc/ptrace.rs index ba999648..a81af84a 100644 --- a/src/sparc/ptrace.rs +++ b/src/sparc/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/sparc/system.rs b/src/sparc/system.rs index 3540d7ec..203e479a 100644 --- a/src/sparc/system.rs +++ b/src/sparc/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/sparc/xdp.rs b/src/sparc/xdp.rs index 0deaf36c..be90b473 100644 --- a/src/sparc/xdp.rs +++ b/src/sparc/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/sparc64/bootparam.rs b/src/sparc64/bootparam.rs index 4f4f6fab..609ea889 100644 --- a/src/sparc64/bootparam.rs +++ b/src/sparc64/bootparam.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/sparc64/btrfs.rs b/src/sparc64/btrfs.rs index f50c5542..90496dd1 100644 --- a/src/sparc64/btrfs.rs +++ b/src/sparc64/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -163,7 +163,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -715,6 +721,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1333,6 +1346,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1535,6 +1552,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/sparc64/elf_uapi.rs b/src/sparc64/elf_uapi.rs index ddd1351d..e691b02a 100644 --- a/src/sparc64/elf_uapi.rs +++ b/src/sparc64/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -497,6 +497,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -504,6 +505,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/sparc64/errno.rs b/src/sparc64/errno.rs index 07992749..994fb91e 100644 --- a/src/sparc64/errno.rs +++ b/src/sparc64/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/sparc64/general.rs b/src/sparc64/general.rs index 40ff94d4..2c8a1b82 100644 --- a/src/sparc64/general.rs +++ b/src/sparc64/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -279,7 +279,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -819,6 +825,13 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1044,9 +1057,9 @@ pub sa_handler_kernel: __kernel_sighandler_t, pub sa_flags: crate::ctypes::c_ulong, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_SYSINFO_EHDR: u32 = 33; pub const AT_ADI_BLKSZ: u32 = 48; @@ -1263,6 +1276,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 4194304; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1440,6 +1454,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1739,6 +1757,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -2716,6 +2736,10 @@ pub const __NR_lsm_get_self_attr: u32 = 459; pub const __NR_lsm_set_self_attr: u32 = 460; pub const __NR_lsm_list_modules: u32 = 461; pub const __NR_mseal: u32 = 462; +pub const __NR_setxattrat: u32 = 463; +pub const __NR_getxattrat: u32 = 464; +pub const __NR_listxattrat: u32 = 465; +pub const __NR_removexattrat: u32 = 466; pub const KERN_FEATURE_MIXED_MODE_STACK: u32 = 1; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; @@ -3012,26 +3036,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -3048,6 +3094,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -3059,6 +3119,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -3103,6 +3175,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -3114,6 +3197,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -3125,6 +3219,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -3136,6 +3241,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3147,6 +3263,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3158,6 +3285,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/sparc64/if_arp.rs b/src/sparc64/if_arp.rs index d1079d42..fc28e409 100644 --- a/src/sparc64/if_arp.rs +++ b/src/sparc64/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1331,6 +1331,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1516,6 +1517,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1806,6 +1809,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -2012,7 +2016,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2340,6 +2345,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2347,7 +2359,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2845,7 +2859,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/sparc64/if_ether.rs b/src/sparc64/if_ether.rs index 5693595a..bac3e387 100644 --- a/src/sparc64/if_ether.rs +++ b/src/sparc64/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/sparc64/if_packet.rs b/src/sparc64/if_packet.rs index 51f542ae..0f5f1dfc 100644 --- a/src/sparc64/if_packet.rs +++ b/src/sparc64/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/sparc64/io_uring.rs b/src/sparc64/io_uring.rs index 58e6b235..06d715b2 100644 --- a/src/sparc64/io_uring.rs +++ b/src/sparc64/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -165,7 +165,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -423,6 +429,23 @@ pub fds: __u64, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { pub nr: __u32, pub flags: __u32, @@ -483,7 +506,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -541,8 +567,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -736,6 +775,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -838,6 +881,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -874,6 +918,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -896,6 +943,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -915,7 +963,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1059,7 +1111,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1073,7 +1128,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1085,6 +1153,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1095,6 +1179,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/sparc64/ioctl.rs b/src/sparc64/ioctl.rs index 4f4f6fab..609ea889 100644 --- a/src/sparc64/ioctl.rs +++ b/src/sparc64/ioctl.rs @@ -1,3 +1,3 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ diff --git a/src/sparc64/landlock.rs b/src/sparc64/landlock.rs index 9c87dcf9..c668c700 100644 --- a/src/sparc64/landlock.rs +++ b/src/sparc64/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/sparc64/loop_device.rs b/src/sparc64/loop_device.rs index 0edbd197..e2201c11 100644 --- a/src/sparc64/loop_device.rs +++ b/src/sparc64/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_old_uid_t = crate::ctypes::c_ushort; pub type __kernel_old_gid_t = crate::ctypes::c_ushort; diff --git a/src/sparc64/mempolicy.rs b/src/sparc64/mempolicy.rs index 4f6c3944..b26dbf96 100644 --- a/src/sparc64/mempolicy.rs +++ b/src/sparc64/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/sparc64/net.rs b/src/sparc64/net.rs index cd86ad66..afee3580 100644 --- a/src/sparc64/net.rs +++ b/src/sparc64/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1422,6 +1422,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 87; pub const SO_DEVMEM_DMABUF: u32 = 88; pub const SCM_DEVMEM_DMABUF: u32 = 88; pub const SO_DEVMEM_DONTNEED: u32 = 89; +pub const SCM_TS_OPT_ID: u32 = 90; pub const SO_TIMESTAMP: u32 = 29; pub const SO_TIMESTAMPNS: u32 = 33; pub const SO_TIMESTAMPING: u32 = 35; @@ -2385,26 +2386,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2421,6 +2444,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2432,6 +2469,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2514,6 +2563,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn ihl(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2525,6 +2585,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, ihl: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2551,6 +2622,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn priority(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2562,6 +2644,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(version: __u8, priority: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2588,6 +2681,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn res1(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2599,6 +2703,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2610,6 +2725,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2621,6 +2747,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2632,6 +2769,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2643,6 +2791,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2654,6 +2813,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2665,6 +2835,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2676,6 +2857,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2687,6 +2879,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(doff: __u16, res1: __u16, cwr: __u16, ece: __u16, urg: __u16, ack: __u16, psh: __u16, rst: __u16, syn: __u16, fin: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2745,6 +2948,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2756,6 +2970,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2767,6 +2992,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2778,6 +3014,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2812,6 +3059,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2823,6 +3081,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2834,6 +3103,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2864,6 +3144,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2875,6 +3166,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2886,6 +3188,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2897,6 +3210,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2931,6 +3255,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2942,6 +3277,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2953,6 +3299,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2964,6 +3321,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2975,6 +3343,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2986,6 +3365,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -3028,6 +3418,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -3039,6 +3440,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -3050,6 +3462,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -3061,6 +3484,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/sparc64/netlink.rs b/src/sparc64/netlink.rs index ac432316..38427e82 100644 --- a/src/sparc64/netlink.rs +++ b/src/sparc64/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -830,6 +830,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1015,6 +1016,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1305,6 +1308,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1659,7 +1663,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1987,6 +1992,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1994,7 +2006,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2492,7 +2506,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/sparc64/prctl.rs b/src/sparc64/prctl.rs index 48b245da..a9fff701 100644 --- a/src/sparc64/prctl.rs +++ b/src/sparc64/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -200,6 +200,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -258,3 +260,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/sparc64/ptrace.rs b/src/sparc64/ptrace.rs index cb36b7f3..3c69cf54 100644 --- a/src/sparc64/ptrace.rs +++ b/src/sparc64/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/sparc64/system.rs b/src/sparc64/system.rs index dcb3c289..4e9f278a 100644 --- a/src/sparc64/system.rs +++ b/src/sparc64/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/sparc64/xdp.rs b/src/sparc64/xdp.rs index f5ecc826..381065bb 100644 --- a/src/sparc64/xdp.rs +++ b/src/sparc64/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x32/bootparam.rs b/src/x32/bootparam.rs index ef67b55b..01afc719 100644 --- a/src/x32/bootparam.rs +++ b/src/x32/bootparam.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x32/btrfs.rs b/src/x32/btrfs.rs index 60919917..c705c0bd 100644 --- a/src/x32/btrfs.rs +++ b/src/x32/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -157,7 +157,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -709,6 +715,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1326,6 +1339,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1528,6 +1545,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/x32/elf_uapi.rs b/src/x32/elf_uapi.rs index 15c2e983..08a756c2 100644 --- a/src/x32/elf_uapi.rs +++ b/src/x32/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -491,6 +491,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -498,6 +499,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/x32/errno.rs b/src/x32/errno.rs index b7766e1c..5b018a26 100644 --- a/src/x32/errno.rs +++ b/src/x32/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/x32/general.rs b/src/x32/general.rs index 3e0cf55f..ef4a0f3c 100644 --- a/src/x32/general.rs +++ b/src/x32/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -272,7 +272,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -800,6 +806,13 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1023,9 +1036,9 @@ pub sa_flags: crate::ctypes::c_ulong, pub sa_restorer: __sigrestore_t, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_SYSINFO_EHDR: u32 = 33; pub const AT_VECTOR_SIZE_ARCH: u32 = 3; @@ -1242,6 +1255,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 524288; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1418,6 +1432,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1673,7 +1691,6 @@ pub const SECRETMEM_MAGIC: u32 = 1397048141; pub const PID_FS_MAGIC: u32 = 1346978886; pub const MAP_32BIT: u32 = 64; pub const MAP_ABOVE4G: u32 = 128; -pub const SHADOW_STACK_SET_TOKEN: u32 = 1; pub const PROT_READ: u32 = 1; pub const PROT_WRITE: u32 = 2; pub const PROT_EXEC: u32 = 4; @@ -1720,6 +1737,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -1732,6 +1751,8 @@ pub const MAP_NORESERVE: u32 = 16384; pub const MCL_CURRENT: u32 = 1; pub const MCL_FUTURE: u32 = 2; pub const MCL_ONFAULT: u32 = 4; +pub const SHADOW_STACK_SET_TOKEN: u32 = 1; +pub const SHADOW_STACK_SET_MARKER: u32 = 2; pub const HUGETLB_FLAG_ENCODE_SHIFT: u32 = 26; pub const HUGETLB_FLAG_ENCODE_MASK: u32 = 63; pub const HUGETLB_FLAG_ENCODE_16KB: u32 = 939524096; @@ -2594,6 +2615,10 @@ pub const __NR_lsm_get_self_attr: u32 = 1073742283; pub const __NR_lsm_set_self_attr: u32 = 1073742284; pub const __NR_lsm_list_modules: u32 = 1073742285; pub const __NR_mseal: u32 = 1073742286; +pub const __NR_setxattrat: u32 = 1073742287; +pub const __NR_getxattrat: u32 = 1073742288; +pub const __NR_listxattrat: u32 = 1073742289; +pub const __NR_removexattrat: u32 = 1073742290; pub const __NR_rt_sigaction: u32 = 1073742336; pub const __NR_rt_sigreturn: u32 = 1073742337; pub const __NR_ioctl: u32 = 1073742338; @@ -2928,26 +2953,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2964,6 +3011,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2975,6 +3036,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -3019,6 +3092,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -3030,6 +3114,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -3041,6 +3136,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -3052,6 +3158,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3063,6 +3180,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3074,6 +3202,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn lm(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } } @@ -3085,6 +3224,17 @@ self._bitfield_1.set(7usize, 1u8, val as u64) } } #[inline] +pub unsafe fn lm_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 7usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_lm_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 7usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint, lm: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/x32/if_arp.rs b/src/x32/if_arp.rs index 18866c89..a94b9325 100644 --- a/src/x32/if_arp.rs +++ b/src/x32/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1109,6 +1109,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1294,6 +1295,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1584,6 +1587,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -1790,7 +1794,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2118,6 +2123,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2125,7 +2137,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2623,7 +2637,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/x32/if_ether.rs b/src/x32/if_ether.rs index 6a4f1f94..c984e0ea 100644 --- a/src/x32/if_ether.rs +++ b/src/x32/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x32/if_packet.rs b/src/x32/if_packet.rs index 578c0394..a345d2f6 100644 --- a/src/x32/if_packet.rs +++ b/src/x32/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x32/io_uring.rs b/src/x32/io_uring.rs index d67df39b..933f4c06 100644 --- a/src/x32/io_uring.rs +++ b/src/x32/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -159,7 +159,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -423,6 +429,23 @@ pub fds: __u64, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { pub nr: __u32, pub flags: __u32, @@ -483,7 +506,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -541,8 +567,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -735,6 +774,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -837,6 +880,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -873,6 +917,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -895,6 +942,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -914,7 +962,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1058,7 +1110,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1072,7 +1127,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1084,6 +1152,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1094,6 +1178,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/x32/ioctl.rs b/src/x32/ioctl.rs index d26fe3a0..695a489b 100644 --- a/src/x32/ioctl.rs +++ b/src/x32/ioctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const FIONREAD: u32 = 21531; pub const FIONBIO: u32 = 21537; diff --git a/src/x32/landlock.rs b/src/x32/landlock.rs index 224a77e9..ddc8754f 100644 --- a/src/x32/landlock.rs +++ b/src/x32/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x32/loop_device.rs b/src/x32/loop_device.rs index f505bd86..5d72b9e3 100644 --- a/src/x32/loop_device.rs +++ b/src/x32/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_long_t = crate::ctypes::c_longlong; pub type __kernel_ulong_t = crate::ctypes::c_ulonglong; diff --git a/src/x32/mempolicy.rs b/src/x32/mempolicy.rs index a24915cc..ad4957c5 100644 --- a/src/x32/mempolicy.rs +++ b/src/x32/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/x32/net.rs b/src/x32/net.rs index 42058968..8d68e037 100644 --- a/src/x32/net.rs +++ b/src/x32/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1202,6 +1202,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 78; pub const SO_DEVMEM_DMABUF: u32 = 79; pub const SCM_DEVMEM_DMABUF: u32 = 79; pub const SO_DEVMEM_DONTNEED: u32 = 80; +pub const SCM_TS_OPT_ID: u32 = 81; pub const SO_TIMESTAMP: u32 = 29; pub const SO_TIMESTAMPNS: u32 = 35; pub const SO_TIMESTAMPING: u32 = 37; @@ -2165,26 +2166,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2201,6 +2224,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2212,6 +2249,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2294,6 +2343,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2305,6 +2365,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(ihl: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2331,6 +2402,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2342,6 +2424,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(priority: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2368,6 +2461,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn doff(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2379,6 +2483,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2390,6 +2505,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2401,6 +2527,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2412,6 +2549,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2423,6 +2571,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2434,6 +2593,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2445,6 +2615,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2456,6 +2637,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2467,6 +2659,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(res1: __u16, doff: __u16, fin: __u16, syn: __u16, rst: __u16, psh: __u16, ack: __u16, urg: __u16, ece: __u16, cwr: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2525,6 +2728,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2536,6 +2750,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2547,6 +2772,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2558,6 +2794,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2592,6 +2839,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2603,6 +2861,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2614,6 +2883,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2644,6 +2924,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2655,6 +2946,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2666,6 +2968,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2677,6 +2990,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2711,6 +3035,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2722,6 +3057,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2733,6 +3079,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2744,6 +3101,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2755,6 +3123,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2766,6 +3145,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2808,6 +3198,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2819,6 +3220,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2830,6 +3242,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -2841,6 +3264,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/x32/netlink.rs b/src/x32/netlink.rs index 7ff26f1a..2964383e 100644 --- a/src/x32/netlink.rs +++ b/src/x32/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -824,6 +824,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1009,6 +1010,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1299,6 +1302,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1653,7 +1657,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1981,6 +1986,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1988,7 +2000,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2486,7 +2500,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/x32/prctl.rs b/src/x32/prctl.rs index f607859a..8335e211 100644 --- a/src/x32/prctl.rs +++ b/src/x32/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -194,6 +194,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -252,3 +254,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/x32/ptrace.rs b/src/x32/ptrace.rs index 55fc8fe1..bee9b4cd 100644 --- a/src/x32/ptrace.rs +++ b/src/x32/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x32/system.rs b/src/x32/system.rs index c7ec850c..9d41eb77 100644 --- a/src/x32/system.rs +++ b/src/x32/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x32/xdp.rs b/src/x32/xdp.rs index 53208260..60d1259f 100644 --- a/src/x32/xdp.rs +++ b/src/x32/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x86/bootparam.rs b/src/x86/bootparam.rs index 8c1b2bf2..29cc138f 100644 --- a/src/x86/bootparam.rs +++ b/src/x86/bootparam.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x86/btrfs.rs b/src/x86/btrfs.rs index bae9836f..60a5d057 100644 --- a/src/x86/btrfs.rs +++ b/src/x86/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -155,7 +155,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -707,6 +713,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1324,6 +1337,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1526,6 +1543,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/x86/elf_uapi.rs b/src/x86/elf_uapi.rs index 291b86b1..187f123d 100644 --- a/src/x86/elf_uapi.rs +++ b/src/x86/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -489,6 +489,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -496,6 +497,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/x86/errno.rs b/src/x86/errno.rs index b7766e1c..5b018a26 100644 --- a/src/x86/errno.rs +++ b/src/x86/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/x86/general.rs b/src/x86/general.rs index fa793d66..3c6c4e2f 100644 --- a/src/x86/general.rs +++ b/src/x86/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -269,7 +269,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -797,6 +803,14 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[repr(align(8))] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1043,9 +1057,9 @@ pub sa_flags: crate::ctypes::c_ulong, pub sa_restorer: __sigrestore_t, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_SYSINFO: u32 = 32; pub const AT_SYSINFO_EHDR: u32 = 33; @@ -1263,6 +1277,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 524288; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1439,6 +1454,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1694,7 +1713,6 @@ pub const SECRETMEM_MAGIC: u32 = 1397048141; pub const PID_FS_MAGIC: u32 = 1346978886; pub const MAP_32BIT: u32 = 64; pub const MAP_ABOVE4G: u32 = 128; -pub const SHADOW_STACK_SET_TOKEN: u32 = 1; pub const PROT_READ: u32 = 1; pub const PROT_WRITE: u32 = 2; pub const PROT_EXEC: u32 = 4; @@ -1741,6 +1759,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -1753,6 +1773,8 @@ pub const MAP_NORESERVE: u32 = 16384; pub const MCL_CURRENT: u32 = 1; pub const MCL_FUTURE: u32 = 2; pub const MCL_ONFAULT: u32 = 4; +pub const SHADOW_STACK_SET_TOKEN: u32 = 1; +pub const SHADOW_STACK_SET_MARKER: u32 = 2; pub const HUGETLB_FLAG_ENCODE_SHIFT: u32 = 26; pub const HUGETLB_FLAG_ENCODE_MASK: u32 = 63; pub const HUGETLB_FLAG_ENCODE_16KB: u32 = 939524096; @@ -2739,6 +2761,10 @@ pub const __NR_lsm_get_self_attr: u32 = 459; pub const __NR_lsm_set_self_attr: u32 = 460; pub const __NR_lsm_list_modules: u32 = 461; pub const __NR_mseal: u32 = 462; +pub const __NR_setxattrat: u32 = 463; +pub const __NR_getxattrat: u32 = 464; +pub const __NR_listxattrat: u32 = 465; +pub const __NR_removexattrat: u32 = 466; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WSTOPPED: u32 = 2; @@ -3044,26 +3070,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -3080,6 +3128,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -3091,6 +3153,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -3135,6 +3209,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -3146,6 +3231,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -3157,6 +3253,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -3168,6 +3275,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3179,6 +3297,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3190,6 +3319,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/x86/if_arp.rs b/src/x86/if_arp.rs index 78081189..dfe4195b 100644 --- a/src/x86/if_arp.rs +++ b/src/x86/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1109,6 +1109,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1294,6 +1295,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1584,6 +1587,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -1790,7 +1794,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2118,6 +2123,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2125,7 +2137,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2623,7 +2637,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/x86/if_ether.rs b/src/x86/if_ether.rs index b17170ca..d337ab84 100644 --- a/src/x86/if_ether.rs +++ b/src/x86/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x86/if_packet.rs b/src/x86/if_packet.rs index 89d3b481..d6a85d8e 100644 --- a/src/x86/if_packet.rs +++ b/src/x86/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x86/io_uring.rs b/src/x86/io_uring.rs index 92a34ae2..94d26aa1 100644 --- a/src/x86/io_uring.rs +++ b/src/x86/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -157,7 +157,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -421,6 +427,23 @@ pub resv: __u32, pub fds: __u64, } #[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] #[repr(align(8))] #[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { @@ -485,7 +508,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -543,8 +569,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -737,6 +776,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -839,6 +882,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -875,6 +919,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -897,6 +944,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -916,7 +964,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1060,7 +1112,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1074,7 +1129,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1086,6 +1154,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1096,6 +1180,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/x86/ioctl.rs b/src/x86/ioctl.rs index c255ba0b..b0c5ad91 100644 --- a/src/x86/ioctl.rs +++ b/src/x86/ioctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const FIONREAD: u32 = 21531; pub const FIONBIO: u32 = 21537; diff --git a/src/x86/landlock.rs b/src/x86/landlock.rs index bd7fed57..422350cd 100644 --- a/src/x86/landlock.rs +++ b/src/x86/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x86/loop_device.rs b/src/x86/loop_device.rs index 15368a84..4178e49e 100644 --- a/src/x86/loop_device.rs +++ b/src/x86/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_mode_t = crate::ctypes::c_ushort; pub type __kernel_ipc_pid_t = crate::ctypes::c_ushort; diff --git a/src/x86/mempolicy.rs b/src/x86/mempolicy.rs index a24915cc..ad4957c5 100644 --- a/src/x86/mempolicy.rs +++ b/src/x86/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/x86/net.rs b/src/x86/net.rs index 5dbfea2e..d912224b 100644 --- a/src/x86/net.rs +++ b/src/x86/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1202,6 +1202,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 78; pub const SO_DEVMEM_DMABUF: u32 = 79; pub const SCM_DEVMEM_DMABUF: u32 = 79; pub const SO_DEVMEM_DONTNEED: u32 = 80; +pub const SCM_TS_OPT_ID: u32 = 81; pub const SYS_SOCKET: u32 = 1; pub const SYS_BIND: u32 = 2; pub const SYS_CONNECT: u32 = 3; @@ -2157,26 +2158,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2193,6 +2216,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2204,6 +2241,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2286,6 +2335,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2297,6 +2357,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(ihl: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2323,6 +2394,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2334,6 +2416,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(priority: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2360,6 +2453,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn doff(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2371,6 +2475,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2382,6 +2497,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2393,6 +2519,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2404,6 +2541,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2415,6 +2563,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2426,6 +2585,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2437,6 +2607,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2448,6 +2629,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2459,6 +2651,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(res1: __u16, doff: __u16, fin: __u16, syn: __u16, rst: __u16, psh: __u16, ack: __u16, urg: __u16, ece: __u16, cwr: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2517,6 +2720,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2528,6 +2742,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2539,6 +2764,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2550,6 +2786,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2584,6 +2831,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2595,6 +2853,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2606,6 +2875,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2636,6 +2916,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2647,6 +2938,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2658,6 +2960,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2669,6 +2982,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2703,6 +3027,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2714,6 +3049,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2725,6 +3071,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2736,6 +3093,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2747,6 +3115,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2758,6 +3137,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2800,6 +3190,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2811,6 +3212,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2822,6 +3234,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -2833,6 +3256,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/x86/netlink.rs b/src/x86/netlink.rs index d50632d6..08aeeaaf 100644 --- a/src/x86/netlink.rs +++ b/src/x86/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -822,6 +822,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1007,6 +1008,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1297,6 +1300,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1651,7 +1655,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1979,6 +1984,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1986,7 +1998,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2484,7 +2498,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/x86/prctl.rs b/src/x86/prctl.rs index 6cb3e050..fc0bf893 100644 --- a/src/x86/prctl.rs +++ b/src/x86/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -192,6 +192,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -250,3 +252,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/x86/ptrace.rs b/src/x86/ptrace.rs index 7de25c27..69c35540 100644 --- a/src/x86/ptrace.rs +++ b/src/x86/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x86/system.rs b/src/x86/system.rs index 744cab75..e1f9f194 100644 --- a/src/x86/system.rs +++ b/src/x86/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x86/xdp.rs b/src/x86/xdp.rs index 250f0eef..875b5f91 100644 --- a/src/x86/xdp.rs +++ b/src/x86/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x86_64/bootparam.rs b/src/x86_64/bootparam.rs index e8e3022b..c8560af2 100644 --- a/src/x86_64/bootparam.rs +++ b/src/x86_64/bootparam.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x86_64/btrfs.rs b/src/x86_64/btrfs.rs index 44a91519..cd8650f5 100644 --- a/src/x86_64/btrfs.rs +++ b/src/x86_64/btrfs.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -157,7 +157,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -709,6 +715,13 @@ pub compression: __u32, pub encryption: __u32, pub reserved: [__u8; 64usize], } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct btrfs_ioctl_subvol_wait { +pub subvolid: __u64, +pub mode: __u32, +pub count: __u32, +} #[repr(C, packed)] #[derive(Debug, Copy, Clone)] pub struct btrfs_disk_key { @@ -1326,6 +1339,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1528,6 +1545,11 @@ pub const BTRFS_ENCODED_IO_COMPRESSION_LZO_64K: u32 = 7; pub const BTRFS_ENCODED_IO_COMPRESSION_TYPES: u32 = 8; pub const BTRFS_ENCODED_IO_ENCRYPTION_NONE: u32 = 0; pub const BTRFS_ENCODED_IO_ENCRYPTION_TYPES: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_ONE: u32 = 0; +pub const BTRFS_SUBVOL_SYNC_WAIT_FOR_QUEUED: u32 = 1; +pub const BTRFS_SUBVOL_SYNC_COUNT: u32 = 2; +pub const BTRFS_SUBVOL_SYNC_PEEK_FIRST: u32 = 3; +pub const BTRFS_SUBVOL_SYNC_PEEK_LAST: u32 = 4; pub const BTRFS_MAGIC: u64 = 5575266562640200287; pub const BTRFS_MAX_LEVEL: u32 = 8; pub const BTRFS_NAME_LEN: u32 = 255; diff --git a/src/x86_64/elf_uapi.rs b/src/x86_64/elf_uapi.rs index 1d005f9e..e28e9277 100644 --- a/src/x86_64/elf_uapi.rs +++ b/src/x86_64/elf_uapi.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -491,6 +491,7 @@ pub const NT_ARM_ZA: u32 = 1036; pub const NT_ARM_ZT: u32 = 1037; pub const NT_ARM_FPMR: u32 = 1038; pub const NT_ARM_POE: u32 = 1039; +pub const NT_ARM_GCS: u32 = 1040; pub const NT_ARC_V2: u32 = 1536; pub const NT_VMCOREDD: u32 = 1792; pub const NT_MIPS_DSP: u32 = 2048; @@ -498,6 +499,7 @@ pub const NT_MIPS_FP_MODE: u32 = 2049; pub const NT_MIPS_MSA: u32 = 2050; pub const NT_RISCV_CSR: u32 = 2304; pub const NT_RISCV_VECTOR: u32 = 2305; +pub const NT_RISCV_TAGGED_ADDR_CTRL: u32 = 2306; pub const NT_LOONGARCH_CPUCFG: u32 = 2560; pub const NT_LOONGARCH_CSR: u32 = 2561; pub const NT_LOONGARCH_LSX: u32 = 2562; diff --git a/src/x86_64/errno.rs b/src/x86_64/errno.rs index b7766e1c..5b018a26 100644 --- a/src/x86_64/errno.rs +++ b/src/x86_64/errno.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/x86_64/general.rs b/src/x86_64/general.rs index fac26b17..c4024694 100644 --- a/src/x86_64/general.rs +++ b/src/x86_64/general.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -271,7 +271,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -798,6 +804,13 @@ pub struct dmabuf_token { pub token_start: __u32, pub token_count: __u32, } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct xattr_args { +pub value: __u64, +pub size: __u32, +pub flags: __u32, +} #[repr(C, packed)] #[derive(Copy, Clone)] pub struct uffd_msg { @@ -1021,9 +1034,9 @@ pub sa_flags: crate::ctypes::c_ulong, pub sa_restorer: __sigrestore_t, pub sa_mask: kernel_sigset_t, } -pub const LINUX_VERSION_CODE: u32 = 396288; +pub const LINUX_VERSION_CODE: u32 = 396544; pub const LINUX_VERSION_MAJOR: u32 = 6; -pub const LINUX_VERSION_PATCHLEVEL: u32 = 12; +pub const LINUX_VERSION_PATCHLEVEL: u32 = 13; pub const LINUX_VERSION_SUBLEVEL: u32 = 0; pub const AT_SYSINFO_EHDR: u32 = 33; pub const AT_VECTOR_SIZE_ARCH: u32 = 3; @@ -1237,6 +1250,7 @@ pub const AT_EACCESS: u32 = 512; pub const AT_REMOVEDIR: u32 = 512; pub const AT_HANDLE_FID: u32 = 512; pub const AT_HANDLE_MNT_ID_UNIQUE: u32 = 1; +pub const AT_HANDLE_CONNECTABLE: u32 = 2; pub const EPOLL_CLOEXEC: u32 = 524288; pub const EPOLL_CTL_ADD: u32 = 1; pub const EPOLL_CTL_DEL: u32 = 2; @@ -1413,6 +1427,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -1668,7 +1686,6 @@ pub const SECRETMEM_MAGIC: u32 = 1397048141; pub const PID_FS_MAGIC: u32 = 1346978886; pub const MAP_32BIT: u32 = 64; pub const MAP_ABOVE4G: u32 = 128; -pub const SHADOW_STACK_SET_TOKEN: u32 = 1; pub const PROT_READ: u32 = 1; pub const PROT_WRITE: u32 = 2; pub const PROT_EXEC: u32 = 4; @@ -1715,6 +1732,8 @@ pub const MADV_POPULATE_READ: u32 = 22; pub const MADV_POPULATE_WRITE: u32 = 23; pub const MADV_DONTNEED_LOCKED: u32 = 24; pub const MADV_COLLAPSE: u32 = 25; +pub const MADV_GUARD_INSTALL: u32 = 102; +pub const MADV_GUARD_REMOVE: u32 = 103; pub const MAP_FILE: u32 = 0; pub const PKEY_DISABLE_ACCESS: u32 = 1; pub const PKEY_DISABLE_WRITE: u32 = 2; @@ -1727,6 +1746,8 @@ pub const MAP_NORESERVE: u32 = 16384; pub const MCL_CURRENT: u32 = 1; pub const MCL_FUTURE: u32 = 2; pub const MCL_ONFAULT: u32 = 4; +pub const SHADOW_STACK_SET_TOKEN: u32 = 1; +pub const SHADOW_STACK_SET_MARKER: u32 = 2; pub const HUGETLB_FLAG_ENCODE_SHIFT: u32 = 26; pub const HUGETLB_FLAG_ENCODE_MASK: u32 = 63; pub const HUGETLB_FLAG_ENCODE_16KB: u32 = 939524096; @@ -2636,6 +2657,10 @@ pub const __NR_lsm_get_self_attr: u32 = 459; pub const __NR_lsm_set_self_attr: u32 = 460; pub const __NR_lsm_list_modules: u32 = 461; pub const __NR_mseal: u32 = 462; +pub const __NR_setxattrat: u32 = 463; +pub const __NR_getxattrat: u32 = 464; +pub const __NR_listxattrat: u32 = 465; +pub const __NR_removexattrat: u32 = 466; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WSTOPPED: u32 = 2; @@ -2934,26 +2959,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2970,6 +3017,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2981,6 +3042,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -3025,6 +3098,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_32bit_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_32bit_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn contents(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } @@ -3036,6 +3120,17 @@ self._bitfield_1.set(1usize, 2u8, val as u64) } } #[inline] +pub unsafe fn contents_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 2u8) as u32) } +} +#[inline] +pub unsafe fn set_contents_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 2u8, val as u64) +} +} +#[inline] pub fn read_exec_only(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -3047,6 +3142,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn read_exec_only_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_read_exec_only_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn limit_in_pages(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -3058,6 +3164,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn limit_in_pages_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_limit_in_pages_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn seg_not_present(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } @@ -3069,6 +3186,17 @@ self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] +pub unsafe fn seg_not_present_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_seg_not_present_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 1u8, val as u64) +} +} +#[inline] pub fn useable(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } @@ -3080,6 +3208,17 @@ self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] +pub unsafe fn useable_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 6usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_useable_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 6usize, 1u8, val as u64) +} +} +#[inline] pub fn lm(&self) -> crate::ctypes::c_uint { unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } } @@ -3091,6 +3230,17 @@ self._bitfield_1.set(7usize, 1u8, val as u64) } } #[inline] +pub unsafe fn lm_raw(this: *const Self) -> crate::ctypes::c_uint { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 7usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_lm_raw(this: *mut Self, val: crate::ctypes::c_uint) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 7usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(seg_32bit: crate::ctypes::c_uint, contents: crate::ctypes::c_uint, read_exec_only: crate::ctypes::c_uint, limit_in_pages: crate::ctypes::c_uint, seg_not_present: crate::ctypes::c_uint, useable: crate::ctypes::c_uint, lm: crate::ctypes::c_uint) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/x86_64/if_arp.rs b/src/x86_64/if_arp.rs index 0b5abb5d..5d130145 100644 --- a/src/x86_64/if_arp.rs +++ b/src/x86_64/if_arp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1109,6 +1109,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_4 = _bindgen_ty_4::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_4 = _bindgen_ty_4::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_4 = _bindgen_ty_4::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_4 = _bindgen_ty_4::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_5 = _bindgen_ty_5::IFLA_PROTO_DOWN_REASON_MASK; @@ -1294,6 +1295,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_20 = _bindgen_ty_20::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_20 = _bindgen_ty_20::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_21 = _bindgen_ty_21::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1584,6 +1587,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_54 = _bindgen_ty_54::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_54 = _bindgen_ty_54::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_55 = _bindgen_ty_55::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_55 = _bindgen_ty_55::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_56 = _bindgen_ty_56::IFLA_DSA_CONDUIT; @@ -1790,7 +1794,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -2118,6 +2123,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_20 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -2125,7 +2137,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2623,7 +2637,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_55 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/x86_64/if_ether.rs b/src/x86_64/if_ether.rs index f8e3d42e..22f63ce7 100644 --- a/src/x86_64/if_ether.rs +++ b/src/x86_64/if_ether.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x86_64/if_packet.rs b/src/x86_64/if_packet.rs index a4eab47e..396193a8 100644 --- a/src/x86_64/if_packet.rs +++ b/src/x86_64/if_packet.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x86_64/io_uring.rs b/src/x86_64/io_uring.rs index 621d586a..1a09c539 100644 --- a/src/x86_64/io_uring.rs +++ b/src/x86_64/io_uring.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -159,7 +159,13 @@ pub propagate_from: __u64, pub mnt_root: __u32, pub mnt_point: __u32, pub mnt_ns_id: __u64, -pub __spare2: [__u64; 49usize], +pub fs_subtype: __u32, +pub sb_source: __u32, +pub opt_num: __u32, +pub opt_array: __u32, +pub opt_sec_num: __u32, +pub opt_sec_array: __u32, +pub __spare2: [__u64; 46usize], pub str_: __IncompleteArrayField, } #[repr(C)] @@ -423,6 +429,23 @@ pub fds: __u64, } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct io_uring_region_desc { +pub user_addr: __u64, +pub size: __u64, +pub flags: __u32, +pub id: __u32, +pub mmap_offset: __u64, +pub __resv: [__u64; 4usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_mem_region_reg { +pub region_uptr: __u64, +pub flags: __u64, +pub __resv: [__u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct io_uring_rsrc_register { pub nr: __u32, pub flags: __u32, @@ -483,7 +506,10 @@ pub __resv: [__u32; 3usize], pub struct io_uring_clone_buffers { pub src_fd: __u32, pub flags: __u32, -pub pad: [__u32; 6usize], +pub src_off: __u32, +pub dst_off: __u32, +pub nr: __u32, +pub pad: [__u32; 3usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -541,8 +567,21 @@ pub resv: [__u32; 8usize], pub struct io_uring_napi { pub busy_poll_to: __u32, pub prefer_busy_poll: __u8, -pub pad: [__u8; 3usize], -pub resv: __u64, +pub opcode: __u8, +pub pad: [__u8; 2usize], +pub op_param: __u32, +pub resv: __u32, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct io_uring_reg_wait { +pub ts: __kernel_timespec, +pub min_wait_usec: __u32, +pub flags: __u32, +pub sigmask: __u64, +pub sigmask_sz: __u32, +pub pad: [__u32; 3usize], +pub pad2: [__u64; 2usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -735,6 +774,10 @@ pub const STATMOUNT_MNT_POINT: u32 = 16; pub const STATMOUNT_FS_TYPE: u32 = 32; pub const STATMOUNT_MNT_NS_ID: u32 = 64; pub const STATMOUNT_MNT_OPTS: u32 = 128; +pub const STATMOUNT_FS_SUBTYPE: u32 = 256; +pub const STATMOUNT_SB_SOURCE: u32 = 512; +pub const STATMOUNT_OPT_ARRAY: u32 = 1024; +pub const STATMOUNT_OPT_SEC_ARRAY: u32 = 2048; pub const LSMT_ROOT: i32 = -1; pub const LISTMOUNT_REVERSE: u32 = 1; pub const INR_OPEN_CUR: u32 = 1024; @@ -837,6 +880,7 @@ pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192; pub const IORING_SETUP_NO_MMAP: u32 = 16384; pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768; pub const IORING_SETUP_NO_SQARRAY: u32 = 65536; +pub const IORING_SETUP_HYBRID_IOPOLL: u32 = 131072; pub const IORING_URING_CMD_FIXED: u32 = 1; pub const IORING_URING_CMD_MASK: u32 = 1; pub const IORING_FSYNC_DATASYNC: u32 = 1; @@ -873,6 +917,9 @@ pub const IORING_MSG_RING_CQE_SKIP: u32 = 1; pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2; pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1; pub const IORING_NOP_INJECT_RESULT: u32 = 1; +pub const IORING_NOP_FILE: u32 = 2; +pub const IORING_NOP_FIXED_FILE: u32 = 4; +pub const IORING_NOP_FIXED_BUFFER: u32 = 8; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_CQE_F_MORE: u32 = 2; pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4; @@ -895,6 +942,7 @@ pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_ENTER_EXT_ARG: u32 = 8; pub const IORING_ENTER_REGISTERED_RING: u32 = 16; pub const IORING_ENTER_ABS_TIMER: u32 = 32; +pub const IORING_ENTER_EXT_ARG_REG: u32 = 64; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; @@ -914,7 +962,11 @@ pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768; pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1; pub const IORING_REGISTER_FILES_SKIP: i32 = -2; pub const IO_URING_OP_SUPPORTED: u32 = 1; -pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = _bindgen_ty_1::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_MEM_REGION_TYPE_USER: _bindgen_ty_1 = _bindgen_ty_1::IORING_MEM_REGION_TYPE_USER; +pub const IORING_MEM_REGION_REG_WAIT_ARG: _bindgen_ty_2 = _bindgen_ty_2::IORING_MEM_REGION_REG_WAIT_ARG; +pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_SRC_REGISTERED; +pub const IORING_REGISTER_DST_REPLACE: _bindgen_ty_3 = _bindgen_ty_3::IORING_REGISTER_DST_REPLACE; +pub const IORING_REG_WAIT_TS: _bindgen_ty_4 = _bindgen_ty_4::IORING_REG_WAIT_TS; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -1058,7 +1110,10 @@ IORING_REGISTER_NAPI = 27, IORING_UNREGISTER_NAPI = 28, IORING_REGISTER_CLOCK = 29, IORING_REGISTER_CLONE_BUFFERS = 30, -IORING_REGISTER_LAST = 31, +IORING_REGISTER_SEND_MSG_RING = 31, +IORING_REGISTER_RESIZE_RINGS = 33, +IORING_REGISTER_MEM_REGION = 34, +IORING_REGISTER_LAST = 35, IORING_REGISTER_USE_REGISTERED_RING = 2147483648, } #[repr(u32)] @@ -1072,7 +1127,20 @@ IO_WQ_UNBOUND = 1, #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_1 { +IORING_MEM_REGION_TYPE_USER = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_2 { +IORING_MEM_REGION_REG_WAIT_ARG = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_3 { IORING_REGISTER_SRC_REGISTERED = 1, +IORING_REGISTER_DST_REPLACE = 2, } #[repr(u32)] #[non_exhaustive] @@ -1084,6 +1152,22 @@ IOU_PBUF_RING_INC = 2, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_op { +IO_URING_NAPI_REGISTER_OP = 0, +IO_URING_NAPI_STATIC_ADD_ID = 1, +IO_URING_NAPI_STATIC_DEL_ID = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum io_uring_napi_tracking_strategy { +IO_URING_NAPI_TRACKING_DYNAMIC = 0, +IO_URING_NAPI_TRACKING_STATIC = 1, +IO_URING_NAPI_TRACKING_INACTIVE = 255, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_register_restriction_op { IORING_RESTRICTION_REGISTER_OP = 0, IORING_RESTRICTION_SQE_OP = 1, @@ -1094,6 +1178,12 @@ IORING_RESTRICTION_LAST = 4, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum _bindgen_ty_4 { +IORING_REG_WAIT_TS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum io_uring_socket_op { SOCKET_URING_OP_SIOCINQ = 0, SOCKET_URING_OP_SIOCOUTQ = 1, diff --git a/src/x86_64/ioctl.rs b/src/x86_64/ioctl.rs index d26fe3a0..695a489b 100644 --- a/src/x86_64/ioctl.rs +++ b/src/x86_64/ioctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const FIONREAD: u32 = 21531; pub const FIONBIO: u32 = 21537; diff --git a/src/x86_64/landlock.rs b/src/x86_64/landlock.rs index 2ea2c7b1..78f9a70f 100644 --- a/src/x86_64/landlock.rs +++ b/src/x86_64/landlock.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x86_64/loop_device.rs b/src/x86_64/loop_device.rs index a473e6f4..02fedb58 100644 --- a/src/x86_64/loop_device.rs +++ b/src/x86_64/loop_device.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_old_uid_t = crate::ctypes::c_ushort; pub type __kernel_old_gid_t = crate::ctypes::c_ushort; diff --git a/src/x86_64/mempolicy.rs b/src/x86_64/mempolicy.rs index a24915cc..ad4957c5 100644 --- a/src/x86_64/mempolicy.rs +++ b/src/x86_64/mempolicy.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; diff --git a/src/x86_64/net.rs b/src/x86_64/net.rs index e2979f16..e2c4b928 100644 --- a/src/x86_64/net.rs +++ b/src/x86_64/net.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -1200,6 +1200,7 @@ pub const SCM_DEVMEM_LINEAR: u32 = 78; pub const SO_DEVMEM_DMABUF: u32 = 79; pub const SCM_DEVMEM_DMABUF: u32 = 79; pub const SO_DEVMEM_DONTNEED: u32 = 80; +pub const SCM_TS_OPT_ID: u32 = 81; pub const SO_TIMESTAMP: u32 = 29; pub const SO_TIMESTAMPNS: u32 = 35; pub const SO_TIMESTAMPING: u32 = 37; @@ -2163,26 +2164,48 @@ where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] +fn extract_bit(byte: u8, index: usize) -> bool { +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 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]; +Self::extract_bit(byte, index) +} +#[inline] +pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); +Self::extract_bit(byte, index) +} +#[inline] +fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; -byte & mask == mask +if val { +byte | mask +} else { +byte & !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; +*byte = Self::change_bit(*byte, index, val); } +#[inline] +pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { +debug_assert!(index / 8 < core::mem::size_of::()); +let byte_index = index / 8; +let byte = (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); +*byte = Self::change_bit(*byte, index, val); } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { @@ -2199,6 +2222,20 @@ val |= 1 << index; val } #[inline] +pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +let mut val = 0; +for i in 0..(bit_width as usize) { +if Self::raw_get_bit(this, 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()); @@ -2210,6 +2247,18 @@ let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { self.set_bit(index + bit_offset, val_bit_is_set); } } +#[inline] +pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { +debug_assert!(bit_width <= 64); +debug_assert!(bit_offset / 8 < core::mem::size_of::()); +debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); +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::raw_set_bit(this, index + bit_offset, val_bit_is_set); +} +} } impl __IncompleteArrayField { #[inline] @@ -2292,6 +2341,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn ihl_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_ihl_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2303,6 +2363,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(ihl: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2329,6 +2400,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn priority_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_priority_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn version(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2340,6 +2422,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn version_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_version_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(priority: __u8, version: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2366,6 +2459,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn res1_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_res1_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn doff(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u16) } } @@ -2377,6 +2481,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn doff_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u16) } +} +#[inline] +pub unsafe fn set_doff_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn fin(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2388,6 +2503,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn fin_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_fin_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn syn(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2399,6 +2525,17 @@ self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] +pub unsafe fn syn_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_syn_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 1u8, val as u64) +} +} +#[inline] pub fn rst(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2410,6 +2547,17 @@ self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] +pub unsafe fn rst_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 10usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_rst_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 10usize, 1u8, val as u64) +} +} +#[inline] pub fn psh(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) } } @@ -2421,6 +2569,17 @@ self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] +pub unsafe fn psh_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 11usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_psh_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 11usize, 1u8, val as u64) +} +} +#[inline] pub fn ack(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } } @@ -2432,6 +2591,17 @@ self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ack_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 12usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ack_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 12usize, 1u8, val as u64) +} +} +#[inline] pub fn urg(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } } @@ -2443,6 +2613,17 @@ self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] +pub unsafe fn urg_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 13usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_urg_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 13usize, 1u8, val as u64) +} +} +#[inline] pub fn ece(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2454,6 +2635,17 @@ self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ece_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 14usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_ece_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 14usize, 1u8, val as u64) +} +} +#[inline] pub fn cwr(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2465,6 +2657,17 @@ self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] +pub unsafe fn cwr_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 15usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_cwr_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 15usize, 1u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(res1: __u16, doff: __u16, fin: __u16, syn: __u16, rst: __u16, psh: __u16, ack: __u16, urg: __u16, ece: __u16, cwr: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2523,6 +2726,17 @@ self._bitfield_1.set(0usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_snd_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_snd_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_rcv_wscale(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } } @@ -2534,6 +2748,17 @@ self._bitfield_1.set(4usize, 4u8, val as u64) } } #[inline] +pub unsafe fn tcpi_rcv_wscale_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 4u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_rcv_wscale_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 4u8, val as u64) +} +} +#[inline] pub fn tcpi_delivery_rate_app_limited(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) } } @@ -2545,6 +2770,17 @@ self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] +pub unsafe fn tcpi_delivery_rate_app_limited_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 8usize, 1u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_delivery_rate_app_limited_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 8usize, 1u8, val as u64) +} +} +#[inline] pub fn tcpi_fastopen_client_fail(&self) -> __u8 { unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 2u8) as u8) } } @@ -2556,6 +2792,17 @@ self._bitfield_1.set(9usize, 2u8, val as u64) } } #[inline] +pub unsafe fn tcpi_fastopen_client_fail_raw(this: *const Self) -> __u8 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 9usize, 2u8) as u8) } +} +#[inline] +pub unsafe fn set_tcpi_fastopen_client_fail_raw(this: *mut Self, val: __u8) { +unsafe { +let val: u8 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 9usize, 2u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(tcpi_snd_wscale: __u8, tcpi_rcv_wscale: __u8, tcpi_delivery_rate_app_limited: __u8, tcpi_fastopen_client_fail: __u8) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 4u8, { @@ -2590,6 +2837,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2601,6 +2859,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } } @@ -2612,6 +2881,17 @@ self._bitfield_1.set(2usize, 30u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 30u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 30u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2642,6 +2922,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2653,6 +2944,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn del_async(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2664,6 +2966,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn del_async_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_del_async_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } } @@ -2675,6 +2988,17 @@ self._bitfield_1.set(3usize, 29u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 29u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 29u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, del_async: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2709,6 +3033,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_current_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_current_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn set_rnext(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -2720,6 +3055,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_rnext_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_rnext_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn ao_required(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -2731,6 +3077,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn ao_required_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_ao_required_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn set_counters(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -2742,6 +3099,17 @@ self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] +pub unsafe fn set_counters_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_set_counters_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 1u8, val as u64) +} +} +#[inline] pub fn accept_icmps(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -2753,6 +3121,17 @@ self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] +pub unsafe fn accept_icmps_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 4usize, 1u8) as u32) } +} +#[inline] +pub unsafe fn set_accept_icmps_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 4usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u32 { unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -2764,6 +3143,17 @@ self._bitfield_1.set(5usize, 27u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u32 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 5usize, 27u8) as u32) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u32) { +unsafe { +let val: u32 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 5usize, 27u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(set_current: __u32, set_rnext: __u32, ao_required: __u32, set_counters: __u32, accept_icmps: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { @@ -2806,6 +3196,17 @@ self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_current_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 0usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_current_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, 1u8, val as u64) +} +} +#[inline] pub fn is_rnext(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2817,6 +3218,17 @@ self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] +pub unsafe fn is_rnext_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 1usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_is_rnext_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 1usize, 1u8, val as u64) +} +} +#[inline] pub fn get_all(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2828,6 +3240,17 @@ self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] +pub unsafe fn get_all_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 2usize, 1u8) as u16) } +} +#[inline] +pub unsafe fn set_get_all_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 2usize, 1u8, val as u64) +} +} +#[inline] pub fn reserved(&self) -> __u16 { unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 13u8) as u16) } } @@ -2839,6 +3262,17 @@ self._bitfield_1.set(3usize, 13u8, val as u64) } } #[inline] +pub unsafe fn reserved_raw(this: *const Self) -> __u16 { +unsafe { ::core::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(::core::ptr::addr_of!((*this)._bitfield_1), 3usize, 13u8) as u16) } +} +#[inline] +pub unsafe fn set_reserved_raw(this: *mut Self, val: __u16) { +unsafe { +let val: u16 = ::core::mem::transmute(val); +<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(::core::ptr::addr_of_mut!((*this)._bitfield_1), 3usize, 13u8, val as u64) +} +} +#[inline] pub fn new_bitfield_1(is_current: __u16, is_rnext: __u16, get_all: __u16, reserved: __u16) -> __BindgenBitfieldUnit<[u8; 2usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { diff --git a/src/x86_64/netlink.rs b/src/x86_64/netlink.rs index a0e6cf65..3e394d01 100644 --- a/src/x86_64/netlink.rs +++ b/src/x86_64/netlink.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __kernel_sa_family_t = crate::ctypes::c_ushort; pub type __s8 = crate::ctypes::c_schar; @@ -824,6 +824,7 @@ pub const IFLA_DEVLINK_PORT: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DEVLINK_PORT; pub const IFLA_GSO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GSO_IPV4_MAX_SIZE; pub const IFLA_GRO_IPV4_MAX_SIZE: _bindgen_ty_2 = _bindgen_ty_2::IFLA_GRO_IPV4_MAX_SIZE; pub const IFLA_DPLL_PIN: _bindgen_ty_2 = _bindgen_ty_2::IFLA_DPLL_PIN; +pub const IFLA_MAX_PACING_OFFLOAD_HORIZON: _bindgen_ty_2 = _bindgen_ty_2::IFLA_MAX_PACING_OFFLOAD_HORIZON; pub const __IFLA_MAX: _bindgen_ty_2 = _bindgen_ty_2::__IFLA_MAX; pub const IFLA_PROTO_DOWN_REASON_UNSPEC: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_UNSPEC; pub const IFLA_PROTO_DOWN_REASON_MASK: _bindgen_ty_3 = _bindgen_ty_3::IFLA_PROTO_DOWN_REASON_MASK; @@ -1009,6 +1010,8 @@ pub const IFLA_NETKIT_PRIMARY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PRIM pub const IFLA_NETKIT_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_POLICY; pub const IFLA_NETKIT_PEER_POLICY: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_POLICY; pub const IFLA_NETKIT_MODE: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_MODE; +pub const IFLA_NETKIT_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_SCRUB; +pub const IFLA_NETKIT_PEER_SCRUB: _bindgen_ty_18 = _bindgen_ty_18::IFLA_NETKIT_PEER_SCRUB; pub const __IFLA_NETKIT_MAX: _bindgen_ty_18 = _bindgen_ty_18::__IFLA_NETKIT_MAX; pub const VNIFILTER_ENTRY_STATS_UNSPEC: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_UNSPEC; pub const VNIFILTER_ENTRY_STATS_RX_BYTES: _bindgen_ty_19 = _bindgen_ty_19::VNIFILTER_ENTRY_STATS_RX_BYTES; @@ -1299,6 +1302,7 @@ pub const IFLA_RMNET_FLAGS: _bindgen_ty_52 = _bindgen_ty_52::IFLA_RMNET_FLAGS; pub const __IFLA_RMNET_MAX: _bindgen_ty_52 = _bindgen_ty_52::__IFLA_RMNET_MAX; pub const IFLA_MCTP_UNSPEC: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_UNSPEC; pub const IFLA_MCTP_NET: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_NET; +pub const IFLA_MCTP_PHYS_BINDING: _bindgen_ty_53 = _bindgen_ty_53::IFLA_MCTP_PHYS_BINDING; pub const __IFLA_MCTP_MAX: _bindgen_ty_53 = _bindgen_ty_53::__IFLA_MCTP_MAX; pub const IFLA_DSA_UNSPEC: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_UNSPEC; pub const IFLA_DSA_CONDUIT: _bindgen_ty_54 = _bindgen_ty_54::IFLA_DSA_CONDUIT; @@ -1653,7 +1657,8 @@ IFLA_DEVLINK_PORT = 62, IFLA_GSO_IPV4_MAX_SIZE = 63, IFLA_GRO_IPV4_MAX_SIZE = 64, IFLA_DPLL_PIN = 65, -__IFLA_MAX = 66, +IFLA_MAX_PACING_OFFLOAD_HORIZON = 66, +__IFLA_MAX = 67, } #[repr(u32)] #[non_exhaustive] @@ -1981,6 +1986,13 @@ NETKIT_L3 = 1, #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum netkit_scrub { +NETKIT_SCRUB_NONE = 0, +NETKIT_SCRUB_DEFAULT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum _bindgen_ty_18 { IFLA_NETKIT_UNSPEC = 0, IFLA_NETKIT_PEER_INFO = 1, @@ -1988,7 +2000,9 @@ IFLA_NETKIT_PRIMARY = 2, IFLA_NETKIT_POLICY = 3, IFLA_NETKIT_PEER_POLICY = 4, IFLA_NETKIT_MODE = 5, -__IFLA_NETKIT_MAX = 6, +IFLA_NETKIT_SCRUB = 6, +IFLA_NETKIT_PEER_SCRUB = 7, +__IFLA_NETKIT_MAX = 8, } #[repr(u32)] #[non_exhaustive] @@ -2486,7 +2500,8 @@ __IFLA_RMNET_MAX = 3, pub enum _bindgen_ty_53 { IFLA_MCTP_UNSPEC = 0, IFLA_MCTP_NET = 1, -__IFLA_MCTP_MAX = 2, +IFLA_MCTP_PHYS_BINDING = 2, +__IFLA_MCTP_MAX = 3, } #[repr(u32)] #[non_exhaustive] diff --git a/src/x86_64/prctl.rs b/src/x86_64/prctl.rs index f8ead299..e21d3500 100644 --- a/src/x86_64/prctl.rs +++ b/src/x86_64/prctl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; @@ -194,6 +194,8 @@ pub const PR_MTE_TCF_MASK: u32 = 6; pub const PR_MTE_TAG_SHIFT: u32 = 3; pub const PR_MTE_TAG_MASK: u32 = 524280; pub const PR_MTE_TCF_SHIFT: u32 = 1; +pub const PR_PMLEN_SHIFT: u32 = 24; +pub const PR_PMLEN_MASK: u32 = 2130706432; pub const PR_SET_IO_FLUSHER: u32 = 57; pub const PR_GET_IO_FLUSHER: u32 = 58; pub const PR_SET_SYSCALL_USER_DISPATCH: u32 = 59; @@ -252,3 +254,9 @@ pub const PR_PPC_DEXCR_CTRL_CLEAR: u32 = 4; pub const PR_PPC_DEXCR_CTRL_SET_ONEXEC: u32 = 8; pub const PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC: u32 = 16; pub const PR_PPC_DEXCR_CTRL_MASK: u32 = 31; +pub const PR_GET_SHADOW_STACK_STATUS: u32 = 74; +pub const PR_SET_SHADOW_STACK_STATUS: u32 = 75; +pub const PR_SHADOW_STACK_ENABLE: u32 = 1; +pub const PR_SHADOW_STACK_WRITE: u32 = 2; +pub const PR_SHADOW_STACK_PUSH: u32 = 4; +pub const PR_LOCK_SHADOW_STACK_STATUS: u32 = 76; diff --git a/src/x86_64/ptrace.rs b/src/x86_64/ptrace.rs index 8ccc2150..042b8461 100644 --- a/src/x86_64/ptrace.rs +++ b/src/x86_64/ptrace.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x86_64/system.rs b/src/x86_64/system.rs index 2d8b16d1..29fedf03 100644 --- a/src/x86_64/system.rs +++ b/src/x86_64/system.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar; diff --git a/src/x86_64/xdp.rs b/src/x86_64/xdp.rs index d2a19e80..c9fde1d0 100644 --- a/src/x86_64/xdp.rs +++ b/src/x86_64/xdp.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.70.1 */ +/* automatically generated by rust-bindgen 0.71.1 */ pub type __s8 = crate::ctypes::c_schar; pub type __u8 = crate::ctypes::c_uchar;