aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / vendor / libc / src / unix / bsd / apple / b64 / mod.rs
| 1 | //! 64-bit specific Apple (ios/darwin) definitions |
| 2 | |
| 3 | use crate::prelude::*; |
| 4 | |
| 5 | s! { |
| 6 | #[derive(Default)] |
| 7 | pub struct timeval32 { |
| 8 | pub tv_sec: i32, |
| 9 | pub tv_usec: i32, |
| 10 | } |
| 11 | |
| 12 | pub struct if_data { |
| 13 | pub ifi_type: c_uchar, |
| 14 | pub ifi_typelen: c_uchar, |
| 15 | pub ifi_physical: c_uchar, |
| 16 | pub ifi_addrlen: c_uchar, |
| 17 | pub ifi_hdrlen: c_uchar, |
| 18 | pub ifi_recvquota: c_uchar, |
| 19 | pub ifi_xmitquota: c_uchar, |
| 20 | pub ifi_unused1: c_uchar, |
| 21 | pub ifi_mtu: u32, |
| 22 | pub ifi_metric: u32, |
| 23 | pub ifi_baudrate: u32, |
| 24 | pub ifi_ipackets: u32, |
| 25 | pub ifi_ierrors: u32, |
| 26 | pub ifi_opackets: u32, |
| 27 | pub ifi_oerrors: u32, |
| 28 | pub ifi_collisions: u32, |
| 29 | pub ifi_ibytes: u32, |
| 30 | pub ifi_obytes: u32, |
| 31 | pub ifi_imcasts: u32, |
| 32 | pub ifi_omcasts: u32, |
| 33 | pub ifi_iqdrops: u32, |
| 34 | pub ifi_noproto: u32, |
| 35 | pub ifi_recvtiming: u32, |
| 36 | pub ifi_xmittiming: u32, |
| 37 | pub ifi_lastchange: timeval32, |
| 38 | pub ifi_unused2: u32, |
| 39 | pub ifi_hwassist: u32, |
| 40 | pub ifi_reserved1: u32, |
| 41 | pub ifi_reserved2: u32, |
| 42 | } |
| 43 | |
| 44 | pub struct bpf_hdr { |
| 45 | pub bh_tstamp: crate::timeval32, |
| 46 | pub bh_caplen: u32, |
| 47 | pub bh_datalen: u32, |
| 48 | pub bh_hdrlen: c_ushort, |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | #[doc(hidden)] |
| 53 | #[deprecated(since = "0.2.55")] |
| 54 | pub const NET_RT_MAXID: c_int = 11; |
| 55 | |
| 56 | pub const BIOCSETF: c_ulong = 0x80104267; |
| 57 | pub const BIOCSRTIMEOUT: c_ulong = 0x8010426d; |
| 58 | pub const BIOCGRTIMEOUT: c_ulong = 0x4010426e; |
| 59 | pub const BIOCSETFNR: c_ulong = 0x8010427e; |
| 60 | |
| 61 | extern "C" { |
| 62 | pub fn exchangedata(path1: *const c_char, path2: *const c_char, options: c_uint) -> c_int; |
| 63 | } |
| 64 | |
| 65 | cfg_if! { |
| 66 | if #[cfg(target_arch = "x86_64")] { |
| 67 | mod x86_64; |
| 68 | pub use self::x86_64::*; |
| 69 | } else if #[cfg(target_arch = "aarch64")] { |
| 70 | mod aarch64; |
| 71 | pub use self::aarch64::*; |
| 72 | } else { |
| 73 | // Unknown target_arch |
| 74 | } |
| 75 | } |