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_pkt / mod.rs
| 1 | //! Definitions specific to QNX versions using io-pkt networking |
| 2 | //! |
| 3 | //! This module applies to: |
| 4 | //! |
| 5 | //! * `aarch64-unknown-nto-qnx700` |
| 6 | //! * `i686-pc-nto-qnx700` |
| 7 | //! * `aarch64-unknown-nto-qnx710` |
| 8 | //! * `x86_64-pc-nto-qnx710` |
| 9 | |
| 10 | use crate::prelude::*; |
| 11 | |
| 12 | s! { |
| 13 | #[repr(packed)] |
| 14 | pub struct in_addr { |
| 15 | pub s_addr: crate::in_addr_t, |
| 16 | } |
| 17 | |
| 18 | pub struct sockaddr_in { |
| 19 | pub sin_len: u8, |
| 20 | pub sin_family: crate::sa_family_t, |
| 21 | pub sin_port: crate::in_port_t, |
| 22 | pub sin_addr: crate::in_addr, |
| 23 | pub sin_zero: [i8; 8], |
| 24 | } |
| 25 | |
| 26 | pub struct in_pktinfo { |
| 27 | pub ipi_addr: crate::in_addr, |
| 28 | pub ipi_ifindex: c_uint, |
| 29 | } |
| 30 | |
| 31 | #[repr(packed)] |
| 32 | pub struct arphdr { |
| 33 | pub ar_hrd: u16, |
| 34 | pub ar_pro: u16, |
| 35 | pub ar_hln: u8, |
| 36 | pub ar_pln: u8, |
| 37 | pub ar_op: u16, |
| 38 | } |
| 39 | |
| 40 | pub struct unpcbid { |
| 41 | pub unp_pid: crate::pid_t, |
| 42 | pub unp_euid: crate::uid_t, |
| 43 | pub unp_egid: crate::gid_t, |
| 44 | } |
| 45 | |
| 46 | pub struct mmsghdr { |
| 47 | pub msg_hdr: crate::msghdr, |
| 48 | pub msg_len: c_uint, |
| 49 | } |
| 50 | |
| 51 | pub struct bpf_stat { |
| 52 | pub bs_recv: u64, |
| 53 | pub bs_drop: u64, |
| 54 | pub bs_capt: u64, |
| 55 | bs_padding: Padding<[u64; 13]>, |
| 56 | } |
| 57 | |
| 58 | pub struct sockaddr_dl { |
| 59 | pub sdl_len: c_uchar, |
| 60 | pub sdl_family: crate::sa_family_t, |
| 61 | pub sdl_index: u16, |
| 62 | pub sdl_type: c_uchar, |
| 63 | pub sdl_nlen: c_uchar, |
| 64 | pub sdl_alen: c_uchar, |
| 65 | pub sdl_slen: c_uchar, |
| 66 | pub sdl_data: [c_char; 12], |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | pub const SCM_CREDS: c_int = 0x04; |
| 71 | pub const IFF_NOTRAILERS: c_int = 0x00000020; |
| 72 | pub const AF_INET6: c_int = 24; |
| 73 | pub const AF_BLUETOOTH: c_int = 31; |
| 74 | pub const pseudo_AF_KEY: c_int = 29; |
| 75 | pub const MSG_NOSIGNAL: c_int = 0x0800; |
| 76 | pub const MSG_WAITFORONE: c_int = 0x2000; |
| 77 | pub const IP_IPSEC_POLICY_COMPAT: c_int = 22; |
| 78 | pub const IP_PKTINFO: c_int = 25; |
| 79 | pub const IPPROTO_DIVERT: c_int = 259; |
| 80 | pub const IPV6_IPSEC_POLICY_COMPAT: c_int = 28; |
| 81 | pub const TCP_KEEPALIVE: c_int = 0x04; |
| 82 | pub const ARPHRD_ARCNET: u16 = 7; |
| 83 | pub const SO_BINDTODEVICE: c_int = 0x0800; |
| 84 | pub const EAI_NODATA: c_int = 7; |
| 85 | pub const IPTOS_ECN_NOT_ECT: u8 = 0x00; |
| 86 | pub const RTF_BROADCAST: u32 = 0x80000; |
| 87 | pub const UDP_ENCAP: c_int = 100; |
| 88 | pub const HW_IOSTATS: c_int = 9; |
| 89 | pub const HW_MACHINE_ARCH: c_int = 10; |
| 90 | pub const HW_ALIGNBYTES: c_int = 11; |
| 91 | pub const HW_CNMAGIC: c_int = 12; |
| 92 | pub const HW_PHYSMEM64: c_int = 13; |
| 93 | pub const HW_USERMEM64: c_int = 14; |
| 94 | pub const HW_IOSTATNAMES: c_int = 15; |
| 95 | pub const HW_MAXID: c_int = 15; |
| 96 | pub const CTL_UNSPEC: c_int = 0; |
| 97 | pub const CTL_QNX: c_int = 9; |
| 98 | pub const CTL_PROC: c_int = 10; |
| 99 | pub const CTL_VENDOR: c_int = 11; |
| 100 | pub const CTL_EMUL: c_int = 12; |
| 101 | pub const CTL_SECURITY: c_int = 13; |
| 102 | pub const CTL_MAXID: c_int = 14; |
| 103 | pub const AF_ARP: c_int = 28; |
| 104 | pub const AF_IEEE80211: c_int = 32; |
| 105 | pub const AF_NATM: c_int = 27; |
| 106 | pub const AF_NS: c_int = 6; |
| 107 | pub const BIOCGDLTLIST: c_int = -1072676233; |
| 108 | pub const BIOCGETIF: c_int = 1083196011; |
| 109 | pub const BIOCGSEESENT: c_int = 1074020984; |
| 110 | pub const BIOCGSTATS: c_int = 1082147439; |
| 111 | pub const BIOCSDLT: c_int = -2147204490; |
| 112 | pub const BIOCSETIF: c_int = -2138029460; |
| 113 | pub const BIOCSSEESENT: c_int = -2147204487; |
| 114 | pub const FIONSPACE: c_int = 1074030200; |
| 115 | pub const FIONWRITE: c_int = 1074030201; |
| 116 | pub const IFF_ACCEPTRTADV: c_int = 0x40000000; |
| 117 | pub const IFF_IP6FORWARDING: c_int = 0x20000000; |
| 118 | pub const IFF_SHIM: c_int = u32_cast_int(0x80000000); |
| 119 | pub const KERN_ARND: c_int = 81; |
| 120 | pub const KERN_IOV_MAX: c_int = 38; |
| 121 | pub const KERN_LOGSIGEXIT: c_int = 46; |
| 122 | pub const KERN_MAXID: c_int = 83; |
| 123 | pub const KERN_PROC_ARGS: c_int = 48; |
| 124 | pub const KERN_PROC_ENV: c_int = 3; |
| 125 | pub const KERN_PROC_GID: c_int = 7; |
| 126 | pub const KERN_PROC_RGID: c_int = 8; |
| 127 | pub const LOCAL_CONNWAIT: c_int = 0x0002; |
| 128 | pub const LOCAL_CREDS: c_int = 0x0001; |
| 129 | pub const LOCAL_PEEREID: c_int = 0x0003; |
| 130 | pub const MSG_NOTIFICATION: c_int = 0x0400; |
| 131 | pub const NET_RT_IFLIST: c_int = 4; |
| 132 | pub const NI_NUMERICSCOPE: c_int = 0x00000040; |
| 133 | pub const PF_ARP: c_int = 28; |
| 134 | pub const PF_NATM: c_int = 27; |
| 135 | pub const pseudo_AF_HDRCMPLT: c_int = 30; |
| 136 | pub const SIOCGIFADDR: c_int = -1064277727; |
| 137 | pub const SO_FIB: c_int = 0x100a; |
| 138 | pub const SO_TXPRIO: c_int = 0x100b; |
| 139 | pub const SO_SETFIB: c_int = 0x100a; |
| 140 | pub const SO_VLANPRIO: c_int = 0x100c; |
| 141 | pub const USER_ATEXIT_MAX: c_int = 21; |
| 142 | pub const USER_MAXID: c_int = 22; |
| 143 | pub const SO_OVERFLOWED: c_int = 0x1009; |
| 144 | |
| 145 | extern "C" { |
| 146 | pub fn sendmmsg( |
| 147 | sockfd: c_int, |
| 148 | msgvec: *mut crate::mmsghdr, |
| 149 | vlen: c_uint, |
| 150 | flags: c_uint, |
| 151 | ) -> c_int; |
| 152 | |
| 153 | pub fn recvmmsg( |
| 154 | sockfd: c_int, |
| 155 | msgvec: *mut crate::mmsghdr, |
| 156 | vlen: c_uint, |
| 157 | flags: c_uint, |
| 158 | timeout: *mut crate::timespec, |
| 159 | ) -> c_int; |
| 160 | } |