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_sock / mod.rs

108 lines · 3002 bytes Raw Blame History
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
10use crate::prelude::*;
11
12s! {
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
55pub const SCM_CREDS: c_int = 0x03;
56pub const AF_INET6: c_int = 28;
57pub const AF_BLUETOOTH: c_int = 36;
58pub const pseudo_AF_KEY: c_int = 27;
59pub const MSG_NOSIGNAL: c_int = 0x20000;
60pub const MSG_WAITFORONE: c_int = 0x00080000;
61pub const IPPROTO_DIVERT: c_int = 258;
62pub const RTF_BROADCAST: u32 = 0x400000;
63pub const UDP_ENCAP: c_int = 1;
64pub const HW_MACHINE_ARCH: c_int = 11;
65pub const AF_ARP: c_int = 35;
66pub const AF_IEEE80211: c_int = 37;
67pub const AF_NATM: c_int = 29;
68pub const BIOCGDLTLIST: c_ulong = 0xffffffffc0104279;
69pub const BIOCGETIF: c_int = 0x4020426b;
70pub const BIOCGSEESENT: c_int = 0x40044276;
71pub const BIOCGSTATS: c_int = 0x4008426f;
72pub const BIOCSDLT: c_int = u32_cast_int(0x80044278);
73pub const BIOCSETIF: c_int = u32_cast_int(0x8020426c);
74pub const BIOCSSEESENT: c_int = u32_cast_int(0x80044277);
75pub const KERN_ARND: c_int = 37;
76pub const KERN_IOV_MAX: c_int = 35;
77pub const KERN_LOGSIGEXIT: c_int = 34;
78pub const KERN_PROC_ARGS: c_int = 7;
79pub const KERN_PROC_ENV: c_int = 35;
80pub const KERN_PROC_GID: c_int = 11;
81pub const KERN_PROC_RGID: c_int = 10;
82pub const LOCAL_CONNWAIT: c_int = 4;
83pub const LOCAL_CREDS: c_int = 2;
84pub const MSG_NOTIFICATION: c_int = 0x00002000;
85pub const NET_RT_IFLIST: c_int = 3;
86pub const NI_NUMERICSCOPE: c_int = 0x00000020;
87pub const PF_ARP: c_int = AF_ARP;
88pub const PF_NATM: c_int = AF_NATM;
89pub const pseudo_AF_HDRCMPLT: c_int = 31;
90pub const SIOCGIFADDR: c_int = u32_cast_int(0xc0206921);
91pub const SO_SETFIB: c_int = 0x1014;
92
93extern "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}