Skip to main content

libc/unix/linux_like/linux/
mod.rs

1//! Linux-specific definitions for linux-like values
2use crate::prelude::*;
3use crate::{
4    __s16,
5    __s32,
6    __u16,
7    __u32,
8    __u64,
9    __u8,
10    sock_filter,
11    _IO,
12    _IOR,
13    _IOW,
14    _IOWR,
15};
16
17pub type dev_t = u64;
18pub type socklen_t = u32;
19pub type mode_t = u32;
20pub type ino64_t = u64;
21// FIXME(1.0,deprecate): lfs binding to be removed
22pub type off64_t = i64;
23pub type blkcnt64_t = i64;
24pub type rlim64_t = u64;
25pub type mqd_t = c_int;
26pub type nfds_t = c_ulong;
27pub type nl_item = c_int;
28pub type idtype_t = c_uint;
29pub type loff_t = c_longlong;
30pub type pthread_key_t = c_uint;
31pub type pthread_once_t = c_int;
32pub type pthread_spinlock_t = c_int;
33pub type __kernel_fsid_t = __c_anonymous__kernel_fsid_t;
34pub type __kernel_clockid_t = c_int;
35
36pub type eventfd_t = u64;
37
38pub type pid_type = crate::prelude::CEnumRepr;
#[allow(deprecated)]
pub const PIDTYPE_PID: pid_type =
    {
        #[allow(unused_variables)]
        let r = 0;
        r
    };
#[allow(deprecated)]
pub const PIDTYPE_TGID: pid_type =
    {
        #[allow(unused_variables)]
        let r = PIDTYPE_PID + 1;
        r
    };
#[allow(deprecated)]
pub const PIDTYPE_PGID: pid_type =
    {
        #[allow(unused_variables)]
        let r = PIDTYPE_TGID + 1;
        r
    };
#[allow(deprecated)]
pub const PIDTYPE_SID: pid_type =
    {
        #[allow(unused_variables)]
        let r = PIDTYPE_PGID + 1;
        r
    };
#[allow(deprecated)]
pub const PIDTYPE_MAX: pid_type =
    {
        #[allow(unused_variables)]
        let r = PIDTYPE_SID + 1;
        r
    };c_enum! {
39    pub enum pid_type {
40        pub PIDTYPE_PID,
41        pub PIDTYPE_TGID,
42        pub PIDTYPE_PGID,
43        pub PIDTYPE_SID,
44        pub PIDTYPE_MAX,
45    }
46}
47
48#[repr(C)]
#[allow(deprecated)]
pub struct dqblk {
    pub dqb_bhardlimit: u64,
    pub dqb_bsoftlimit: u64,
    pub dqb_curspace: u64,
    pub dqb_ihardlimit: u64,
    pub dqb_isoftlimit: u64,
    pub dqb_curinodes: u64,
    pub dqb_btime: u64,
    pub dqb_itime: u64,
    pub dqb_valid: u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for dqblk { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for dqblk {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<u64>;
        let _: ::core::clone::AssertParamIsClone<u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for dqblk { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for dqblk {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["dqb_bhardlimit", "dqb_bsoftlimit", "dqb_curspace",
                        "dqb_ihardlimit", "dqb_isoftlimit", "dqb_curinodes",
                        "dqb_btime", "dqb_itime", "dqb_valid"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.dqb_bhardlimit, &self.dqb_bsoftlimit, &self.dqb_curspace,
                        &self.dqb_ihardlimit, &self.dqb_isoftlimit,
                        &self.dqb_curinodes, &self.dqb_btime, &self.dqb_itime,
                        &&self.dqb_valid];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "dqblk", names,
            values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct signalfd_siginfo {
    pub ssi_signo: u32,
    pub ssi_errno: i32,
    pub ssi_code: i32,
    pub ssi_pid: u32,
    pub ssi_uid: u32,
    pub ssi_fd: i32,
    pub ssi_tid: u32,
    pub ssi_band: u32,
    pub ssi_overrun: u32,
    pub ssi_trapno: u32,
    pub ssi_status: i32,
    pub ssi_int: i32,
    pub ssi_ptr: u64,
    pub ssi_utime: u64,
    pub ssi_stime: u64,
    pub ssi_addr: u64,
    pub ssi_addr_lsb: u16,
    _pad2: Padding<u16>,
    pub ssi_syscall: i32,
    pub ssi_call_addr: u64,
    pub ssi_arch: u32,
    _pad: Padding<[u8; 28]>,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for signalfd_siginfo { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for signalfd_siginfo {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<u32>;
        let _: ::core::clone::AssertParamIsClone<i32>;
        let _: ::core::clone::AssertParamIsClone<u64>;
        let _: ::core::clone::AssertParamIsClone<u16>;
        let _: ::core::clone::AssertParamIsClone<Padding<u16>>;
        let _: ::core::clone::AssertParamIsClone<Padding<[u8; 28]>>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for signalfd_siginfo { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for signalfd_siginfo {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["ssi_signo", "ssi_errno", "ssi_code", "ssi_pid", "ssi_uid",
                        "ssi_fd", "ssi_tid", "ssi_band", "ssi_overrun",
                        "ssi_trapno", "ssi_status", "ssi_int", "ssi_ptr",
                        "ssi_utime", "ssi_stime", "ssi_addr", "ssi_addr_lsb",
                        "_pad2", "ssi_syscall", "ssi_call_addr", "ssi_arch",
                        "_pad"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.ssi_signo, &self.ssi_errno, &self.ssi_code, &self.ssi_pid,
                        &self.ssi_uid, &self.ssi_fd, &self.ssi_tid, &self.ssi_band,
                        &self.ssi_overrun, &self.ssi_trapno, &self.ssi_status,
                        &self.ssi_int, &self.ssi_ptr, &self.ssi_utime,
                        &self.ssi_stime, &self.ssi_addr, &self.ssi_addr_lsb,
                        &self._pad2, &self.ssi_syscall, &self.ssi_call_addr,
                        &self.ssi_arch, &&self._pad];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "signalfd_siginfo", names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct msginfo {
    pub msgpool: c_int,
    pub msgmap: c_int,
    pub msgmax: c_int,
    pub msgmnb: c_int,
    pub msgmni: c_int,
    pub msgssz: c_int,
    pub msgtql: c_int,
    pub msgseg: c_ushort,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for msginfo { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for msginfo {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_int>;
        let _: ::core::clone::AssertParamIsClone<c_ushort>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for msginfo { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for msginfo {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["msgpool", "msgmap", "msgmax", "msgmnb", "msgmni", "msgssz",
                        "msgtql", "msgseg"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.msgpool, &self.msgmap, &self.msgmax, &self.msgmnb,
                        &self.msgmni, &self.msgssz, &self.msgtql, &&self.msgseg];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "msginfo",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct input_event {
    pub time: crate::timeval,
    pub type_: __u16,
    pub code: __u16,
    pub value: __s32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for input_event { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for input_event {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::timeval>;
        let _: ::core::clone::AssertParamIsClone<__u16>;
        let _: ::core::clone::AssertParamIsClone<__s32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for input_event { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for input_event {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "input_event",
            "time", &self.time, "type_", &self.type_, "code", &self.code,
            "value", &&self.value)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct input_id {
    pub bustype: __u16,
    pub vendor: __u16,
    pub product: __u16,
    pub version: __u16,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for input_id { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for input_id {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u16>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for input_id { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for input_id {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "input_id",
            "bustype", &self.bustype, "vendor", &self.vendor, "product",
            &self.product, "version", &&self.version)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct input_absinfo {
    pub value: __s32,
    pub minimum: __s32,
    pub maximum: __s32,
    pub fuzz: __s32,
    pub flat: __s32,
    pub resolution: __s32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for input_absinfo { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for input_absinfo {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__s32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for input_absinfo { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for input_absinfo {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["value", "minimum", "maximum", "fuzz", "flat", "resolution"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.value, &self.minimum, &self.maximum, &self.fuzz,
                        &self.flat, &&self.resolution];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "input_absinfo",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct input_keymap_entry {
    pub flags: __u8,
    pub len: __u8,
    pub index: __u16,
    pub keycode: __u32,
    pub scancode: [__u8; 32],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for input_keymap_entry { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for input_keymap_entry {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u8>;
        let _: ::core::clone::AssertParamIsClone<__u16>;
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _: ::core::clone::AssertParamIsClone<[__u8; 32]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for input_keymap_entry { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for input_keymap_entry {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f,
            "input_keymap_entry", "flags", &self.flags, "len", &self.len,
            "index", &self.index, "keycode", &self.keycode, "scancode",
            &&self.scancode)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct input_mask {
    pub type_: __u32,
    pub codes_size: __u32,
    pub codes_ptr: crate::__u64,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for input_mask { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for input_mask {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for input_mask { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for input_mask {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "input_mask",
            "type_", &self.type_, "codes_size", &self.codes_size, "codes_ptr",
            &&self.codes_ptr)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ff_replay {
    pub length: __u16,
    pub delay: __u16,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ff_replay { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ff_replay {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u16>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ff_replay { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ff_replay {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "ff_replay",
            "length", &self.length, "delay", &&self.delay)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ff_trigger {
    pub button: __u16,
    pub interval: __u16,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ff_trigger { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ff_trigger {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u16>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ff_trigger { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ff_trigger {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "ff_trigger",
            "button", &self.button, "interval", &&self.interval)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ff_envelope {
    pub attack_length: __u16,
    pub attack_level: __u16,
    pub fade_length: __u16,
    pub fade_level: __u16,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ff_envelope { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ff_envelope {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u16>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ff_envelope { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ff_envelope {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "ff_envelope",
            "attack_length", &self.attack_length, "attack_level",
            &self.attack_level, "fade_length", &self.fade_length,
            "fade_level", &&self.fade_level)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ff_constant_effect {
    pub level: __s16,
    pub envelope: ff_envelope,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ff_constant_effect { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ff_constant_effect {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__s16>;
        let _: ::core::clone::AssertParamIsClone<ff_envelope>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ff_constant_effect { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ff_constant_effect {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "ff_constant_effect", "level", &self.level, "envelope",
            &&self.envelope)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ff_ramp_effect {
    pub start_level: __s16,
    pub end_level: __s16,
    pub envelope: ff_envelope,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ff_ramp_effect { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ff_ramp_effect {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__s16>;
        let _: ::core::clone::AssertParamIsClone<ff_envelope>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ff_ramp_effect { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ff_ramp_effect {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "ff_ramp_effect", "start_level", &self.start_level, "end_level",
            &self.end_level, "envelope", &&self.envelope)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ff_condition_effect {
    pub right_saturation: __u16,
    pub left_saturation: __u16,
    pub right_coeff: __s16,
    pub left_coeff: __s16,
    pub deadband: __u16,
    pub center: __s16,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ff_condition_effect { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ff_condition_effect {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u16>;
        let _: ::core::clone::AssertParamIsClone<__s16>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ff_condition_effect { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ff_condition_effect {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["right_saturation", "left_saturation", "right_coeff",
                        "left_coeff", "deadband", "center"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.right_saturation, &self.left_saturation,
                        &self.right_coeff, &self.left_coeff, &self.deadband,
                        &&self.center];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "ff_condition_effect", names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ff_periodic_effect {
    pub waveform: __u16,
    pub period: __u16,
    pub magnitude: __s16,
    pub offset: __s16,
    pub phase: __u16,
    pub envelope: ff_envelope,
    pub custom_len: __u32,
    pub custom_data: *mut __s16,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ff_periodic_effect { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ff_periodic_effect {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u16>;
        let _: ::core::clone::AssertParamIsClone<__s16>;
        let _: ::core::clone::AssertParamIsClone<ff_envelope>;
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _: ::core::clone::AssertParamIsClone<*mut __s16>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ff_periodic_effect { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ff_periodic_effect {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["waveform", "period", "magnitude", "offset", "phase",
                        "envelope", "custom_len", "custom_data"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.waveform, &self.period, &self.magnitude, &self.offset,
                        &self.phase, &self.envelope, &self.custom_len,
                        &&self.custom_data];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "ff_periodic_effect", names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ff_rumble_effect {
    pub strong_magnitude: __u16,
    pub weak_magnitude: __u16,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ff_rumble_effect { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ff_rumble_effect {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u16>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ff_rumble_effect { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ff_rumble_effect {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "ff_rumble_effect", "strong_magnitude", &self.strong_magnitude,
            "weak_magnitude", &&self.weak_magnitude)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ff_effect {
    pub type_: __u16,
    pub id: __s16,
    pub direction: __u16,
    pub trigger: ff_trigger,
    pub replay: ff_replay,
    pub u: [u64; 4],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ff_effect { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ff_effect {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u16>;
        let _: ::core::clone::AssertParamIsClone<__s16>;
        let _: ::core::clone::AssertParamIsClone<ff_trigger>;
        let _: ::core::clone::AssertParamIsClone<ff_replay>;
        let _: ::core::clone::AssertParamIsClone<[u64; 4]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ff_effect { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ff_effect {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["type_", "id", "direction", "trigger", "replay", "u"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.type_, &self.id, &self.direction, &self.trigger,
                        &self.replay, &&self.u];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "ff_effect",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct uinput_ff_upload {
    pub request_id: __u32,
    pub retval: __s32,
    pub effect: ff_effect,
    pub old: ff_effect,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for uinput_ff_upload { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for uinput_ff_upload {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _: ::core::clone::AssertParamIsClone<__s32>;
        let _: ::core::clone::AssertParamIsClone<ff_effect>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for uinput_ff_upload { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for uinput_ff_upload {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "uinput_ff_upload", "request_id", &self.request_id, "retval",
            &self.retval, "effect", &self.effect, "old", &&self.old)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct uinput_ff_erase {
    pub request_id: __u32,
    pub retval: __s32,
    pub effect_id: __u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for uinput_ff_erase { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for uinput_ff_erase {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _: ::core::clone::AssertParamIsClone<__s32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for uinput_ff_erase { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for uinput_ff_erase {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "uinput_ff_erase", "request_id", &self.request_id, "retval",
            &self.retval, "effect_id", &&self.effect_id)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct uinput_abs_setup {
    pub code: __u16,
    pub absinfo: input_absinfo,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for uinput_abs_setup { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for uinput_abs_setup {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u16>;
        let _: ::core::clone::AssertParamIsClone<input_absinfo>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for uinput_abs_setup { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for uinput_abs_setup {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "uinput_abs_setup", "code", &self.code, "absinfo", &&self.absinfo)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct __c_anonymous__kernel_fsid_t {
    pub val: [c_int; 2],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for __c_anonymous__kernel_fsid_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for __c_anonymous__kernel_fsid_t {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<[c_int; 2]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for __c_anonymous__kernel_fsid_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for __c_anonymous__kernel_fsid_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f,
            "__c_anonymous__kernel_fsid_t", "val", &&self.val)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct posix_spawn_file_actions_t {
    __allocated: c_int,
    __used: c_int,
    __actions: *mut c_int,
    __pad: Padding<[c_int; 16]>,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for posix_spawn_file_actions_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for posix_spawn_file_actions_t {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_int>;
        let _: ::core::clone::AssertParamIsClone<*mut c_int>;
        let _: ::core::clone::AssertParamIsClone<Padding<[c_int; 16]>>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for posix_spawn_file_actions_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for posix_spawn_file_actions_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "posix_spawn_file_actions_t", "__allocated", &self.__allocated,
            "__used", &self.__used, "__actions", &self.__actions, "__pad",
            &&self.__pad)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct posix_spawnattr_t {
    __flags: c_short,
    __pgrp: crate::pid_t,
    __sd: crate::sigset_t,
    __ss: crate::sigset_t,
    __sp: crate::sched_param,
    __policy: c_int,
    __pad: Padding<[c_int; 16]>,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for posix_spawnattr_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for posix_spawnattr_t {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_short>;
        let _: ::core::clone::AssertParamIsClone<crate::pid_t>;
        let _: ::core::clone::AssertParamIsClone<crate::sigset_t>;
        let _: ::core::clone::AssertParamIsClone<crate::sigset_t>;
        let _: ::core::clone::AssertParamIsClone<crate::sched_param>;
        let _: ::core::clone::AssertParamIsClone<c_int>;
        let _: ::core::clone::AssertParamIsClone<Padding<[c_int; 16]>>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for posix_spawnattr_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for posix_spawnattr_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["__flags", "__pgrp", "__sd", "__ss", "__sp", "__policy",
                        "__pad"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.__flags, &self.__pgrp, &self.__sd, &self.__ss, &self.__sp,
                        &self.__policy, &&self.__pad];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "posix_spawnattr_t", names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct genlmsghdr {
    pub cmd: u8,
    pub version: u8,
    pub reserved: u16,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for genlmsghdr { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for genlmsghdr {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<u8>;
        let _: ::core::clone::AssertParamIsClone<u16>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for genlmsghdr { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for genlmsghdr {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "genlmsghdr",
            "cmd", &self.cmd, "version", &self.version, "reserved",
            &&self.reserved)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct inotify_event {
    pub wd: c_int,
    pub mask: u32,
    pub cookie: u32,
    pub len: u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for inotify_event { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for inotify_event {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_int>;
        let _: ::core::clone::AssertParamIsClone<u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for inotify_event { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for inotify_event {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "inotify_event",
            "wd", &self.wd, "mask", &self.mask, "cookie", &self.cookie, "len",
            &&self.len)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct fanotify_response {
    pub fd: c_int,
    pub response: __u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for fanotify_response { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for fanotify_response {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_int>;
        let _: ::core::clone::AssertParamIsClone<__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for fanotify_response { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for fanotify_response {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "fanotify_response", "fd", &self.fd, "response", &&self.response)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct fanotify_event_info_header {
    pub info_type: __u8,
    pub pad: __u8,
    pub len: __u16,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for fanotify_event_info_header { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for fanotify_event_info_header {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u8>;
        let _: ::core::clone::AssertParamIsClone<__u16>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for fanotify_event_info_header { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for fanotify_event_info_header {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "fanotify_event_info_header", "info_type", &self.info_type, "pad",
            &self.pad, "len", &&self.len)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct fanotify_event_info_fid {
    pub hdr: fanotify_event_info_header,
    pub fsid: __kernel_fsid_t,
    pub handle: [c_uchar; 0],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for fanotify_event_info_fid { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for fanotify_event_info_fid {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<fanotify_event_info_header>;
        let _: ::core::clone::AssertParamIsClone<__kernel_fsid_t>;
        let _: ::core::clone::AssertParamIsClone<[c_uchar; 0]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for fanotify_event_info_fid { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for fanotify_event_info_fid {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "fanotify_event_info_fid", "hdr", &self.hdr, "fsid", &self.fsid,
            "handle", &&self.handle)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct sockaddr_vm {
    pub svm_family: crate::sa_family_t,
    pub svm_reserved1: c_ushort,
    pub svm_port: c_uint,
    pub svm_cid: c_uint,
    pub svm_zero: [u8; 4],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for sockaddr_vm { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for sockaddr_vm {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::sa_family_t>;
        let _: ::core::clone::AssertParamIsClone<c_ushort>;
        let _: ::core::clone::AssertParamIsClone<c_uint>;
        let _: ::core::clone::AssertParamIsClone<[u8; 4]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for sockaddr_vm { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for sockaddr_vm {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "sockaddr_vm",
            "svm_family", &self.svm_family, "svm_reserved1",
            &self.svm_reserved1, "svm_port", &self.svm_port, "svm_cid",
            &self.svm_cid, "svm_zero", &&self.svm_zero)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct sock_extended_err {
    pub ee_errno: u32,
    pub ee_origin: u8,
    pub ee_type: u8,
    pub ee_code: u8,
    pub ee_pad: u8,
    pub ee_info: u32,
    pub ee_data: u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for sock_extended_err { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for sock_extended_err {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<u32>;
        let _: ::core::clone::AssertParamIsClone<u8>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for sock_extended_err { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for sock_extended_err {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["ee_errno", "ee_origin", "ee_type", "ee_code", "ee_pad",
                        "ee_info", "ee_data"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.ee_errno, &self.ee_origin, &self.ee_type, &self.ee_code,
                        &self.ee_pad, &self.ee_info, &&self.ee_data];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "sock_extended_err", names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct seccomp_data {
    pub nr: c_int,
    pub arch: __u32,
    pub instruction_pointer: crate::__u64,
    pub args: [crate::__u64; 6],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for seccomp_data { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for seccomp_data {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_int>;
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<[crate::__u64; 6]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for seccomp_data { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for seccomp_data {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "seccomp_data",
            "nr", &self.nr, "arch", &self.arch, "instruction_pointer",
            &self.instruction_pointer, "args", &&self.args)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct seccomp_notif_sizes {
    pub seccomp_notif: __u16,
    pub seccomp_notif_resp: __u16,
    pub seccomp_data: __u16,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for seccomp_notif_sizes { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for seccomp_notif_sizes {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u16>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for seccomp_notif_sizes { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for seccomp_notif_sizes {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "seccomp_notif_sizes", "seccomp_notif", &self.seccomp_notif,
            "seccomp_notif_resp", &self.seccomp_notif_resp, "seccomp_data",
            &&self.seccomp_data)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct seccomp_notif {
    pub id: crate::__u64,
    pub pid: __u32,
    pub flags: __u32,
    pub data: seccomp_data,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for seccomp_notif { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for seccomp_notif {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _: ::core::clone::AssertParamIsClone<seccomp_data>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for seccomp_notif { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for seccomp_notif {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "seccomp_notif",
            "id", &self.id, "pid", &self.pid, "flags", &self.flags, "data",
            &&self.data)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct seccomp_notif_resp {
    pub id: crate::__u64,
    pub val: crate::__s64,
    pub error: __s32,
    pub flags: __u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for seccomp_notif_resp { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for seccomp_notif_resp {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__s64>;
        let _: ::core::clone::AssertParamIsClone<__s32>;
        let _: ::core::clone::AssertParamIsClone<__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for seccomp_notif_resp { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for seccomp_notif_resp {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "seccomp_notif_resp", "id", &self.id, "val", &self.val, "error",
            &self.error, "flags", &&self.flags)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct seccomp_notif_addfd {
    pub id: crate::__u64,
    pub flags: __u32,
    pub srcfd: __u32,
    pub newfd: __u32,
    pub newfd_flags: __u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for seccomp_notif_addfd { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for seccomp_notif_addfd {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for seccomp_notif_addfd { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for seccomp_notif_addfd {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f,
            "seccomp_notif_addfd", "id", &self.id, "flags", &self.flags,
            "srcfd", &self.srcfd, "newfd", &self.newfd, "newfd_flags",
            &&self.newfd_flags)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct in6_ifreq {
    pub ifr6_addr: crate::in6_addr,
    pub ifr6_prefixlen: u32,
    pub ifr6_ifindex: c_int,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for in6_ifreq { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for in6_ifreq {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::in6_addr>;
        let _: ::core::clone::AssertParamIsClone<u32>;
        let _: ::core::clone::AssertParamIsClone<c_int>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for in6_ifreq { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for in6_ifreq {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "in6_ifreq",
            "ifr6_addr", &self.ifr6_addr, "ifr6_prefixlen",
            &self.ifr6_prefixlen, "ifr6_ifindex", &&self.ifr6_ifindex)
    }
}
#[repr(C)]
#[allow(deprecated)]
#[non_exhaustive]
pub struct open_how {
    pub flags: crate::__u64,
    pub mode: crate::__u64,
    pub resolve: crate::__u64,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for open_how { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for open_how {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for open_how { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for open_how {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "open_how",
            "flags", &self.flags, "mode", &self.mode, "resolve",
            &&self.resolve)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ptp_clock_time {
    pub sec: crate::__s64,
    pub nsec: __u32,
    pub reserved: __u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ptp_clock_time { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ptp_clock_time {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__s64>;
        let _: ::core::clone::AssertParamIsClone<__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ptp_clock_time { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ptp_clock_time {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "ptp_clock_time", "sec", &self.sec, "nsec", &self.nsec,
            "reserved", &&self.reserved)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ptp_extts_request {
    pub index: c_uint,
    pub flags: c_uint,
    pub rsv: [c_uint; 2],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ptp_extts_request { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ptp_extts_request {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_uint>;
        let _: ::core::clone::AssertParamIsClone<[c_uint; 2]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ptp_extts_request { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ptp_extts_request {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "ptp_extts_request", "index", &self.index, "flags", &self.flags,
            "rsv", &&self.rsv)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ptp_sys_offset_extended {
    pub n_samples: c_uint,
    pub clockid: __kernel_clockid_t,
    pub rsv: [c_uint; 2],
    pub ts: [[ptp_clock_time; 3]; PTP_MAX_SAMPLES as usize],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ptp_sys_offset_extended { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ptp_sys_offset_extended {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_uint>;
        let _: ::core::clone::AssertParamIsClone<__kernel_clockid_t>;
        let _: ::core::clone::AssertParamIsClone<[c_uint; 2]>;
        let _:
                ::core::clone::AssertParamIsClone<[[ptp_clock_time; 3]; PTP_MAX_SAMPLES
                    as usize]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ptp_sys_offset_extended { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ptp_sys_offset_extended {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "ptp_sys_offset_extended", "n_samples", &self.n_samples,
            "clockid", &self.clockid, "rsv", &self.rsv, "ts", &&self.ts)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ptp_sys_offset_precise {
    pub device: ptp_clock_time,
    pub sys_realtime: ptp_clock_time,
    pub sys_monoraw: ptp_clock_time,
    pub rsv: [c_uint; 4],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ptp_sys_offset_precise { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ptp_sys_offset_precise {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<ptp_clock_time>;
        let _: ::core::clone::AssertParamIsClone<[c_uint; 4]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ptp_sys_offset_precise { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ptp_sys_offset_precise {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "ptp_sys_offset_precise", "device", &self.device, "sys_realtime",
            &self.sys_realtime, "sys_monoraw", &self.sys_monoraw, "rsv",
            &&self.rsv)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ptp_extts_event {
    pub t: ptp_clock_time,
    index: c_uint,
    flags: c_uint,
    rsv: Padding<[c_uint; 2]>,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ptp_extts_event { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ptp_extts_event {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<ptp_clock_time>;
        let _: ::core::clone::AssertParamIsClone<c_uint>;
        let _: ::core::clone::AssertParamIsClone<Padding<[c_uint; 2]>>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ptp_extts_event { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ptp_extts_event {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "ptp_extts_event", "t", &self.t, "index", &self.index, "flags",
            &self.flags, "rsv", &&self.rsv)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct iw_param {
    pub value: __s32,
    pub fixed: __u8,
    pub disabled: __u8,
    pub flags: __u16,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iw_param { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iw_param {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__s32>;
        let _: ::core::clone::AssertParamIsClone<__u8>;
        let _: ::core::clone::AssertParamIsClone<__u16>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iw_param { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iw_param {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "iw_param",
            "value", &self.value, "fixed", &self.fixed, "disabled",
            &self.disabled, "flags", &&self.flags)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct iw_point {
    pub pointer: *mut c_void,
    pub length: __u16,
    pub flags: __u16,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iw_point { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iw_point {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<*mut c_void>;
        let _: ::core::clone::AssertParamIsClone<__u16>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iw_point { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iw_point {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "iw_point",
            "pointer", &self.pointer, "length", &self.length, "flags",
            &&self.flags)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct iw_freq {
    pub m: __s32,
    pub e: __s16,
    pub i: __u8,
    pub flags: __u8,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iw_freq { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iw_freq {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__s32>;
        let _: ::core::clone::AssertParamIsClone<__s16>;
        let _: ::core::clone::AssertParamIsClone<__u8>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iw_freq { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iw_freq {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "iw_freq", "m",
            &self.m, "e", &self.e, "i", &self.i, "flags", &&self.flags)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct iw_quality {
    pub qual: __u8,
    pub level: __u8,
    pub noise: __u8,
    pub updated: __u8,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iw_quality { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iw_quality {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u8>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iw_quality { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iw_quality {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "iw_quality",
            "qual", &self.qual, "level", &self.level, "noise", &self.noise,
            "updated", &&self.updated)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct iw_discarded {
    pub nwid: __u32,
    pub code: __u32,
    pub fragment: __u32,
    pub retries: __u32,
    pubmisc: __u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iw_discarded { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iw_discarded {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iw_discarded { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iw_discarded {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "iw_discarded",
            "nwid", &self.nwid, "code", &self.code, "fragment",
            &self.fragment, "retries", &self.retries, "pubmisc",
            &&self.pubmisc)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct iw_missed {
    pub beacon: __u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iw_missed { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iw_missed {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iw_missed { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iw_missed {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f, "iw_missed",
            "beacon", &&self.beacon)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct iw_scan_req {
    pub scan_type: __u8,
    pub essid_len: __u8,
    pub num_channels: __u8,
    pub flags: __u8,
    pub bssid: crate::sockaddr,
    pub essid: [__u8; IW_ESSID_MAX_SIZE],
    pub min_channel_time: __u32,
    pub max_channel_time: __u32,
    pub channel_list: [iw_freq; IW_MAX_FREQUENCIES],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iw_scan_req { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iw_scan_req {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u8>;
        let _: ::core::clone::AssertParamIsClone<crate::sockaddr>;
        let _: ::core::clone::AssertParamIsClone<[__u8; IW_ESSID_MAX_SIZE]>;
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _:
                ::core::clone::AssertParamIsClone<[iw_freq; IW_MAX_FREQUENCIES]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iw_scan_req { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iw_scan_req {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["scan_type", "essid_len", "num_channels", "flags", "bssid",
                        "essid", "min_channel_time", "max_channel_time",
                        "channel_list"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.scan_type, &self.essid_len, &self.num_channels,
                        &self.flags, &self.bssid, &self.essid,
                        &self.min_channel_time, &self.max_channel_time,
                        &&self.channel_list];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "iw_scan_req",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct iw_encode_ext {
    pub ext_flags: __u32,
    pub tx_seq: [__u8; IW_ENCODE_SEQ_MAX_SIZE],
    pub rx_seq: [__u8; IW_ENCODE_SEQ_MAX_SIZE],
    pub addr: crate::sockaddr,
    pub alg: __u16,
    pub key_len: __u16,
    pub key: [__u8; 0],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iw_encode_ext { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iw_encode_ext {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _:
                ::core::clone::AssertParamIsClone<[__u8; IW_ENCODE_SEQ_MAX_SIZE]>;
        let _:
                ::core::clone::AssertParamIsClone<[__u8; IW_ENCODE_SEQ_MAX_SIZE]>;
        let _: ::core::clone::AssertParamIsClone<crate::sockaddr>;
        let _: ::core::clone::AssertParamIsClone<__u16>;
        let _: ::core::clone::AssertParamIsClone<[__u8; 0]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iw_encode_ext { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iw_encode_ext {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["ext_flags", "tx_seq", "rx_seq", "addr", "alg", "key_len",
                        "key"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.ext_flags, &self.tx_seq, &self.rx_seq, &self.addr,
                        &self.alg, &self.key_len, &&self.key];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "iw_encode_ext",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct iw_pmksa {
    pub cmd: __u32,
    pub bssid: crate::sockaddr,
    pub pmkid: [__u8; IW_PMKID_LEN],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iw_pmksa { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iw_pmksa {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::sockaddr>;
        let _: ::core::clone::AssertParamIsClone<[__u8; IW_PMKID_LEN]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iw_pmksa { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iw_pmksa {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "iw_pmksa",
            "cmd", &self.cmd, "bssid", &self.bssid, "pmkid", &&self.pmkid)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct iw_pmkid_cand {
    pub flags: __u32,
    pub index: __u32,
    pub bssid: crate::sockaddr,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iw_pmkid_cand { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iw_pmkid_cand {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::sockaddr>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iw_pmkid_cand { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iw_pmkid_cand {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "iw_pmkid_cand",
            "flags", &self.flags, "index", &self.index, "bssid", &&self.bssid)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct iw_statistics {
    pub status: __u16,
    pub qual: iw_quality,
    pub discard: iw_discarded,
    pub miss: iw_missed,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iw_statistics { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iw_statistics {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u16>;
        let _: ::core::clone::AssertParamIsClone<iw_quality>;
        let _: ::core::clone::AssertParamIsClone<iw_discarded>;
        let _: ::core::clone::AssertParamIsClone<iw_missed>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iw_statistics { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iw_statistics {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "iw_statistics",
            "status", &self.status, "qual", &self.qual, "discard",
            &self.discard, "miss", &&self.miss)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct iw_range {
    pub throughput: __u32,
    pub min_nwid: __u32,
    pub max_nwid: __u32,
    pub old_num_channels: __u16,
    pub old_num_frequency: __u8,
    pub scan_capa: __u8,
    pub event_capa: [__u32; 6],
    pub sensitivity: __s32,
    pub max_qual: iw_quality,
    pub avg_qual: iw_quality,
    pub num_bitrates: __u8,
    pub bitrate: [__s32; IW_MAX_BITRATES],
    pub min_rts: __s32,
    pub max_rts: __s32,
    pub min_frag: __s32,
    pub max_frag: __s32,
    pub min_pmp: __s32,
    pub max_pmp: __s32,
    pub min_pmt: __s32,
    pub max_pmt: __s32,
    pub pmp_flags: __u16,
    pub pmt_flags: __u16,
    pub pm_capa: __u16,
    pub encoding_size: [__u16; IW_MAX_ENCODING_SIZES],
    pub num_encoding_sizes: __u8,
    pub max_encoding_tokens: __u8,
    pub encoding_login_index: __u8,
    pub txpower_capa: __u16,
    pub num_txpower: __u8,
    pub txpower: [__s32; IW_MAX_TXPOWER],
    pub we_version_compiled: __u8,
    pub we_version_source: __u8,
    pub retry_capa: __u16,
    pub retry_flags: __u16,
    pub r_time_flags: __u16,
    pub min_retry: __s32,
    pub max_retry: __s32,
    pub min_r_time: __s32,
    pub max_r_time: __s32,
    pub num_channels: __u16,
    pub num_frequency: __u8,
    pub freq: [iw_freq; IW_MAX_FREQUENCIES],
    pub enc_capa: __u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iw_range { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iw_range {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _: ::core::clone::AssertParamIsClone<__u16>;
        let _: ::core::clone::AssertParamIsClone<__u8>;
        let _: ::core::clone::AssertParamIsClone<[__u32; 6]>;
        let _: ::core::clone::AssertParamIsClone<__s32>;
        let _: ::core::clone::AssertParamIsClone<iw_quality>;
        let _: ::core::clone::AssertParamIsClone<[__s32; IW_MAX_BITRATES]>;
        let _:
                ::core::clone::AssertParamIsClone<[__u16; IW_MAX_ENCODING_SIZES]>;
        let _: ::core::clone::AssertParamIsClone<[__s32; IW_MAX_TXPOWER]>;
        let _:
                ::core::clone::AssertParamIsClone<[iw_freq; IW_MAX_FREQUENCIES]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iw_range { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iw_range {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["throughput", "min_nwid", "max_nwid", "old_num_channels",
                        "old_num_frequency", "scan_capa", "event_capa",
                        "sensitivity", "max_qual", "avg_qual", "num_bitrates",
                        "bitrate", "min_rts", "max_rts", "min_frag", "max_frag",
                        "min_pmp", "max_pmp", "min_pmt", "max_pmt", "pmp_flags",
                        "pmt_flags", "pm_capa", "encoding_size",
                        "num_encoding_sizes", "max_encoding_tokens",
                        "encoding_login_index", "txpower_capa", "num_txpower",
                        "txpower", "we_version_compiled", "we_version_source",
                        "retry_capa", "retry_flags", "r_time_flags", "min_retry",
                        "max_retry", "min_r_time", "max_r_time", "num_channels",
                        "num_frequency", "freq", "enc_capa"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.throughput, &self.min_nwid, &self.max_nwid,
                        &self.old_num_channels, &self.old_num_frequency,
                        &self.scan_capa, &self.event_capa, &self.sensitivity,
                        &self.max_qual, &self.avg_qual, &self.num_bitrates,
                        &self.bitrate, &self.min_rts, &self.max_rts, &self.min_frag,
                        &self.max_frag, &self.min_pmp, &self.max_pmp, &self.min_pmt,
                        &self.max_pmt, &self.pmp_flags, &self.pmt_flags,
                        &self.pm_capa, &self.encoding_size,
                        &self.num_encoding_sizes, &self.max_encoding_tokens,
                        &self.encoding_login_index, &self.txpower_capa,
                        &self.num_txpower, &self.txpower, &self.we_version_compiled,
                        &self.we_version_source, &self.retry_capa,
                        &self.retry_flags, &self.r_time_flags, &self.min_retry,
                        &self.max_retry, &self.min_r_time, &self.max_r_time,
                        &self.num_channels, &self.num_frequency, &self.freq,
                        &&self.enc_capa];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "iw_range",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct iw_priv_args {
    pub cmd: __u32,
    pub set_args: __u16,
    pub get_args: __u16,
    pub name: [c_char; crate::IFNAMSIZ],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iw_priv_args { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iw_priv_args {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _: ::core::clone::AssertParamIsClone<__u16>;
        let _: ::core::clone::AssertParamIsClone<[c_char; crate::IFNAMSIZ]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iw_priv_args { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iw_priv_args {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "iw_priv_args",
            "cmd", &self.cmd, "set_args", &self.set_args, "get_args",
            &self.get_args, "name", &&self.name)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct epoll_params {
    pub busy_poll_usecs: u32,
    pub busy_poll_budget: u16,
    pub prefer_busy_poll: u8,
    pub __pad: u8,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for epoll_params { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for epoll_params {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<u32>;
        let _: ::core::clone::AssertParamIsClone<u16>;
        let _: ::core::clone::AssertParamIsClone<u8>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for epoll_params { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for epoll_params {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "epoll_params",
            "busy_poll_usecs", &self.busy_poll_usecs, "busy_poll_budget",
            &self.busy_poll_budget, "prefer_busy_poll",
            &self.prefer_busy_poll, "__pad", &&self.__pad)
    }
}
#[repr(C)]
#[allow(deprecated)]
#[repr(align(4))]
pub struct pthread_mutexattr_t {
    #[doc(hidden)]
    size: [u8; crate::__SIZEOF_PTHREAD_MUTEXATTR_T],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for pthread_mutexattr_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for pthread_mutexattr_t {
    #[inline]
    fn clone(&self) -> Self {
        let _:
                ::core::clone::AssertParamIsClone<[u8; crate::__SIZEOF_PTHREAD_MUTEXATTR_T]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for pthread_mutexattr_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for pthread_mutexattr_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f,
            "pthread_mutexattr_t", "size", &&self.size)
    }
}
#[repr(C)]
#[allow(deprecated)]
#[repr(align(8))]
pub struct pthread_rwlockattr_t {
    #[doc(hidden)]
    size: [u8; crate::__SIZEOF_PTHREAD_RWLOCKATTR_T],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for pthread_rwlockattr_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for pthread_rwlockattr_t {
    #[inline]
    fn clone(&self) -> Self {
        let _:
                ::core::clone::AssertParamIsClone<[u8; crate::__SIZEOF_PTHREAD_RWLOCKATTR_T]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for pthread_rwlockattr_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for pthread_rwlockattr_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f,
            "pthread_rwlockattr_t", "size", &&self.size)
    }
}
#[repr(C)]
#[allow(deprecated)]
#[repr(align(4))]
pub struct pthread_condattr_t {
    #[doc(hidden)]
    size: [u8; crate::__SIZEOF_PTHREAD_CONDATTR_T],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for pthread_condattr_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for pthread_condattr_t {
    #[inline]
    fn clone(&self) -> Self {
        let _:
                ::core::clone::AssertParamIsClone<[u8; crate::__SIZEOF_PTHREAD_CONDATTR_T]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for pthread_condattr_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for pthread_condattr_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f,
            "pthread_condattr_t", "size", &&self.size)
    }
}
#[repr(C)]
#[allow(deprecated)]
#[repr(align(4))]
pub struct pthread_barrierattr_t {
    #[doc(hidden)]
    size: [u8; crate::__SIZEOF_PTHREAD_BARRIERATTR_T],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for pthread_barrierattr_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for pthread_barrierattr_t {
    #[inline]
    fn clone(&self) -> Self {
        let _:
                ::core::clone::AssertParamIsClone<[u8; crate::__SIZEOF_PTHREAD_BARRIERATTR_T]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for pthread_barrierattr_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for pthread_barrierattr_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f,
            "pthread_barrierattr_t", "size", &&self.size)
    }
}
#[repr(C)]
#[allow(deprecated)]
#[repr(align(8))]
pub struct fanotify_event_metadata {
    pub event_len: __u32,
    pub vers: __u8,
    pub reserved: __u8,
    pub metadata_len: __u16,
    pub mask: __u64,
    pub fd: c_int,
    pub pid: c_int,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for fanotify_event_metadata { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for fanotify_event_metadata {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _: ::core::clone::AssertParamIsClone<__u8>;
        let _: ::core::clone::AssertParamIsClone<__u16>;
        let _: ::core::clone::AssertParamIsClone<__u64>;
        let _: ::core::clone::AssertParamIsClone<c_int>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for fanotify_event_metadata { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for fanotify_event_metadata {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["event_len", "vers", "reserved", "metadata_len", "mask", "fd",
                        "pid"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.event_len, &self.vers, &self.reserved, &self.metadata_len,
                        &self.mask, &self.fd, &&self.pid];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "fanotify_event_metadata", names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ptp_sys_offset {
    pub n_samples: c_uint,
    pub rsv: [c_uint; 3],
    pub ts: [ptp_clock_time; 51],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ptp_sys_offset { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ptp_sys_offset {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_uint>;
        let _: ::core::clone::AssertParamIsClone<[c_uint; 3]>;
        let _: ::core::clone::AssertParamIsClone<[ptp_clock_time; 51]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ptp_sys_offset { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ptp_sys_offset {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "ptp_sys_offset", "n_samples", &self.n_samples, "rsv", &self.rsv,
            "ts", &&self.ts)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ptp_pin_desc {
    pub name: [c_char; 64],
    pub index: c_uint,
    pub func: c_uint,
    pub chan: c_uint,
    pub rsv: [c_uint; 5],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ptp_pin_desc { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ptp_pin_desc {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<[c_char; 64]>;
        let _: ::core::clone::AssertParamIsClone<c_uint>;
        let _: ::core::clone::AssertParamIsClone<[c_uint; 5]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ptp_pin_desc { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ptp_pin_desc {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "ptp_pin_desc",
            "name", &self.name, "index", &self.index, "func", &self.func,
            "chan", &self.chan, "rsv", &&self.rsv)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ptp_clock_caps {
    pub max_adj: c_int,
    pub n_alarm: c_int,
    pub n_ext_ts: c_int,
    pub n_per_out: c_int,
    pub pps: c_int,
    pub n_pins: c_int,
    pub cross_timestamping: c_int,
    pub adjust_phase: c_int,
    pub max_phase_adj: c_int,
    pub rsv: [c_int; 11],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ptp_clock_caps { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ptp_clock_caps {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_int>;
        let _: ::core::clone::AssertParamIsClone<[c_int; 11]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ptp_clock_caps { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ptp_clock_caps {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["max_adj", "n_alarm", "n_ext_ts", "n_per_out", "pps", "n_pins",
                        "cross_timestamping", "adjust_phase", "max_phase_adj",
                        "rsv"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.max_adj, &self.n_alarm, &self.n_ext_ts, &self.n_per_out,
                        &self.pps, &self.n_pins, &self.cross_timestamping,
                        &self.adjust_phase, &self.max_phase_adj, &&self.rsv];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "ptp_clock_caps", names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct sockaddr_xdp {
    pub sxdp_family: crate::__u16,
    pub sxdp_flags: crate::__u16,
    pub sxdp_ifindex: crate::__u32,
    pub sxdp_queue_id: crate::__u32,
    pub sxdp_shared_umem_fd: crate::__u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for sockaddr_xdp { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for sockaddr_xdp {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u16>;
        let _: ::core::clone::AssertParamIsClone<crate::__u16>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for sockaddr_xdp { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for sockaddr_xdp {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "sockaddr_xdp",
            "sxdp_family", &self.sxdp_family, "sxdp_flags", &self.sxdp_flags,
            "sxdp_ifindex", &self.sxdp_ifindex, "sxdp_queue_id",
            &self.sxdp_queue_id, "sxdp_shared_umem_fd",
            &&self.sxdp_shared_umem_fd)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct xdp_ring_offset {
    pub producer: crate::__u64,
    pub consumer: crate::__u64,
    pub desc: crate::__u64,
    pub flags: crate::__u64,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for xdp_ring_offset { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for xdp_ring_offset {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for xdp_ring_offset { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for xdp_ring_offset {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "xdp_ring_offset", "producer", &self.producer, "consumer",
            &self.consumer, "desc", &self.desc, "flags", &&self.flags)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct xdp_mmap_offsets {
    pub rx: xdp_ring_offset,
    pub tx: xdp_ring_offset,
    pub fr: xdp_ring_offset,
    pub cr: xdp_ring_offset,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for xdp_mmap_offsets { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for xdp_mmap_offsets {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<xdp_ring_offset>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for xdp_mmap_offsets { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for xdp_mmap_offsets {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "xdp_mmap_offsets", "rx", &self.rx, "tx", &self.tx, "fr",
            &self.fr, "cr", &&self.cr)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct xdp_ring_offset_v1 {
    pub producer: crate::__u64,
    pub consumer: crate::__u64,
    pub desc: crate::__u64,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for xdp_ring_offset_v1 { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for xdp_ring_offset_v1 {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for xdp_ring_offset_v1 { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for xdp_ring_offset_v1 {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "xdp_ring_offset_v1", "producer", &self.producer, "consumer",
            &self.consumer, "desc", &&self.desc)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct xdp_mmap_offsets_v1 {
    pub rx: xdp_ring_offset_v1,
    pub tx: xdp_ring_offset_v1,
    pub fr: xdp_ring_offset_v1,
    pub cr: xdp_ring_offset_v1,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for xdp_mmap_offsets_v1 { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for xdp_mmap_offsets_v1 {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<xdp_ring_offset_v1>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for xdp_mmap_offsets_v1 { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for xdp_mmap_offsets_v1 {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "xdp_mmap_offsets_v1", "rx", &self.rx, "tx", &self.tx, "fr",
            &self.fr, "cr", &&self.cr)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct xdp_umem_reg {
    pub addr: crate::__u64,
    pub len: crate::__u64,
    pub chunk_size: crate::__u32,
    pub headroom: crate::__u32,
    pub flags: crate::__u32,
    pub tx_metadata_len: crate::__u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for xdp_umem_reg { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for xdp_umem_reg {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for xdp_umem_reg { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for xdp_umem_reg {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["addr", "len", "chunk_size", "headroom", "flags",
                        "tx_metadata_len"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.addr, &self.len, &self.chunk_size, &self.headroom,
                        &self.flags, &&self.tx_metadata_len];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "xdp_umem_reg",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct xdp_umem_reg_v1 {
    pub addr: crate::__u64,
    pub len: crate::__u64,
    pub chunk_size: crate::__u32,
    pub headroom: crate::__u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for xdp_umem_reg_v1 { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for xdp_umem_reg_v1 {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for xdp_umem_reg_v1 { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for xdp_umem_reg_v1 {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "xdp_umem_reg_v1", "addr", &self.addr, "len", &self.len,
            "chunk_size", &self.chunk_size, "headroom", &&self.headroom)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct xdp_statistics {
    pub rx_dropped: crate::__u64,
    pub rx_invalid_descs: crate::__u64,
    pub tx_invalid_descs: crate::__u64,
    pub rx_ring_full: crate::__u64,
    pub rx_fill_ring_empty_descs: crate::__u64,
    pub tx_ring_empty_descs: crate::__u64,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for xdp_statistics { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for xdp_statistics {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for xdp_statistics { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for xdp_statistics {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["rx_dropped", "rx_invalid_descs", "tx_invalid_descs",
                        "rx_ring_full", "rx_fill_ring_empty_descs",
                        "tx_ring_empty_descs"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.rx_dropped, &self.rx_invalid_descs,
                        &self.tx_invalid_descs, &self.rx_ring_full,
                        &self.rx_fill_ring_empty_descs, &&self.tx_ring_empty_descs];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "xdp_statistics", names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct xdp_statistics_v1 {
    pub rx_dropped: crate::__u64,
    pub rx_invalid_descs: crate::__u64,
    pub tx_invalid_descs: crate::__u64,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for xdp_statistics_v1 { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for xdp_statistics_v1 {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for xdp_statistics_v1 { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for xdp_statistics_v1 {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "xdp_statistics_v1", "rx_dropped", &self.rx_dropped,
            "rx_invalid_descs", &self.rx_invalid_descs, "tx_invalid_descs",
            &&self.tx_invalid_descs)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct xdp_options {
    pub flags: crate::__u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for xdp_options { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for xdp_options {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for xdp_options { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for xdp_options {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f, "xdp_options",
            "flags", &&self.flags)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct xdp_desc {
    pub addr: crate::__u64,
    pub len: crate::__u32,
    pub options: crate::__u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for xdp_desc { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for xdp_desc {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for xdp_desc { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for xdp_desc {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "xdp_desc",
            "addr", &self.addr, "len", &self.len, "options", &&self.options)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct xsk_tx_metadata_completion {
    pub tx_timestamp: crate::__u64,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for xsk_tx_metadata_completion { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for xsk_tx_metadata_completion {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for xsk_tx_metadata_completion { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for xsk_tx_metadata_completion {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f,
            "xsk_tx_metadata_completion", "tx_timestamp", &&self.tx_timestamp)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct xsk_tx_metadata_request {
    pub csum_start: __u16,
    pub csum_offset: __u16,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for xsk_tx_metadata_request { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for xsk_tx_metadata_request {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u16>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for xsk_tx_metadata_request { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for xsk_tx_metadata_request {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "xsk_tx_metadata_request", "csum_start", &self.csum_start,
            "csum_offset", &&self.csum_offset)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct mnt_ns_info {
    pub size: crate::__u32,
    pub nr_mounts: crate::__u32,
    pub mnt_ns_id: crate::__u64,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for mnt_ns_info { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for mnt_ns_info {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for mnt_ns_info { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for mnt_ns_info {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "mnt_ns_info",
            "size", &self.size, "nr_mounts", &self.nr_mounts, "mnt_ns_id",
            &&self.mnt_ns_id)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct dmabuf_cmsg {
    pub frag_offset: crate::__u64,
    pub frag_size: crate::__u32,
    pub frag_token: crate::__u32,
    pub dmabuf_id: crate::__u32,
    pub flags: crate::__u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for dmabuf_cmsg { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for dmabuf_cmsg {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for dmabuf_cmsg { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for dmabuf_cmsg {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "dmabuf_cmsg",
            "frag_offset", &self.frag_offset, "frag_size", &self.frag_size,
            "frag_token", &self.frag_token, "dmabuf_id", &self.dmabuf_id,
            "flags", &&self.flags)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct dmabuf_token {
    pub token_start: crate::__u32,
    pub token_count: crate::__u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for dmabuf_token { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for dmabuf_token {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for dmabuf_token { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for dmabuf_token {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "dmabuf_token",
            "token_start", &self.token_start, "token_count",
            &&self.token_count)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct sockaddr_alg {
    pub salg_family: crate::sa_family_t,
    pub salg_type: [c_uchar; 14],
    pub salg_feat: u32,
    pub salg_mask: u32,
    pub salg_name: [c_uchar; 64],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for sockaddr_alg { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for sockaddr_alg {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::sa_family_t>;
        let _: ::core::clone::AssertParamIsClone<[c_uchar; 14]>;
        let _: ::core::clone::AssertParamIsClone<u32>;
        let _: ::core::clone::AssertParamIsClone<[c_uchar; 64]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for sockaddr_alg { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for sockaddr_alg {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "sockaddr_alg",
            "salg_family", &self.salg_family, "salg_type", &self.salg_type,
            "salg_feat", &self.salg_feat, "salg_mask", &self.salg_mask,
            "salg_name", &&self.salg_name)
    }
}
#[repr(C)]
#[allow(deprecated)]
#[repr(align(8))]
pub struct pthread_cond_t {
    #[doc(hidden)]
    size: [u8; crate::__SIZEOF_PTHREAD_COND_T],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for pthread_cond_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for pthread_cond_t {
    #[inline]
    fn clone(&self) -> Self {
        let _:
                ::core::clone::AssertParamIsClone<[u8; crate::__SIZEOF_PTHREAD_COND_T]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for pthread_cond_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for pthread_cond_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f,
            "pthread_cond_t", "size", &&self.size)
    }
}
#[repr(C)]
#[allow(deprecated)]
#[repr(align(8))]
pub struct pthread_mutex_t {
    pub(crate) size: [c_char; crate::__SIZEOF_PTHREAD_MUTEX_T],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for pthread_mutex_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for pthread_mutex_t {
    #[inline]
    fn clone(&self) -> Self {
        let _:
                ::core::clone::AssertParamIsClone<[c_char; crate::__SIZEOF_PTHREAD_MUTEX_T]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for pthread_mutex_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for pthread_mutex_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f,
            "pthread_mutex_t", "size", &&self.size)
    }
}
#[repr(C)]
#[allow(deprecated)]
#[repr(align(8))]
pub struct pthread_rwlock_t {
    size: [u8; crate::__SIZEOF_PTHREAD_RWLOCK_T],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for pthread_rwlock_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for pthread_rwlock_t {
    #[inline]
    fn clone(&self) -> Self {
        let _:
                ::core::clone::AssertParamIsClone<[u8; crate::__SIZEOF_PTHREAD_RWLOCK_T]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for pthread_rwlock_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for pthread_rwlock_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f,
            "pthread_rwlock_t", "size", &&self.size)
    }
}
#[repr(C)]
#[allow(deprecated)]
#[repr(align(8))]
pub struct pthread_barrier_t {
    size: [u8; crate::__SIZEOF_PTHREAD_BARRIER_T],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for pthread_barrier_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for pthread_barrier_t {
    #[inline]
    fn clone(&self) -> Self {
        let _:
                ::core::clone::AssertParamIsClone<[u8; crate::__SIZEOF_PTHREAD_BARRIER_T]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for pthread_barrier_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for pthread_barrier_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f,
            "pthread_barrier_t", "size", &&self.size)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct uinput_setup {
    pub id: input_id,
    pub name: [c_char; UINPUT_MAX_NAME_SIZE],
    pub ff_effects_max: __u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for uinput_setup { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for uinput_setup {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<input_id>;
        let _:
                ::core::clone::AssertParamIsClone<[c_char; UINPUT_MAX_NAME_SIZE]>;
        let _: ::core::clone::AssertParamIsClone<__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for uinput_setup { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for uinput_setup {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "uinput_setup",
            "id", &self.id, "name", &self.name, "ff_effects_max",
            &&self.ff_effects_max)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct uinput_user_dev {
    pub name: [c_char; UINPUT_MAX_NAME_SIZE],
    pub id: input_id,
    pub ff_effects_max: __u32,
    pub absmax: [__s32; ABS_CNT],
    pub absmin: [__s32; ABS_CNT],
    pub absfuzz: [__s32; ABS_CNT],
    pub absflat: [__s32; ABS_CNT],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for uinput_user_dev { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for uinput_user_dev {
    #[inline]
    fn clone(&self) -> Self {
        let _:
                ::core::clone::AssertParamIsClone<[c_char; UINPUT_MAX_NAME_SIZE]>;
        let _: ::core::clone::AssertParamIsClone<input_id>;
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _: ::core::clone::AssertParamIsClone<[__s32; ABS_CNT]>;
        let _: ::core::clone::AssertParamIsClone<[__s32; ABS_CNT]>;
        let _: ::core::clone::AssertParamIsClone<[__s32; ABS_CNT]>;
        let _: ::core::clone::AssertParamIsClone<[__s32; ABS_CNT]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for uinput_user_dev { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for uinput_user_dev {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["name", "id", "ff_effects_max", "absmax", "absmin", "absfuzz",
                        "absflat"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.name, &self.id, &self.ff_effects_max, &self.absmax,
                        &self.absmin, &self.absfuzz, &&self.absflat];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "uinput_user_dev", names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct mq_attr {
    pub mq_flags: c_long,
    pub mq_maxmsg: c_long,
    pub mq_msgsize: c_long,
    pub mq_curmsgs: c_long,
    pad: Padding<[c_long; 4]>,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for mq_attr { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for mq_attr {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_long>;
        let _: ::core::clone::AssertParamIsClone<Padding<[c_long; 4]>>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for mq_attr { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for mq_attr {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "mq_attr",
            "mq_flags", &self.mq_flags, "mq_maxmsg", &self.mq_maxmsg,
            "mq_msgsize", &self.mq_msgsize, "mq_curmsgs", &self.mq_curmsgs,
            "pad", &&self.pad)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct hwtstamp_config {
    pub flags: c_int,
    pub tx_type: c_int,
    pub rx_filter: c_int,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for hwtstamp_config { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for hwtstamp_config {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_int>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for hwtstamp_config { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for hwtstamp_config {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "hwtstamp_config", "flags", &self.flags, "tx_type", &self.tx_type,
            "rx_filter", &&self.rx_filter)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct sched_attr {
    pub size: __u32,
    pub sched_policy: __u32,
    pub sched_flags: crate::__u64,
    pub sched_nice: __s32,
    pub sched_priority: __u32,
    pub sched_runtime: crate::__u64,
    pub sched_deadline: crate::__u64,
    pub sched_period: crate::__u64,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for sched_attr { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for sched_attr {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<__s32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for sched_attr { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for sched_attr {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["size", "sched_policy", "sched_flags", "sched_nice",
                        "sched_priority", "sched_runtime", "sched_deadline",
                        "sched_period"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.size, &self.sched_policy, &self.sched_flags,
                        &self.sched_nice, &self.sched_priority, &self.sched_runtime,
                        &self.sched_deadline, &&self.sched_period];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "sched_attr",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct file_handle {
    pub handle_bytes: c_uint,
    pub handle_type: c_int,
    pub f_handle: [c_uchar; 0],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for file_handle { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for file_handle {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_uint>;
        let _: ::core::clone::AssertParamIsClone<c_int>;
        let _: ::core::clone::AssertParamIsClone<[c_uchar; 0]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for file_handle { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for file_handle {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "file_handle",
            "handle_bytes", &self.handle_bytes, "handle_type",
            &self.handle_type, "f_handle", &&self.f_handle)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ifinfomsg {
    pub ifi_family: c_uchar,
    __ifi_pad: Padding<c_uchar>,
    pub ifi_type: c_ushort,
    pub ifi_index: c_int,
    pub ifi_flags: c_uint,
    pub ifi_change: c_uint,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ifinfomsg { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ifinfomsg {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_uchar>;
        let _: ::core::clone::AssertParamIsClone<Padding<c_uchar>>;
        let _: ::core::clone::AssertParamIsClone<c_ushort>;
        let _: ::core::clone::AssertParamIsClone<c_int>;
        let _: ::core::clone::AssertParamIsClone<c_uint>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ifinfomsg { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ifinfomsg {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["ifi_family", "__ifi_pad", "ifi_type", "ifi_index", "ifi_flags",
                        "ifi_change"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.ifi_family, &self.__ifi_pad, &self.ifi_type,
                        &self.ifi_index, &self.ifi_flags, &&self.ifi_change];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "ifinfomsg",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct rtattr {
    pub rta_len: c_ushort,
    pub rta_type: c_ushort,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for rtattr { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for rtattr {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_ushort>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for rtattr { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for rtattr {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "rtattr",
            "rta_len", &self.rta_len, "rta_type", &&self.rta_type)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct netent {
    pub n_name: *mut c_char,
    pub n_aliases: *mut *mut c_char,
    pub n_addrtype: c_int,
    pub n_net: u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for netent { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for netent {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<*mut c_char>;
        let _: ::core::clone::AssertParamIsClone<*mut *mut c_char>;
        let _: ::core::clone::AssertParamIsClone<c_int>;
        let _: ::core::clone::AssertParamIsClone<u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for netent { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for netent {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "netent",
            "n_name", &self.n_name, "n_aliases", &self.n_aliases,
            "n_addrtype", &self.n_addrtype, "n_net", &&self.n_net)
    }
}s! {
49    pub struct dqblk {
50        pub dqb_bhardlimit: u64,
51        pub dqb_bsoftlimit: u64,
52        pub dqb_curspace: u64,
53        pub dqb_ihardlimit: u64,
54        pub dqb_isoftlimit: u64,
55        pub dqb_curinodes: u64,
56        pub dqb_btime: u64,
57        pub dqb_itime: u64,
58        pub dqb_valid: u32,
59    }
60
61    pub struct signalfd_siginfo {
62        pub ssi_signo: u32,
63        pub ssi_errno: i32,
64        pub ssi_code: i32,
65        pub ssi_pid: u32,
66        pub ssi_uid: u32,
67        pub ssi_fd: i32,
68        pub ssi_tid: u32,
69        pub ssi_band: u32,
70        pub ssi_overrun: u32,
71        pub ssi_trapno: u32,
72        pub ssi_status: i32,
73        pub ssi_int: i32,
74        pub ssi_ptr: u64,
75        pub ssi_utime: u64,
76        pub ssi_stime: u64,
77        pub ssi_addr: u64,
78        pub ssi_addr_lsb: u16,
79        _pad2: Padding<u16>,
80        pub ssi_syscall: i32,
81        pub ssi_call_addr: u64,
82        pub ssi_arch: u32,
83        _pad: Padding<[u8; 28]>,
84    }
85
86    // System V IPC
87    pub struct msginfo {
88        pub msgpool: c_int,
89        pub msgmap: c_int,
90        pub msgmax: c_int,
91        pub msgmnb: c_int,
92        pub msgmni: c_int,
93        pub msgssz: c_int,
94        pub msgtql: c_int,
95        pub msgseg: c_ushort,
96    }
97
98    pub struct input_event {
99        // FIXME(1.0): Change to the commented variant, see https://github.com/rust-lang/libc/pull/4148#discussion_r1857511742
100        #[cfg(any(target_pointer_width = "64", not(linux_time_bits64)))]
101        pub time: crate::timeval,
102        // #[cfg(any(target_pointer_width = "64", not(linux_time_bits64)))]
103        // pub input_event_sec: time_t,
104        // #[cfg(any(target_pointer_width = "64", not(linux_time_bits64)))]
105        // pub input_event_usec: suseconds_t,
106        // #[cfg(target_arch = "sparc64")]
107        // _pad1: c_int,
108        #[cfg(all(target_pointer_width = "32", linux_time_bits64))]
109        pub input_event_sec: c_ulong,
110
111        #[cfg(all(target_pointer_width = "32", linux_time_bits64))]
112        pub input_event_usec: c_ulong,
113
114        pub type_: __u16,
115        pub code: __u16,
116        pub value: __s32,
117    }
118
119    pub struct input_id {
120        pub bustype: __u16,
121        pub vendor: __u16,
122        pub product: __u16,
123        pub version: __u16,
124    }
125
126    pub struct input_absinfo {
127        pub value: __s32,
128        pub minimum: __s32,
129        pub maximum: __s32,
130        pub fuzz: __s32,
131        pub flat: __s32,
132        pub resolution: __s32,
133    }
134
135    pub struct input_keymap_entry {
136        pub flags: __u8,
137        pub len: __u8,
138        pub index: __u16,
139        pub keycode: __u32,
140        pub scancode: [__u8; 32],
141    }
142
143    pub struct input_mask {
144        pub type_: __u32,
145        pub codes_size: __u32,
146        pub codes_ptr: crate::__u64,
147    }
148
149    pub struct ff_replay {
150        pub length: __u16,
151        pub delay: __u16,
152    }
153
154    pub struct ff_trigger {
155        pub button: __u16,
156        pub interval: __u16,
157    }
158
159    pub struct ff_envelope {
160        pub attack_length: __u16,
161        pub attack_level: __u16,
162        pub fade_length: __u16,
163        pub fade_level: __u16,
164    }
165
166    pub struct ff_constant_effect {
167        pub level: __s16,
168        pub envelope: ff_envelope,
169    }
170
171    pub struct ff_ramp_effect {
172        pub start_level: __s16,
173        pub end_level: __s16,
174        pub envelope: ff_envelope,
175    }
176
177    pub struct ff_condition_effect {
178        pub right_saturation: __u16,
179        pub left_saturation: __u16,
180
181        pub right_coeff: __s16,
182        pub left_coeff: __s16,
183
184        pub deadband: __u16,
185        pub center: __s16,
186    }
187
188    pub struct ff_periodic_effect {
189        pub waveform: __u16,
190        pub period: __u16,
191        pub magnitude: __s16,
192        pub offset: __s16,
193        pub phase: __u16,
194
195        pub envelope: ff_envelope,
196
197        pub custom_len: __u32,
198        pub custom_data: *mut __s16,
199    }
200
201    pub struct ff_rumble_effect {
202        pub strong_magnitude: __u16,
203        pub weak_magnitude: __u16,
204    }
205
206    pub struct ff_effect {
207        pub type_: __u16,
208        pub id: __s16,
209        pub direction: __u16,
210        pub trigger: ff_trigger,
211        pub replay: ff_replay,
212        // FIXME(1.0): this is actually a union
213        #[cfg(target_pointer_width = "64")]
214        pub u: [u64; 4],
215        #[cfg(target_pointer_width = "32")]
216        pub u: [u32; 7],
217    }
218
219    pub struct uinput_ff_upload {
220        pub request_id: __u32,
221        pub retval: __s32,
222        pub effect: ff_effect,
223        pub old: ff_effect,
224    }
225
226    pub struct uinput_ff_erase {
227        pub request_id: __u32,
228        pub retval: __s32,
229        pub effect_id: __u32,
230    }
231
232    pub struct uinput_abs_setup {
233        pub code: __u16,
234        pub absinfo: input_absinfo,
235    }
236
237    pub struct __c_anonymous__kernel_fsid_t {
238        pub val: [c_int; 2],
239    }
240
241    pub struct posix_spawn_file_actions_t {
242        __allocated: c_int,
243        __used: c_int,
244        __actions: *mut c_int,
245        __pad: Padding<[c_int; 16]>,
246    }
247
248    pub struct posix_spawnattr_t {
249        __flags: c_short,
250        __pgrp: crate::pid_t,
251        __sd: crate::sigset_t,
252        __ss: crate::sigset_t,
253        #[cfg(any(target_env = "musl", target_env = "ohos"))]
254        __prio: c_int,
255        #[cfg(not(any(target_env = "musl", target_env = "ohos")))]
256        __sp: crate::sched_param,
257        __policy: c_int,
258        __pad: Padding<[c_int; 16]>,
259    }
260
261    pub struct genlmsghdr {
262        pub cmd: u8,
263        pub version: u8,
264        pub reserved: u16,
265    }
266
267    pub struct inotify_event {
268        pub wd: c_int,
269        pub mask: u32,
270        pub cookie: u32,
271        pub len: u32,
272    }
273
274    pub struct fanotify_response {
275        pub fd: c_int,
276        pub response: __u32,
277    }
278
279    pub struct fanotify_event_info_header {
280        pub info_type: __u8,
281        pub pad: __u8,
282        pub len: __u16,
283    }
284
285    pub struct fanotify_event_info_fid {
286        pub hdr: fanotify_event_info_header,
287        pub fsid: __kernel_fsid_t,
288        pub handle: [c_uchar; 0],
289    }
290
291    pub struct sockaddr_vm {
292        pub svm_family: crate::sa_family_t,
293        pub svm_reserved1: c_ushort,
294        pub svm_port: c_uint,
295        pub svm_cid: c_uint,
296        pub svm_zero: [u8; 4],
297    }
298
299    pub struct sock_extended_err {
300        pub ee_errno: u32,
301        pub ee_origin: u8,
302        pub ee_type: u8,
303        pub ee_code: u8,
304        pub ee_pad: u8,
305        pub ee_info: u32,
306        pub ee_data: u32,
307    }
308
309    // linux/seccomp.h
310    pub struct seccomp_data {
311        pub nr: c_int,
312        pub arch: __u32,
313        pub instruction_pointer: crate::__u64,
314        pub args: [crate::__u64; 6],
315    }
316
317    pub struct seccomp_notif_sizes {
318        pub seccomp_notif: __u16,
319        pub seccomp_notif_resp: __u16,
320        pub seccomp_data: __u16,
321    }
322
323    pub struct seccomp_notif {
324        pub id: crate::__u64,
325        pub pid: __u32,
326        pub flags: __u32,
327        pub data: seccomp_data,
328    }
329
330    pub struct seccomp_notif_resp {
331        pub id: crate::__u64,
332        pub val: crate::__s64,
333        pub error: __s32,
334        pub flags: __u32,
335    }
336
337    pub struct seccomp_notif_addfd {
338        pub id: crate::__u64,
339        pub flags: __u32,
340        pub srcfd: __u32,
341        pub newfd: __u32,
342        pub newfd_flags: __u32,
343    }
344
345    pub struct in6_ifreq {
346        pub ifr6_addr: crate::in6_addr,
347        pub ifr6_prefixlen: u32,
348        pub ifr6_ifindex: c_int,
349    }
350
351    // linux/openat2.h
352    #[non_exhaustive]
353    pub struct open_how {
354        pub flags: crate::__u64,
355        pub mode: crate::__u64,
356        pub resolve: crate::__u64,
357    }
358
359    // linux/ptp_clock.h
360    pub struct ptp_clock_time {
361        pub sec: crate::__s64,
362        pub nsec: __u32,
363        pub reserved: __u32,
364    }
365
366    pub struct ptp_extts_request {
367        pub index: c_uint,
368        pub flags: c_uint,
369        pub rsv: [c_uint; 2],
370    }
371
372    pub struct ptp_sys_offset_extended {
373        pub n_samples: c_uint,
374        pub clockid: __kernel_clockid_t,
375        pub rsv: [c_uint; 2],
376        pub ts: [[ptp_clock_time; 3]; PTP_MAX_SAMPLES as usize],
377    }
378
379    pub struct ptp_sys_offset_precise {
380        pub device: ptp_clock_time,
381        pub sys_realtime: ptp_clock_time,
382        pub sys_monoraw: ptp_clock_time,
383        pub rsv: [c_uint; 4],
384    }
385
386    pub struct ptp_extts_event {
387        pub t: ptp_clock_time,
388        index: c_uint,
389        flags: c_uint,
390        rsv: Padding<[c_uint; 2]>,
391    }
392
393    // linux/wireless.h
394
395    pub struct iw_param {
396        pub value: __s32,
397        pub fixed: __u8,
398        pub disabled: __u8,
399        pub flags: __u16,
400    }
401
402    pub struct iw_point {
403        pub pointer: *mut c_void,
404        pub length: __u16,
405        pub flags: __u16,
406    }
407
408    pub struct iw_freq {
409        pub m: __s32,
410        pub e: __s16,
411        pub i: __u8,
412        pub flags: __u8,
413    }
414
415    pub struct iw_quality {
416        pub qual: __u8,
417        pub level: __u8,
418        pub noise: __u8,
419        pub updated: __u8,
420    }
421
422    pub struct iw_discarded {
423        pub nwid: __u32,
424        pub code: __u32,
425        pub fragment: __u32,
426        pub retries: __u32,
427        pubmisc: __u32,
428    }
429
430    pub struct iw_missed {
431        pub beacon: __u32,
432    }
433
434    pub struct iw_scan_req {
435        pub scan_type: __u8,
436        pub essid_len: __u8,
437        pub num_channels: __u8,
438        pub flags: __u8,
439        pub bssid: crate::sockaddr,
440        pub essid: [__u8; IW_ESSID_MAX_SIZE],
441        pub min_channel_time: __u32,
442        pub max_channel_time: __u32,
443        pub channel_list: [iw_freq; IW_MAX_FREQUENCIES],
444    }
445
446    pub struct iw_encode_ext {
447        pub ext_flags: __u32,
448        pub tx_seq: [__u8; IW_ENCODE_SEQ_MAX_SIZE],
449        pub rx_seq: [__u8; IW_ENCODE_SEQ_MAX_SIZE],
450        pub addr: crate::sockaddr,
451        pub alg: __u16,
452        pub key_len: __u16,
453        pub key: [__u8; 0],
454    }
455
456    pub struct iw_pmksa {
457        pub cmd: __u32,
458        pub bssid: crate::sockaddr,
459        pub pmkid: [__u8; IW_PMKID_LEN],
460    }
461
462    pub struct iw_pmkid_cand {
463        pub flags: __u32,
464        pub index: __u32,
465        pub bssid: crate::sockaddr,
466    }
467
468    pub struct iw_statistics {
469        pub status: __u16,
470        pub qual: iw_quality,
471        pub discard: iw_discarded,
472        pub miss: iw_missed,
473    }
474
475    pub struct iw_range {
476        pub throughput: __u32,
477        pub min_nwid: __u32,
478        pub max_nwid: __u32,
479        pub old_num_channels: __u16,
480        pub old_num_frequency: __u8,
481        pub scan_capa: __u8,
482        pub event_capa: [__u32; 6],
483        pub sensitivity: __s32,
484        pub max_qual: iw_quality,
485        pub avg_qual: iw_quality,
486        pub num_bitrates: __u8,
487        pub bitrate: [__s32; IW_MAX_BITRATES],
488        pub min_rts: __s32,
489        pub max_rts: __s32,
490        pub min_frag: __s32,
491        pub max_frag: __s32,
492        pub min_pmp: __s32,
493        pub max_pmp: __s32,
494        pub min_pmt: __s32,
495        pub max_pmt: __s32,
496        pub pmp_flags: __u16,
497        pub pmt_flags: __u16,
498        pub pm_capa: __u16,
499        pub encoding_size: [__u16; IW_MAX_ENCODING_SIZES],
500        pub num_encoding_sizes: __u8,
501        pub max_encoding_tokens: __u8,
502        pub encoding_login_index: __u8,
503        pub txpower_capa: __u16,
504        pub num_txpower: __u8,
505        pub txpower: [__s32; IW_MAX_TXPOWER],
506        pub we_version_compiled: __u8,
507        pub we_version_source: __u8,
508        pub retry_capa: __u16,
509        pub retry_flags: __u16,
510        pub r_time_flags: __u16,
511        pub min_retry: __s32,
512        pub max_retry: __s32,
513        pub min_r_time: __s32,
514        pub max_r_time: __s32,
515        pub num_channels: __u16,
516        pub num_frequency: __u8,
517        pub freq: [iw_freq; IW_MAX_FREQUENCIES],
518        pub enc_capa: __u32,
519    }
520
521    pub struct iw_priv_args {
522        pub cmd: __u32,
523        pub set_args: __u16,
524        pub get_args: __u16,
525        pub name: [c_char; crate::IFNAMSIZ],
526    }
527
528    // #include <linux/eventpoll.h>
529
530    pub struct epoll_params {
531        pub busy_poll_usecs: u32,
532        pub busy_poll_budget: u16,
533        pub prefer_busy_poll: u8,
534        pub __pad: u8, // Must be zero
535    }
536
537    #[cfg_attr(
538        any(
539            target_pointer_width = "32",
540            target_arch = "x86_64",
541            target_arch = "powerpc64",
542            target_arch = "mips64",
543            target_arch = "mips64r6",
544            target_arch = "s390x",
545            target_arch = "sparc64",
546            target_arch = "aarch64",
547            target_arch = "riscv64",
548            target_arch = "riscv32",
549            target_arch = "loongarch64"
550        ),
551        repr(align(4))
552    )]
553    #[cfg_attr(
554        not(any(
555            target_pointer_width = "32",
556            target_arch = "x86_64",
557            target_arch = "powerpc64",
558            target_arch = "mips64",
559            target_arch = "mips64r6",
560            target_arch = "s390x",
561            target_arch = "sparc64",
562            target_arch = "aarch64",
563            target_arch = "riscv64",
564            target_arch = "riscv32",
565            target_arch = "loongarch64"
566        )),
567        repr(align(8))
568    )]
569    pub struct pthread_mutexattr_t {
570        #[doc(hidden)]
571        size: [u8; crate::__SIZEOF_PTHREAD_MUTEXATTR_T],
572    }
573
574    #[cfg_attr(
575        any(
576            target_env = "musl",
577            target_env = "ohos",
578            target_env = "uclibc",
579            target_pointer_width = "32"
580        ),
581        repr(align(4))
582    )]
583    #[cfg_attr(
584        all(
585            not(target_env = "musl"),
586            not(target_env = "ohos"),
587            not(target_env = "uclibc"),
588            target_pointer_width = "64"
589        ),
590        repr(align(8))
591    )]
592    pub struct pthread_rwlockattr_t {
593        #[doc(hidden)]
594        size: [u8; crate::__SIZEOF_PTHREAD_RWLOCKATTR_T],
595    }
596
597    #[repr(align(4))]
598    pub struct pthread_condattr_t {
599        #[doc(hidden)]
600        size: [u8; crate::__SIZEOF_PTHREAD_CONDATTR_T],
601    }
602
603    #[repr(align(4))]
604    pub struct pthread_barrierattr_t {
605        #[doc(hidden)]
606        size: [u8; crate::__SIZEOF_PTHREAD_BARRIERATTR_T],
607    }
608
609    #[cfg(not(any(target_env = "musl", target_env = "ohos")))]
610    #[repr(align(8))]
611    pub struct fanotify_event_metadata {
612        pub event_len: __u32,
613        pub vers: __u8,
614        pub reserved: __u8,
615        pub metadata_len: __u16,
616        pub mask: __u64,
617        pub fd: c_int,
618        pub pid: c_int,
619    }
620
621    // linux/ptp_clock.h
622
623    pub struct ptp_sys_offset {
624        pub n_samples: c_uint,
625        pub rsv: [c_uint; 3],
626        // FIXME(garando): replace length with `2 * PTP_MAX_SAMPLES + 1` when supported
627        pub ts: [ptp_clock_time; 51],
628    }
629
630    pub struct ptp_pin_desc {
631        pub name: [c_char; 64],
632        pub index: c_uint,
633        pub func: c_uint,
634        pub chan: c_uint,
635        pub rsv: [c_uint; 5],
636    }
637
638    pub struct ptp_clock_caps {
639        pub max_adj: c_int,
640        pub n_alarm: c_int,
641        pub n_ext_ts: c_int,
642        pub n_per_out: c_int,
643        pub pps: c_int,
644        pub n_pins: c_int,
645        pub cross_timestamping: c_int,
646        pub adjust_phase: c_int,
647        pub max_phase_adj: c_int,
648        pub rsv: [c_int; 11],
649    }
650
651    // linux/if_xdp.h
652
653    pub struct sockaddr_xdp {
654        pub sxdp_family: crate::__u16,
655        pub sxdp_flags: crate::__u16,
656        pub sxdp_ifindex: crate::__u32,
657        pub sxdp_queue_id: crate::__u32,
658        pub sxdp_shared_umem_fd: crate::__u32,
659    }
660
661    pub struct xdp_ring_offset {
662        pub producer: crate::__u64,
663        pub consumer: crate::__u64,
664        pub desc: crate::__u64,
665        pub flags: crate::__u64,
666    }
667
668    pub struct xdp_mmap_offsets {
669        pub rx: xdp_ring_offset,
670        pub tx: xdp_ring_offset,
671        pub fr: xdp_ring_offset,
672        pub cr: xdp_ring_offset,
673    }
674
675    pub struct xdp_ring_offset_v1 {
676        pub producer: crate::__u64,
677        pub consumer: crate::__u64,
678        pub desc: crate::__u64,
679    }
680
681    pub struct xdp_mmap_offsets_v1 {
682        pub rx: xdp_ring_offset_v1,
683        pub tx: xdp_ring_offset_v1,
684        pub fr: xdp_ring_offset_v1,
685        pub cr: xdp_ring_offset_v1,
686    }
687
688    pub struct xdp_umem_reg {
689        pub addr: crate::__u64,
690        pub len: crate::__u64,
691        pub chunk_size: crate::__u32,
692        pub headroom: crate::__u32,
693        pub flags: crate::__u32,
694        pub tx_metadata_len: crate::__u32,
695    }
696
697    pub struct xdp_umem_reg_v1 {
698        pub addr: crate::__u64,
699        pub len: crate::__u64,
700        pub chunk_size: crate::__u32,
701        pub headroom: crate::__u32,
702    }
703
704    pub struct xdp_statistics {
705        pub rx_dropped: crate::__u64,
706        pub rx_invalid_descs: crate::__u64,
707        pub tx_invalid_descs: crate::__u64,
708        pub rx_ring_full: crate::__u64,
709        pub rx_fill_ring_empty_descs: crate::__u64,
710        pub tx_ring_empty_descs: crate::__u64,
711    }
712
713    pub struct xdp_statistics_v1 {
714        pub rx_dropped: crate::__u64,
715        pub rx_invalid_descs: crate::__u64,
716        pub tx_invalid_descs: crate::__u64,
717    }
718
719    pub struct xdp_options {
720        pub flags: crate::__u32,
721    }
722
723    pub struct xdp_desc {
724        pub addr: crate::__u64,
725        pub len: crate::__u32,
726        pub options: crate::__u32,
727    }
728
729    pub struct xsk_tx_metadata_completion {
730        pub tx_timestamp: crate::__u64,
731    }
732
733    pub struct xsk_tx_metadata_request {
734        pub csum_start: __u16,
735        pub csum_offset: __u16,
736    }
737
738    // linux/nsfs.h
739    pub struct mnt_ns_info {
740        pub size: crate::__u32,
741        pub nr_mounts: crate::__u32,
742        pub mnt_ns_id: crate::__u64,
743    }
744
745    // linux/pidfd.h
746
747    // linux/uio.h
748
749    pub struct dmabuf_cmsg {
750        pub frag_offset: crate::__u64,
751        pub frag_size: crate::__u32,
752        pub frag_token: crate::__u32,
753        pub dmabuf_id: crate::__u32,
754        pub flags: crate::__u32,
755    }
756
757    pub struct dmabuf_token {
758        pub token_start: crate::__u32,
759        pub token_count: crate::__u32,
760    }
761
762    pub struct sockaddr_alg {
763        pub salg_family: crate::sa_family_t,
764        pub salg_type: [c_uchar; 14],
765        pub salg_feat: u32,
766        pub salg_mask: u32,
767        pub salg_name: [c_uchar; 64],
768    }
769
770    #[cfg_attr(
771        all(
772            any(target_env = "musl", target_env = "ohos"),
773            target_pointer_width = "32"
774        ),
775        repr(align(4))
776    )]
777    #[cfg_attr(
778        all(
779            any(target_env = "musl", target_env = "ohos"),
780            target_pointer_width = "64"
781        ),
782        repr(align(8))
783    )]
784    #[cfg_attr(
785        all(
786            not(any(target_env = "musl", target_env = "ohos")),
787            target_arch = "x86"
788        ),
789        repr(align(4))
790    )]
791    #[cfg_attr(
792        all(
793            not(any(target_env = "musl", target_env = "ohos")),
794            not(target_arch = "x86")
795        ),
796        repr(align(8))
797    )]
798    pub struct pthread_cond_t {
799        #[doc(hidden)]
800        size: [u8; crate::__SIZEOF_PTHREAD_COND_T],
801    }
802
803    #[cfg_attr(
804        all(
805            target_pointer_width = "32",
806            any(
807                target_arch = "mips",
808                target_arch = "mips32r6",
809                target_arch = "arm",
810                target_arch = "hexagon",
811                target_arch = "m68k",
812                target_arch = "csky",
813                target_arch = "powerpc",
814                target_arch = "sparc",
815                target_arch = "x86_64",
816                target_arch = "x86",
817            )
818        ),
819        repr(align(4))
820    )]
821    #[cfg_attr(
822        any(
823            target_pointer_width = "64",
824            not(any(
825                target_arch = "mips",
826                target_arch = "mips32r6",
827                target_arch = "arm",
828                target_arch = "hexagon",
829                target_arch = "m68k",
830                target_arch = "csky",
831                target_arch = "powerpc",
832                target_arch = "sparc",
833                target_arch = "x86_64",
834                target_arch = "x86",
835            ))
836        ),
837        repr(align(8))
838    )]
839    pub struct pthread_mutex_t {
840        pub(crate) size: [c_char; crate::__SIZEOF_PTHREAD_MUTEX_T],
841    }
842
843    #[cfg_attr(
844        all(
845            target_pointer_width = "32",
846            any(
847                target_arch = "mips",
848                target_arch = "mips32r6",
849                target_arch = "arm",
850                target_arch = "hexagon",
851                target_arch = "m68k",
852                target_arch = "csky",
853                target_arch = "powerpc",
854                target_arch = "sparc",
855                target_arch = "x86_64",
856                target_arch = "x86"
857            )
858        ),
859        repr(align(4))
860    )]
861    #[cfg_attr(
862        any(
863            target_pointer_width = "64",
864            not(any(
865                target_arch = "mips",
866                target_arch = "mips32r6",
867                target_arch = "arm",
868                target_arch = "hexagon",
869                target_arch = "m68k",
870                target_arch = "powerpc",
871                target_arch = "sparc",
872                target_arch = "x86_64",
873                target_arch = "x86"
874            ))
875        ),
876        repr(align(8))
877    )]
878    pub struct pthread_rwlock_t {
879        size: [u8; crate::__SIZEOF_PTHREAD_RWLOCK_T],
880    }
881
882    #[cfg_attr(
883        all(
884            target_pointer_width = "32",
885            any(
886                target_arch = "mips",
887                target_arch = "mips32r6",
888                target_arch = "arm",
889                target_arch = "hexagon",
890                target_arch = "m68k",
891                target_arch = "csky",
892                target_arch = "powerpc",
893                target_arch = "sparc",
894                target_arch = "x86_64",
895                target_arch = "x86"
896            )
897        ),
898        repr(align(4))
899    )]
900    #[cfg_attr(
901        any(
902            target_pointer_width = "64",
903            not(any(
904                target_arch = "mips",
905                target_arch = "mips32r6",
906                target_arch = "arm",
907                target_arch = "hexagon",
908                target_arch = "m68k",
909                target_arch = "csky",
910                target_arch = "powerpc",
911                target_arch = "sparc",
912                target_arch = "x86_64",
913                target_arch = "x86"
914            ))
915        ),
916        repr(align(8))
917    )]
918    pub struct pthread_barrier_t {
919        size: [u8; crate::__SIZEOF_PTHREAD_BARRIER_T],
920    }
921
922    pub struct uinput_setup {
923        pub id: input_id,
924        pub name: [c_char; UINPUT_MAX_NAME_SIZE],
925        pub ff_effects_max: __u32,
926    }
927
928    pub struct uinput_user_dev {
929        pub name: [c_char; UINPUT_MAX_NAME_SIZE],
930        pub id: input_id,
931        pub ff_effects_max: __u32,
932        pub absmax: [__s32; ABS_CNT],
933        pub absmin: [__s32; ABS_CNT],
934        pub absfuzz: [__s32; ABS_CNT],
935        pub absflat: [__s32; ABS_CNT],
936    }
937
938    // x32 compatibility
939    // See https://sourceware.org/bugzilla/show_bug.cgi?id=21279
940    pub struct mq_attr {
941        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
942        pub mq_flags: i64,
943        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
944        pub mq_maxmsg: i64,
945        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
946        pub mq_msgsize: i64,
947        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
948        pub mq_curmsgs: i64,
949        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
950        pad: Padding<[i64; 4]>,
951
952        #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
953        pub mq_flags: c_long,
954        #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
955        pub mq_maxmsg: c_long,
956        #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
957        pub mq_msgsize: c_long,
958        #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
959        pub mq_curmsgs: c_long,
960        #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
961        pad: Padding<[c_long; 4]>,
962    }
963
964    pub struct hwtstamp_config {
965        pub flags: c_int,
966        pub tx_type: c_int,
967        pub rx_filter: c_int,
968    }
969
970    pub struct sched_attr {
971        pub size: __u32,
972        pub sched_policy: __u32,
973        pub sched_flags: crate::__u64,
974        pub sched_nice: __s32,
975        pub sched_priority: __u32,
976        pub sched_runtime: crate::__u64,
977        pub sched_deadline: crate::__u64,
978        pub sched_period: crate::__u64,
979    }
980
981    // linux/fcntl.h
982
983    pub struct file_handle {
984        pub handle_bytes: c_uint,
985        pub handle_type: c_int,
986        pub f_handle: [c_uchar; 0],
987    }
988
989    // include/uapi/linux/rtnetlink.h
990    pub struct ifinfomsg {
991        pub ifi_family: c_uchar,
992        __ifi_pad: Padding<c_uchar>,
993        pub ifi_type: c_ushort,
994        pub ifi_index: c_int,
995        pub ifi_flags: c_uint,
996        pub ifi_change: c_uint,
997    }
998
999    pub struct rtattr {
1000        pub rta_len: c_ushort,
1001        pub rta_type: c_ushort,
1002    }
1003
1004    // netdb.h
1005    pub struct netent {
1006        pub n_name: *mut c_char,
1007        pub n_aliases: *mut *mut c_char,
1008        pub n_addrtype: c_int,
1009        pub n_net: u32,
1010    }
1011}
1012
1013cfg_if! {
1014    if #[cfg(not(any(target_env = "gnu", target_env = "uclibc")))] {
1015        extern_ty! {
1016            // FIXME(1.0,deprecate): lfs binding to be removed
1017            pub type fpos64_t; // FIXME(linux): fill this out with a struct
1018        }
1019    }
1020}
1021
1022cfg_if! {
1023    if #[cfg(not(target_arch = "sparc64"))] {
1024        #[repr(C)]
#[allow(deprecated)]
pub struct iw_thrspy {
    pub addr: crate::sockaddr,
    pub qual: iw_quality,
    pub low: iw_quality,
    pub high: iw_quality,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iw_thrspy { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iw_thrspy {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::sockaddr>;
        let _: ::core::clone::AssertParamIsClone<iw_quality>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iw_thrspy { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iw_thrspy {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "iw_thrspy",
            "addr", &self.addr, "qual", &self.qual, "low", &self.low, "high",
            &&self.high)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct iw_mlme {
    pub cmd: __u16,
    pub reason_code: __u16,
    pub addr: crate::sockaddr,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iw_mlme { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iw_mlme {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u16>;
        let _: ::core::clone::AssertParamIsClone<crate::sockaddr>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iw_mlme { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iw_mlme {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "iw_mlme",
            "cmd", &self.cmd, "reason_code", &self.reason_code, "addr",
            &&self.addr)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct iw_michaelmicfailure {
    pub flags: __u32,
    pub src_addr: crate::sockaddr,
    pub tsc: [__u8; IW_ENCODE_SEQ_MAX_SIZE],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for iw_michaelmicfailure { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for iw_michaelmicfailure {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::sockaddr>;
        let _:
                ::core::clone::AssertParamIsClone<[__u8; IW_ENCODE_SEQ_MAX_SIZE]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for iw_michaelmicfailure { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for iw_michaelmicfailure {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "iw_michaelmicfailure", "flags", &self.flags, "src_addr",
            &self.src_addr, "tsc", &&self.tsc)
    }
}s! {
1025            pub struct iw_thrspy {
1026                pub addr: crate::sockaddr,
1027                pub qual: iw_quality,
1028                pub low: iw_quality,
1029                pub high: iw_quality,
1030            }
1031
1032            pub struct iw_mlme {
1033                pub cmd: __u16,
1034                pub reason_code: __u16,
1035                pub addr: crate::sockaddr,
1036            }
1037
1038            pub struct iw_michaelmicfailure {
1039                pub flags: __u32,
1040                pub src_addr: crate::sockaddr,
1041                pub tsc: [__u8; IW_ENCODE_SEQ_MAX_SIZE],
1042            }
1043        }
1044    }
1045}
1046
1047#[repr(C)]
pub struct af_alg_iv {
    pub ivlen: u32,
    pub iv: [c_uchar; 0],
}
#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for af_alg_iv { }
#[automatically_derived]
impl ::core::clone::Clone for af_alg_iv {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<u32>;
        let _: ::core::clone::AssertParamIsClone<[c_uchar; 0]>;
        *self
    }
}
#[automatically_derived]
impl ::core::marker::Copy for af_alg_iv { }
#[automatically_derived]
impl ::core::fmt::Debug for af_alg_iv {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "af_alg_iv",
            "ivlen", &self.ivlen, "iv", &&self.iv)
    }
}
#[repr(C)]
pub struct sock_txtime {
    pub clockid: crate::clockid_t,
    pub flags: __u32,
}
#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for sock_txtime { }
#[automatically_derived]
impl ::core::clone::Clone for sock_txtime {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::clockid_t>;
        let _: ::core::clone::AssertParamIsClone<__u32>;
        *self
    }
}
#[automatically_derived]
impl ::core::marker::Copy for sock_txtime { }
#[automatically_derived]
impl ::core::fmt::Debug for sock_txtime {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "sock_txtime",
            "clockid", &self.clockid, "flags", &&self.flags)
    }
}
#[repr(C)]
pub union iwreq_data {
    pub name: [c_char; crate::IFNAMSIZ],
    pub essid: iw_point,
    pub nwid: iw_param,
    pub freq: iw_freq,
    pub sens: iw_param,
    pub bitrate: iw_param,
    pub txpower: iw_param,
    pub rts: iw_param,
    pub frag: iw_param,
    pub mode: __u32,
    pub retry: iw_param,
    pub encoding: iw_point,
    pub power: iw_param,
    pub qual: iw_quality,
    pub ap_addr: crate::sockaddr,
    pub addr: crate::sockaddr,
    pub param: iw_param,
    pub data: iw_point,
}
#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for iwreq_data { }
#[automatically_derived]
impl ::core::clone::Clone for iwreq_data {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsCopy<Self>;
        *self
    }
}
#[automatically_derived]
impl ::core::marker::Copy for iwreq_data { }
#[allow(deprecated)]
impl ::core::fmt::Debug for iwreq_data {
    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
        f.debug_struct("iwreq_data").finish_non_exhaustive()
    }
}
#[repr(C)]
pub struct iw_event {
    pub len: __u16,
    pub cmd: __u16,
    pub u: iwreq_data,
}
#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for iw_event { }
#[automatically_derived]
impl ::core::clone::Clone for iw_event {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__u16>;
        let _: ::core::clone::AssertParamIsClone<iwreq_data>;
        *self
    }
}
#[automatically_derived]
impl ::core::marker::Copy for iw_event { }
#[automatically_derived]
impl ::core::fmt::Debug for iw_event {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "iw_event",
            "len", &self.len, "cmd", &self.cmd, "u", &&self.u)
    }
}
#[repr(C)]
pub union __c_anonymous_iwreq {
    pub ifrn_name: [c_char; crate::IFNAMSIZ],
}
#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for __c_anonymous_iwreq { }
#[automatically_derived]
impl ::core::clone::Clone for __c_anonymous_iwreq {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsCopy<Self>;
        *self
    }
}
#[automatically_derived]
impl ::core::marker::Copy for __c_anonymous_iwreq { }
#[allow(deprecated)]
impl ::core::fmt::Debug for __c_anonymous_iwreq {
    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
        f.debug_struct("__c_anonymous_iwreq").finish_non_exhaustive()
    }
}
#[repr(C)]
pub struct iwreq {
    pub ifr_ifrn: __c_anonymous_iwreq,
    pub u: iwreq_data,
}
#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for iwreq { }
#[automatically_derived]
impl ::core::clone::Clone for iwreq {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<__c_anonymous_iwreq>;
        let _: ::core::clone::AssertParamIsClone<iwreq_data>;
        *self
    }
}
#[automatically_derived]
impl ::core::marker::Copy for iwreq { }
#[automatically_derived]
impl ::core::fmt::Debug for iwreq {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "iwreq",
            "ifr_ifrn", &self.ifr_ifrn, "u", &&self.u)
    }
}
#[repr(C)]
pub union __c_anonymous_ptp_perout_request_1 {
    pub start: ptp_clock_time,
    pub phase: ptp_clock_time,
}
#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for __c_anonymous_ptp_perout_request_1
    {
}
#[automatically_derived]
impl ::core::clone::Clone for __c_anonymous_ptp_perout_request_1 {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsCopy<Self>;
        *self
    }
}
#[automatically_derived]
impl ::core::marker::Copy for __c_anonymous_ptp_perout_request_1 { }
#[allow(deprecated)]
impl ::core::fmt::Debug for __c_anonymous_ptp_perout_request_1 {
    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
        f.debug_struct("__c_anonymous_ptp_perout_request_1").finish_non_exhaustive()
    }
}
#[repr(C)]
pub union __c_anonymous_ptp_perout_request_2 {
    pub on: ptp_clock_time,
    pub rsv: [c_uint; 4],
}
#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for __c_anonymous_ptp_perout_request_2
    {
}
#[automatically_derived]
impl ::core::clone::Clone for __c_anonymous_ptp_perout_request_2 {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsCopy<Self>;
        *self
    }
}
#[automatically_derived]
impl ::core::marker::Copy for __c_anonymous_ptp_perout_request_2 { }
#[allow(deprecated)]
impl ::core::fmt::Debug for __c_anonymous_ptp_perout_request_2 {
    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
        f.debug_struct("__c_anonymous_ptp_perout_request_2").finish_non_exhaustive()
    }
}
#[repr(C)]
pub struct ptp_perout_request {
    pub anonymous_1: __c_anonymous_ptp_perout_request_1,
    pub period: ptp_clock_time,
    pub index: c_uint,
    pub flags: c_uint,
    pub anonymous_2: __c_anonymous_ptp_perout_request_2,
}
#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for ptp_perout_request { }
#[automatically_derived]
impl ::core::clone::Clone for ptp_perout_request {
    #[inline]
    fn clone(&self) -> Self {
        let _:
                ::core::clone::AssertParamIsClone<__c_anonymous_ptp_perout_request_1>;
        let _: ::core::clone::AssertParamIsClone<ptp_clock_time>;
        let _: ::core::clone::AssertParamIsClone<c_uint>;
        let _:
                ::core::clone::AssertParamIsClone<__c_anonymous_ptp_perout_request_2>;
        *self
    }
}
#[automatically_derived]
impl ::core::marker::Copy for ptp_perout_request { }
#[automatically_derived]
impl ::core::fmt::Debug for ptp_perout_request {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f,
            "ptp_perout_request", "anonymous_1", &self.anonymous_1, "period",
            &self.period, "index", &self.index, "flags", &self.flags,
            "anonymous_2", &&self.anonymous_2)
    }
}
#[repr(C)]
pub struct xsk_tx_metadata {
    pub flags: crate::__u64,
    pub xsk_tx_metadata_union: __c_anonymous_xsk_tx_metadata_union,
}
#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for xsk_tx_metadata { }
#[automatically_derived]
impl ::core::clone::Clone for xsk_tx_metadata {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _:
                ::core::clone::AssertParamIsClone<__c_anonymous_xsk_tx_metadata_union>;
        *self
    }
}
#[automatically_derived]
impl ::core::marker::Copy for xsk_tx_metadata { }
#[automatically_derived]
impl ::core::fmt::Debug for xsk_tx_metadata {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "xsk_tx_metadata", "flags", &self.flags, "xsk_tx_metadata_union",
            &&self.xsk_tx_metadata_union)
    }
}
#[repr(C)]
pub union __c_anonymous_xsk_tx_metadata_union {
    pub request: xsk_tx_metadata_request,
    pub completion: xsk_tx_metadata_completion,
}
#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for
    __c_anonymous_xsk_tx_metadata_union {
}
#[automatically_derived]
impl ::core::clone::Clone for __c_anonymous_xsk_tx_metadata_union {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsCopy<Self>;
        *self
    }
}
#[automatically_derived]
impl ::core::marker::Copy for __c_anonymous_xsk_tx_metadata_union { }
#[allow(deprecated)]
impl ::core::fmt::Debug for __c_anonymous_xsk_tx_metadata_union {
    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
        f.debug_struct("__c_anonymous_xsk_tx_metadata_union").finish_non_exhaustive()
    }
}s_no_extra_traits! {
1048    pub struct af_alg_iv {
1049        pub ivlen: u32,
1050        pub iv: [c_uchar; 0],
1051    }
1052
1053    // linux/net_tstamp.h
1054    pub struct sock_txtime {
1055        pub clockid: crate::clockid_t,
1056        pub flags: __u32,
1057    }
1058
1059    // linux/wireless.h
1060    pub union iwreq_data {
1061        pub name: [c_char; crate::IFNAMSIZ],
1062        pub essid: iw_point,
1063        pub nwid: iw_param,
1064        pub freq: iw_freq,
1065        pub sens: iw_param,
1066        pub bitrate: iw_param,
1067        pub txpower: iw_param,
1068        pub rts: iw_param,
1069        pub frag: iw_param,
1070        pub mode: __u32,
1071        pub retry: iw_param,
1072        pub encoding: iw_point,
1073        pub power: iw_param,
1074        pub qual: iw_quality,
1075        pub ap_addr: crate::sockaddr,
1076        pub addr: crate::sockaddr,
1077        pub param: iw_param,
1078        pub data: iw_point,
1079    }
1080
1081    pub struct iw_event {
1082        pub len: __u16,
1083        pub cmd: __u16,
1084        pub u: iwreq_data,
1085    }
1086
1087    pub union __c_anonymous_iwreq {
1088        pub ifrn_name: [c_char; crate::IFNAMSIZ],
1089    }
1090
1091    pub struct iwreq {
1092        pub ifr_ifrn: __c_anonymous_iwreq,
1093        pub u: iwreq_data,
1094    }
1095
1096    // linux/ptp_clock.h
1097    pub union __c_anonymous_ptp_perout_request_1 {
1098        pub start: ptp_clock_time,
1099        pub phase: ptp_clock_time,
1100    }
1101
1102    pub union __c_anonymous_ptp_perout_request_2 {
1103        pub on: ptp_clock_time,
1104        pub rsv: [c_uint; 4],
1105    }
1106
1107    pub struct ptp_perout_request {
1108        pub anonymous_1: __c_anonymous_ptp_perout_request_1,
1109        pub period: ptp_clock_time,
1110        pub index: c_uint,
1111        pub flags: c_uint,
1112        pub anonymous_2: __c_anonymous_ptp_perout_request_2,
1113    }
1114
1115    // linux/if_xdp.h
1116    pub struct xsk_tx_metadata {
1117        pub flags: crate::__u64,
1118        pub xsk_tx_metadata_union: __c_anonymous_xsk_tx_metadata_union,
1119    }
1120
1121    pub union __c_anonymous_xsk_tx_metadata_union {
1122        pub request: xsk_tx_metadata_request,
1123        pub completion: xsk_tx_metadata_completion,
1124    }
1125}
1126
1127pub const POSIX_SPAWN_USEVFORK: c_short = 64;
1128#[cfg(not(target_env = "uclibc"))]
1129pub const POSIX_SPAWN_SETSID: c_short = 128;
1130
1131pub const F_SEAL_FUTURE_WRITE: c_int = 0x0010;
1132pub const F_SEAL_EXEC: c_int = 0x0020;
1133
1134pub const IFF_LOWER_UP: c_int = 0x10000;
1135pub const IFF_DORMANT: c_int = 0x20000;
1136pub const IFF_ECHO: c_int = 0x40000;
1137
1138// linux/fcntl.h
1139pub const AT_EXECVE_CHECK: c_int = 0x10000;
1140
1141pub const MAX_HANDLE_SZ: c_int = 128;
1142pub const AT_HANDLE_FID: c_int = 0x200;
1143pub const AT_HANDLE_MNT_ID_UNIQUE: c_int = 0x001;
1144pub const AT_HANDLE_CONNECTABLE: c_int = 0x002;
1145
1146// linux/fs.h
1147
1148// Flags for preadv2/pwritev2
1149pub const RWF_HIPRI: c_int = 0x00000001;
1150pub const RWF_DSYNC: c_int = 0x00000002;
1151pub const RWF_SYNC: c_int = 0x00000004;
1152pub const RWF_NOWAIT: c_int = 0x00000008;
1153pub const RWF_APPEND: c_int = 0x00000010;
1154pub const RWF_NOAPPEND: c_int = 0x00000020;
1155pub const RWF_ATOMIC: c_int = 0x00000040;
1156pub const RWF_DONTCACHE: c_int = 0x00000080;
1157
1158// Since Linux 3.1
1159pub const SEEK_DATA: c_int = 3;
1160pub const SEEK_HOLE: c_int = 4;
1161
1162// linux/mempolicy.h
1163pub const MPOL_DEFAULT: c_int = 0;
1164pub const MPOL_PREFERRED: c_int = 1;
1165pub const MPOL_BIND: c_int = 2;
1166pub const MPOL_INTERLEAVE: c_int = 3;
1167pub const MPOL_LOCAL: c_int = 4;
1168pub const MPOL_F_NUMA_BALANCING: c_int = 1 << 13;
1169pub const MPOL_F_RELATIVE_NODES: c_int = 1 << 14;
1170pub const MPOL_F_STATIC_NODES: c_int = 1 << 15;
1171
1172#[cfg(not(target_env = "gnu"))] // defined in `new/glibc`
1173pub const PTHREAD_MUTEX_INITIALIZER: crate::pthread_mutex_t = crate::pthread_mutex_t {
1174    size: [0; crate::__SIZEOF_PTHREAD_MUTEX_T],
1175};
1176pub const PTHREAD_COND_INITIALIZER: crate::pthread_cond_t = crate::pthread_cond_t {
1177    size: [0; crate::__SIZEOF_PTHREAD_COND_T],
1178};
1179pub const PTHREAD_RWLOCK_INITIALIZER: crate::pthread_rwlock_t = crate::pthread_rwlock_t {
1180    size: [0; crate::__SIZEOF_PTHREAD_RWLOCK_T],
1181};
1182
1183pub const RENAME_NOREPLACE: c_uint = 1;
1184pub const RENAME_EXCHANGE: c_uint = 2;
1185pub const RENAME_WHITEOUT: c_uint = 4;
1186
1187pub const MSG_STAT: c_int = 11 | (crate::IPC_STAT & 0x100);
1188pub const MSG_INFO: c_int = 12;
1189
1190pub const MSG_NOERROR: c_int = 0o10000;
1191pub const MSG_EXCEPT: c_int = 0o20000;
1192pub const MSG_ZEROCOPY: c_int = 0x4000000;
1193
1194pub const SEM_UNDO: c_int = 0x1000;
1195
1196pub const GETPID: c_int = 11;
1197pub const GETVAL: c_int = 12;
1198pub const GETALL: c_int = 13;
1199pub const GETNCNT: c_int = 14;
1200pub const GETZCNT: c_int = 15;
1201pub const SETVAL: c_int = 16;
1202pub const SETALL: c_int = 17;
1203pub const SEM_STAT: c_int = 18 | (crate::IPC_STAT & 0x100);
1204pub const SEM_INFO: c_int = 19;
1205pub const SEM_STAT_ANY: c_int = 20 | (crate::IPC_STAT & 0x100);
1206
1207pub const QFMT_VFS_OLD: c_int = 1;
1208pub const QFMT_VFS_V0: c_int = 2;
1209pub const QFMT_VFS_V1: c_int = 4;
1210
1211pub const EFD_SEMAPHORE: c_int = 0x1;
1212
1213pub const RB_AUTOBOOT: c_int = 0x01234567u32 as i32;
1214pub const RB_HALT_SYSTEM: c_int = 0xcdef0123u32 as i32;
1215pub const RB_ENABLE_CAD: c_int = 0x89abcdefu32 as i32;
1216pub const RB_DISABLE_CAD: c_int = 0x00000000u32 as i32;
1217pub const RB_POWER_OFF: c_int = 0x4321fedcu32 as i32;
1218pub const RB_SW_SUSPEND: c_int = 0xd000fce2u32 as i32;
1219pub const RB_KEXEC: c_int = 0x45584543u32 as i32;
1220
1221pub const SYNC_FILE_RANGE_WAIT_BEFORE: c_uint = 1;
1222pub const SYNC_FILE_RANGE_WRITE: c_uint = 2;
1223pub const SYNC_FILE_RANGE_WAIT_AFTER: c_uint = 4;
1224
1225pub const MREMAP_MAYMOVE: c_int = 1;
1226pub const MREMAP_FIXED: c_int = 2;
1227pub const MREMAP_DONTUNMAP: c_int = 4;
1228
1229// linux/nsfs.h
1230const NSIO: c_uint = 0xb7;
1231
1232pub const NS_GET_USERNS: Ioctl = _IO(NSIO, 0x1);
1233pub const NS_GET_PARENT: Ioctl = _IO(NSIO, 0x2);
1234pub const NS_GET_NSTYPE: Ioctl = _IO(NSIO, 0x3);
1235pub const NS_GET_OWNER_UID: Ioctl = _IO(NSIO, 0x4);
1236
1237pub const NS_GET_MNTNS_ID: Ioctl = _IOR::<__u64>(NSIO, 0x5);
1238
1239pub const NS_GET_PID_FROM_PIDNS: Ioctl = _IOR::<c_int>(NSIO, 0x6);
1240pub const NS_GET_TGID_FROM_PIDNS: Ioctl = _IOR::<c_int>(NSIO, 0x7);
1241pub const NS_GET_PID_IN_PIDNS: Ioctl = _IOR::<c_int>(NSIO, 0x8);
1242pub const NS_GET_TGID_IN_PIDNS: Ioctl = _IOR::<c_int>(NSIO, 0x9);
1243
1244pub const MNT_NS_INFO_SIZE_VER0: Ioctl = 16;
1245
1246pub const NS_MNT_GET_INFO: Ioctl = _IOR::<mnt_ns_info>(NSIO, 10);
1247pub const NS_MNT_GET_NEXT: Ioctl = _IOR::<mnt_ns_info>(NSIO, 11);
1248pub const NS_MNT_GET_PREV: Ioctl = _IOR::<mnt_ns_info>(NSIO, 12);
1249
1250pub const PR_SET_MDWE: c_int = 65;
1251pub const PR_GET_MDWE: c_int = 66;
1252pub const PR_MDWE_REFUSE_EXEC_GAIN: c_uint = 1 << 0;
1253pub const PR_MDWE_NO_INHERIT: c_uint = 1 << 1;
1254pub const PR_SET_MEMORY_MERGE: c_int = 67;
1255pub const PR_GET_MEMORY_MERGE: c_int = 68;
1256
1257pub const GRND_NONBLOCK: c_uint = 0x0001;
1258pub const GRND_RANDOM: c_uint = 0x0002;
1259pub const GRND_INSECURE: c_uint = 0x0004;
1260
1261// <linux/seccomp.h>
1262pub const SECCOMP_MODE_DISABLED: c_uint = 0;
1263pub const SECCOMP_MODE_STRICT: c_uint = 1;
1264pub const SECCOMP_MODE_FILTER: c_uint = 2;
1265
1266pub const SECCOMP_SET_MODE_STRICT: c_uint = 0;
1267pub const SECCOMP_SET_MODE_FILTER: c_uint = 1;
1268pub const SECCOMP_GET_ACTION_AVAIL: c_uint = 2;
1269pub const SECCOMP_GET_NOTIF_SIZES: c_uint = 3;
1270
1271pub const SECCOMP_FILTER_FLAG_TSYNC: c_ulong = 1 << 0;
1272pub const SECCOMP_FILTER_FLAG_LOG: c_ulong = 1 << 1;
1273pub const SECCOMP_FILTER_FLAG_SPEC_ALLOW: c_ulong = 1 << 2;
1274pub const SECCOMP_FILTER_FLAG_NEW_LISTENER: c_ulong = 1 << 3;
1275pub const SECCOMP_FILTER_FLAG_TSYNC_ESRCH: c_ulong = 1 << 4;
1276pub const SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV: c_ulong = 1 << 5;
1277
1278pub const SECCOMP_RET_KILL_PROCESS: c_uint = 0x80000000;
1279pub const SECCOMP_RET_KILL_THREAD: c_uint = 0x00000000;
1280pub const SECCOMP_RET_KILL: c_uint = SECCOMP_RET_KILL_THREAD;
1281pub const SECCOMP_RET_TRAP: c_uint = 0x00030000;
1282pub const SECCOMP_RET_ERRNO: c_uint = 0x00050000;
1283pub const SECCOMP_RET_USER_NOTIF: c_uint = 0x7fc00000;
1284pub const SECCOMP_RET_TRACE: c_uint = 0x7ff00000;
1285pub const SECCOMP_RET_LOG: c_uint = 0x7ffc0000;
1286pub const SECCOMP_RET_ALLOW: c_uint = 0x7fff0000;
1287
1288pub const SECCOMP_RET_ACTION_FULL: c_uint = 0xffff0000;
1289pub const SECCOMP_RET_ACTION: c_uint = 0x7fff0000;
1290pub const SECCOMP_RET_DATA: c_uint = 0x0000ffff;
1291
1292pub const SECCOMP_USER_NOTIF_FLAG_CONTINUE: c_ulong = 1;
1293
1294pub const SECCOMP_ADDFD_FLAG_SETFD: c_ulong = 1;
1295pub const SECCOMP_ADDFD_FLAG_SEND: c_ulong = 2;
1296
1297const SECCOMP_IOC_MAGIC: u32 = b'!' as u32;
1298
1299pub const SECCOMP_IOCTL_NOTIF_RECV: Ioctl = _IOWR::<seccomp_notif>(SECCOMP_IOC_MAGIC, 0);
1300pub const SECCOMP_IOCTL_NOTIF_SEND: Ioctl = _IOWR::<seccomp_notif_resp>(SECCOMP_IOC_MAGIC, 1);
1301pub const SECCOMP_IOCTL_NOTIF_ID_VALID: Ioctl = _IOW::<u64>(SECCOMP_IOC_MAGIC, 2);
1302pub const SECCOMP_IOCTL_NOTIF_ADDFD: Ioctl = _IOW::<seccomp_notif_addfd>(SECCOMP_IOC_MAGIC, 3);
1303pub const SECCOMP_IOCTL_NOTIF_SET_FLAGS: Ioctl = _IOW::<u64>(SECCOMP_IOC_MAGIC, 4);
1304
1305pub const TFD_CLOEXEC: c_int = O_CLOEXEC;
1306pub const TFD_NONBLOCK: c_int = O_NONBLOCK;
1307pub const TFD_TIMER_ABSTIME: c_int = 1;
1308pub const TFD_TIMER_CANCEL_ON_SET: c_int = 2;
1309
1310pub const FALLOC_FL_KEEP_SIZE: c_int = 0x01;
1311pub const FALLOC_FL_PUNCH_HOLE: c_int = 0x02;
1312pub const FALLOC_FL_COLLAPSE_RANGE: c_int = 0x08;
1313pub const FALLOC_FL_ZERO_RANGE: c_int = 0x10;
1314pub const FALLOC_FL_INSERT_RANGE: c_int = 0x20;
1315pub const FALLOC_FL_UNSHARE_RANGE: c_int = 0x40;
1316
1317pub const SO_ORIGINAL_DST: c_int = 80;
1318
1319pub const IP_RECVFRAGSIZE: c_int = 25;
1320
1321pub const IPV6_FLOWINFO: c_int = 11;
1322pub const IPV6_FLOWLABEL_MGR: c_int = 32;
1323pub const IPV6_FLOWINFO_SEND: c_int = 33;
1324pub const IPV6_RECVFRAGSIZE: c_int = 77;
1325pub const IPV6_FREEBIND: c_int = 78;
1326pub const IPV6_FLOWINFO_FLOWLABEL: c_int = 0x000fffff;
1327pub const IPV6_FLOWINFO_PRIORITY: c_int = 0x0ff00000;
1328
1329// netinet/in.h
1330// NOTE: These are in addition to the constants defined in src/unix/mod.rs
1331
1332pub const IPPROTO_MAX: c_int = 263;
1333
1334// SO_MEMINFO offsets
1335pub const SK_MEMINFO_RMEM_ALLOC: c_int = 0;
1336pub const SK_MEMINFO_RCVBUF: c_int = 1;
1337pub const SK_MEMINFO_WMEM_ALLOC: c_int = 2;
1338pub const SK_MEMINFO_SNDBUF: c_int = 3;
1339pub const SK_MEMINFO_FWD_ALLOC: c_int = 4;
1340pub const SK_MEMINFO_WMEM_QUEUED: c_int = 5;
1341pub const SK_MEMINFO_OPTMEM: c_int = 6;
1342pub const SK_MEMINFO_BACKLOG: c_int = 7;
1343pub const SK_MEMINFO_DROPS: c_int = 8;
1344
1345// linux/close_range.h
1346pub const CLOSE_RANGE_UNSHARE: c_uint = 1 << 1;
1347pub const CLOSE_RANGE_CLOEXEC: c_uint = 1 << 2;
1348
1349// linux/filter.h
1350pub const SKF_AD_OFF: c_int = -0x1000;
1351pub const SKF_AD_PROTOCOL: c_int = 0;
1352pub const SKF_AD_PKTTYPE: c_int = 4;
1353pub const SKF_AD_IFINDEX: c_int = 8;
1354pub const SKF_AD_NLATTR: c_int = 12;
1355pub const SKF_AD_NLATTR_NEST: c_int = 16;
1356pub const SKF_AD_MARK: c_int = 20;
1357pub const SKF_AD_QUEUE: c_int = 24;
1358pub const SKF_AD_HATYPE: c_int = 28;
1359pub const SKF_AD_RXHASH: c_int = 32;
1360pub const SKF_AD_CPU: c_int = 36;
1361pub const SKF_AD_ALU_XOR_X: c_int = 40;
1362pub const SKF_AD_VLAN_TAG: c_int = 44;
1363pub const SKF_AD_VLAN_TAG_PRESENT: c_int = 48;
1364pub const SKF_AD_PAY_OFFSET: c_int = 52;
1365pub const SKF_AD_RANDOM: c_int = 56;
1366pub const SKF_AD_VLAN_TPID: c_int = 60;
1367
1368/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
1369/// for details.
1370pub const SKF_AD_MAX: c_int = 64;
1371
1372pub const SKF_NET_OFF: c_int = -0x100000;
1373pub const SKF_LL_OFF: c_int = -0x200000;
1374pub const BPF_NET_OFF: c_int = SKF_NET_OFF;
1375pub const BPF_LL_OFF: c_int = SKF_LL_OFF;
1376pub const BPF_MEMWORDS: c_int = 16;
1377pub const BPF_MAXINSNS: c_int = 4096;
1378
1379// linux/bpf_common.h
1380pub const BPF_LD: __u32 = 0x00;
1381pub const BPF_LDX: __u32 = 0x01;
1382pub const BPF_ST: __u32 = 0x02;
1383pub const BPF_STX: __u32 = 0x03;
1384pub const BPF_ALU: __u32 = 0x04;
1385pub const BPF_JMP: __u32 = 0x05;
1386pub const BPF_RET: __u32 = 0x06;
1387pub const BPF_MISC: __u32 = 0x07;
1388pub const BPF_W: __u32 = 0x00;
1389pub const BPF_H: __u32 = 0x08;
1390pub const BPF_B: __u32 = 0x10;
1391pub const BPF_IMM: __u32 = 0x00;
1392pub const BPF_ABS: __u32 = 0x20;
1393pub const BPF_IND: __u32 = 0x40;
1394pub const BPF_MEM: __u32 = 0x60;
1395pub const BPF_LEN: __u32 = 0x80;
1396pub const BPF_MSH: __u32 = 0xa0;
1397pub const BPF_ADD: __u32 = 0x00;
1398pub const BPF_SUB: __u32 = 0x10;
1399pub const BPF_MUL: __u32 = 0x20;
1400pub const BPF_DIV: __u32 = 0x30;
1401pub const BPF_OR: __u32 = 0x40;
1402pub const BPF_AND: __u32 = 0x50;
1403pub const BPF_LSH: __u32 = 0x60;
1404pub const BPF_RSH: __u32 = 0x70;
1405pub const BPF_NEG: __u32 = 0x80;
1406pub const BPF_MOD: __u32 = 0x90;
1407pub const BPF_XOR: __u32 = 0xa0;
1408pub const BPF_JA: __u32 = 0x00;
1409pub const BPF_JEQ: __u32 = 0x10;
1410pub const BPF_JGT: __u32 = 0x20;
1411pub const BPF_JGE: __u32 = 0x30;
1412pub const BPF_JSET: __u32 = 0x40;
1413pub const BPF_K: __u32 = 0x00;
1414pub const BPF_X: __u32 = 0x08;
1415
1416// linux/filter.h
1417
1418pub const BPF_A: __u32 = 0x10;
1419pub const BPF_TAX: __u32 = 0x00;
1420pub const BPF_TXA: __u32 = 0x80;
1421
1422// linux/openat2.h
1423pub const RESOLVE_NO_XDEV: crate::__u64 = 0x01;
1424pub const RESOLVE_NO_MAGICLINKS: crate::__u64 = 0x02;
1425pub const RESOLVE_NO_SYMLINKS: crate::__u64 = 0x04;
1426pub const RESOLVE_BENEATH: crate::__u64 = 0x08;
1427pub const RESOLVE_IN_ROOT: crate::__u64 = 0x10;
1428pub const RESOLVE_CACHED: crate::__u64 = 0x20;
1429
1430// linux/if_ether.h
1431pub const ETH_ALEN: c_int = 6;
1432pub const ETH_HLEN: c_int = 14;
1433pub const ETH_ZLEN: c_int = 60;
1434pub const ETH_DATA_LEN: c_int = 1500;
1435pub const ETH_FRAME_LEN: c_int = 1514;
1436pub const ETH_FCS_LEN: c_int = 4;
1437
1438// These are the defined Ethernet Protocol ID's.
1439pub const ETH_P_LOOP: c_int = 0x0060;
1440pub const ETH_P_PUP: c_int = 0x0200;
1441pub const ETH_P_PUPAT: c_int = 0x0201;
1442pub const ETH_P_IP: c_int = 0x0800;
1443pub const ETH_P_X25: c_int = 0x0805;
1444pub const ETH_P_ARP: c_int = 0x0806;
1445pub const ETH_P_BPQ: c_int = 0x08FF;
1446pub const ETH_P_IEEEPUP: c_int = 0x0a00;
1447pub const ETH_P_IEEEPUPAT: c_int = 0x0a01;
1448pub const ETH_P_BATMAN: c_int = 0x4305;
1449pub const ETH_P_DEC: c_int = 0x6000;
1450pub const ETH_P_DNA_DL: c_int = 0x6001;
1451pub const ETH_P_DNA_RC: c_int = 0x6002;
1452pub const ETH_P_DNA_RT: c_int = 0x6003;
1453pub const ETH_P_LAT: c_int = 0x6004;
1454pub const ETH_P_DIAG: c_int = 0x6005;
1455pub const ETH_P_CUST: c_int = 0x6006;
1456pub const ETH_P_SCA: c_int = 0x6007;
1457pub const ETH_P_TEB: c_int = 0x6558;
1458pub const ETH_P_RARP: c_int = 0x8035;
1459pub const ETH_P_ATALK: c_int = 0x809B;
1460pub const ETH_P_AARP: c_int = 0x80F3;
1461pub const ETH_P_8021Q: c_int = 0x8100;
1462pub const ETH_P_IPX: c_int = 0x8137;
1463pub const ETH_P_IPV6: c_int = 0x86DD;
1464pub const ETH_P_PAUSE: c_int = 0x8808;
1465pub const ETH_P_SLOW: c_int = 0x8809;
1466pub const ETH_P_WCCP: c_int = 0x883E;
1467pub const ETH_P_MPLS_UC: c_int = 0x8847;
1468pub const ETH_P_MPLS_MC: c_int = 0x8848;
1469pub const ETH_P_ATMMPOA: c_int = 0x884c;
1470pub const ETH_P_PPP_DISC: c_int = 0x8863;
1471pub const ETH_P_PPP_SES: c_int = 0x8864;
1472pub const ETH_P_LINK_CTL: c_int = 0x886c;
1473pub const ETH_P_ATMFATE: c_int = 0x8884;
1474pub const ETH_P_PAE: c_int = 0x888E;
1475pub const ETH_P_AOE: c_int = 0x88A2;
1476pub const ETH_P_8021AD: c_int = 0x88A8;
1477pub const ETH_P_802_EX1: c_int = 0x88B5;
1478pub const ETH_P_TIPC: c_int = 0x88CA;
1479pub const ETH_P_LLDP: c_int = 0x88CC;
1480pub const ETH_P_MACSEC: c_int = 0x88E5;
1481pub const ETH_P_8021AH: c_int = 0x88E7;
1482pub const ETH_P_MVRP: c_int = 0x88F5;
1483pub const ETH_P_1588: c_int = 0x88F7;
1484pub const ETH_P_PRP: c_int = 0x88FB;
1485pub const ETH_P_FCOE: c_int = 0x8906;
1486pub const ETH_P_TDLS: c_int = 0x890D;
1487pub const ETH_P_FIP: c_int = 0x8914;
1488pub const ETH_P_80221: c_int = 0x8917;
1489pub const ETH_P_LOOPBACK: c_int = 0x9000;
1490pub const ETH_P_QINQ1: c_int = 0x9100;
1491pub const ETH_P_QINQ2: c_int = 0x9200;
1492pub const ETH_P_QINQ3: c_int = 0x9300;
1493pub const ETH_P_EDSA: c_int = 0xDADA;
1494pub const ETH_P_AF_IUCV: c_int = 0xFBFB;
1495
1496pub const ETH_P_802_3_MIN: c_int = 0x0600;
1497
1498// Non DIX types. Won't clash for 1500 types.
1499pub const ETH_P_802_3: c_int = 0x0001;
1500pub const ETH_P_AX25: c_int = 0x0002;
1501pub const ETH_P_ALL: c_int = 0x0003;
1502pub const ETH_P_802_2: c_int = 0x0004;
1503pub const ETH_P_SNAP: c_int = 0x0005;
1504pub const ETH_P_DDCMP: c_int = 0x0006;
1505pub const ETH_P_WAN_PPP: c_int = 0x0007;
1506pub const ETH_P_PPP_MP: c_int = 0x0008;
1507pub const ETH_P_LOCALTALK: c_int = 0x0009;
1508pub const ETH_P_CANFD: c_int = 0x000D;
1509pub const ETH_P_PPPTALK: c_int = 0x0010;
1510pub const ETH_P_TR_802_2: c_int = 0x0011;
1511pub const ETH_P_MOBITEX: c_int = 0x0015;
1512pub const ETH_P_CONTROL: c_int = 0x0016;
1513pub const ETH_P_IRDA: c_int = 0x0017;
1514pub const ETH_P_ECONET: c_int = 0x0018;
1515pub const ETH_P_HDLC: c_int = 0x0019;
1516pub const ETH_P_ARCNET: c_int = 0x001A;
1517pub const ETH_P_DSA: c_int = 0x001B;
1518pub const ETH_P_TRAILER: c_int = 0x001C;
1519pub const ETH_P_PHONET: c_int = 0x00F5;
1520pub const ETH_P_IEEE802154: c_int = 0x00F6;
1521pub const ETH_P_CAIF: c_int = 0x00F7;
1522
1523// DIFF(main): changed to `c_short` in f62eb023ab
1524pub const POSIX_SPAWN_RESETIDS: c_int = 0x01;
1525pub const POSIX_SPAWN_SETPGROUP: c_int = 0x02;
1526pub const POSIX_SPAWN_SETSIGDEF: c_int = 0x04;
1527pub const POSIX_SPAWN_SETSIGMASK: c_int = 0x08;
1528pub const POSIX_SPAWN_SETSCHEDPARAM: c_int = 0x10;
1529pub const POSIX_SPAWN_SETSCHEDULER: c_int = 0x20;
1530
1531// linux/netfilter/nfnetlink.h
1532pub const NFNLGRP_NONE: c_int = 0;
1533pub const NFNLGRP_CONNTRACK_NEW: c_int = 1;
1534pub const NFNLGRP_CONNTRACK_UPDATE: c_int = 2;
1535pub const NFNLGRP_CONNTRACK_DESTROY: c_int = 3;
1536pub const NFNLGRP_CONNTRACK_EXP_NEW: c_int = 4;
1537pub const NFNLGRP_CONNTRACK_EXP_UPDATE: c_int = 5;
1538pub const NFNLGRP_CONNTRACK_EXP_DESTROY: c_int = 6;
1539pub const NFNLGRP_NFTABLES: c_int = 7;
1540pub const NFNLGRP_ACCT_QUOTA: c_int = 8;
1541pub const NFNLGRP_NFTRACE: c_int = 9;
1542
1543pub const NFNETLINK_V0: c_int = 0;
1544
1545pub const NFNL_SUBSYS_NONE: c_int = 0;
1546pub const NFNL_SUBSYS_CTNETLINK: c_int = 1;
1547pub const NFNL_SUBSYS_CTNETLINK_EXP: c_int = 2;
1548pub const NFNL_SUBSYS_QUEUE: c_int = 3;
1549pub const NFNL_SUBSYS_ULOG: c_int = 4;
1550pub const NFNL_SUBSYS_OSF: c_int = 5;
1551pub const NFNL_SUBSYS_IPSET: c_int = 6;
1552pub const NFNL_SUBSYS_ACCT: c_int = 7;
1553pub const NFNL_SUBSYS_CTNETLINK_TIMEOUT: c_int = 8;
1554pub const NFNL_SUBSYS_CTHELPER: c_int = 9;
1555pub const NFNL_SUBSYS_NFTABLES: c_int = 10;
1556pub const NFNL_SUBSYS_NFT_COMPAT: c_int = 11;
1557pub const NFNL_SUBSYS_HOOK: c_int = 12;
1558
1559/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
1560/// for details.
1561pub const NFNL_SUBSYS_COUNT: c_int = 13;
1562
1563pub const NFNL_MSG_BATCH_BEGIN: c_int = crate::NLMSG_MIN_TYPE;
1564pub const NFNL_MSG_BATCH_END: c_int = crate::NLMSG_MIN_TYPE + 1;
1565
1566pub const NFNL_BATCH_UNSPEC: c_int = 0;
1567pub const NFNL_BATCH_GENID: c_int = 1;
1568
1569// linux/netfilter/nfnetlink_log.h
1570pub const NFULNL_MSG_PACKET: c_int = 0;
1571pub const NFULNL_MSG_CONFIG: c_int = 1;
1572
1573pub const NFULA_VLAN_UNSPEC: c_int = 0;
1574pub const NFULA_VLAN_PROTO: c_int = 1;
1575pub const NFULA_VLAN_TCI: c_int = 2;
1576
1577pub const NFULA_UNSPEC: c_int = 0;
1578pub const NFULA_PACKET_HDR: c_int = 1;
1579pub const NFULA_MARK: c_int = 2;
1580pub const NFULA_TIMESTAMP: c_int = 3;
1581pub const NFULA_IFINDEX_INDEV: c_int = 4;
1582pub const NFULA_IFINDEX_OUTDEV: c_int = 5;
1583pub const NFULA_IFINDEX_PHYSINDEV: c_int = 6;
1584pub const NFULA_IFINDEX_PHYSOUTDEV: c_int = 7;
1585pub const NFULA_HWADDR: c_int = 8;
1586pub const NFULA_PAYLOAD: c_int = 9;
1587pub const NFULA_PREFIX: c_int = 10;
1588pub const NFULA_UID: c_int = 11;
1589pub const NFULA_SEQ: c_int = 12;
1590pub const NFULA_SEQ_GLOBAL: c_int = 13;
1591pub const NFULA_GID: c_int = 14;
1592pub const NFULA_HWTYPE: c_int = 15;
1593pub const NFULA_HWHEADER: c_int = 16;
1594pub const NFULA_HWLEN: c_int = 17;
1595pub const NFULA_CT: c_int = 18;
1596pub const NFULA_CT_INFO: c_int = 19;
1597pub const NFULA_VLAN: c_int = 20;
1598pub const NFULA_L2HDR: c_int = 21;
1599
1600pub const NFULNL_CFG_CMD_NONE: c_int = 0;
1601pub const NFULNL_CFG_CMD_BIND: c_int = 1;
1602pub const NFULNL_CFG_CMD_UNBIND: c_int = 2;
1603pub const NFULNL_CFG_CMD_PF_BIND: c_int = 3;
1604pub const NFULNL_CFG_CMD_PF_UNBIND: c_int = 4;
1605
1606pub const NFULA_CFG_UNSPEC: c_int = 0;
1607pub const NFULA_CFG_CMD: c_int = 1;
1608pub const NFULA_CFG_MODE: c_int = 2;
1609pub const NFULA_CFG_NLBUFSIZ: c_int = 3;
1610pub const NFULA_CFG_TIMEOUT: c_int = 4;
1611pub const NFULA_CFG_QTHRESH: c_int = 5;
1612pub const NFULA_CFG_FLAGS: c_int = 6;
1613
1614pub const NFULNL_COPY_NONE: c_int = 0x00;
1615pub const NFULNL_COPY_META: c_int = 0x01;
1616pub const NFULNL_COPY_PACKET: c_int = 0x02;
1617
1618pub const NFULNL_CFG_F_SEQ: c_int = 0x0001;
1619pub const NFULNL_CFG_F_SEQ_GLOBAL: c_int = 0x0002;
1620pub const NFULNL_CFG_F_CONNTRACK: c_int = 0x0004;
1621
1622// linux/netfilter/nfnetlink_queue.h
1623pub const NFQNL_MSG_PACKET: c_int = 0;
1624pub const NFQNL_MSG_VERDICT: c_int = 1;
1625pub const NFQNL_MSG_CONFIG: c_int = 2;
1626pub const NFQNL_MSG_VERDICT_BATCH: c_int = 3;
1627
1628pub const NFQA_UNSPEC: c_int = 0;
1629pub const NFQA_PACKET_HDR: c_int = 1;
1630pub const NFQA_VERDICT_HDR: c_int = 2;
1631pub const NFQA_MARK: c_int = 3;
1632pub const NFQA_TIMESTAMP: c_int = 4;
1633pub const NFQA_IFINDEX_INDEV: c_int = 5;
1634pub const NFQA_IFINDEX_OUTDEV: c_int = 6;
1635pub const NFQA_IFINDEX_PHYSINDEV: c_int = 7;
1636pub const NFQA_IFINDEX_PHYSOUTDEV: c_int = 8;
1637pub const NFQA_HWADDR: c_int = 9;
1638pub const NFQA_PAYLOAD: c_int = 10;
1639pub const NFQA_CT: c_int = 11;
1640pub const NFQA_CT_INFO: c_int = 12;
1641pub const NFQA_CAP_LEN: c_int = 13;
1642pub const NFQA_SKB_INFO: c_int = 14;
1643pub const NFQA_EXP: c_int = 15;
1644pub const NFQA_UID: c_int = 16;
1645pub const NFQA_GID: c_int = 17;
1646pub const NFQA_SECCTX: c_int = 18;
1647pub const NFQA_VLAN: c_int = 19;
1648pub const NFQA_L2HDR: c_int = 20;
1649pub const NFQA_PRIORITY: c_int = 21;
1650
1651pub const NFQA_VLAN_UNSPEC: c_int = 0;
1652pub const NFQA_VLAN_PROTO: c_int = 1;
1653pub const NFQA_VLAN_TCI: c_int = 2;
1654
1655pub const NFQNL_CFG_CMD_NONE: c_int = 0;
1656pub const NFQNL_CFG_CMD_BIND: c_int = 1;
1657pub const NFQNL_CFG_CMD_UNBIND: c_int = 2;
1658pub const NFQNL_CFG_CMD_PF_BIND: c_int = 3;
1659pub const NFQNL_CFG_CMD_PF_UNBIND: c_int = 4;
1660
1661pub const NFQNL_COPY_NONE: c_int = 0;
1662pub const NFQNL_COPY_META: c_int = 1;
1663pub const NFQNL_COPY_PACKET: c_int = 2;
1664
1665pub const NFQA_CFG_UNSPEC: c_int = 0;
1666pub const NFQA_CFG_CMD: c_int = 1;
1667pub const NFQA_CFG_PARAMS: c_int = 2;
1668pub const NFQA_CFG_QUEUE_MAXLEN: c_int = 3;
1669pub const NFQA_CFG_MASK: c_int = 4;
1670pub const NFQA_CFG_FLAGS: c_int = 5;
1671
1672pub const NFQA_CFG_F_FAIL_OPEN: c_int = 0x0001;
1673pub const NFQA_CFG_F_CONNTRACK: c_int = 0x0002;
1674pub const NFQA_CFG_F_GSO: c_int = 0x0004;
1675pub const NFQA_CFG_F_UID_GID: c_int = 0x0008;
1676pub const NFQA_CFG_F_SECCTX: c_int = 0x0010;
1677
1678/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
1679/// for details.
1680pub const NFQA_CFG_F_MAX: c_int = 0x0020;
1681
1682pub const NFQA_SKB_CSUMNOTREADY: c_int = 0x0001;
1683pub const NFQA_SKB_GSO: c_int = 0x0002;
1684pub const NFQA_SKB_CSUM_NOTVERIFIED: c_int = 0x0004;
1685
1686// linux/genetlink.h
1687
1688pub const GENL_NAMSIZ: c_int = 16;
1689
1690pub const GENL_MIN_ID: c_int = crate::NLMSG_MIN_TYPE;
1691pub const GENL_MAX_ID: c_int = 1023;
1692
1693pub const GENL_ADMIN_PERM: c_int = 0x01;
1694pub const GENL_CMD_CAP_DO: c_int = 0x02;
1695pub const GENL_CMD_CAP_DUMP: c_int = 0x04;
1696pub const GENL_CMD_CAP_HASPOL: c_int = 0x08;
1697
1698pub const GENL_ID_CTRL: c_int = crate::NLMSG_MIN_TYPE;
1699
1700pub const CTRL_CMD_UNSPEC: c_int = 0;
1701pub const CTRL_CMD_NEWFAMILY: c_int = 1;
1702pub const CTRL_CMD_DELFAMILY: c_int = 2;
1703pub const CTRL_CMD_GETFAMILY: c_int = 3;
1704pub const CTRL_CMD_NEWOPS: c_int = 4;
1705pub const CTRL_CMD_DELOPS: c_int = 5;
1706pub const CTRL_CMD_GETOPS: c_int = 6;
1707pub const CTRL_CMD_NEWMCAST_GRP: c_int = 7;
1708pub const CTRL_CMD_DELMCAST_GRP: c_int = 8;
1709pub const CTRL_CMD_GETMCAST_GRP: c_int = 9;
1710
1711pub const CTRL_ATTR_UNSPEC: c_int = 0;
1712pub const CTRL_ATTR_FAMILY_ID: c_int = 1;
1713pub const CTRL_ATTR_FAMILY_NAME: c_int = 2;
1714pub const CTRL_ATTR_VERSION: c_int = 3;
1715pub const CTRL_ATTR_HDRSIZE: c_int = 4;
1716pub const CTRL_ATTR_MAXATTR: c_int = 5;
1717pub const CTRL_ATTR_OPS: c_int = 6;
1718pub const CTRL_ATTR_MCAST_GROUPS: c_int = 7;
1719
1720pub const CTRL_ATTR_OP_UNSPEC: c_int = 0;
1721pub const CTRL_ATTR_OP_ID: c_int = 1;
1722pub const CTRL_ATTR_OP_FLAGS: c_int = 2;
1723
1724pub const CTRL_ATTR_MCAST_GRP_UNSPEC: c_int = 0;
1725pub const CTRL_ATTR_MCAST_GRP_NAME: c_int = 1;
1726pub const CTRL_ATTR_MCAST_GRP_ID: c_int = 2;
1727
1728// linux/netfilter.h
1729pub const NF_DROP: c_int = 0;
1730pub const NF_ACCEPT: c_int = 1;
1731pub const NF_STOLEN: c_int = 2;
1732pub const NF_QUEUE: c_int = 3;
1733pub const NF_REPEAT: c_int = 4;
1734pub const NF_STOP: c_int = 5;
1735pub const NF_MAX_VERDICT: c_int = NF_STOP;
1736
1737pub const NF_VERDICT_MASK: c_int = 0x000000ff;
1738pub const NF_VERDICT_FLAG_QUEUE_BYPASS: c_int = 0x00008000;
1739
1740pub const NF_VERDICT_QMASK: c_int = u32_cast_int(0xffff0000);
1741pub const NF_VERDICT_QBITS: c_int = 16;
1742
1743pub const NF_VERDICT_BITS: c_int = 16;
1744
1745pub const NF_INET_PRE_ROUTING: c_int = 0;
1746pub const NF_INET_LOCAL_IN: c_int = 1;
1747pub const NF_INET_FORWARD: c_int = 2;
1748pub const NF_INET_LOCAL_OUT: c_int = 3;
1749pub const NF_INET_POST_ROUTING: c_int = 4;
1750pub const NF_INET_NUMHOOKS: c_int = 5;
1751pub const NF_INET_INGRESS: c_int = NF_INET_NUMHOOKS;
1752
1753pub const NF_NETDEV_INGRESS: c_int = 0;
1754pub const NF_NETDEV_EGRESS: c_int = 1;
1755pub const NF_NETDEV_NUMHOOKS: c_int = 2;
1756
1757// Some NFPROTO are not compatible with musl and are defined in submodules.
1758pub const NFPROTO_UNSPEC: c_int = 0;
1759pub const NFPROTO_INET: c_int = 1;
1760pub const NFPROTO_IPV4: c_int = 2;
1761pub const NFPROTO_ARP: c_int = 3;
1762pub const NFPROTO_NETDEV: c_int = 5;
1763pub const NFPROTO_BRIDGE: c_int = 7;
1764pub const NFPROTO_IPV6: c_int = 10;
1765pub const NFPROTO_DECNET: c_int = 12;
1766pub const NFPROTO_NUMPROTO: c_int = 13;
1767
1768// linux/netfilter_arp.h
1769pub const NF_ARP: c_int = 0;
1770pub const NF_ARP_IN: c_int = 0;
1771pub const NF_ARP_OUT: c_int = 1;
1772pub const NF_ARP_FORWARD: c_int = 2;
1773pub const NF_ARP_NUMHOOKS: c_int = 3;
1774
1775// linux/netfilter_bridge.h
1776pub const NF_BR_PRE_ROUTING: c_int = 0;
1777pub const NF_BR_LOCAL_IN: c_int = 1;
1778pub const NF_BR_FORWARD: c_int = 2;
1779pub const NF_BR_LOCAL_OUT: c_int = 3;
1780pub const NF_BR_POST_ROUTING: c_int = 4;
1781pub const NF_BR_BROUTING: c_int = 5;
1782pub const NF_BR_NUMHOOKS: c_int = 6;
1783
1784pub const NF_BR_PRI_FIRST: c_int = c_int::MIN;
1785pub const NF_BR_PRI_NAT_DST_BRIDGED: c_int = -300;
1786pub const NF_BR_PRI_FILTER_BRIDGED: c_int = -200;
1787pub const NF_BR_PRI_BRNF: c_int = 0;
1788pub const NF_BR_PRI_NAT_DST_OTHER: c_int = 100;
1789pub const NF_BR_PRI_FILTER_OTHER: c_int = 200;
1790pub const NF_BR_PRI_NAT_SRC: c_int = 300;
1791
1792/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
1793/// for details.
1794pub const NF_BR_PRI_LAST: c_int = c_int::MAX;
1795
1796// linux/netfilter_ipv4.h
1797pub const NF_IP_PRE_ROUTING: c_int = 0;
1798pub const NF_IP_LOCAL_IN: c_int = 1;
1799pub const NF_IP_FORWARD: c_int = 2;
1800pub const NF_IP_LOCAL_OUT: c_int = 3;
1801pub const NF_IP_POST_ROUTING: c_int = 4;
1802pub const NF_IP_NUMHOOKS: c_int = 5;
1803
1804pub const NF_IP_PRI_FIRST: c_int = c_int::MIN;
1805pub const NF_IP_PRI_RAW_BEFORE_DEFRAG: c_int = -450;
1806pub const NF_IP_PRI_CONNTRACK_DEFRAG: c_int = -400;
1807pub const NF_IP_PRI_RAW: c_int = -300;
1808pub const NF_IP_PRI_SELINUX_FIRST: c_int = -225;
1809pub const NF_IP_PRI_CONNTRACK: c_int = -200;
1810pub const NF_IP_PRI_MANGLE: c_int = -150;
1811pub const NF_IP_PRI_NAT_DST: c_int = -100;
1812pub const NF_IP_PRI_FILTER: c_int = 0;
1813pub const NF_IP_PRI_SECURITY: c_int = 50;
1814pub const NF_IP_PRI_NAT_SRC: c_int = 100;
1815pub const NF_IP_PRI_SELINUX_LAST: c_int = 225;
1816pub const NF_IP_PRI_CONNTRACK_HELPER: c_int = 300;
1817pub const NF_IP_PRI_CONNTRACK_CONFIRM: c_int = c_int::MAX;
1818
1819/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
1820/// for details.
1821pub const NF_IP_PRI_LAST: c_int = c_int::MAX;
1822
1823// linux/netfilter_ipv6.h
1824pub const NF_IP6_PRE_ROUTING: c_int = 0;
1825pub const NF_IP6_LOCAL_IN: c_int = 1;
1826pub const NF_IP6_FORWARD: c_int = 2;
1827pub const NF_IP6_LOCAL_OUT: c_int = 3;
1828pub const NF_IP6_POST_ROUTING: c_int = 4;
1829pub const NF_IP6_NUMHOOKS: c_int = 5;
1830
1831pub const NF_IP6_PRI_FIRST: c_int = c_int::MIN;
1832pub const NF_IP6_PRI_RAW_BEFORE_DEFRAG: c_int = -450;
1833pub const NF_IP6_PRI_CONNTRACK_DEFRAG: c_int = -400;
1834pub const NF_IP6_PRI_RAW: c_int = -300;
1835pub const NF_IP6_PRI_SELINUX_FIRST: c_int = -225;
1836pub const NF_IP6_PRI_CONNTRACK: c_int = -200;
1837pub const NF_IP6_PRI_MANGLE: c_int = -150;
1838pub const NF_IP6_PRI_NAT_DST: c_int = -100;
1839pub const NF_IP6_PRI_FILTER: c_int = 0;
1840pub const NF_IP6_PRI_SECURITY: c_int = 50;
1841pub const NF_IP6_PRI_NAT_SRC: c_int = 100;
1842pub const NF_IP6_PRI_SELINUX_LAST: c_int = 225;
1843pub const NF_IP6_PRI_CONNTRACK_HELPER: c_int = 300;
1844
1845/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
1846/// for details.
1847pub const NF_IP6_PRI_LAST: c_int = c_int::MAX;
1848
1849// linux/netfilter_ipv6/ip6_tables.h
1850pub const IP6T_SO_ORIGINAL_DST: c_int = 80;
1851
1852pub const SIOCSHWTSTAMP: c_ulong = 0x000089b0;
1853pub const SIOCGHWTSTAMP: c_ulong = 0x000089b1;
1854
1855// wireless.h
1856pub const WIRELESS_EXT: c_ulong = 0x16;
1857
1858pub const SIOCSIWCOMMIT: c_ulong = 0x8B00;
1859pub const SIOCGIWNAME: c_ulong = 0x8B01;
1860
1861pub const SIOCSIWNWID: c_ulong = 0x8B02;
1862pub const SIOCGIWNWID: c_ulong = 0x8B03;
1863pub const SIOCSIWFREQ: c_ulong = 0x8B04;
1864pub const SIOCGIWFREQ: c_ulong = 0x8B05;
1865pub const SIOCSIWMODE: c_ulong = 0x8B06;
1866pub const SIOCGIWMODE: c_ulong = 0x8B07;
1867pub const SIOCSIWSENS: c_ulong = 0x8B08;
1868pub const SIOCGIWSENS: c_ulong = 0x8B09;
1869
1870pub const SIOCSIWRANGE: c_ulong = 0x8B0A;
1871pub const SIOCGIWRANGE: c_ulong = 0x8B0B;
1872pub const SIOCSIWPRIV: c_ulong = 0x8B0C;
1873pub const SIOCGIWPRIV: c_ulong = 0x8B0D;
1874pub const SIOCSIWSTATS: c_ulong = 0x8B0E;
1875pub const SIOCGIWSTATS: c_ulong = 0x8B0F;
1876
1877pub const SIOCSIWSPY: c_ulong = 0x8B10;
1878pub const SIOCGIWSPY: c_ulong = 0x8B11;
1879pub const SIOCSIWTHRSPY: c_ulong = 0x8B12;
1880pub const SIOCGIWTHRSPY: c_ulong = 0x8B13;
1881
1882pub const SIOCSIWAP: c_ulong = 0x8B14;
1883pub const SIOCGIWAP: c_ulong = 0x8B15;
1884pub const SIOCGIWAPLIST: c_ulong = 0x8B17;
1885pub const SIOCSIWSCAN: c_ulong = 0x8B18;
1886pub const SIOCGIWSCAN: c_ulong = 0x8B19;
1887
1888pub const SIOCSIWESSID: c_ulong = 0x8B1A;
1889pub const SIOCGIWESSID: c_ulong = 0x8B1B;
1890pub const SIOCSIWNICKN: c_ulong = 0x8B1C;
1891pub const SIOCGIWNICKN: c_ulong = 0x8B1D;
1892
1893pub const SIOCSIWRATE: c_ulong = 0x8B20;
1894pub const SIOCGIWRATE: c_ulong = 0x8B21;
1895pub const SIOCSIWRTS: c_ulong = 0x8B22;
1896pub const SIOCGIWRTS: c_ulong = 0x8B23;
1897pub const SIOCSIWFRAG: c_ulong = 0x8B24;
1898pub const SIOCGIWFRAG: c_ulong = 0x8B25;
1899pub const SIOCSIWTXPOW: c_ulong = 0x8B26;
1900pub const SIOCGIWTXPOW: c_ulong = 0x8B27;
1901pub const SIOCSIWRETRY: c_ulong = 0x8B28;
1902pub const SIOCGIWRETRY: c_ulong = 0x8B29;
1903
1904pub const SIOCSIWENCODE: c_ulong = 0x8B2A;
1905pub const SIOCGIWENCODE: c_ulong = 0x8B2B;
1906
1907pub const SIOCSIWPOWER: c_ulong = 0x8B2C;
1908pub const SIOCGIWPOWER: c_ulong = 0x8B2D;
1909
1910pub const SIOCSIWGENIE: c_ulong = 0x8B30;
1911pub const SIOCGIWGENIE: c_ulong = 0x8B31;
1912
1913pub const SIOCSIWMLME: c_ulong = 0x8B16;
1914
1915pub const SIOCSIWAUTH: c_ulong = 0x8B32;
1916pub const SIOCGIWAUTH: c_ulong = 0x8B33;
1917
1918pub const SIOCSIWENCODEEXT: c_ulong = 0x8B34;
1919pub const SIOCGIWENCODEEXT: c_ulong = 0x8B35;
1920
1921pub const SIOCSIWPMKSA: c_ulong = 0x8B36;
1922
1923pub const SIOCIWFIRSTPRIV: c_ulong = 0x8BE0;
1924
1925/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
1926/// for details.
1927pub const SIOCIWLASTPRIV: c_ulong = 0x8BFF;
1928
1929pub const SIOCIWFIRST: c_ulong = 0x8B00;
1930
1931/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
1932/// for details.
1933pub const SIOCIWLAST: c_ulong = SIOCIWLASTPRIV;
1934
1935pub const IWEVTXDROP: c_ulong = 0x8C00;
1936pub const IWEVQUAL: c_ulong = 0x8C01;
1937pub const IWEVCUSTOM: c_ulong = 0x8C02;
1938pub const IWEVREGISTERED: c_ulong = 0x8C03;
1939pub const IWEVEXPIRED: c_ulong = 0x8C04;
1940pub const IWEVGENIE: c_ulong = 0x8C05;
1941pub const IWEVMICHAELMICFAILURE: c_ulong = 0x8C06;
1942pub const IWEVASSOCREQIE: c_ulong = 0x8C07;
1943pub const IWEVASSOCRESPIE: c_ulong = 0x8C08;
1944pub const IWEVPMKIDCAND: c_ulong = 0x8C09;
1945pub const IWEVFIRST: c_ulong = 0x8C00;
1946
1947pub const IW_PRIV_TYPE_MASK: c_ulong = 0x7000;
1948pub const IW_PRIV_TYPE_NONE: c_ulong = 0x0000;
1949pub const IW_PRIV_TYPE_BYTE: c_ulong = 0x1000;
1950pub const IW_PRIV_TYPE_CHAR: c_ulong = 0x2000;
1951pub const IW_PRIV_TYPE_INT: c_ulong = 0x4000;
1952pub const IW_PRIV_TYPE_FLOAT: c_ulong = 0x5000;
1953pub const IW_PRIV_TYPE_ADDR: c_ulong = 0x6000;
1954
1955pub const IW_PRIV_SIZE_FIXED: c_ulong = 0x0800;
1956
1957pub const IW_PRIV_SIZE_MASK: c_ulong = 0x07FF;
1958
1959pub const IW_MAX_FREQUENCIES: usize = 32;
1960pub const IW_MAX_BITRATES: usize = 32;
1961pub const IW_MAX_TXPOWER: usize = 8;
1962pub const IW_MAX_SPY: usize = 8;
1963pub const IW_MAX_AP: usize = 64;
1964pub const IW_ESSID_MAX_SIZE: usize = 32;
1965
1966pub const IW_MODE_AUTO: usize = 0;
1967pub const IW_MODE_ADHOC: usize = 1;
1968pub const IW_MODE_INFRA: usize = 2;
1969pub const IW_MODE_MASTER: usize = 3;
1970pub const IW_MODE_REPEAT: usize = 4;
1971pub const IW_MODE_SECOND: usize = 5;
1972pub const IW_MODE_MONITOR: usize = 6;
1973pub const IW_MODE_MESH: usize = 7;
1974
1975pub const IW_QUAL_QUAL_UPDATED: c_ulong = 0x01;
1976pub const IW_QUAL_LEVEL_UPDATED: c_ulong = 0x02;
1977pub const IW_QUAL_NOISE_UPDATED: c_ulong = 0x04;
1978pub const IW_QUAL_ALL_UPDATED: c_ulong = 0x07;
1979pub const IW_QUAL_DBM: c_ulong = 0x08;
1980pub const IW_QUAL_QUAL_INVALID: c_ulong = 0x10;
1981pub const IW_QUAL_LEVEL_INVALID: c_ulong = 0x20;
1982pub const IW_QUAL_NOISE_INVALID: c_ulong = 0x40;
1983pub const IW_QUAL_RCPI: c_ulong = 0x80;
1984pub const IW_QUAL_ALL_INVALID: c_ulong = 0x70;
1985
1986pub const IW_FREQ_AUTO: c_ulong = 0x00;
1987pub const IW_FREQ_FIXED: c_ulong = 0x01;
1988
1989pub const IW_MAX_ENCODING_SIZES: usize = 8;
1990pub const IW_ENCODING_TOKEN_MAX: usize = 64;
1991
1992pub const IW_ENCODE_INDEX: c_ulong = 0x00FF;
1993pub const IW_ENCODE_FLAGS: c_ulong = 0xFF00;
1994pub const IW_ENCODE_MODE: c_ulong = 0xF000;
1995pub const IW_ENCODE_DISABLED: c_ulong = 0x8000;
1996pub const IW_ENCODE_ENABLED: c_ulong = 0x0000;
1997pub const IW_ENCODE_RESTRICTED: c_ulong = 0x4000;
1998pub const IW_ENCODE_OPEN: c_ulong = 0x2000;
1999pub const IW_ENCODE_NOKEY: c_ulong = 0x0800;
2000pub const IW_ENCODE_TEMP: c_ulong = 0x0400;
2001
2002pub const IW_POWER_ON: c_ulong = 0x0000;
2003pub const IW_POWER_TYPE: c_ulong = 0xF000;
2004pub const IW_POWER_PERIOD: c_ulong = 0x1000;
2005pub const IW_POWER_TIMEOUT: c_ulong = 0x2000;
2006pub const IW_POWER_MODE: c_ulong = 0x0F00;
2007pub const IW_POWER_UNICAST_R: c_ulong = 0x0100;
2008pub const IW_POWER_MULTICAST_R: c_ulong = 0x0200;
2009pub const IW_POWER_ALL_R: c_ulong = 0x0300;
2010pub const IW_POWER_FORCE_S: c_ulong = 0x0400;
2011pub const IW_POWER_REPEATER: c_ulong = 0x0800;
2012pub const IW_POWER_MODIFIER: c_ulong = 0x000F;
2013pub const IW_POWER_MIN: c_ulong = 0x0001;
2014pub const IW_POWER_MAX: c_ulong = 0x0002;
2015pub const IW_POWER_RELATIVE: c_ulong = 0x0004;
2016
2017pub const IW_TXPOW_TYPE: c_ulong = 0x00FF;
2018pub const IW_TXPOW_DBM: c_ulong = 0x0000;
2019pub const IW_TXPOW_MWATT: c_ulong = 0x0001;
2020pub const IW_TXPOW_RELATIVE: c_ulong = 0x0002;
2021pub const IW_TXPOW_RANGE: c_ulong = 0x1000;
2022
2023pub const IW_RETRY_ON: c_ulong = 0x0000;
2024pub const IW_RETRY_TYPE: c_ulong = 0xF000;
2025pub const IW_RETRY_LIMIT: c_ulong = 0x1000;
2026pub const IW_RETRY_LIFETIME: c_ulong = 0x2000;
2027pub const IW_RETRY_MODIFIER: c_ulong = 0x00FF;
2028pub const IW_RETRY_MIN: c_ulong = 0x0001;
2029pub const IW_RETRY_MAX: c_ulong = 0x0002;
2030pub const IW_RETRY_RELATIVE: c_ulong = 0x0004;
2031pub const IW_RETRY_SHORT: c_ulong = 0x0010;
2032pub const IW_RETRY_LONG: c_ulong = 0x0020;
2033
2034pub const IW_SCAN_DEFAULT: c_ulong = 0x0000;
2035pub const IW_SCAN_ALL_ESSID: c_ulong = 0x0001;
2036pub const IW_SCAN_THIS_ESSID: c_ulong = 0x0002;
2037pub const IW_SCAN_ALL_FREQ: c_ulong = 0x0004;
2038pub const IW_SCAN_THIS_FREQ: c_ulong = 0x0008;
2039pub const IW_SCAN_ALL_MODE: c_ulong = 0x0010;
2040pub const IW_SCAN_THIS_MODE: c_ulong = 0x0020;
2041pub const IW_SCAN_ALL_RATE: c_ulong = 0x0040;
2042pub const IW_SCAN_THIS_RATE: c_ulong = 0x0080;
2043
2044pub const IW_SCAN_TYPE_ACTIVE: usize = 0;
2045pub const IW_SCAN_TYPE_PASSIVE: usize = 1;
2046
2047pub const IW_SCAN_MAX_DATA: usize = 4096;
2048
2049pub const IW_SCAN_CAPA_NONE: c_ulong = 0x00;
2050pub const IW_SCAN_CAPA_ESSID: c_ulong = 0x01;
2051pub const IW_SCAN_CAPA_BSSID: c_ulong = 0x02;
2052pub const IW_SCAN_CAPA_CHANNEL: c_ulong = 0x04;
2053pub const IW_SCAN_CAPA_MODE: c_ulong = 0x08;
2054pub const IW_SCAN_CAPA_RATE: c_ulong = 0x10;
2055pub const IW_SCAN_CAPA_TYPE: c_ulong = 0x20;
2056pub const IW_SCAN_CAPA_TIME: c_ulong = 0x40;
2057
2058pub const IW_CUSTOM_MAX: c_ulong = 256;
2059
2060pub const IW_GENERIC_IE_MAX: c_ulong = 1024;
2061
2062pub const IW_MLME_DEAUTH: c_ulong = 0;
2063pub const IW_MLME_DISASSOC: c_ulong = 1;
2064pub const IW_MLME_AUTH: c_ulong = 2;
2065pub const IW_MLME_ASSOC: c_ulong = 3;
2066
2067pub const IW_AUTH_INDEX: c_ulong = 0x0FFF;
2068pub const IW_AUTH_FLAGS: c_ulong = 0xF000;
2069
2070pub const IW_AUTH_WPA_VERSION: usize = 0;
2071pub const IW_AUTH_CIPHER_PAIRWISE: usize = 1;
2072pub const IW_AUTH_CIPHER_GROUP: usize = 2;
2073pub const IW_AUTH_KEY_MGMT: usize = 3;
2074pub const IW_AUTH_TKIP_COUNTERMEASURES: usize = 4;
2075pub const IW_AUTH_DROP_UNENCRYPTED: usize = 5;
2076pub const IW_AUTH_80211_AUTH_ALG: usize = 6;
2077pub const IW_AUTH_WPA_ENABLED: usize = 7;
2078pub const IW_AUTH_RX_UNENCRYPTED_EAPOL: usize = 8;
2079pub const IW_AUTH_ROAMING_CONTROL: usize = 9;
2080pub const IW_AUTH_PRIVACY_INVOKED: usize = 10;
2081pub const IW_AUTH_CIPHER_GROUP_MGMT: usize = 11;
2082pub const IW_AUTH_MFP: usize = 12;
2083
2084pub const IW_AUTH_WPA_VERSION_DISABLED: c_ulong = 0x00000001;
2085pub const IW_AUTH_WPA_VERSION_WPA: c_ulong = 0x00000002;
2086pub const IW_AUTH_WPA_VERSION_WPA2: c_ulong = 0x00000004;
2087
2088pub const IW_AUTH_CIPHER_NONE: c_ulong = 0x00000001;
2089pub const IW_AUTH_CIPHER_WEP40: c_ulong = 0x00000002;
2090pub const IW_AUTH_CIPHER_TKIP: c_ulong = 0x00000004;
2091pub const IW_AUTH_CIPHER_CCMP: c_ulong = 0x00000008;
2092pub const IW_AUTH_CIPHER_WEP104: c_ulong = 0x00000010;
2093pub const IW_AUTH_CIPHER_AES_CMAC: c_ulong = 0x00000020;
2094
2095pub const IW_AUTH_KEY_MGMT_802_1X: usize = 1;
2096pub const IW_AUTH_KEY_MGMT_PSK: usize = 2;
2097
2098pub const IW_AUTH_ALG_OPEN_SYSTEM: c_ulong = 0x00000001;
2099pub const IW_AUTH_ALG_SHARED_KEY: c_ulong = 0x00000002;
2100pub const IW_AUTH_ALG_LEAP: c_ulong = 0x00000004;
2101
2102pub const IW_AUTH_ROAMING_ENABLE: usize = 0;
2103pub const IW_AUTH_ROAMING_DISABLE: usize = 1;
2104
2105pub const IW_AUTH_MFP_DISABLED: usize = 0;
2106pub const IW_AUTH_MFP_OPTIONAL: usize = 1;
2107pub const IW_AUTH_MFP_REQUIRED: usize = 2;
2108
2109pub const IW_ENCODE_SEQ_MAX_SIZE: usize = 8;
2110
2111pub const IW_ENCODE_ALG_NONE: usize = 0;
2112pub const IW_ENCODE_ALG_WEP: usize = 1;
2113pub const IW_ENCODE_ALG_TKIP: usize = 2;
2114pub const IW_ENCODE_ALG_CCMP: usize = 3;
2115pub const IW_ENCODE_ALG_PMK: usize = 4;
2116pub const IW_ENCODE_ALG_AES_CMAC: usize = 5;
2117
2118pub const IW_ENCODE_EXT_TX_SEQ_VALID: c_ulong = 0x00000001;
2119pub const IW_ENCODE_EXT_RX_SEQ_VALID: c_ulong = 0x00000002;
2120pub const IW_ENCODE_EXT_GROUP_KEY: c_ulong = 0x00000004;
2121pub const IW_ENCODE_EXT_SET_TX_KEY: c_ulong = 0x00000008;
2122
2123pub const IW_MICFAILURE_KEY_ID: c_ulong = 0x00000003;
2124pub const IW_MICFAILURE_GROUP: c_ulong = 0x00000004;
2125pub const IW_MICFAILURE_PAIRWISE: c_ulong = 0x00000008;
2126pub const IW_MICFAILURE_STAKEY: c_ulong = 0x00000010;
2127pub const IW_MICFAILURE_COUNT: c_ulong = 0x00000060;
2128
2129pub const IW_ENC_CAPA_WPA: c_ulong = 0x00000001;
2130pub const IW_ENC_CAPA_WPA2: c_ulong = 0x00000002;
2131pub const IW_ENC_CAPA_CIPHER_TKIP: c_ulong = 0x00000004;
2132pub const IW_ENC_CAPA_CIPHER_CCMP: c_ulong = 0x00000008;
2133pub const IW_ENC_CAPA_4WAY_HANDSHAKE: c_ulong = 0x00000010;
2134
2135pub const IW_EVENT_CAPA_K_0: c_ulong = 0x4000050; //   IW_EVENT_CAPA_MASK(0x8B04) | IW_EVENT_CAPA_MASK(0x8B06) | IW_EVENT_CAPA_MASK(0x8B1A);
2136pub const IW_EVENT_CAPA_K_1: c_ulong = 0x400; //   W_EVENT_CAPA_MASK(0x8B2A);
2137
2138pub const IW_PMKSA_ADD: usize = 1;
2139pub const IW_PMKSA_REMOVE: usize = 2;
2140pub const IW_PMKSA_FLUSH: usize = 3;
2141
2142pub const IW_PMKID_LEN: usize = 16;
2143
2144pub const IW_PMKID_CAND_PREAUTH: c_ulong = 0x00000001;
2145
2146pub const IW_EV_LCP_PK_LEN: usize = 4;
2147
2148pub const IW_EV_CHAR_PK_LEN: usize = 20; // IW_EV_LCP_PK_LEN + crate::IFNAMSIZ;
2149pub const IW_EV_UINT_PK_LEN: usize = 8; // IW_EV_LCP_PK_LEN + size_of::<u32>();
2150pub const IW_EV_FREQ_PK_LEN: usize = 12; // IW_EV_LCP_PK_LEN + size_of::<iw_freq>();
2151pub const IW_EV_PARAM_PK_LEN: usize = 12; // IW_EV_LCP_PK_LEN + size_of::<iw_param>();
2152pub const IW_EV_ADDR_PK_LEN: usize = 20; // IW_EV_LCP_PK_LEN + size_of::<crate::sockaddr>();
2153pub const IW_EV_QUAL_PK_LEN: usize = 8; // IW_EV_LCP_PK_LEN + size_of::<iw_quality>();
2154pub const IW_EV_POINT_PK_LEN: usize = 8; // IW_EV_LCP_PK_LEN + 4;
2155
2156// linux/neighbor.h
2157pub const NUD_NONE: u16 = 0x00;
2158pub const NUD_INCOMPLETE: u16 = 0x01;
2159pub const NUD_REACHABLE: u16 = 0x02;
2160pub const NUD_STALE: u16 = 0x04;
2161pub const NUD_DELAY: u16 = 0x08;
2162pub const NUD_PROBE: u16 = 0x10;
2163pub const NUD_FAILED: u16 = 0x20;
2164pub const NUD_NOARP: u16 = 0x40;
2165pub const NUD_PERMANENT: u16 = 0x80;
2166
2167pub const NTF_USE: u8 = 0x01;
2168pub const NTF_SELF: u8 = 0x02;
2169pub const NTF_MASTER: u8 = 0x04;
2170pub const NTF_PROXY: u8 = 0x08;
2171pub const NTF_ROUTER: u8 = 0x80;
2172
2173pub const NDA_UNSPEC: c_ushort = 0;
2174pub const NDA_DST: c_ushort = 1;
2175pub const NDA_LLADDR: c_ushort = 2;
2176pub const NDA_CACHEINFO: c_ushort = 3;
2177pub const NDA_PROBES: c_ushort = 4;
2178pub const NDA_VLAN: c_ushort = 5;
2179pub const NDA_PORT: c_ushort = 6;
2180pub const NDA_VNI: c_ushort = 7;
2181pub const NDA_IFINDEX: c_ushort = 8;
2182
2183// linux/netlink.h
2184
2185pub const NLM_F_BULK: c_int = 0x200;
2186
2187// linux/rtnetlink.h
2188pub const TCA_UNSPEC: c_ushort = 0;
2189pub const TCA_KIND: c_ushort = 1;
2190pub const TCA_OPTIONS: c_ushort = 2;
2191pub const TCA_STATS: c_ushort = 3;
2192pub const TCA_XSTATS: c_ushort = 4;
2193pub const TCA_RATE: c_ushort = 5;
2194pub const TCA_FCNT: c_ushort = 6;
2195pub const TCA_STATS2: c_ushort = 7;
2196pub const TCA_STAB: c_ushort = 8;
2197
2198pub const RTM_NEWLINK: u16 = 16;
2199pub const RTM_DELLINK: u16 = 17;
2200pub const RTM_GETLINK: u16 = 18;
2201pub const RTM_SETLINK: u16 = 19;
2202pub const RTM_NEWADDR: u16 = 20;
2203pub const RTM_DELADDR: u16 = 21;
2204pub const RTM_GETADDR: u16 = 22;
2205pub const RTM_NEWROUTE: u16 = 24;
2206pub const RTM_DELROUTE: u16 = 25;
2207pub const RTM_GETROUTE: u16 = 26;
2208pub const RTM_NEWNEIGH: u16 = 28;
2209pub const RTM_DELNEIGH: u16 = 29;
2210pub const RTM_GETNEIGH: u16 = 30;
2211pub const RTM_NEWRULE: u16 = 32;
2212pub const RTM_DELRULE: u16 = 33;
2213pub const RTM_GETRULE: u16 = 34;
2214pub const RTM_NEWQDISC: u16 = 36;
2215pub const RTM_DELQDISC: u16 = 37;
2216pub const RTM_GETQDISC: u16 = 38;
2217pub const RTM_NEWTCLASS: u16 = 40;
2218pub const RTM_DELTCLASS: u16 = 41;
2219pub const RTM_GETTCLASS: u16 = 42;
2220pub const RTM_NEWTFILTER: u16 = 44;
2221pub const RTM_DELTFILTER: u16 = 45;
2222pub const RTM_GETTFILTER: u16 = 46;
2223pub const RTM_NEWACTION: u16 = 48;
2224pub const RTM_DELACTION: u16 = 49;
2225pub const RTM_GETACTION: u16 = 50;
2226pub const RTM_NEWPREFIX: u16 = 52;
2227pub const RTM_GETMULTICAST: u16 = 58;
2228pub const RTM_GETANYCAST: u16 = 62;
2229pub const RTM_NEWNEIGHTBL: u16 = 64;
2230pub const RTM_GETNEIGHTBL: u16 = 66;
2231pub const RTM_SETNEIGHTBL: u16 = 67;
2232pub const RTM_NEWNDUSEROPT: u16 = 68;
2233pub const RTM_NEWADDRLABEL: u16 = 72;
2234pub const RTM_DELADDRLABEL: u16 = 73;
2235pub const RTM_GETADDRLABEL: u16 = 74;
2236pub const RTM_GETDCB: u16 = 78;
2237pub const RTM_SETDCB: u16 = 79;
2238pub const RTM_NEWNETCONF: u16 = 80;
2239pub const RTM_GETNETCONF: u16 = 82;
2240pub const RTM_NEWMDB: u16 = 84;
2241pub const RTM_DELMDB: u16 = 85;
2242pub const RTM_GETMDB: u16 = 86;
2243pub const RTM_NEWNSID: u16 = 88;
2244pub const RTM_DELNSID: u16 = 89;
2245pub const RTM_GETNSID: u16 = 90;
2246
2247pub const RTM_F_NOTIFY: c_uint = 0x100;
2248pub const RTM_F_CLONED: c_uint = 0x200;
2249pub const RTM_F_EQUALIZE: c_uint = 0x400;
2250pub const RTM_F_PREFIX: c_uint = 0x800;
2251
2252pub const RTA_UNSPEC: c_ushort = 0;
2253pub const RTA_DST: c_ushort = 1;
2254pub const RTA_SRC: c_ushort = 2;
2255pub const RTA_IIF: c_ushort = 3;
2256pub const RTA_OIF: c_ushort = 4;
2257pub const RTA_GATEWAY: c_ushort = 5;
2258pub const RTA_PRIORITY: c_ushort = 6;
2259pub const RTA_PREFSRC: c_ushort = 7;
2260pub const RTA_METRICS: c_ushort = 8;
2261pub const RTA_MULTIPATH: c_ushort = 9;
2262pub const RTA_PROTOINFO: c_ushort = 10; // No longer used
2263pub const RTA_FLOW: c_ushort = 11;
2264pub const RTA_CACHEINFO: c_ushort = 12;
2265pub const RTA_SESSION: c_ushort = 13; // No longer used
2266pub const RTA_MP_ALGO: c_ushort = 14; // No longer used
2267pub const RTA_TABLE: c_ushort = 15;
2268pub const RTA_MARK: c_ushort = 16;
2269pub const RTA_MFC_STATS: c_ushort = 17;
2270
2271pub const RTN_UNSPEC: c_uchar = 0;
2272pub const RTN_UNICAST: c_uchar = 1;
2273pub const RTN_LOCAL: c_uchar = 2;
2274pub const RTN_BROADCAST: c_uchar = 3;
2275pub const RTN_ANYCAST: c_uchar = 4;
2276pub const RTN_MULTICAST: c_uchar = 5;
2277pub const RTN_BLACKHOLE: c_uchar = 6;
2278pub const RTN_UNREACHABLE: c_uchar = 7;
2279pub const RTN_PROHIBIT: c_uchar = 8;
2280pub const RTN_THROW: c_uchar = 9;
2281pub const RTN_NAT: c_uchar = 10;
2282pub const RTN_XRESOLVE: c_uchar = 11;
2283
2284pub const RTPROT_UNSPEC: c_uchar = 0;
2285pub const RTPROT_REDIRECT: c_uchar = 1;
2286pub const RTPROT_KERNEL: c_uchar = 2;
2287pub const RTPROT_BOOT: c_uchar = 3;
2288pub const RTPROT_STATIC: c_uchar = 4;
2289
2290pub const RT_SCOPE_UNIVERSE: c_uchar = 0;
2291pub const RT_SCOPE_SITE: c_uchar = 200;
2292pub const RT_SCOPE_LINK: c_uchar = 253;
2293pub const RT_SCOPE_HOST: c_uchar = 254;
2294pub const RT_SCOPE_NOWHERE: c_uchar = 255;
2295
2296pub const RT_TABLE_UNSPEC: c_uchar = 0;
2297pub const RT_TABLE_COMPAT: c_uchar = 252;
2298pub const RT_TABLE_DEFAULT: c_uchar = 253;
2299pub const RT_TABLE_MAIN: c_uchar = 254;
2300pub const RT_TABLE_LOCAL: c_uchar = 255;
2301
2302pub const RTMSG_OVERRUN: u32 = crate::NLMSG_OVERRUN as u32;
2303pub const RTMSG_NEWDEVICE: u32 = 0x11;
2304pub const RTMSG_DELDEVICE: u32 = 0x12;
2305pub const RTMSG_NEWROUTE: u32 = 0x21;
2306pub const RTMSG_DELROUTE: u32 = 0x22;
2307pub const RTMSG_NEWRULE: u32 = 0x31;
2308pub const RTMSG_DELRULE: u32 = 0x32;
2309pub const RTMSG_CONTROL: u32 = 0x40;
2310pub const RTMSG_AR_FAILED: u32 = 0x51;
2311
2312pub const RTEXT_FILTER_VF: c_int = 1 << 0;
2313pub const RTEXT_FILTER_BRVLAN: c_int = 1 << 1;
2314pub const RTEXT_FILTER_BRVLAN_COMPRESSED: c_int = 1 << 2;
2315pub const RTEXT_FILTER_SKIP_STATS: c_int = 1 << 3;
2316pub const RTEXT_FILTER_MRP: c_int = 1 << 4;
2317pub const RTEXT_FILTER_CFM_CONFIG: c_int = 1 << 5;
2318pub const RTEXT_FILTER_CFM_STATUS: c_int = 1 << 6;
2319
2320// userspace compat definitions for RTNLGRP_*
2321pub const RTMGRP_LINK: c_int = 0x00001;
2322pub const RTMGRP_NOTIFY: c_int = 0x00002;
2323pub const RTMGRP_NEIGH: c_int = 0x00004;
2324pub const RTMGRP_TC: c_int = 0x00008;
2325pub const RTMGRP_IPV4_IFADDR: c_int = 0x00010;
2326pub const RTMGRP_IPV4_MROUTE: c_int = 0x00020;
2327pub const RTMGRP_IPV4_ROUTE: c_int = 0x00040;
2328pub const RTMGRP_IPV4_RULE: c_int = 0x00080;
2329pub const RTMGRP_IPV6_IFADDR: c_int = 0x00100;
2330pub const RTMGRP_IPV6_MROUTE: c_int = 0x00200;
2331pub const RTMGRP_IPV6_ROUTE: c_int = 0x00400;
2332pub const RTMGRP_IPV6_IFINFO: c_int = 0x00800;
2333pub const RTMGRP_DECnet_IFADDR: c_int = 0x01000;
2334pub const RTMGRP_DECnet_ROUTE: c_int = 0x04000;
2335pub const RTMGRP_IPV6_PREFIX: c_int = 0x20000;
2336
2337// enum rtnetlink_groups
2338pub const RTNLGRP_NONE: c_uint = 0x00;
2339pub const RTNLGRP_LINK: c_uint = 0x01;
2340pub const RTNLGRP_NOTIFY: c_uint = 0x02;
2341pub const RTNLGRP_NEIGH: c_uint = 0x03;
2342pub const RTNLGRP_TC: c_uint = 0x04;
2343pub const RTNLGRP_IPV4_IFADDR: c_uint = 0x05;
2344pub const RTNLGRP_IPV4_MROUTE: c_uint = 0x06;
2345pub const RTNLGRP_IPV4_ROUTE: c_uint = 0x07;
2346pub const RTNLGRP_IPV4_RULE: c_uint = 0x08;
2347pub const RTNLGRP_IPV6_IFADDR: c_uint = 0x09;
2348pub const RTNLGRP_IPV6_MROUTE: c_uint = 0x0a;
2349pub const RTNLGRP_IPV6_ROUTE: c_uint = 0x0b;
2350pub const RTNLGRP_IPV6_IFINFO: c_uint = 0x0c;
2351pub const RTNLGRP_DECnet_IFADDR: c_uint = 0x0d;
2352pub const RTNLGRP_NOP2: c_uint = 0x0e;
2353pub const RTNLGRP_DECnet_ROUTE: c_uint = 0x0f;
2354pub const RTNLGRP_DECnet_RULE: c_uint = 0x10;
2355pub const RTNLGRP_NOP4: c_uint = 0x11;
2356pub const RTNLGRP_IPV6_PREFIX: c_uint = 0x12;
2357pub const RTNLGRP_IPV6_RULE: c_uint = 0x13;
2358pub const RTNLGRP_ND_USEROPT: c_uint = 0x14;
2359pub const RTNLGRP_PHONET_IFADDR: c_uint = 0x15;
2360pub const RTNLGRP_PHONET_ROUTE: c_uint = 0x16;
2361pub const RTNLGRP_DCB: c_uint = 0x17;
2362pub const RTNLGRP_IPV4_NETCONF: c_uint = 0x18;
2363pub const RTNLGRP_IPV6_NETCONF: c_uint = 0x19;
2364pub const RTNLGRP_MDB: c_uint = 0x1a;
2365pub const RTNLGRP_MPLS_ROUTE: c_uint = 0x1b;
2366pub const RTNLGRP_NSID: c_uint = 0x1c;
2367pub const RTNLGRP_MPLS_NETCONF: c_uint = 0x1d;
2368pub const RTNLGRP_IPV4_MROUTE_R: c_uint = 0x1e;
2369pub const RTNLGRP_IPV6_MROUTE_R: c_uint = 0x1f;
2370pub const RTNLGRP_NEXTHOP: c_uint = 0x20;
2371pub const RTNLGRP_BRVLAN: c_uint = 0x21;
2372pub const RTNLGRP_MCTP_IFADDR: c_uint = 0x22;
2373pub const RTNLGRP_TUNNEL: c_uint = 0x23;
2374pub const RTNLGRP_STATS: c_uint = 0x24;
2375
2376// linux/cn_proc.h
2377pub type proc_cn_mcast_op = crate::prelude::CEnumRepr;
#[allow(deprecated)]
pub const PROC_CN_MCAST_LISTEN: proc_cn_mcast_op =
    {
        #[allow(unused_variables)]
        let r = 0;
        let r = 1;
        r
    };
#[allow(deprecated)]
pub const PROC_CN_MCAST_IGNORE: proc_cn_mcast_op =
    {
        #[allow(unused_variables)]
        let r = PROC_CN_MCAST_LISTEN + 1;
        let r = 2;
        r
    };
pub type proc_cn_event = crate::prelude::CEnumRepr;
#[allow(deprecated)]
pub const PROC_EVENT_NONE: proc_cn_event =
    {
        #[allow(unused_variables)]
        let r = 0;
        let r = 0x00000000;
        r
    };
#[allow(deprecated)]
pub const PROC_EVENT_FORK: proc_cn_event =
    {
        #[allow(unused_variables)]
        let r = PROC_EVENT_NONE + 1;
        let r = 0x00000001;
        r
    };
#[allow(deprecated)]
pub const PROC_EVENT_EXEC: proc_cn_event =
    {
        #[allow(unused_variables)]
        let r = PROC_EVENT_FORK + 1;
        let r = 0x00000002;
        r
    };
#[allow(deprecated)]
pub const PROC_EVENT_UID: proc_cn_event =
    {
        #[allow(unused_variables)]
        let r = PROC_EVENT_EXEC + 1;
        let r = 0x00000004;
        r
    };
#[allow(deprecated)]
pub const PROC_EVENT_GID: proc_cn_event =
    {
        #[allow(unused_variables)]
        let r = PROC_EVENT_UID + 1;
        let r = 0x00000040;
        r
    };
#[allow(deprecated)]
pub const PROC_EVENT_SID: proc_cn_event =
    {
        #[allow(unused_variables)]
        let r = PROC_EVENT_GID + 1;
        let r = 0x00000080;
        r
    };
#[allow(deprecated)]
pub const PROC_EVENT_PTRACE: proc_cn_event =
    {
        #[allow(unused_variables)]
        let r = PROC_EVENT_SID + 1;
        let r = 0x00000100;
        r
    };
#[allow(deprecated)]
pub const PROC_EVENT_COMM: proc_cn_event =
    {
        #[allow(unused_variables)]
        let r = PROC_EVENT_PTRACE + 1;
        let r = 0x00000200;
        r
    };
#[allow(deprecated)]
pub const PROC_EVENT_NONZERO_EXIT: proc_cn_event =
    {
        #[allow(unused_variables)]
        let r = PROC_EVENT_COMM + 1;
        let r = 0x20000000;
        r
    };
#[allow(deprecated)]
pub const PROC_EVENT_COREDUMP: proc_cn_event =
    {
        #[allow(unused_variables)]
        let r = PROC_EVENT_NONZERO_EXIT + 1;
        let r = 0x40000000;
        r
    };
#[allow(deprecated)]
pub const PROC_EVENT_EXIT: proc_cn_event =
    {
        #[allow(unused_variables)]
        let r = PROC_EVENT_COREDUMP + 1;
        let r = 0x80000000;
        r
    };c_enum! {
2378    pub enum proc_cn_mcast_op {
2379        pub PROC_CN_MCAST_LISTEN = 1,
2380        pub PROC_CN_MCAST_IGNORE = 2,
2381    }
2382
2383    pub enum proc_cn_event {
2384        pub PROC_EVENT_NONE = 0x00000000,
2385        pub PROC_EVENT_FORK = 0x00000001,
2386        pub PROC_EVENT_EXEC = 0x00000002,
2387        pub PROC_EVENT_UID = 0x00000004,
2388        pub PROC_EVENT_GID = 0x00000040,
2389        pub PROC_EVENT_SID = 0x00000080,
2390        pub PROC_EVENT_PTRACE = 0x00000100,
2391        pub PROC_EVENT_COMM = 0x00000200,
2392        pub PROC_EVENT_NONZERO_EXIT = 0x20000000,
2393        pub PROC_EVENT_COREDUMP = 0x40000000,
2394        pub PROC_EVENT_EXIT = 0x80000000,
2395    }
2396}
2397
2398// linux/connector.h
2399pub const CN_IDX_PROC: c_uint = 0x1;
2400pub const CN_VAL_PROC: c_uint = 0x1;
2401pub const CN_IDX_CIFS: c_uint = 0x2;
2402pub const CN_VAL_CIFS: c_uint = 0x1;
2403pub const CN_W1_IDX: c_uint = 0x3;
2404pub const CN_W1_VAL: c_uint = 0x1;
2405pub const CN_IDX_V86D: c_uint = 0x4;
2406pub const CN_VAL_V86D_UVESAFB: c_uint = 0x1;
2407pub const CN_IDX_BB: c_uint = 0x5;
2408pub const CN_DST_IDX: c_uint = 0x6;
2409pub const CN_DST_VAL: c_uint = 0x1;
2410pub const CN_IDX_DM: c_uint = 0x7;
2411pub const CN_VAL_DM_USERSPACE_LOG: c_uint = 0x1;
2412pub const CN_IDX_DRBD: c_uint = 0x8;
2413pub const CN_VAL_DRBD: c_uint = 0x1;
2414pub const CN_KVP_IDX: c_uint = 0x9;
2415pub const CN_KVP_VAL: c_uint = 0x1;
2416pub const CN_VSS_IDX: c_uint = 0xA;
2417pub const CN_VSS_VAL: c_uint = 0x1;
2418
2419// linux/module.h
2420pub const MODULE_INIT_IGNORE_MODVERSIONS: c_uint = 0x0001;
2421pub const MODULE_INIT_IGNORE_VERMAGIC: c_uint = 0x0002;
2422
2423// linux/net_tstamp.h
2424pub const SOF_TIMESTAMPING_TX_HARDWARE: c_uint = 1 << 0;
2425pub const SOF_TIMESTAMPING_TX_SOFTWARE: c_uint = 1 << 1;
2426pub const SOF_TIMESTAMPING_RX_HARDWARE: c_uint = 1 << 2;
2427pub const SOF_TIMESTAMPING_RX_SOFTWARE: c_uint = 1 << 3;
2428pub const SOF_TIMESTAMPING_SOFTWARE: c_uint = 1 << 4;
2429pub const SOF_TIMESTAMPING_SYS_HARDWARE: c_uint = 1 << 5;
2430pub const SOF_TIMESTAMPING_RAW_HARDWARE: c_uint = 1 << 6;
2431pub const SOF_TIMESTAMPING_OPT_ID: c_uint = 1 << 7;
2432pub const SOF_TIMESTAMPING_TX_SCHED: c_uint = 1 << 8;
2433pub const SOF_TIMESTAMPING_TX_ACK: c_uint = 1 << 9;
2434pub const SOF_TIMESTAMPING_OPT_CMSG: c_uint = 1 << 10;
2435pub const SOF_TIMESTAMPING_OPT_TSONLY: c_uint = 1 << 11;
2436pub const SOF_TIMESTAMPING_OPT_STATS: c_uint = 1 << 12;
2437pub const SOF_TIMESTAMPING_OPT_PKTINFO: c_uint = 1 << 13;
2438pub const SOF_TIMESTAMPING_OPT_TX_SWHW: c_uint = 1 << 14;
2439pub const SOF_TIMESTAMPING_BIND_PHC: c_uint = 1 << 15;
2440pub const SOF_TIMESTAMPING_OPT_ID_TCP: c_uint = 1 << 16;
2441pub const SOF_TIMESTAMPING_OPT_RX_FILTER: c_uint = 1 << 17;
2442pub const SOF_TXTIME_DEADLINE_MODE: u32 = 1 << 0;
2443pub const SOF_TXTIME_REPORT_ERRORS: u32 = 1 << 1;
2444
2445pub const HWTSTAMP_TX_OFF: c_uint = 0;
2446pub const HWTSTAMP_TX_ON: c_uint = 1;
2447pub const HWTSTAMP_TX_ONESTEP_SYNC: c_uint = 2;
2448pub const HWTSTAMP_TX_ONESTEP_P2P: c_uint = 3;
2449
2450pub const HWTSTAMP_FILTER_NONE: c_uint = 0;
2451pub const HWTSTAMP_FILTER_ALL: c_uint = 1;
2452pub const HWTSTAMP_FILTER_SOME: c_uint = 2;
2453pub const HWTSTAMP_FILTER_PTP_V1_L4_EVENT: c_uint = 3;
2454pub const HWTSTAMP_FILTER_PTP_V1_L4_SYNC: c_uint = 4;
2455pub const HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ: c_uint = 5;
2456pub const HWTSTAMP_FILTER_PTP_V2_L4_EVENT: c_uint = 6;
2457pub const HWTSTAMP_FILTER_PTP_V2_L4_SYNC: c_uint = 7;
2458pub const HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ: c_uint = 8;
2459pub const HWTSTAMP_FILTER_PTP_V2_L2_EVENT: c_uint = 9;
2460pub const HWTSTAMP_FILTER_PTP_V2_L2_SYNC: c_uint = 10;
2461pub const HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ: c_uint = 11;
2462pub const HWTSTAMP_FILTER_PTP_V2_EVENT: c_uint = 12;
2463pub const HWTSTAMP_FILTER_PTP_V2_SYNC: c_uint = 13;
2464pub const HWTSTAMP_FILTER_PTP_V2_DELAY_REQ: c_uint = 14;
2465pub const HWTSTAMP_FILTER_NTP_ALL: c_uint = 15;
2466
2467// linux/ptp_clock.h
2468pub const PTP_MAX_SAMPLES: c_uint = 25; // Maximum allowed offset measurement samples.
2469
2470const PTP_CLK_MAGIC: u32 = b'=' as u32;
2471
2472pub const PTP_CLOCK_GETCAPS: Ioctl = _IOR::<ptp_clock_caps>(PTP_CLK_MAGIC, 1);
2473pub const PTP_EXTTS_REQUEST: Ioctl = _IOW::<ptp_extts_request>(PTP_CLK_MAGIC, 2);
2474pub const PTP_PEROUT_REQUEST: Ioctl = _IOW::<ptp_perout_request>(PTP_CLK_MAGIC, 3);
2475pub const PTP_ENABLE_PPS: Ioctl = _IOW::<c_int>(PTP_CLK_MAGIC, 4);
2476pub const PTP_SYS_OFFSET: Ioctl = _IOW::<ptp_sys_offset>(PTP_CLK_MAGIC, 5);
2477pub const PTP_PIN_GETFUNC: Ioctl = _IOWR::<ptp_pin_desc>(PTP_CLK_MAGIC, 6);
2478pub const PTP_PIN_SETFUNC: Ioctl = _IOW::<ptp_pin_desc>(PTP_CLK_MAGIC, 7);
2479pub const PTP_SYS_OFFSET_PRECISE: Ioctl = _IOWR::<ptp_sys_offset_precise>(PTP_CLK_MAGIC, 8);
2480pub const PTP_SYS_OFFSET_EXTENDED: Ioctl = _IOWR::<ptp_sys_offset_extended>(PTP_CLK_MAGIC, 9);
2481
2482pub const PTP_CLOCK_GETCAPS2: Ioctl = _IOR::<ptp_clock_caps>(PTP_CLK_MAGIC, 10);
2483pub const PTP_EXTTS_REQUEST2: Ioctl = _IOW::<ptp_extts_request>(PTP_CLK_MAGIC, 11);
2484pub const PTP_PEROUT_REQUEST2: Ioctl = _IOW::<ptp_perout_request>(PTP_CLK_MAGIC, 12);
2485pub const PTP_ENABLE_PPS2: Ioctl = _IOW::<c_int>(PTP_CLK_MAGIC, 13);
2486pub const PTP_SYS_OFFSET2: Ioctl = _IOW::<ptp_sys_offset>(PTP_CLK_MAGIC, 14);
2487pub const PTP_PIN_GETFUNC2: Ioctl = _IOWR::<ptp_pin_desc>(PTP_CLK_MAGIC, 15);
2488pub const PTP_PIN_SETFUNC2: Ioctl = _IOW::<ptp_pin_desc>(PTP_CLK_MAGIC, 16);
2489pub const PTP_SYS_OFFSET_PRECISE2: Ioctl = _IOWR::<ptp_sys_offset_precise>(PTP_CLK_MAGIC, 17);
2490pub const PTP_SYS_OFFSET_EXTENDED2: Ioctl = _IOWR::<ptp_sys_offset_extended>(PTP_CLK_MAGIC, 18);
2491
2492// enum ptp_pin_function
2493pub const PTP_PF_NONE: c_uint = 0;
2494pub const PTP_PF_EXTTS: c_uint = 1;
2495pub const PTP_PF_PEROUT: c_uint = 2;
2496pub const PTP_PF_PHYSYNC: c_uint = 3;
2497
2498// linux/socket.h
2499
2500pub const SOL_TLS: c_int = 282;
2501
2502// linux/if_alg.h
2503pub const ALG_SET_KEY: c_int = 1;
2504pub const ALG_SET_IV: c_int = 2;
2505pub const ALG_SET_OP: c_int = 3;
2506pub const ALG_SET_AEAD_ASSOCLEN: c_int = 4;
2507pub const ALG_SET_AEAD_AUTHSIZE: c_int = 5;
2508pub const ALG_SET_DRBG_ENTROPY: c_int = 6;
2509pub const ALG_SET_KEY_BY_KEY_SERIAL: c_int = 7;
2510
2511pub const ALG_OP_DECRYPT: c_int = 0;
2512pub const ALG_OP_ENCRYPT: c_int = 1;
2513
2514// include/uapi/linux/if.h
2515pub const IF_OPER_UNKNOWN: c_int = 0;
2516pub const IF_OPER_NOTPRESENT: c_int = 1;
2517pub const IF_OPER_DOWN: c_int = 2;
2518pub const IF_OPER_LOWERLAYERDOWN: c_int = 3;
2519pub const IF_OPER_TESTING: c_int = 4;
2520pub const IF_OPER_DORMANT: c_int = 5;
2521pub const IF_OPER_UP: c_int = 6;
2522
2523pub const IF_LINK_MODE_DEFAULT: c_int = 0;
2524pub const IF_LINK_MODE_DORMANT: c_int = 1;
2525pub const IF_LINK_MODE_TESTING: c_int = 2;
2526
2527// include/uapi/linux/mman.h
2528pub const MAP_SHARED_VALIDATE: c_int = 0x3;
2529pub const MAP_DROPPABLE: c_int = 0x8;
2530
2531// uapi/linux/vm_sockets.h
2532pub const VMADDR_CID_ANY: c_uint = 0xFFFFFFFF;
2533pub const VMADDR_CID_HYPERVISOR: c_uint = 0;
2534pub const VMADDR_CID_LOCAL: c_uint = 1;
2535pub const VMADDR_CID_HOST: c_uint = 2;
2536pub const VMADDR_PORT_ANY: c_uint = 0xFFFFFFFF;
2537
2538// uapi/linux/inotify.h
2539pub const IN_ACCESS: u32 = 0x0000_0001;
2540pub const IN_MODIFY: u32 = 0x0000_0002;
2541pub const IN_ATTRIB: u32 = 0x0000_0004;
2542pub const IN_CLOSE_WRITE: u32 = 0x0000_0008;
2543pub const IN_CLOSE_NOWRITE: u32 = 0x0000_0010;
2544pub const IN_CLOSE: u32 = IN_CLOSE_WRITE | IN_CLOSE_NOWRITE;
2545pub const IN_OPEN: u32 = 0x0000_0020;
2546pub const IN_MOVED_FROM: u32 = 0x0000_0040;
2547pub const IN_MOVED_TO: u32 = 0x0000_0080;
2548pub const IN_MOVE: u32 = IN_MOVED_FROM | IN_MOVED_TO;
2549pub const IN_CREATE: u32 = 0x0000_0100;
2550pub const IN_DELETE: u32 = 0x0000_0200;
2551pub const IN_DELETE_SELF: u32 = 0x0000_0400;
2552pub const IN_MOVE_SELF: u32 = 0x0000_0800;
2553pub const IN_UNMOUNT: u32 = 0x0000_2000;
2554pub const IN_Q_OVERFLOW: u32 = 0x0000_4000;
2555pub const IN_IGNORED: u32 = 0x0000_8000;
2556pub const IN_ONLYDIR: u32 = 0x0100_0000;
2557pub const IN_DONT_FOLLOW: u32 = 0x0200_0000;
2558pub const IN_EXCL_UNLINK: u32 = 0x0400_0000;
2559
2560// uapi/linux/magic.h
2561// Most `*_SUPER_MAGIC` constants are defined at the `linux_like` level; the
2562// following are only available on newer Linux versions than the versions
2563// currently used in CI in some configurations, so we define them here.
2564cfg_if! {
2565    if #[cfg(not(target_arch = "s390x"))] {
2566        pub const BINDERFS_SUPER_MAGIC: c_long = 0x6c6f6f70;
2567        pub const XFS_SUPER_MAGIC: c_long = 0x58465342;
2568    } else if #[cfg(target_arch = "s390x")] {
2569        pub const BINDERFS_SUPER_MAGIC: c_uint = 0x6c6f6f70;
2570        pub const XFS_SUPER_MAGIC: c_uint = 0x58465342;
2571    }
2572}
2573
2574// uapi/linux/securebits.h
2575const SECURE_NOROOT: c_int = 0;
2576const SECURE_NOROOT_LOCKED: c_int = 1;
2577
2578pub const SECBIT_NOROOT: c_int = issecure_mask(SECURE_NOROOT);
2579pub const SECBIT_NOROOT_LOCKED: c_int = issecure_mask(SECURE_NOROOT_LOCKED);
2580
2581const SECURE_NO_SETUID_FIXUP: c_int = 2;
2582const SECURE_NO_SETUID_FIXUP_LOCKED: c_int = 3;
2583
2584pub const SECBIT_NO_SETUID_FIXUP: c_int = issecure_mask(SECURE_NO_SETUID_FIXUP);
2585pub const SECBIT_NO_SETUID_FIXUP_LOCKED: c_int = issecure_mask(SECURE_NO_SETUID_FIXUP_LOCKED);
2586
2587const SECURE_KEEP_CAPS: c_int = 4;
2588const SECURE_KEEP_CAPS_LOCKED: c_int = 5;
2589
2590pub const SECBIT_KEEP_CAPS: c_int = issecure_mask(SECURE_KEEP_CAPS);
2591pub const SECBIT_KEEP_CAPS_LOCKED: c_int = issecure_mask(SECURE_KEEP_CAPS_LOCKED);
2592
2593const SECURE_NO_CAP_AMBIENT_RAISE: c_int = 6;
2594const SECURE_NO_CAP_AMBIENT_RAISE_LOCKED: c_int = 7;
2595
2596pub const SECBIT_NO_CAP_AMBIENT_RAISE: c_int = issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE);
2597pub const SECBIT_NO_CAP_AMBIENT_RAISE_LOCKED: c_int =
2598    issecure_mask(SECURE_NO_CAP_AMBIENT_RAISE_LOCKED);
2599
2600const SECURE_EXEC_RESTRICT_FILE: c_int = 8;
2601const SECURE_EXEC_RESTRICT_FILE_LOCKED: c_int = 9;
2602
2603pub const SECBIT_EXEC_RESTRICT_FILE: c_int = issecure_mask(SECURE_EXEC_RESTRICT_FILE);
2604pub const SECBIT_EXEC_RESTRICT_FILE_LOCKED: c_int = issecure_mask(SECURE_EXEC_RESTRICT_FILE_LOCKED);
2605
2606const SECURE_EXEC_DENY_INTERACTIVE: c_int = 10;
2607const SECURE_EXEC_DENY_INTERACTIVE_LOCKED: c_int = 11;
2608
2609pub const SECBIT_EXEC_DENY_INTERACTIVE: c_int = issecure_mask(SECURE_EXEC_DENY_INTERACTIVE);
2610pub const SECBIT_EXEC_DENY_INTERACTIVE_LOCKED: c_int =
2611    issecure_mask(SECURE_EXEC_DENY_INTERACTIVE_LOCKED);
2612
2613pub const SECUREBITS_DEFAULT: c_int = 0x00000000;
2614pub const SECURE_ALL_BITS: c_int = SECBIT_NOROOT
2615    | SECBIT_NO_SETUID_FIXUP
2616    | SECBIT_KEEP_CAPS
2617    | SECBIT_NO_CAP_AMBIENT_RAISE
2618    | SECBIT_EXEC_RESTRICT_FILE
2619    | SECBIT_EXEC_DENY_INTERACTIVE;
2620pub const SECURE_ALL_LOCKS: c_int = SECURE_ALL_BITS << 1;
2621
2622pub const SECURE_ALL_UNPRIVILEGED: c_int =
2623    issecure_mask(SECURE_EXEC_RESTRICT_FILE) | issecure_mask(SECURE_EXEC_DENY_INTERACTIVE);
2624
2625const fn issecure_mask(x: c_int) -> c_int {
2626    1 << x
2627}
2628
2629pub const IN_MASK_CREATE: u32 = 0x1000_0000;
2630pub const IN_MASK_ADD: u32 = 0x2000_0000;
2631pub const IN_ISDIR: u32 = 0x4000_0000;
2632pub const IN_ONESHOT: u32 = 0x8000_0000;
2633
2634pub const IN_ALL_EVENTS: u32 = IN_ACCESS
2635    | IN_MODIFY
2636    | IN_ATTRIB
2637    | IN_CLOSE_WRITE
2638    | IN_CLOSE_NOWRITE
2639    | IN_OPEN
2640    | IN_MOVED_FROM
2641    | IN_MOVED_TO
2642    | IN_DELETE
2643    | IN_CREATE
2644    | IN_DELETE_SELF
2645    | IN_MOVE_SELF;
2646
2647pub const IN_CLOEXEC: c_int = O_CLOEXEC;
2648pub const IN_NONBLOCK: c_int = O_NONBLOCK;
2649
2650// uapi/linux/netfilter/nf_tables.h
2651pub const NFT_TABLE_MAXNAMELEN: c_int = 256;
2652pub const NFT_CHAIN_MAXNAMELEN: c_int = 256;
2653pub const NFT_SET_MAXNAMELEN: c_int = 256;
2654pub const NFT_OBJ_MAXNAMELEN: c_int = 256;
2655pub const NFT_USERDATA_MAXLEN: c_int = 256;
2656
2657pub const NFT_REG_VERDICT: c_int = 0;
2658pub const NFT_REG_1: c_int = 1;
2659pub const NFT_REG_2: c_int = 2;
2660pub const NFT_REG_3: c_int = 3;
2661pub const NFT_REG_4: c_int = 4;
2662
2663/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
2664/// for details.
2665pub const __NFT_REG_MAX: c_int = 5;
2666
2667pub const NFT_REG32_00: c_int = 8;
2668pub const NFT_REG32_01: c_int = 9;
2669pub const NFT_REG32_02: c_int = 10;
2670pub const NFT_REG32_03: c_int = 11;
2671pub const NFT_REG32_04: c_int = 12;
2672pub const NFT_REG32_05: c_int = 13;
2673pub const NFT_REG32_06: c_int = 14;
2674pub const NFT_REG32_07: c_int = 15;
2675pub const NFT_REG32_08: c_int = 16;
2676pub const NFT_REG32_09: c_int = 17;
2677pub const NFT_REG32_10: c_int = 18;
2678pub const NFT_REG32_11: c_int = 19;
2679pub const NFT_REG32_12: c_int = 20;
2680pub const NFT_REG32_13: c_int = 21;
2681pub const NFT_REG32_14: c_int = 22;
2682pub const NFT_REG32_15: c_int = 23;
2683
2684pub const NFT_REG_SIZE: c_int = 16;
2685pub const NFT_REG32_SIZE: c_int = 4;
2686
2687pub const NFT_CONTINUE: c_int = -1;
2688pub const NFT_BREAK: c_int = -2;
2689pub const NFT_JUMP: c_int = -3;
2690pub const NFT_GOTO: c_int = -4;
2691pub const NFT_RETURN: c_int = -5;
2692
2693pub const NFT_MSG_NEWTABLE: c_int = 0;
2694pub const NFT_MSG_GETTABLE: c_int = 1;
2695pub const NFT_MSG_DELTABLE: c_int = 2;
2696pub const NFT_MSG_NEWCHAIN: c_int = 3;
2697pub const NFT_MSG_GETCHAIN: c_int = 4;
2698pub const NFT_MSG_DELCHAIN: c_int = 5;
2699pub const NFT_MSG_NEWRULE: c_int = 6;
2700pub const NFT_MSG_GETRULE: c_int = 7;
2701pub const NFT_MSG_DELRULE: c_int = 8;
2702pub const NFT_MSG_NEWSET: c_int = 9;
2703pub const NFT_MSG_GETSET: c_int = 10;
2704pub const NFT_MSG_DELSET: c_int = 11;
2705pub const NFT_MSG_NEWSETELEM: c_int = 12;
2706pub const NFT_MSG_GETSETELEM: c_int = 13;
2707pub const NFT_MSG_DELSETELEM: c_int = 14;
2708pub const NFT_MSG_NEWGEN: c_int = 15;
2709pub const NFT_MSG_GETGEN: c_int = 16;
2710pub const NFT_MSG_TRACE: c_int = 17;
2711cfg_if! {
2712    if #[cfg(not(target_arch = "sparc64"))] {
2713        pub const NFT_MSG_NEWOBJ: c_int = 18;
2714        pub const NFT_MSG_GETOBJ: c_int = 19;
2715        pub const NFT_MSG_DELOBJ: c_int = 20;
2716        pub const NFT_MSG_GETOBJ_RESET: c_int = 21;
2717    }
2718}
2719
2720/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
2721/// for details.
2722pub const NFT_MSG_MAX: c_int = 34;
2723
2724pub const NFT_SET_ANONYMOUS: c_int = 0x1;
2725pub const NFT_SET_CONSTANT: c_int = 0x2;
2726pub const NFT_SET_INTERVAL: c_int = 0x4;
2727pub const NFT_SET_MAP: c_int = 0x8;
2728pub const NFT_SET_TIMEOUT: c_int = 0x10;
2729pub const NFT_SET_EVAL: c_int = 0x20;
2730
2731pub const NFT_SET_POL_PERFORMANCE: c_int = 0;
2732pub const NFT_SET_POL_MEMORY: c_int = 1;
2733
2734pub const NFT_SET_ELEM_INTERVAL_END: c_int = 0x1;
2735
2736pub const NFT_DATA_VALUE: c_uint = 0;
2737pub const NFT_DATA_VERDICT: c_uint = 0xffffff00;
2738
2739pub const NFT_DATA_RESERVED_MASK: c_uint = 0xffffff00;
2740
2741pub const NFT_DATA_VALUE_MAXLEN: c_int = 64;
2742
2743pub const NFT_BYTEORDER_NTOH: c_int = 0;
2744pub const NFT_BYTEORDER_HTON: c_int = 1;
2745
2746pub const NFT_CMP_EQ: c_int = 0;
2747pub const NFT_CMP_NEQ: c_int = 1;
2748pub const NFT_CMP_LT: c_int = 2;
2749pub const NFT_CMP_LTE: c_int = 3;
2750pub const NFT_CMP_GT: c_int = 4;
2751pub const NFT_CMP_GTE: c_int = 5;
2752
2753pub const NFT_RANGE_EQ: c_int = 0;
2754pub const NFT_RANGE_NEQ: c_int = 1;
2755
2756pub const NFT_LOOKUP_F_INV: c_int = 1 << 0;
2757
2758pub const NFT_DYNSET_OP_ADD: c_int = 0;
2759pub const NFT_DYNSET_OP_UPDATE: c_int = 1;
2760
2761pub const NFT_DYNSET_F_INV: c_int = 1 << 0;
2762
2763pub const NFT_PAYLOAD_LL_HEADER: c_int = 0;
2764pub const NFT_PAYLOAD_NETWORK_HEADER: c_int = 1;
2765pub const NFT_PAYLOAD_TRANSPORT_HEADER: c_int = 2;
2766
2767pub const NFT_PAYLOAD_CSUM_NONE: c_int = 0;
2768pub const NFT_PAYLOAD_CSUM_INET: c_int = 1;
2769
2770pub const NFT_META_LEN: c_int = 0;
2771pub const NFT_META_PROTOCOL: c_int = 1;
2772pub const NFT_META_PRIORITY: c_int = 2;
2773pub const NFT_META_MARK: c_int = 3;
2774pub const NFT_META_IIF: c_int = 4;
2775pub const NFT_META_OIF: c_int = 5;
2776pub const NFT_META_IIFNAME: c_int = 6;
2777pub const NFT_META_OIFNAME: c_int = 7;
2778pub const NFT_META_IIFTYPE: c_int = 8;
2779pub const NFT_META_OIFTYPE: c_int = 9;
2780pub const NFT_META_SKUID: c_int = 10;
2781pub const NFT_META_SKGID: c_int = 11;
2782pub const NFT_META_NFTRACE: c_int = 12;
2783pub const NFT_META_RTCLASSID: c_int = 13;
2784pub const NFT_META_SECMARK: c_int = 14;
2785pub const NFT_META_NFPROTO: c_int = 15;
2786pub const NFT_META_L4PROTO: c_int = 16;
2787pub const NFT_META_BRI_IIFNAME: c_int = 17;
2788pub const NFT_META_BRI_OIFNAME: c_int = 18;
2789pub const NFT_META_PKTTYPE: c_int = 19;
2790pub const NFT_META_CPU: c_int = 20;
2791pub const NFT_META_IIFGROUP: c_int = 21;
2792pub const NFT_META_OIFGROUP: c_int = 22;
2793pub const NFT_META_CGROUP: c_int = 23;
2794pub const NFT_META_PRANDOM: c_int = 24;
2795
2796pub const NFT_CT_STATE: c_int = 0;
2797pub const NFT_CT_DIRECTION: c_int = 1;
2798pub const NFT_CT_STATUS: c_int = 2;
2799pub const NFT_CT_MARK: c_int = 3;
2800pub const NFT_CT_SECMARK: c_int = 4;
2801pub const NFT_CT_EXPIRATION: c_int = 5;
2802pub const NFT_CT_HELPER: c_int = 6;
2803pub const NFT_CT_L3PROTOCOL: c_int = 7;
2804pub const NFT_CT_SRC: c_int = 8;
2805pub const NFT_CT_DST: c_int = 9;
2806pub const NFT_CT_PROTOCOL: c_int = 10;
2807pub const NFT_CT_PROTO_SRC: c_int = 11;
2808pub const NFT_CT_PROTO_DST: c_int = 12;
2809pub const NFT_CT_LABELS: c_int = 13;
2810pub const NFT_CT_PKTS: c_int = 14;
2811pub const NFT_CT_BYTES: c_int = 15;
2812pub const NFT_CT_AVGPKT: c_int = 16;
2813pub const NFT_CT_ZONE: c_int = 17;
2814pub const NFT_CT_EVENTMASK: c_int = 18;
2815pub const NFT_CT_SRC_IP: c_int = 19;
2816pub const NFT_CT_DST_IP: c_int = 20;
2817pub const NFT_CT_SRC_IP6: c_int = 21;
2818pub const NFT_CT_DST_IP6: c_int = 22;
2819
2820pub const NFT_LIMIT_PKTS: c_int = 0;
2821pub const NFT_LIMIT_PKT_BYTES: c_int = 1;
2822
2823pub const NFT_LIMIT_F_INV: c_int = 1 << 0;
2824
2825pub const NFT_QUEUE_FLAG_BYPASS: c_int = 0x01;
2826pub const NFT_QUEUE_FLAG_CPU_FANOUT: c_int = 0x02;
2827pub const NFT_QUEUE_FLAG_MASK: c_int = 0x03;
2828
2829pub const NFT_QUOTA_F_INV: c_int = 1 << 0;
2830
2831pub const NFT_REJECT_ICMP_UNREACH: c_int = 0;
2832pub const NFT_REJECT_TCP_RST: c_int = 1;
2833pub const NFT_REJECT_ICMPX_UNREACH: c_int = 2;
2834
2835pub const NFT_REJECT_ICMPX_NO_ROUTE: c_int = 0;
2836pub const NFT_REJECT_ICMPX_PORT_UNREACH: c_int = 1;
2837pub const NFT_REJECT_ICMPX_HOST_UNREACH: c_int = 2;
2838pub const NFT_REJECT_ICMPX_ADMIN_PROHIBITED: c_int = 3;
2839
2840pub const NFT_NAT_SNAT: c_int = 0;
2841pub const NFT_NAT_DNAT: c_int = 1;
2842
2843pub const NFT_TRACETYPE_UNSPEC: c_int = 0;
2844pub const NFT_TRACETYPE_POLICY: c_int = 1;
2845pub const NFT_TRACETYPE_RETURN: c_int = 2;
2846pub const NFT_TRACETYPE_RULE: c_int = 3;
2847
2848pub const NFT_NG_INCREMENTAL: c_int = 0;
2849pub const NFT_NG_RANDOM: c_int = 1;
2850
2851// linux/input.h
2852/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
2853/// for details.
2854pub const FF_MAX: __u16 = 0x7f;
2855pub const FF_CNT: usize = FF_MAX as usize + 1;
2856
2857// linux/input-event-codes.h
2858pub const INPUT_PROP_POINTER: __u16 = 0x00;
2859pub const INPUT_PROP_DIRECT: __u16 = 0x01;
2860pub const INPUT_PROP_BUTTONPAD: __u16 = 0x02;
2861pub const INPUT_PROP_SEMI_MT: __u16 = 0x03;
2862pub const INPUT_PROP_TOPBUTTONPAD: __u16 = 0x04;
2863pub const INPUT_PROP_POINTING_STICK: __u16 = 0x05;
2864pub const INPUT_PROP_ACCELEROMETER: __u16 = 0x06;
2865
2866/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
2867/// for details.
2868pub const INPUT_PROP_MAX: __u16 = 0x1f;
2869
2870pub const INPUT_PROP_CNT: usize = INPUT_PROP_MAX as usize + 1;
2871
2872/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
2873/// for details.
2874pub const EV_MAX: __u16 = 0x1f;
2875pub const EV_CNT: usize = EV_MAX as usize + 1;
2876
2877/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
2878/// for details.
2879pub const SYN_MAX: __u16 = 0xf;
2880pub const SYN_CNT: usize = SYN_MAX as usize + 1;
2881
2882/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
2883/// for details.
2884pub const KEY_MAX: __u16 = 0x2ff;
2885pub const KEY_CNT: usize = KEY_MAX as usize + 1;
2886
2887/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
2888/// for details.
2889pub const REL_MAX: __u16 = 0x0f;
2890pub const REL_CNT: usize = REL_MAX as usize + 1;
2891
2892/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
2893/// for details.
2894pub const ABS_MAX: __u16 = 0x3f;
2895pub const ABS_CNT: usize = ABS_MAX as usize + 1;
2896
2897/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
2898/// for details.
2899pub const SW_MAX: __u16 = 0x11;
2900pub const SW_CNT: usize = SW_MAX as usize + 1;
2901
2902/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
2903/// for details.
2904pub const MSC_MAX: __u16 = 0x07;
2905pub const MSC_CNT: usize = MSC_MAX as usize + 1;
2906
2907/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
2908/// for details.
2909pub const LED_MAX: __u16 = 0x0f;
2910pub const LED_CNT: usize = LED_MAX as usize + 1;
2911
2912/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
2913/// for details.
2914pub const REP_MAX: __u16 = 0x01;
2915pub const REP_CNT: usize = REP_MAX as usize + 1;
2916
2917/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
2918/// for details.
2919pub const SND_MAX: __u16 = 0x07;
2920pub const SND_CNT: usize = SND_MAX as usize + 1;
2921
2922// linux/uinput.h
2923pub const UINPUT_VERSION: c_uint = 5;
2924pub const UINPUT_MAX_NAME_SIZE: usize = 80;
2925
2926// uapi/linux/fanotify.h
2927pub const FAN_ACCESS: u64 = 0x0000_0001;
2928pub const FAN_MODIFY: u64 = 0x0000_0002;
2929pub const FAN_ATTRIB: u64 = 0x0000_0004;
2930pub const FAN_CLOSE_WRITE: u64 = 0x0000_0008;
2931pub const FAN_CLOSE_NOWRITE: u64 = 0x0000_0010;
2932pub const FAN_OPEN: u64 = 0x0000_0020;
2933pub const FAN_MOVED_FROM: u64 = 0x0000_0040;
2934pub const FAN_MOVED_TO: u64 = 0x0000_0080;
2935pub const FAN_CREATE: u64 = 0x0000_0100;
2936pub const FAN_DELETE: u64 = 0x0000_0200;
2937pub const FAN_DELETE_SELF: u64 = 0x0000_0400;
2938pub const FAN_MOVE_SELF: u64 = 0x0000_0800;
2939pub const FAN_OPEN_EXEC: u64 = 0x0000_1000;
2940
2941pub const FAN_Q_OVERFLOW: u64 = 0x0000_4000;
2942pub const FAN_FS_ERROR: u64 = 0x0000_8000;
2943
2944pub const FAN_OPEN_PERM: u64 = 0x0001_0000;
2945pub const FAN_ACCESS_PERM: u64 = 0x0002_0000;
2946pub const FAN_OPEN_EXEC_PERM: u64 = 0x0004_0000;
2947
2948pub const FAN_EVENT_ON_CHILD: u64 = 0x0800_0000;
2949
2950pub const FAN_RENAME: u64 = 0x1000_0000;
2951
2952pub const FAN_ONDIR: u64 = 0x4000_0000;
2953
2954pub const FAN_CLOSE: u64 = FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE;
2955pub const FAN_MOVE: u64 = FAN_MOVED_FROM | FAN_MOVED_TO;
2956
2957pub const FAN_CLOEXEC: c_uint = 0x0000_0001;
2958pub const FAN_NONBLOCK: c_uint = 0x0000_0002;
2959
2960pub const FAN_CLASS_NOTIF: c_uint = 0x0000_0000;
2961pub const FAN_CLASS_CONTENT: c_uint = 0x0000_0004;
2962pub const FAN_CLASS_PRE_CONTENT: c_uint = 0x0000_0008;
2963
2964pub const FAN_UNLIMITED_QUEUE: c_uint = 0x0000_0010;
2965pub const FAN_UNLIMITED_MARKS: c_uint = 0x0000_0020;
2966pub const FAN_ENABLE_AUDIT: c_uint = 0x0000_0040;
2967
2968pub const FAN_REPORT_PIDFD: c_uint = 0x0000_0080;
2969pub const FAN_REPORT_TID: c_uint = 0x0000_0100;
2970pub const FAN_REPORT_FID: c_uint = 0x0000_0200;
2971pub const FAN_REPORT_DIR_FID: c_uint = 0x0000_0400;
2972pub const FAN_REPORT_NAME: c_uint = 0x0000_0800;
2973pub const FAN_REPORT_TARGET_FID: c_uint = 0x0000_1000;
2974
2975pub const FAN_REPORT_DFID_NAME: c_uint = FAN_REPORT_DIR_FID | FAN_REPORT_NAME;
2976pub const FAN_REPORT_DFID_NAME_TARGET: c_uint =
2977    FAN_REPORT_DFID_NAME | FAN_REPORT_FID | FAN_REPORT_TARGET_FID;
2978
2979pub const FAN_MARK_ADD: c_uint = 0x0000_0001;
2980pub const FAN_MARK_REMOVE: c_uint = 0x0000_0002;
2981pub const FAN_MARK_DONT_FOLLOW: c_uint = 0x0000_0004;
2982pub const FAN_MARK_ONLYDIR: c_uint = 0x0000_0008;
2983pub const FAN_MARK_IGNORED_MASK: c_uint = 0x0000_0020;
2984pub const FAN_MARK_IGNORED_SURV_MODIFY: c_uint = 0x0000_0040;
2985pub const FAN_MARK_FLUSH: c_uint = 0x0000_0080;
2986pub const FAN_MARK_EVICTABLE: c_uint = 0x0000_0200;
2987pub const FAN_MARK_IGNORE: c_uint = 0x0000_0400;
2988
2989pub const FAN_MARK_INODE: c_uint = 0x0000_0000;
2990pub const FAN_MARK_MOUNT: c_uint = 0x0000_0010;
2991pub const FAN_MARK_FILESYSTEM: c_uint = 0x0000_0100;
2992
2993pub const FAN_MARK_IGNORE_SURV: c_uint = FAN_MARK_IGNORE | FAN_MARK_IGNORED_SURV_MODIFY;
2994
2995pub const FANOTIFY_METADATA_VERSION: u8 = 3;
2996
2997pub const FAN_EVENT_INFO_TYPE_FID: u8 = 1;
2998pub const FAN_EVENT_INFO_TYPE_DFID_NAME: u8 = 2;
2999pub const FAN_EVENT_INFO_TYPE_DFID: u8 = 3;
3000pub const FAN_EVENT_INFO_TYPE_PIDFD: u8 = 4;
3001pub const FAN_EVENT_INFO_TYPE_ERROR: u8 = 5;
3002
3003pub const FAN_EVENT_INFO_TYPE_OLD_DFID_NAME: u8 = 10;
3004pub const FAN_EVENT_INFO_TYPE_NEW_DFID_NAME: u8 = 12;
3005
3006pub const FAN_RESPONSE_INFO_NONE: u8 = 0;
3007pub const FAN_RESPONSE_INFO_AUDIT_RULE: u8 = 1;
3008
3009pub const FAN_ALLOW: u32 = 0x01;
3010pub const FAN_DENY: u32 = 0x02;
3011pub const FAN_AUDIT: u32 = 0x10;
3012pub const FAN_INFO: u32 = 0x20;
3013
3014pub const FAN_NOFD: c_int = -1;
3015pub const FAN_NOPIDFD: c_int = FAN_NOFD;
3016pub const FAN_EPIDFD: c_int = -2;
3017
3018// linux/kexec.h
3019pub const KEXEC_ON_CRASH: c_int = 0x00000001;
3020pub const KEXEC_PRESERVE_CONTEXT: c_int = 0x00000002;
3021pub const KEXEC_ARCH_MASK: c_int = u32_cast_int(0xffff0000);
3022pub const KEXEC_FILE_UNLOAD: c_int = 0x00000001;
3023pub const KEXEC_FILE_ON_CRASH: c_int = 0x00000002;
3024pub const KEXEC_FILE_NO_INITRAMFS: c_int = 0x00000004;
3025
3026// linux/reboot.h
3027pub const LINUX_REBOOT_MAGIC1: c_int = u32_cast_int(0xfee1dead);
3028pub const LINUX_REBOOT_MAGIC2: c_int = 672274793;
3029pub const LINUX_REBOOT_MAGIC2A: c_int = 85072278;
3030pub const LINUX_REBOOT_MAGIC2B: c_int = 369367448;
3031pub const LINUX_REBOOT_MAGIC2C: c_int = 537993216;
3032
3033pub const LINUX_REBOOT_CMD_RESTART: c_int = 0x01234567;
3034pub const LINUX_REBOOT_CMD_HALT: c_int = u32_cast_int(0xCDEF0123);
3035pub const LINUX_REBOOT_CMD_CAD_ON: c_int = u32_cast_int(0x89ABCDEF);
3036pub const LINUX_REBOOT_CMD_CAD_OFF: c_int = 0x00000000;
3037pub const LINUX_REBOOT_CMD_POWER_OFF: c_int = 0x4321FEDC;
3038pub const LINUX_REBOOT_CMD_RESTART2: c_int = u32_cast_int(0xA1B2C3D4);
3039pub const LINUX_REBOOT_CMD_SW_SUSPEND: c_int = u32_cast_int(0xD000FCE2);
3040pub const LINUX_REBOOT_CMD_KEXEC: c_int = 0x45584543;
3041
3042// linux/errqueue.h
3043pub const SO_EE_ORIGIN_NONE: u8 = 0;
3044pub const SO_EE_ORIGIN_LOCAL: u8 = 1;
3045pub const SO_EE_ORIGIN_ICMP: u8 = 2;
3046pub const SO_EE_ORIGIN_ICMP6: u8 = 3;
3047pub const SO_EE_ORIGIN_TXSTATUS: u8 = 4;
3048pub const SO_EE_ORIGIN_TIMESTAMPING: u8 = SO_EE_ORIGIN_TXSTATUS;
3049
3050/* DCCP socket options */
3051pub const DCCP_SOCKOPT_PACKET_SIZE: c_int = 1;
3052pub const DCCP_SOCKOPT_SERVICE: c_int = 2;
3053pub const DCCP_SOCKOPT_CHANGE_L: c_int = 3;
3054pub const DCCP_SOCKOPT_CHANGE_R: c_int = 4;
3055pub const DCCP_SOCKOPT_GET_CUR_MPS: c_int = 5;
3056pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: c_int = 6;
3057pub const DCCP_SOCKOPT_SEND_CSCOV: c_int = 10;
3058pub const DCCP_SOCKOPT_RECV_CSCOV: c_int = 11;
3059pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: c_int = 12;
3060pub const DCCP_SOCKOPT_CCID: c_int = 13;
3061pub const DCCP_SOCKOPT_TX_CCID: c_int = 14;
3062pub const DCCP_SOCKOPT_RX_CCID: c_int = 15;
3063pub const DCCP_SOCKOPT_QPOLICY_ID: c_int = 16;
3064pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: c_int = 17;
3065pub const DCCP_SOCKOPT_CCID_RX_INFO: c_int = 128;
3066pub const DCCP_SOCKOPT_CCID_TX_INFO: c_int = 192;
3067
3068/// maximum number of services provided on the same listening port
3069pub const DCCP_SERVICE_LIST_MAX_LEN: c_int = 32;
3070
3071pub const CTL_KERN: c_int = 1;
3072pub const CTL_VM: c_int = 2;
3073pub const CTL_NET: c_int = 3;
3074pub const CTL_FS: c_int = 5;
3075pub const CTL_DEBUG: c_int = 6;
3076pub const CTL_DEV: c_int = 7;
3077pub const CTL_BUS: c_int = 8;
3078pub const CTL_ABI: c_int = 9;
3079pub const CTL_CPU: c_int = 10;
3080
3081pub const CTL_BUS_ISA: c_int = 1;
3082
3083pub const INOTIFY_MAX_USER_INSTANCES: c_int = 1;
3084pub const INOTIFY_MAX_USER_WATCHES: c_int = 2;
3085pub const INOTIFY_MAX_QUEUED_EVENTS: c_int = 3;
3086
3087pub const KERN_OSTYPE: c_int = 1;
3088pub const KERN_OSRELEASE: c_int = 2;
3089pub const KERN_OSREV: c_int = 3;
3090pub const KERN_VERSION: c_int = 4;
3091pub const KERN_SECUREMASK: c_int = 5;
3092pub const KERN_PROF: c_int = 6;
3093pub const KERN_NODENAME: c_int = 7;
3094pub const KERN_DOMAINNAME: c_int = 8;
3095pub const KERN_PANIC: c_int = 15;
3096pub const KERN_SPARC_REBOOT: c_int = 21;
3097pub const KERN_CTLALTDEL: c_int = 22;
3098pub const KERN_PRINTK: c_int = 23;
3099pub const KERN_NAMETRANS: c_int = 24;
3100pub const KERN_PPC_HTABRECLAIM: c_int = 25;
3101pub const KERN_PPC_ZEROPAGED: c_int = 26;
3102pub const KERN_PPC_POWERSAVE_NAP: c_int = 27;
3103pub const KERN_MODPROBE: c_int = 28;
3104pub const KERN_SG_BIG_BUFF: c_int = 29;
3105pub const KERN_ACCT: c_int = 30;
3106pub const KERN_PPC_L2CR: c_int = 31;
3107pub const KERN_RTSIGNR: c_int = 32;
3108pub const KERN_RTSIGMAX: c_int = 33;
3109pub const KERN_SHMMAX: c_int = 34;
3110pub const KERN_MSGMAX: c_int = 35;
3111pub const KERN_MSGMNB: c_int = 36;
3112pub const KERN_MSGPOOL: c_int = 37;
3113pub const KERN_SYSRQ: c_int = 38;
3114pub const KERN_MAX_THREADS: c_int = 39;
3115pub const KERN_RANDOM: c_int = 40;
3116pub const KERN_SHMALL: c_int = 41;
3117pub const KERN_MSGMNI: c_int = 42;
3118pub const KERN_SEM: c_int = 43;
3119pub const KERN_SPARC_STOP_A: c_int = 44;
3120pub const KERN_SHMMNI: c_int = 45;
3121pub const KERN_OVERFLOWUID: c_int = 46;
3122pub const KERN_OVERFLOWGID: c_int = 47;
3123pub const KERN_SHMPATH: c_int = 48;
3124pub const KERN_HOTPLUG: c_int = 49;
3125pub const KERN_IEEE_EMULATION_WARNINGS: c_int = 50;
3126pub const KERN_S390_USER_DEBUG_LOGGING: c_int = 51;
3127pub const KERN_CORE_USES_PID: c_int = 52;
3128pub const KERN_TAINTED: c_int = 53;
3129pub const KERN_CADPID: c_int = 54;
3130
3131/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
3132/// for details.
3133pub const KERN_PIDMAX: c_int = 55;
3134
3135pub const KERN_CORE_PATTERN: c_int = 56;
3136pub const KERN_PANIC_ON_OOPS: c_int = 57;
3137pub const KERN_HPPA_PWRSW: c_int = 58;
3138pub const KERN_HPPA_UNALIGNED: c_int = 59;
3139pub const KERN_PRINTK_RATELIMIT: c_int = 60;
3140pub const KERN_PRINTK_RATELIMIT_BURST: c_int = 61;
3141pub const KERN_PTY: c_int = 62;
3142
3143/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines)
3144/// for details.
3145pub const KERN_NGROUPS_MAX: c_int = 63;
3146
3147pub const KERN_SPARC_SCONS_PWROFF: c_int = 64;
3148pub const KERN_HZ_TIMER: c_int = 65;
3149pub const KERN_UNKNOWN_NMI_PANIC: c_int = 66;
3150pub const KERN_BOOTLOADER_TYPE: c_int = 67;
3151pub const KERN_RANDOMIZE: c_int = 68;
3152pub const KERN_SETUID_DUMPABLE: c_int = 69;
3153pub const KERN_SPIN_RETRY: c_int = 70;
3154pub const KERN_ACPI_VIDEO_FLAGS: c_int = 71;
3155pub const KERN_IA64_UNALIGNED: c_int = 72;
3156pub const KERN_COMPAT_LOG: c_int = 73;
3157pub const KERN_MAX_LOCK_DEPTH: c_int = 74;
3158pub const KERN_NMI_WATCHDOG: c_int = 75;
3159pub const KERN_PANIC_ON_NMI: c_int = 76;
3160
3161pub const VM_OVERCOMMIT_MEMORY: c_int = 5;
3162pub const VM_PAGE_CLUSTER: c_int = 10;
3163pub const VM_DIRTY_BACKGROUND: c_int = 11;
3164pub const VM_DIRTY_RATIO: c_int = 12;
3165pub const VM_DIRTY_WB_CS: c_int = 13;
3166pub const VM_DIRTY_EXPIRE_CS: c_int = 14;
3167pub const VM_NR_PDFLUSH_THREADS: c_int = 15;
3168pub const VM_OVERCOMMIT_RATIO: c_int = 16;
3169pub const VM_PAGEBUF: c_int = 17;
3170pub const VM_HUGETLB_PAGES: c_int = 18;
3171pub const VM_SWAPPINESS: c_int = 19;
3172pub const VM_LOWMEM_RESERVE_RATIO: c_int = 20;
3173pub const VM_MIN_FREE_KBYTES: c_int = 21;
3174pub const VM_MAX_MAP_COUNT: c_int = 22;
3175pub const VM_BLOCK_DUMP: c_int = 24;
3176pub const VM_HUGETLB_GROUP: c_int = 25;
3177pub const VM_VFS_CACHE_PRESSURE: c_int = 26;
3178pub const VM_LEGACY_VA_LAYOUT: c_int = 27;
3179pub const VM_SWAP_TOKEN_TIMEOUT: c_int = 28;
3180pub const VM_DROP_PAGECACHE: c_int = 29;
3181pub const VM_PERCPU_PAGELIST_FRACTION: c_int = 30;
3182pub const VM_ZONE_RECLAIM_MODE: c_int = 31;
3183pub const VM_MIN_UNMAPPED: c_int = 32;
3184pub const VM_PANIC_ON_OOM: c_int = 33;
3185pub const VM_VDSO_ENABLED: c_int = 34;
3186pub const VM_MIN_SLAB: c_int = 35;
3187
3188pub const NET_CORE: c_int = 1;
3189pub const NET_ETHER: c_int = 2;
3190pub const NET_802: c_int = 3;
3191pub const NET_UNIX: c_int = 4;
3192pub const NET_IPV4: c_int = 5;
3193pub const NET_IPX: c_int = 6;
3194pub const NET_ATALK: c_int = 7;
3195pub const NET_NETROM: c_int = 8;
3196pub const NET_AX25: c_int = 9;
3197pub const NET_BRIDGE: c_int = 10;
3198pub const NET_ROSE: c_int = 11;
3199pub const NET_IPV6: c_int = 12;
3200pub const NET_X25: c_int = 13;
3201pub const NET_TR: c_int = 14;
3202pub const NET_DECNET: c_int = 15;
3203pub const NET_ECONET: c_int = 16;
3204pub const NET_SCTP: c_int = 17;
3205pub const NET_LLC: c_int = 18;
3206pub const NET_NETFILTER: c_int = 19;
3207pub const NET_DCCP: c_int = 20;
3208pub const NET_IRDA: c_int = 412;
3209
3210// include/linux/sched.h
3211/// I'm a virtual CPU.
3212pub const PF_VCPU: c_int = 0x00000001;
3213/// I am an IDLE thread.
3214pub const PF_IDLE: c_int = 0x00000002;
3215/// Getting shut down.
3216pub const PF_EXITING: c_int = 0x00000004;
3217/// Coredumps should ignore this task.
3218pub const PF_POSTCOREDUMP: c_int = 0x00000008;
3219/// Task is an IO worker.
3220pub const PF_IO_WORKER: c_int = 0x00000010;
3221/// I'm a workqueue worker.
3222pub const PF_WQ_WORKER: c_int = 0x00000020;
3223/// Forked but didn't exec.
3224pub const PF_FORKNOEXEC: c_int = 0x00000040;
3225/// Process policy on mce errors.
3226pub const PF_MCE_PROCESS: c_int = 0x00000080;
3227/// Used super-user privileges.
3228pub const PF_SUPERPRIV: c_int = 0x00000100;
3229/// Dumped core.
3230pub const PF_DUMPCORE: c_int = 0x00000200;
3231/// Killed by a signal.
3232pub const PF_SIGNALED: c_int = 0x00000400;
3233/// Allocating memory to free memory.
3234///
3235/// See `memalloc_noreclaim_save()`.
3236pub const PF_MEMALLOC: c_int = 0x00000800;
3237/// `set_user()` noticed that `RLIMIT_NPROC` was exceeded.
3238pub const PF_NPROC_EXCEEDED: c_int = 0x00001000;
3239/// If unset the fpu must be initialized before use.
3240pub const PF_USED_MATH: c_int = 0x00002000;
3241/// Kernel thread cloned from userspace thread.
3242pub const PF_USER_WORKER: c_int = 0x00004000;
3243/// This thread should not be frozen.
3244pub const PF_NOFREEZE: c_int = 0x00008000;
3245/// I am `kswapd`.
3246pub const PF_KSWAPD: c_int = 0x00020000;
3247/// All allocations inherit `GFP_NOFS`.
3248///
3249/// See `memalloc_nfs_save()`.
3250pub const PF_MEMALLOC_NOFS: c_int = 0x00040000;
3251/// All allocations inherit `GFP_NOIO`.
3252///
3253/// See `memalloc_noio_save()`.
3254pub const PF_MEMALLOC_NOIO: c_int = 0x00080000;
3255/// Throttle writes only against the bdi I write to, I am cleaning
3256/// dirty pages from some other bdi.
3257pub const PF_LOCAL_THROTTLE: c_int = 0x00100000;
3258/// I am a kernel thread.
3259pub const PF_KTHREAD: c_int = 0x00200000;
3260/// Randomize virtual address space.
3261pub const PF_RANDOMIZE: c_int = 0x00400000;
3262/// Userland is not allowed to meddle with `cpus_mask`.
3263pub const PF_NO_SETAFFINITY: c_int = 0x04000000;
3264/// Early kill for mce process policy.
3265pub const PF_MCE_EARLY: c_int = 0x08000000;
3266/// Allocations constrained to zones which allow long term pinning.
3267///
3268/// See `memalloc_pin_save()`.
3269pub const PF_MEMALLOC_PIN: c_int = 0x10000000;
3270/// Plug has ts that needs updating.
3271pub const PF_BLOCK_TS: c_int = 0x20000000;
3272/// This thread called `freeze_processes()` and should not be frozen.
3273pub const PF_SUSPEND_TASK: c_int = u32_cast_int(PF_SUSPEND_TASK_UINT);
3274// The used value is the highest possible bit fitting on 32 bits, so directly
3275// defining it as a signed integer causes the compiler to report an overflow.
3276// Use instead a private intermediary that assuringly has the correct type and
3277// cast it where necessary to the wanted final type, which preserves the
3278// desired information as-is in terms of integer representation.
3279const PF_SUSPEND_TASK_UINT: c_uint = 0x80000000;
3280
3281pub const CLONE_PIDFD: c_int = 0x1000;
3282
3283pub const SCHED_FLAG_RESET_ON_FORK: c_int = 0x01;
3284pub const SCHED_FLAG_RECLAIM: c_int = 0x02;
3285pub const SCHED_FLAG_DL_OVERRUN: c_int = 0x04;
3286pub const SCHED_FLAG_KEEP_POLICY: c_int = 0x08;
3287pub const SCHED_FLAG_KEEP_PARAMS: c_int = 0x10;
3288pub const SCHED_FLAG_UTIL_CLAMP_MIN: c_int = 0x20;
3289pub const SCHED_FLAG_UTIL_CLAMP_MAX: c_int = 0x40;
3290
3291// linux/if_xdp.h
3292pub const XDP_SHARED_UMEM: crate::__u16 = 1 << 0;
3293pub const XDP_COPY: crate::__u16 = 1 << 1;
3294pub const XDP_ZEROCOPY: crate::__u16 = 1 << 2;
3295pub const XDP_USE_NEED_WAKEUP: crate::__u16 = 1 << 3;
3296pub const XDP_USE_SG: crate::__u16 = 1 << 4;
3297
3298pub const XDP_UMEM_UNALIGNED_CHUNK_FLAG: crate::__u32 = 1 << 0;
3299
3300pub const XDP_RING_NEED_WAKEUP: crate::__u32 = 1 << 0;
3301
3302pub const XDP_MMAP_OFFSETS: c_int = 1;
3303pub const XDP_RX_RING: c_int = 2;
3304pub const XDP_TX_RING: c_int = 3;
3305pub const XDP_UMEM_REG: c_int = 4;
3306pub const XDP_UMEM_FILL_RING: c_int = 5;
3307pub const XDP_UMEM_COMPLETION_RING: c_int = 6;
3308pub const XDP_STATISTICS: c_int = 7;
3309pub const XDP_OPTIONS: c_int = 8;
3310
3311pub const XDP_OPTIONS_ZEROCOPY: crate::__u32 = 1 << 0;
3312
3313pub const XDP_PGOFF_RX_RING: crate::off_t = 0;
3314pub const XDP_PGOFF_TX_RING: crate::off_t = 0x80000000u32 as crate::off_t;
3315pub const XDP_UMEM_PGOFF_FILL_RING: c_ulonglong = 0x100000000;
3316pub const XDP_UMEM_PGOFF_COMPLETION_RING: c_ulonglong = 0x180000000;
3317
3318pub const XSK_UNALIGNED_BUF_OFFSET_SHIFT: c_int = 48;
3319pub const XSK_UNALIGNED_BUF_ADDR_MASK: c_ulonglong = (1 << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1;
3320
3321pub const XDP_PKT_CONTD: crate::__u32 = 1 << 0;
3322
3323pub const XDP_UMEM_TX_SW_CSUM: crate::__u32 = 1 << 1;
3324pub const XDP_UMEM_TX_METADATA_LEN: crate::__u32 = 1 << 2;
3325
3326pub const XDP_TXMD_FLAGS_TIMESTAMP: crate::__u32 = 1 << 0;
3327pub const XDP_TXMD_FLAGS_CHECKSUM: crate::__u32 = 1 << 1;
3328
3329pub const XDP_TX_METADATA: crate::__u32 = 1 << 1;
3330
3331pub const SOL_XDP: c_int = 283;
3332
3333pub const SCHED_FLAG_KEEP_ALL: c_int = SCHED_FLAG_KEEP_POLICY | SCHED_FLAG_KEEP_PARAMS;
3334
3335pub const SCHED_FLAG_UTIL_CLAMP: c_int = SCHED_FLAG_UTIL_CLAMP_MIN | SCHED_FLAG_UTIL_CLAMP_MAX;
3336
3337pub const SCHED_FLAG_ALL: c_int = SCHED_FLAG_RESET_ON_FORK
3338    | SCHED_FLAG_RECLAIM
3339    | SCHED_FLAG_DL_OVERRUN
3340    | SCHED_FLAG_KEEP_ALL
3341    | SCHED_FLAG_UTIL_CLAMP;
3342
3343// ioctl_eventpoll: added in Linux 6.9
3344const EPOLL_IOC_TYPE: u32 = 0x8A;
3345pub const EPIOCSPARAMS: Ioctl = _IOW::<epoll_params>(EPOLL_IOC_TYPE, 0x01);
3346pub const EPIOCGPARAMS: Ioctl = _IOR::<epoll_params>(EPOLL_IOC_TYPE, 0x02);
3347
3348// siginfo.h
3349pub const SI_DETHREAD: c_int = -7;
3350pub const TRAP_PERF: c_int = 6;
3351
3352#[inline]
pub unsafe extern "C" fn SUN_LEN(s: crate::sockaddr_un) -> usize {
    ({
            #[allow(clippy :: unneeded_wildcard_pattern)]
            let crate::sockaddr_un { sun_path: _, .. };
            let data = core::mem::MaybeUninit::<crate::sockaddr_un>::uninit();
            let ptr = data.as_ptr();
            #[allow(unused_unsafe)]
            let fptr = unsafe { &raw const (*ptr).sun_path };
            let off = (fptr as usize).checked_sub(ptr as usize).unwrap();
            if !(off <= core::mem::size_of::<crate::sockaddr_un>()) {
                ::core::panicking::panic("assertion failed: off <= core::mem::size_of::<crate::sockaddr_un>()")
            };
            off
        }) + crate::strlen(s.sun_path.as_ptr())
}f! {
3353    pub unsafe fn SO_EE_OFFENDER(ee: *const crate::sock_extended_err) -> *mut crate::sockaddr {
3354        ee.offset(1) as *mut crate::sockaddr
3355    }
3356
3357    pub unsafe fn BPF_CLASS(code: __u32) -> __u32 {
3358        code & 0x07
3359    }
3360
3361    pub unsafe fn BPF_SIZE(code: __u32) -> __u32 {
3362        code & 0x18
3363    }
3364
3365    pub unsafe fn BPF_MODE(code: __u32) -> __u32 {
3366        code & 0xe0
3367    }
3368
3369    pub unsafe fn BPF_OP(code: __u32) -> __u32 {
3370        code & 0xf0
3371    }
3372
3373    pub unsafe fn BPF_SRC(code: __u32) -> __u32 {
3374        code & 0x08
3375    }
3376
3377    pub unsafe fn BPF_RVAL(code: __u32) -> __u32 {
3378        code & 0x18
3379    }
3380
3381    pub unsafe fn BPF_MISCOP(code: __u32) -> __u32 {
3382        code & 0xf8
3383    }
3384
3385    pub unsafe fn BPF_STMT(code: __u16, k: __u32) -> sock_filter {
3386        sock_filter {
3387            code,
3388            jt: 0,
3389            jf: 0,
3390            k,
3391        }
3392    }
3393
3394    pub unsafe fn BPF_JUMP(code: __u16, k: __u32, jt: __u8, jf: __u8) -> sock_filter {
3395        sock_filter { code, jt, jf, k }
3396    }
3397
3398    #[cfg(target_env = "gnu")]
3399    pub unsafe fn SUN_LEN(s: crate::sockaddr_un) -> usize {
3400        offset_of!(crate::sockaddr_un, sun_path) + crate::strlen(s.sun_path.as_ptr())
3401    }
3402
3403    #[cfg(target_env = "musl")]
3404    pub unsafe fn SUN_LEN(s: crate::sockaddr_un) -> usize {
3405        2 * crate::strlen(s.sun_path.as_ptr())
3406    }
3407}
3408
3409// These functions are not available on OpenHarmony
3410cfg_if! {
3411    if #[cfg(not(target_env = "ohos"))] {
3412        extern "C" {
3413            // Only `getspnam_r` is implemented for musl, out of all of the reenterant
3414            // functions from `shadow.h`.
3415            // https://git.musl-libc.org/cgit/musl/tree/include/shadow.h
3416            pub fn getspnam_r(
3417                name: *const c_char,
3418                spbuf: *mut crate::spwd,
3419                buf: *mut c_char,
3420                buflen: size_t,
3421                spbufp: *mut *mut crate::spwd,
3422            ) -> c_int;
3423
3424            pub fn mq_open(name: *const c_char, oflag: c_int, ...) -> mqd_t;
3425            pub fn mq_close(mqd: mqd_t) -> c_int;
3426            pub fn mq_unlink(name: *const c_char) -> c_int;
3427            pub fn mq_receive(
3428                mqd: mqd_t,
3429                msg_ptr: *mut c_char,
3430                msg_len: size_t,
3431                msg_prio: *mut c_uint,
3432            ) -> ssize_t;
3433            #[cfg_attr(
3434                any(gnu_time_bits64, musl_redir_time64),
3435                link_name = "__mq_timedreceive_time64"
3436            )]
3437            pub fn mq_timedreceive(
3438                mqd: mqd_t,
3439                msg_ptr: *mut c_char,
3440                msg_len: size_t,
3441                msg_prio: *mut c_uint,
3442                abs_timeout: *const crate::timespec,
3443            ) -> ssize_t;
3444            pub fn mq_send(
3445                mqd: mqd_t,
3446                msg_ptr: *const c_char,
3447                msg_len: size_t,
3448                msg_prio: c_uint,
3449            ) -> c_int;
3450            #[cfg_attr(
3451                any(gnu_time_bits64, musl_redir_time64),
3452                link_name = "__mq_timedsend_time64"
3453            )]
3454            pub fn mq_timedsend(
3455                mqd: mqd_t,
3456                msg_ptr: *const c_char,
3457                msg_len: size_t,
3458                msg_prio: c_uint,
3459                abs_timeout: *const crate::timespec,
3460            ) -> c_int;
3461            pub fn mq_getattr(mqd: mqd_t, attr: *mut crate::mq_attr) -> c_int;
3462            pub fn mq_setattr(
3463                mqd: mqd_t,
3464                newattr: *const crate::mq_attr,
3465                oldattr: *mut crate::mq_attr,
3466            ) -> c_int;
3467        }
3468    }
3469}
3470
3471extern "C" {
3472    pub fn mrand48() -> c_long;
3473    pub fn seed48(xseed: *mut c_ushort) -> *mut c_ushort;
3474    pub fn lcong48(p: *mut c_ushort);
3475
3476    #[cfg_attr(gnu_time_bits64, link_name = "__lutimes64")]
3477    #[cfg_attr(musl_redir_time64, link_name = "__lutimes_time64")]
3478    pub fn lutimes(file: *const c_char, times: *const crate::timeval) -> c_int;
3479
3480    pub fn shm_open(name: *const c_char, oflag: c_int, mode: mode_t) -> c_int;
3481    pub fn shm_unlink(name: *const c_char) -> c_int;
3482
3483    // System V IPC
3484    pub fn ftok(pathname: *const c_char, proj_id: c_int) -> crate::key_t;
3485    pub fn semget(key: crate::key_t, nsems: c_int, semflag: c_int) -> c_int;
3486    pub fn semop(semid: c_int, sops: *mut crate::sembuf, nsops: size_t) -> c_int;
3487    #[cfg_attr(gnu_time_bits64, link_name = "__semctl64")]
3488    pub fn semctl(semid: c_int, semnum: c_int, cmd: c_int, ...) -> c_int;
3489    #[cfg_attr(gnu_time_bits64, link_name = "__msgctl64")]
3490    pub fn msgctl(msqid: c_int, cmd: c_int, buf: *mut msqid_ds) -> c_int;
3491    pub fn msgget(key: crate::key_t, msgflg: c_int) -> c_int;
3492    pub fn msgrcv(
3493        msqid: c_int,
3494        msgp: *mut c_void,
3495        msgsz: size_t,
3496        msgtyp: c_long,
3497        msgflg: c_int,
3498    ) -> ssize_t;
3499    pub fn msgsnd(msqid: c_int, msgp: *const c_void, msgsz: size_t, msgflg: c_int) -> c_int;
3500
3501    #[cfg_attr(gnu_file_offset_bits64, link_name = "fallocate64")]
3502    pub fn fallocate(fd: c_int, mode: c_int, offset: off_t, len: off_t) -> c_int;
3503    #[cfg_attr(gnu_file_offset_bits64, link_name = "posix_fallocate64")]
3504    pub fn posix_fallocate(fd: c_int, offset: off_t, len: off_t) -> c_int;
3505    #[cfg(not(any(target_env = "musl", target_env = "ohos")))]
3506    pub fn readahead(fd: c_int, offset: off64_t, count: size_t) -> ssize_t;
3507    #[cfg(any(target_env = "musl", target_env = "ohos"))]
3508    pub fn readahead(fd: c_int, offset: off_t, count: size_t) -> ssize_t;
3509    pub fn getxattr(
3510        path: *const c_char,
3511        name: *const c_char,
3512        value: *mut c_void,
3513        size: size_t,
3514    ) -> ssize_t;
3515    pub fn lgetxattr(
3516        path: *const c_char,
3517        name: *const c_char,
3518        value: *mut c_void,
3519        size: size_t,
3520    ) -> ssize_t;
3521    pub fn fgetxattr(
3522        filedes: c_int,
3523        name: *const c_char,
3524        value: *mut c_void,
3525        size: size_t,
3526    ) -> ssize_t;
3527    pub fn setxattr(
3528        path: *const c_char,
3529        name: *const c_char,
3530        value: *const c_void,
3531        size: size_t,
3532        flags: c_int,
3533    ) -> c_int;
3534    pub fn lsetxattr(
3535        path: *const c_char,
3536        name: *const c_char,
3537        value: *const c_void,
3538        size: size_t,
3539        flags: c_int,
3540    ) -> c_int;
3541    pub fn fsetxattr(
3542        filedes: c_int,
3543        name: *const c_char,
3544        value: *const c_void,
3545        size: size_t,
3546        flags: c_int,
3547    ) -> c_int;
3548    pub fn listxattr(path: *const c_char, list: *mut c_char, size: size_t) -> ssize_t;
3549    pub fn llistxattr(path: *const c_char, list: *mut c_char, size: size_t) -> ssize_t;
3550    pub fn flistxattr(filedes: c_int, list: *mut c_char, size: size_t) -> ssize_t;
3551    pub fn removexattr(path: *const c_char, name: *const c_char) -> c_int;
3552    pub fn lremovexattr(path: *const c_char, name: *const c_char) -> c_int;
3553    pub fn fremovexattr(filedes: c_int, name: *const c_char) -> c_int;
3554    pub fn signalfd(fd: c_int, mask: *const crate::sigset_t, flags: c_int) -> c_int;
3555    pub fn timerfd_create(clockid: crate::clockid_t, flags: c_int) -> c_int;
3556    #[cfg_attr(
3557        any(gnu_time_bits64, musl_redir_time64),
3558        link_name = "__timerfd_gettime64"
3559    )]
3560    pub fn timerfd_gettime(fd: c_int, curr_value: *mut crate::itimerspec) -> c_int;
3561    #[cfg_attr(
3562        any(gnu_time_bits64, musl_redir_time64),
3563        link_name = "__timerfd_settime64"
3564    )]
3565    pub fn timerfd_settime(
3566        fd: c_int,
3567        flags: c_int,
3568        new_value: *const crate::itimerspec,
3569        old_value: *mut crate::itimerspec,
3570    ) -> c_int;
3571    pub fn quotactl(cmd: c_int, special: *const c_char, id: c_int, data: *mut c_char) -> c_int;
3572    pub fn epoll_pwait(
3573        epfd: c_int,
3574        events: *mut crate::epoll_event,
3575        maxevents: c_int,
3576        timeout: c_int,
3577        sigmask: *const crate::sigset_t,
3578    ) -> c_int;
3579    pub fn dup3(oldfd: c_int, newfd: c_int, flags: c_int) -> c_int;
3580    #[cfg_attr(gnu_time_bits64, link_name = "__sigtimedwait64")]
3581    #[cfg_attr(musl_redir_time64, link_name = "__sigtimedwait_time64")]
3582    pub fn sigtimedwait(
3583        set: *const sigset_t,
3584        info: *mut crate::siginfo_t,
3585        timeout: *const crate::timespec,
3586    ) -> c_int;
3587    pub fn sigwaitinfo(set: *const sigset_t, info: *mut crate::siginfo_t) -> c_int;
3588    pub fn accept4(fd: c_int, addr: *mut crate::sockaddr, len: *mut socklen_t, flg: c_int)
3589        -> c_int;
3590    pub fn reboot(how_to: c_int) -> c_int;
3591    pub fn setfsgid(gid: crate::gid_t) -> c_int;
3592    pub fn setfsuid(uid: crate::uid_t) -> c_int;
3593
3594    // Not available now on Android
3595    pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int;
3596    #[cfg(not(any(target_env = "musl", target_env = "ohos")))]
3597    pub fn sync_file_range(fd: c_int, offset: off64_t, nbytes: off64_t, flags: c_uint) -> c_int;
3598    #[cfg(any(target_env = "musl", target_env = "ohos"))]
3599    pub fn sync_file_range(fd: c_int, offset: off_t, nbytes: off_t, flags: c_uint) -> c_int;
3600
3601    pub fn posix_madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int;
3602
3603    pub fn mremap(
3604        addr: *mut c_void,
3605        len: size_t,
3606        new_len: size_t,
3607        flags: c_int,
3608        ...
3609    ) -> *mut c_void;
3610    pub fn remap_file_pages(
3611        addr: *mut c_void,
3612        size: size_t,
3613        prot: c_int,
3614        pgoff: size_t,
3615        flags: c_int,
3616    ) -> c_int;
3617    #[cfg_attr(gnu_file_offset_bits64, link_name = "mkstemps64")]
3618    pub fn mkstemps(template: *mut c_char, suffixlen: c_int) -> c_int;
3619
3620    pub fn vhangup() -> c_int;
3621    pub fn sync();
3622    pub fn syncfs(fd: c_int) -> c_int;
3623    pub fn syscall(num: c_long, ...) -> c_long;
3624    pub fn sched_setaffinity(
3625        pid: crate::pid_t,
3626        cpusetsize: size_t,
3627        cpuset: *const crate::cpu_set_t,
3628    ) -> c_int;
3629    pub fn epoll_create(size: c_int) -> c_int;
3630    pub fn epoll_create1(flags: c_int) -> c_int;
3631    pub fn epoll_wait(
3632        epfd: c_int,
3633        events: *mut crate::epoll_event,
3634        maxevents: c_int,
3635        timeout: c_int,
3636    ) -> c_int;
3637    pub fn epoll_ctl(epfd: c_int, op: c_int, fd: c_int, event: *mut crate::epoll_event) -> c_int;
3638    pub fn unshare(flags: c_int) -> c_int;
3639    pub fn umount(target: *const c_char) -> c_int;
3640    pub fn tee(fd_in: c_int, fd_out: c_int, len: size_t, flags: c_uint) -> ssize_t;
3641    pub fn splice(
3642        fd_in: c_int,
3643        off_in: *mut loff_t,
3644        fd_out: c_int,
3645        off_out: *mut loff_t,
3646        len: size_t,
3647        flags: c_uint,
3648    ) -> ssize_t;
3649    pub fn eventfd(initval: c_uint, flags: c_int) -> c_int;
3650    pub fn eventfd_read(fd: c_int, value: *mut eventfd_t) -> c_int;
3651    pub fn eventfd_write(fd: c_int, value: eventfd_t) -> c_int;
3652
3653    #[cfg_attr(gnu_time_bits64, link_name = "__sched_rr_get_interval64")]
3654    #[cfg_attr(musl_redir_time64, link_name = "__sched_rr_get_interval_time64")]
3655    pub fn sched_rr_get_interval(pid: crate::pid_t, tp: *mut crate::timespec) -> c_int;
3656    pub fn sched_setparam(pid: crate::pid_t, param: *const crate::sched_param) -> c_int;
3657    pub fn setns(fd: c_int, nstype: c_int) -> c_int;
3658    pub fn swapoff(path: *const c_char) -> c_int;
3659    pub fn vmsplice(fd: c_int, iov: *const crate::iovec, nr_segs: size_t, flags: c_uint)
3660        -> ssize_t;
3661    pub fn personality(persona: c_ulong) -> c_int;
3662    pub fn sched_getparam(pid: crate::pid_t, param: *mut crate::sched_param) -> c_int;
3663    pub fn clone(
3664        cb: extern "C" fn(*mut c_void) -> c_int,
3665        child_stack: *mut c_void,
3666        flags: c_int,
3667        arg: *mut c_void,
3668        ...
3669    ) -> c_int;
3670    pub fn sched_getscheduler(pid: crate::pid_t) -> c_int;
3671    #[cfg_attr(
3672        any(gnu_time_bits64, musl_redir_time64),
3673        link_name = "__clock_nanosleep_time64"
3674    )]
3675    pub fn clock_nanosleep(
3676        clk_id: crate::clockid_t,
3677        flags: c_int,
3678        rqtp: *const crate::timespec,
3679        rmtp: *mut crate::timespec,
3680    ) -> c_int;
3681    pub fn umount2(target: *const c_char, flags: c_int) -> c_int;
3682    pub fn swapon(path: *const c_char, swapflags: c_int) -> c_int;
3683    pub fn sched_setscheduler(
3684        pid: crate::pid_t,
3685        policy: c_int,
3686        param: *const crate::sched_param,
3687    ) -> c_int;
3688    #[cfg_attr(gnu_file_offset_bits64, link_name = "sendfile64")]
3689    pub fn sendfile(out_fd: c_int, in_fd: c_int, offset: *mut off_t, count: size_t) -> ssize_t;
3690    pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> c_int;
3691    pub fn getdtablesize() -> c_int;
3692    pub fn getgrouplist(
3693        user: *const c_char,
3694        group: crate::gid_t,
3695        groups: *mut crate::gid_t,
3696        ngroups: *mut c_int,
3697    ) -> c_int;
3698    pub fn posix_spawn(
3699        pid: *mut crate::pid_t,
3700        path: *const c_char,
3701        file_actions: *const crate::posix_spawn_file_actions_t,
3702        attrp: *const crate::posix_spawnattr_t,
3703        argv: *const *mut c_char,
3704        envp: *const *mut c_char,
3705    ) -> c_int;
3706    pub fn posix_spawnp(
3707        pid: *mut crate::pid_t,
3708        file: *const c_char,
3709        file_actions: *const crate::posix_spawn_file_actions_t,
3710        attrp: *const crate::posix_spawnattr_t,
3711        argv: *const *mut c_char,
3712        envp: *const *mut c_char,
3713    ) -> c_int;
3714    pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> c_int;
3715    pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> c_int;
3716    pub fn posix_spawnattr_getsigdefault(
3717        attr: *const posix_spawnattr_t,
3718        default: *mut crate::sigset_t,
3719    ) -> c_int;
3720    pub fn posix_spawnattr_setsigdefault(
3721        attr: *mut posix_spawnattr_t,
3722        default: *const crate::sigset_t,
3723    ) -> c_int;
3724    pub fn posix_spawnattr_getsigmask(
3725        attr: *const posix_spawnattr_t,
3726        default: *mut crate::sigset_t,
3727    ) -> c_int;
3728    pub fn posix_spawnattr_setsigmask(
3729        attr: *mut posix_spawnattr_t,
3730        default: *const crate::sigset_t,
3731    ) -> c_int;
3732    pub fn posix_spawnattr_getflags(attr: *const posix_spawnattr_t, flags: *mut c_short) -> c_int;
3733    pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: c_short) -> c_int;
3734    pub fn posix_spawnattr_getpgroup(
3735        attr: *const posix_spawnattr_t,
3736        flags: *mut crate::pid_t,
3737    ) -> c_int;
3738    pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: crate::pid_t) -> c_int;
3739    pub fn posix_spawnattr_getschedpolicy(
3740        attr: *const posix_spawnattr_t,
3741        flags: *mut c_int,
3742    ) -> c_int;
3743    pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: c_int) -> c_int;
3744    pub fn posix_spawnattr_getschedparam(
3745        attr: *const posix_spawnattr_t,
3746        param: *mut crate::sched_param,
3747    ) -> c_int;
3748    pub fn posix_spawnattr_setschedparam(
3749        attr: *mut posix_spawnattr_t,
3750        param: *const crate::sched_param,
3751    ) -> c_int;
3752
3753    pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> c_int;
3754    pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> c_int;
3755    pub fn posix_spawn_file_actions_addopen(
3756        actions: *mut posix_spawn_file_actions_t,
3757        fd: c_int,
3758        path: *const c_char,
3759        oflag: c_int,
3760        mode: mode_t,
3761    ) -> c_int;
3762    pub fn posix_spawn_file_actions_addclose(
3763        actions: *mut posix_spawn_file_actions_t,
3764        fd: c_int,
3765    ) -> c_int;
3766    pub fn posix_spawn_file_actions_adddup2(
3767        actions: *mut posix_spawn_file_actions_t,
3768        fd: c_int,
3769        newfd: c_int,
3770    ) -> c_int;
3771    pub fn fread_unlocked(
3772        buf: *mut c_void,
3773        size: size_t,
3774        nobj: size_t,
3775        stream: *mut crate::FILE,
3776    ) -> size_t;
3777    pub fn inotify_rm_watch(fd: c_int, wd: c_int) -> c_int;
3778    pub fn inotify_init() -> c_int;
3779    pub fn inotify_init1(flags: c_int) -> c_int;
3780    pub fn inotify_add_watch(fd: c_int, path: *const c_char, mask: u32) -> c_int;
3781    pub fn fanotify_init(flags: c_uint, event_f_flags: c_uint) -> c_int;
3782
3783    pub fn gethostid() -> c_long;
3784
3785    pub fn klogctl(syslog_type: c_int, bufp: *mut c_char, len: c_int) -> c_int;
3786
3787    pub fn name_to_handle_at(
3788        dirfd: c_int,
3789        path: *const c_char,
3790        handle: *mut file_handle,
3791        mount_id: *mut c_int,
3792        flags: c_int,
3793    ) -> c_int;
3794    pub fn open_by_handle_at(mount_fd: c_int, handle: *mut file_handle, flags: c_int) -> c_int;
3795    pub fn getnetbyname(name: *const c_char) -> *mut netent;
3796    pub fn getnetbyaddr(net: u32, type_: c_int) -> *mut netent;
3797    pub fn getnetent() -> *mut netent;
3798    pub fn setnetent(stayopen: c_int);
3799    pub fn endnetent();
3800}
3801
3802// LFS64 extensions
3803//
3804// * musl has 64-bit versions only so aliases the LFS64 symbols to the standard ones
3805cfg_if! {
3806    if #[cfg(not(any(target_env = "musl", target_env = "ohos")))] {
3807        extern "C" {
3808            pub fn fallocate64(fd: c_int, mode: c_int, offset: off64_t, len: off64_t) -> c_int;
3809            pub fn fgetpos64(stream: *mut crate::FILE, ptr: *mut crate::fpos64_t) -> c_int;
3810            pub fn fopen64(filename: *const c_char, mode: *const c_char) -> *mut crate::FILE;
3811            pub fn posix_fallocate64(fd: c_int, offset: off64_t, len: off64_t) -> c_int;
3812            pub fn sendfile64(
3813                out_fd: c_int,
3814                in_fd: c_int,
3815                offset: *mut off64_t,
3816                count: size_t,
3817            ) -> ssize_t;
3818            pub fn tmpfile64() -> *mut crate::FILE;
3819        }
3820    }
3821}
3822
3823cfg_if! {
3824    if #[cfg(target_env = "uclibc")] {
3825        mod uclibc;
3826        pub use self::uclibc::*;
3827    } else if #[cfg(any(target_env = "musl", target_env = "ohos"))] {
3828        mod musl;
3829        pub use self::musl::*;
3830    } else if #[cfg(target_env = "gnu")] {
3831        mod gnu;
3832        pub use self::gnu::*;
3833    }
3834}
3835
3836mod arch;
3837pub use self::arch::*;