interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / vendor / libc / src / unix / nto / io_pkt / mod.rs

160 lines · 4683 bytes Raw Blame History
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
10use crate::prelude::*;
11
12s! {
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
70pub const SCM_CREDS: c_int = 0x04;
71pub const IFF_NOTRAILERS: c_int = 0x00000020;
72pub const AF_INET6: c_int = 24;
73pub const AF_BLUETOOTH: c_int = 31;
74pub const pseudo_AF_KEY: c_int = 29;
75pub const MSG_NOSIGNAL: c_int = 0x0800;
76pub const MSG_WAITFORONE: c_int = 0x2000;
77pub const IP_IPSEC_POLICY_COMPAT: c_int = 22;
78pub const IP_PKTINFO: c_int = 25;
79pub const IPPROTO_DIVERT: c_int = 259;
80pub const IPV6_IPSEC_POLICY_COMPAT: c_int = 28;
81pub const TCP_KEEPALIVE: c_int = 0x04;
82pub const ARPHRD_ARCNET: u16 = 7;
83pub const SO_BINDTODEVICE: c_int = 0x0800;
84pub const EAI_NODATA: c_int = 7;
85pub const IPTOS_ECN_NOT_ECT: u8 = 0x00;
86pub const RTF_BROADCAST: u32 = 0x80000;
87pub const UDP_ENCAP: c_int = 100;
88pub const HW_IOSTATS: c_int = 9;
89pub const HW_MACHINE_ARCH: c_int = 10;
90pub const HW_ALIGNBYTES: c_int = 11;
91pub const HW_CNMAGIC: c_int = 12;
92pub const HW_PHYSMEM64: c_int = 13;
93pub const HW_USERMEM64: c_int = 14;
94pub const HW_IOSTATNAMES: c_int = 15;
95pub const HW_MAXID: c_int = 15;
96pub const CTL_UNSPEC: c_int = 0;
97pub const CTL_QNX: c_int = 9;
98pub const CTL_PROC: c_int = 10;
99pub const CTL_VENDOR: c_int = 11;
100pub const CTL_EMUL: c_int = 12;
101pub const CTL_SECURITY: c_int = 13;
102pub const CTL_MAXID: c_int = 14;
103pub const AF_ARP: c_int = 28;
104pub const AF_IEEE80211: c_int = 32;
105pub const AF_NATM: c_int = 27;
106pub const AF_NS: c_int = 6;
107pub const BIOCGDLTLIST: c_int = -1072676233;
108pub const BIOCGETIF: c_int = 1083196011;
109pub const BIOCGSEESENT: c_int = 1074020984;
110pub const BIOCGSTATS: c_int = 1082147439;
111pub const BIOCSDLT: c_int = -2147204490;
112pub const BIOCSETIF: c_int = -2138029460;
113pub const BIOCSSEESENT: c_int = -2147204487;
114pub const FIONSPACE: c_int = 1074030200;
115pub const FIONWRITE: c_int = 1074030201;
116pub const IFF_ACCEPTRTADV: c_int = 0x40000000;
117pub const IFF_IP6FORWARDING: c_int = 0x20000000;
118pub const IFF_SHIM: c_int = u32_cast_int(0x80000000);
119pub const KERN_ARND: c_int = 81;
120pub const KERN_IOV_MAX: c_int = 38;
121pub const KERN_LOGSIGEXIT: c_int = 46;
122pub const KERN_MAXID: c_int = 83;
123pub const KERN_PROC_ARGS: c_int = 48;
124pub const KERN_PROC_ENV: c_int = 3;
125pub const KERN_PROC_GID: c_int = 7;
126pub const KERN_PROC_RGID: c_int = 8;
127pub const LOCAL_CONNWAIT: c_int = 0x0002;
128pub const LOCAL_CREDS: c_int = 0x0001;
129pub const LOCAL_PEEREID: c_int = 0x0003;
130pub const MSG_NOTIFICATION: c_int = 0x0400;
131pub const NET_RT_IFLIST: c_int = 4;
132pub const NI_NUMERICSCOPE: c_int = 0x00000040;
133pub const PF_ARP: c_int = 28;
134pub const PF_NATM: c_int = 27;
135pub const pseudo_AF_HDRCMPLT: c_int = 30;
136pub const SIOCGIFADDR: c_int = -1064277727;
137pub const SO_FIB: c_int = 0x100a;
138pub const SO_TXPRIO: c_int = 0x100b;
139pub const SO_SETFIB: c_int = 0x100a;
140pub const SO_VLANPRIO: c_int = 0x100c;
141pub const USER_ATEXIT_MAX: c_int = 21;
142pub const USER_MAXID: c_int = 22;
143pub const SO_OVERFLOWED: c_int = 0x1009;
144
145extern "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}