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 / nto / io_sock / mod.rs
| 1 | //! Definitions specific to QNX versions using io-sock networking |
| 2 | //! |
| 3 | //! This module applies to: |
| 4 | //! |
| 5 | //! * `aarch64-unknown-nto-qnx710` |
| 6 | //! * `x86_64-pc-nto-qnx710` |
| 7 | //! * `aarch64-unknown-qnx` |
| 8 | //! * `x86_64-pc-qnx` |
| 9 | |
| 10 | use crate::prelude::*; |
| 11 | |
| 12 | s! { |
| 13 | pub struct in_addr { |
| 14 | pub s_addr: crate::in_addr_t, |
| 15 | } |
| 16 | |
| 17 | pub struct sockaddr_in { |
| 18 | pub sin_len: u8, |
| 19 | pub sin_family: crate::sa_family_t, |
| 20 | pub sin_port: crate::in_port_t, |
| 21 | pub sin_addr: crate::in_addr, |
| 22 | pub sin_zero: [c_char; 8], |
| 23 | } |
| 24 | |
| 25 | pub struct arphdr { |
| 26 | pub ar_hrd: u16, |
| 27 | pub ar_pro: u16, |
| 28 | pub ar_hln: u8, |
| 29 | pub ar_pln: u8, |
| 30 | pub ar_op: u16, |
| 31 | } |
| 32 | |
| 33 | pub struct mmsghdr { |
| 34 | pub msg_hdr: crate::msghdr, |
| 35 | pub msg_len: ssize_t, |
| 36 | } |
| 37 | |
| 38 | pub struct bpf_stat { |
| 39 | pub bs_recv: c_uint, |
| 40 | pub bs_drop: c_uint, |
| 41 | } |
| 42 | |
| 43 | pub struct sockaddr_dl { |
| 44 | pub sdl_len: c_uchar, |
| 45 | pub sdl_family: c_uchar, |
| 46 | pub sdl_index: c_ushort, |
| 47 | pub sdl_type: c_uchar, |
| 48 | pub sdl_nlen: c_uchar, |
| 49 | pub sdl_alen: c_uchar, |
| 50 | pub sdl_slen: c_uchar, |
| 51 | pub sdl_data: [c_char; 46], |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | pub const SCM_CREDS: c_int = 0x03; |
| 56 | pub const AF_INET6: c_int = 28; |
| 57 | pub const AF_BLUETOOTH: c_int = 36; |
| 58 | pub const pseudo_AF_KEY: c_int = 27; |
| 59 | pub const MSG_NOSIGNAL: c_int = 0x20000; |
| 60 | pub const MSG_WAITFORONE: c_int = 0x00080000; |
| 61 | pub const IPPROTO_DIVERT: c_int = 258; |
| 62 | pub const RTF_BROADCAST: u32 = 0x400000; |
| 63 | pub const UDP_ENCAP: c_int = 1; |
| 64 | pub const HW_MACHINE_ARCH: c_int = 11; |
| 65 | pub const AF_ARP: c_int = 35; |
| 66 | pub const AF_IEEE80211: c_int = 37; |
| 67 | pub const AF_NATM: c_int = 29; |
| 68 | pub const BIOCGDLTLIST: c_ulong = 0xffffffffc0104279; |
| 69 | pub const BIOCGETIF: c_int = 0x4020426b; |
| 70 | pub const BIOCGSEESENT: c_int = 0x40044276; |
| 71 | pub const BIOCGSTATS: c_int = 0x4008426f; |
| 72 | pub const BIOCSDLT: c_int = u32_cast_int(0x80044278); |
| 73 | pub const BIOCSETIF: c_int = u32_cast_int(0x8020426c); |
| 74 | pub const BIOCSSEESENT: c_int = u32_cast_int(0x80044277); |
| 75 | pub const KERN_ARND: c_int = 37; |
| 76 | pub const KERN_IOV_MAX: c_int = 35; |
| 77 | pub const KERN_LOGSIGEXIT: c_int = 34; |
| 78 | pub const KERN_PROC_ARGS: c_int = 7; |
| 79 | pub const KERN_PROC_ENV: c_int = 35; |
| 80 | pub const KERN_PROC_GID: c_int = 11; |
| 81 | pub const KERN_PROC_RGID: c_int = 10; |
| 82 | pub const LOCAL_CONNWAIT: c_int = 4; |
| 83 | pub const LOCAL_CREDS: c_int = 2; |
| 84 | pub const MSG_NOTIFICATION: c_int = 0x00002000; |
| 85 | pub const NET_RT_IFLIST: c_int = 3; |
| 86 | pub const NI_NUMERICSCOPE: c_int = 0x00000020; |
| 87 | pub const PF_ARP: c_int = AF_ARP; |
| 88 | pub const PF_NATM: c_int = AF_NATM; |
| 89 | pub const pseudo_AF_HDRCMPLT: c_int = 31; |
| 90 | pub const SIOCGIFADDR: c_int = u32_cast_int(0xc0206921); |
| 91 | pub const SO_SETFIB: c_int = 0x1014; |
| 92 | |
| 93 | extern "C" { |
| 94 | pub fn sendmmsg( |
| 95 | sockfd: c_int, |
| 96 | msgvec: *mut crate::mmsghdr, |
| 97 | vlen: size_t, |
| 98 | flags: c_int, |
| 99 | ) -> ssize_t; |
| 100 | |
| 101 | pub fn recvmmsg( |
| 102 | sockfd: c_int, |
| 103 | msgvec: *mut crate::mmsghdr, |
| 104 | vlen: size_t, |
| 105 | flags: c_int, |
| 106 | timeout: *const crate::timespec, |
| 107 | ) -> ssize_t; |
| 108 | } |