1#[cfg(all(feature = "struct_iovec", feature = "types", feature = "unistd"))]
2windows_link::link!("c" "C" fn __cmsg_nxthdr(__mhdr : *mut msghdr, __cmsg : *mut cmsghdr) -> *mut cmsghdr);
3#[cfg(all(feature = "sockaddr", feature = "types", feature = "unistd"))]
4windows_link::link!("c" "C" fn accept(__fd : i32, __addr : *mut sockaddr, __addr_len : *mut super::unistd::socklen_t) -> i32);
5#[cfg(all(feature = "sockaddr", feature = "types", feature = "unistd"))]
6windows_link::link!("c" "C" fn bind(__fd : i32, __addr : *const sockaddr, __len : super::unistd::socklen_t) -> i32);
7#[cfg(all(feature = "sockaddr", feature = "types", feature = "unistd"))]
8windows_link::link!("c" "C" fn connect(__fd : i32, __addr : *const sockaddr, __len : super::unistd::socklen_t) -> i32);
9#[cfg(all(feature = "sockaddr", feature = "types", feature = "unistd"))]
10windows_link::link!("c" "C" fn getpeername(__fd : i32, __addr : *mut sockaddr, __len : *mut super::unistd::socklen_t) -> i32);
11#[cfg(all(feature = "sockaddr", feature = "types", feature = "unistd"))]
12windows_link::link!("c" "C" fn getsockname(__fd : i32, __addr : *mut sockaddr, __len : *mut super::unistd::socklen_t) -> i32);
13#[cfg(all(feature = "types", feature = "unistd"))]
14windows_link::link!("c" "C" fn getsockopt(__fd : i32, __level : i32, __optname : i32, __optval : *mut core::ffi::c_void, __optlen : *mut super::unistd::socklen_t) -> i32);
15windows_link::link!("c" "C" fn isfdtype(__fd : i32, __fdtype : i32) -> i32);
16windows_link::link!("c" "C" fn listen(__fd : i32, __n : i32) -> i32);
17#[cfg(feature = "types")]
18windows_link::link!("c" "C" fn recv(__fd : i32, __buf : *mut core::ffi::c_void, __n : usize, __flags : i32) -> super::types::ssize_t);
19#[cfg(all(feature = "sockaddr", feature = "types", feature = "unistd"))]
20windows_link::link!("c" "C" fn recvfrom(__fd : i32, __buf : *mut core::ffi::c_void, __n : usize, __flags : i32, __addr : *mut sockaddr, __addr_len : *mut super::unistd::socklen_t) -> super::types::ssize_t);
21#[cfg(all(feature = "struct_iovec", feature = "types", feature = "unistd"))]
22windows_link::link!("c" "C" fn recvmsg(__fd : i32, __message : *mut msghdr, __flags : i32) -> super::types::ssize_t);
23#[cfg(feature = "types")]
24windows_link::link!("c" "C" fn send(__fd : i32, __buf : *const core::ffi::c_void, __n : usize, __flags : i32) -> super::types::ssize_t);
25#[cfg(all(feature = "struct_iovec", feature = "types", feature = "unistd"))]
26windows_link::link!("c" "C" fn sendmsg(__fd : i32, __message : *const msghdr, __flags : i32) -> super::types::ssize_t);
27#[cfg(all(feature = "sockaddr", feature = "types", feature = "unistd"))]
28windows_link::link!("c" "C" fn sendto(__fd : i32, __buf : *const core::ffi::c_void, __n : usize, __flags : i32, __addr : *const sockaddr, __addr_len : super::unistd::socklen_t) -> super::types::ssize_t);
29#[cfg(all(feature = "types", feature = "unistd"))]
30windows_link::link!("c" "C" fn setsockopt(__fd : i32, __level : i32, __optname : i32, __optval : *const core::ffi::c_void, __optlen : super::unistd::socklen_t) -> i32);
31windows_link::link!("c" "C" fn shutdown(__fd : i32, __how : i32) -> i32);
32windows_link::link!("c" "C" fn sockatmark(__fd : i32) -> i32);
33windows_link::link!("c" "C" fn socket(__domain : i32, __type : i32, __protocol : i32) -> i32);
34windows_link::link!("c" "C" fn socketpair(__domain : i32, __type : i32, __protocol : i32, __fds : *mut i32) -> i32);
35pub const AF_ALG: i32 = 38;
36pub const AF_APPLETALK: i32 = 5;
37pub const AF_ASH: i32 = 18;
38pub const AF_ATMPVC: i32 = 8;
39pub const AF_ATMSVC: i32 = 20;
40pub const AF_AX25: i32 = 3;
41pub const AF_BLUETOOTH: i32 = 31;
42pub const AF_BRIDGE: i32 = 7;
43pub const AF_CAIF: i32 = 37;
44pub const AF_CAN: i32 = 29;
45pub const AF_DECnet: i32 = 12;
46pub const AF_ECONET: i32 = 19;
47pub const AF_FILE: i32 = 1;
48pub const AF_IB: i32 = 27;
49pub const AF_IEEE802154: i32 = 36;
50pub const AF_INET: i32 = 2;
51pub const AF_INET6: i32 = 10;
52pub const AF_IPX: i32 = 4;
53pub const AF_IRDA: i32 = 23;
54pub const AF_ISDN: i32 = 34;
55pub const AF_IUCV: i32 = 32;
56pub const AF_KCM: i32 = 41;
57pub const AF_KEY: i32 = 15;
58pub const AF_LLC: i32 = 26;
59pub const AF_LOCAL: i32 = 1;
60pub const AF_MAX: i32 = 46;
61pub const AF_MCTP: i32 = 45;
62pub const AF_MPLS: i32 = 28;
63pub const AF_NETBEUI: i32 = 13;
64pub const AF_NETLINK: i32 = 16;
65pub const AF_NETROM: i32 = 6;
66pub const AF_NFC: i32 = 39;
67pub const AF_PACKET: i32 = 17;
68pub const AF_PHONET: i32 = 35;
69pub const AF_PPPOX: i32 = 24;
70pub const AF_QIPCRTR: i32 = 42;
71pub const AF_RDS: i32 = 21;
72pub const AF_ROSE: i32 = 11;
73pub const AF_ROUTE: i32 = 16;
74pub const AF_RXRPC: i32 = 33;
75pub const AF_SECURITY: i32 = 14;
76pub const AF_SMC: i32 = 43;
77pub const AF_SNA: i32 = 22;
78pub const AF_TIPC: i32 = 30;
79pub const AF_UNIX: i32 = 1;
80pub const AF_UNSPEC: i32 = 0;
81pub const AF_VSOCK: i32 = 40;
82pub const AF_WANPIPE: i32 = 25;
83pub const AF_X25: i32 = 9;
84pub const AF_XDP: i32 = 44;
85pub const MSG_BATCH: u32 = 262144;
86pub const MSG_CMSG_CLOEXEC: u32 = 1073741824;
87pub const MSG_CONFIRM: u32 = 2048;
88pub const MSG_CTRUNC: u32 = 8;
89pub const MSG_DONTROUTE: u32 = 4;
90pub const MSG_DONTWAIT: u32 = 64;
91pub const MSG_EOR: u32 = 128;
92pub const MSG_ERRQUEUE: u32 = 8192;
93pub const MSG_FASTOPEN: u32 = 536870912;
94pub const MSG_FIN: u32 = 512;
95pub const MSG_MORE: u32 = 32768;
96pub const MSG_NOSIGNAL: u32 = 16384;
97pub const MSG_OOB: u32 = 1;
98pub const MSG_PEEK: u32 = 2;
99pub const MSG_PROXY: u32 = 16;
100pub const MSG_RST: u32 = 4096;
101pub const MSG_SOCK_DEVMEM: u32 = 33554432;
102pub const MSG_SYN: u32 = 1024;
103pub const MSG_TRUNC: u32 = 32;
104pub const MSG_WAITALL: u32 = 256;
105pub const MSG_WAITFORONE: u32 = 65536;
106pub const MSG_ZEROCOPY: u32 = 67108864;
107pub const PF_ALG: i32 = 38;
108pub const PF_APPLETALK: i32 = 5;
109pub const PF_ASH: i32 = 18;
110pub const PF_ATMPVC: i32 = 8;
111pub const PF_ATMSVC: i32 = 20;
112pub const PF_AX25: i32 = 3;
113pub const PF_BLUETOOTH: i32 = 31;
114pub const PF_BRIDGE: i32 = 7;
115pub const PF_CAIF: i32 = 37;
116pub const PF_CAN: i32 = 29;
117pub const PF_DECnet: i32 = 12;
118pub const PF_ECONET: i32 = 19;
119pub const PF_FILE: i32 = 1;
120pub const PF_IB: i32 = 27;
121pub const PF_IEEE802154: i32 = 36;
122pub const PF_INET: i32 = 2;
123pub const PF_INET6: i32 = 10;
124pub const PF_IPX: i32 = 4;
125pub const PF_IRDA: i32 = 23;
126pub const PF_ISDN: i32 = 34;
127pub const PF_IUCV: i32 = 32;
128pub const PF_KCM: i32 = 41;
129pub const PF_KEY: i32 = 15;
130pub const PF_LLC: i32 = 26;
131pub const PF_LOCAL: i32 = 1;
132pub const PF_MAX: i32 = 46;
133pub const PF_MCTP: i32 = 45;
134pub const PF_MPLS: i32 = 28;
135pub const PF_NETBEUI: i32 = 13;
136pub const PF_NETLINK: i32 = 16;
137pub const PF_NETROM: i32 = 6;
138pub const PF_NFC: i32 = 39;
139pub const PF_PACKET: i32 = 17;
140pub const PF_PHONET: i32 = 35;
141pub const PF_PPPOX: i32 = 24;
142pub const PF_QIPCRTR: i32 = 42;
143pub const PF_RDS: i32 = 21;
144pub const PF_ROSE: i32 = 11;
145pub const PF_ROUTE: i32 = 16;
146pub const PF_RXRPC: i32 = 33;
147pub const PF_SECURITY: i32 = 14;
148pub const PF_SMC: i32 = 43;
149pub const PF_SNA: i32 = 22;
150pub const PF_TIPC: i32 = 30;
151pub const PF_UNIX: i32 = 1;
152pub const PF_UNSPEC: i32 = 0;
153pub const PF_VSOCK: i32 = 40;
154pub const PF_WANPIPE: i32 = 25;
155pub const PF_X25: i32 = 9;
156pub const PF_XDP: i32 = 44;
157pub const SCM_DEVMEM_DMABUF: i32 = 79;
158pub const SCM_DEVMEM_LINEAR: i32 = 78;
159pub const SCM_INQ: i32 = 84;
160pub const SCM_RIGHTS: u32 = 1;
161pub const SCM_TIMESTAMP: i32 = 29;
162pub const SCM_TIMESTAMPING: i32 = 37;
163pub const SCM_TIMESTAMPING_OPT_STATS: i32 = 54;
164pub const SCM_TIMESTAMPING_PKTINFO: i32 = 58;
165pub const SCM_TIMESTAMPNS: i32 = 35;
166pub const SCM_TS_OPT_ID: i32 = 81;
167pub const SCM_TXTIME: i32 = 61;
168pub const SCM_WIFI_STATUS: i32 = 41;
169pub const SHUT_RD: u32 = 0;
170pub const SHUT_RDWR: u32 = 2;
171pub const SHUT_WR: u32 = 1;
172pub const SOL_AAL: i32 = 265;
173pub const SOL_ALG: i32 = 279;
174pub const SOL_ATM: i32 = 264;
175pub const SOL_BLUETOOTH: i32 = 274;
176pub const SOL_CAIF: i32 = 278;
177pub const SOL_DCCP: i32 = 269;
178pub const SOL_DECNET: i32 = 261;
179pub const SOL_IRDA: i32 = 266;
180pub const SOL_IUCV: i32 = 277;
181pub const SOL_KCM: i32 = 281;
182pub const SOL_LLC: i32 = 268;
183pub const SOL_MCTP: i32 = 285;
184pub const SOL_MPTCP: i32 = 284;
185pub const SOL_NETBEUI: i32 = 267;
186pub const SOL_NETLINK: i32 = 270;
187pub const SOL_NFC: i32 = 280;
188pub const SOL_PACKET: i32 = 263;
189pub const SOL_PNPIPE: i32 = 275;
190pub const SOL_PPPOL2TP: i32 = 273;
191pub const SOL_RAW: i32 = 255;
192pub const SOL_RDS: i32 = 276;
193pub const SOL_RXRPC: i32 = 272;
194pub const SOL_SMC: i32 = 286;
195pub const SOL_SOCKET: i32 = 1;
196pub const SOL_TIPC: i32 = 271;
197pub const SOL_TLS: i32 = 282;
198pub const SOL_VSOCK: i32 = 287;
199pub const SOL_X25: i32 = 262;
200pub const SOL_XDP: i32 = 283;
201pub const SOMAXCONN: i32 = 4096;
202pub const SO_ACCEPTCONN: i32 = 30;
203pub const SO_ATTACH_BPF: i32 = 50;
204pub const SO_ATTACH_FILTER: i32 = 26;
205pub const SO_ATTACH_REUSEPORT_CBPF: i32 = 51;
206pub const SO_ATTACH_REUSEPORT_EBPF: i32 = 52;
207pub const SO_BINDTODEVICE: i32 = 25;
208pub const SO_BINDTOIFINDEX: i32 = 62;
209pub const SO_BPF_EXTENSIONS: i32 = 48;
210pub const SO_BROADCAST: i32 = 6;
211pub const SO_BSDCOMPAT: i32 = 14;
212pub const SO_BUF_LOCK: i32 = 72;
213pub const SO_BUSY_POLL: i32 = 46;
214pub const SO_BUSY_POLL_BUDGET: i32 = 70;
215pub const SO_CNX_ADVICE: i32 = 53;
216pub const SO_COOKIE: i32 = 57;
217pub const SO_DEBUG: i32 = 1;
218pub const SO_DETACH_BPF: i32 = 27;
219pub const SO_DETACH_FILTER: i32 = 27;
220pub const SO_DETACH_REUSEPORT_BPF: i32 = 68;
221pub const SO_DEVMEM_DMABUF: i32 = 79;
222pub const SO_DEVMEM_DONTNEED: i32 = 80;
223pub const SO_DEVMEM_LINEAR: i32 = 78;
224pub const SO_DOMAIN: i32 = 39;
225pub const SO_DONTROUTE: i32 = 5;
226pub const SO_ERROR: i32 = 4;
227pub const SO_GET_FILTER: i32 = 26;
228pub const SO_INCOMING_CPU: i32 = 49;
229pub const SO_INCOMING_NAPI_ID: i32 = 56;
230pub const SO_INQ: i32 = 84;
231pub const SO_KEEPALIVE: i32 = 9;
232pub const SO_LINGER: i32 = 13;
233pub const SO_LOCK_FILTER: i32 = 44;
234pub const SO_MARK: i32 = 36;
235pub const SO_MAX_PACING_RATE: i32 = 47;
236pub const SO_MEMINFO: i32 = 55;
237pub const SO_NETNS_COOKIE: i32 = 71;
238pub const SO_NOFCS: i32 = 43;
239pub const SO_NO_CHECK: i32 = 11;
240pub const SO_OOBINLINE: i32 = 10;
241pub const SO_PASSCRED: i32 = 16;
242pub const SO_PASSPIDFD: i32 = 76;
243pub const SO_PASSRIGHTS: i32 = 83;
244pub const SO_PASSSEC: i32 = 34;
245pub const SO_PEEK_OFF: i32 = 42;
246pub const SO_PEERCRED: i32 = 17;
247pub const SO_PEERGROUPS: i32 = 59;
248pub const SO_PEERNAME: i32 = 28;
249pub const SO_PEERPIDFD: i32 = 77;
250pub const SO_PEERSEC: i32 = 31;
251pub const SO_PREFER_BUSY_POLL: i32 = 69;
252pub const SO_PRIORITY: i32 = 12;
253pub const SO_PROTOCOL: i32 = 38;
254pub const SO_RCVBUF: i32 = 8;
255pub const SO_RCVBUFFORCE: i32 = 33;
256pub const SO_RCVLOWAT: i32 = 18;
257pub const SO_RCVMARK: i32 = 75;
258pub const SO_RCVPRIORITY: i32 = 82;
259pub const SO_RCVTIMEO: i32 = 20;
260pub const SO_RCVTIMEO_NEW: i32 = 66;
261pub const SO_RCVTIMEO_OLD: i32 = 20;
262pub const SO_RESERVE_MEM: i32 = 73;
263pub const SO_REUSEADDR: i32 = 2;
264pub const SO_REUSEPORT: i32 = 15;
265pub const SO_RXQ_OVFL: i32 = 40;
266pub const SO_SECURITY_AUTHENTICATION: i32 = 22;
267pub const SO_SECURITY_ENCRYPTION_NETWORK: i32 = 24;
268pub const SO_SECURITY_ENCRYPTION_TRANSPORT: i32 = 23;
269pub const SO_SELECT_ERR_QUEUE: i32 = 45;
270pub const SO_SNDBUF: i32 = 7;
271pub const SO_SNDBUFFORCE: i32 = 32;
272pub const SO_SNDLOWAT: i32 = 19;
273pub const SO_SNDTIMEO: i32 = 21;
274pub const SO_SNDTIMEO_NEW: i32 = 67;
275pub const SO_SNDTIMEO_OLD: i32 = 21;
276pub const SO_TIMESTAMP: i32 = 29;
277pub const SO_TIMESTAMPING: i32 = 37;
278pub const SO_TIMESTAMPING_NEW: i32 = 65;
279pub const SO_TIMESTAMPING_OLD: i32 = 37;
280pub const SO_TIMESTAMPNS: i32 = 35;
281pub const SO_TIMESTAMPNS_NEW: i32 = 64;
282pub const SO_TIMESTAMPNS_OLD: i32 = 35;
283pub const SO_TIMESTAMP_NEW: i32 = 63;
284pub const SO_TIMESTAMP_OLD: i32 = 29;
285pub const SO_TXREHASH: i32 = 74;
286pub const SO_TXTIME: i32 = 61;
287pub const SO_TYPE: i32 = 3;
288pub const SO_WIFI_STATUS: i32 = 41;
289pub const SO_ZEROCOPY: i32 = 60;
290#[repr(C)]
291#[derive(Clone, Copy)]
292pub struct cmsghdr {
293 pub cmsg_len: usize,
294 pub cmsg_level: i32,
295 pub cmsg_type: i32,
296 pub __cmsg_data: [u8; 0],
297}
298impl Default for cmsghdr {
299 fn default() -> Self {
300 unsafe { core::mem::zeroed() }
301 }
302}
303#[repr(C)]
304#[derive(Clone, Copy, Default)]
305pub struct linger {
306 pub l_onoff: i32,
307 pub l_linger: i32,
308}
309#[repr(C)]
310#[cfg(all(feature = "struct_iovec", feature = "types", feature = "unistd"))]
311#[derive(Clone, Copy, Default)]
312pub struct msghdr {
313 pub msg_name: *mut core::ffi::c_void,
314 pub msg_namelen: super::unistd::socklen_t,
315 pub msg_iov: *mut super::struct_iovec::iovec,
316 pub msg_iovlen: usize,
317 pub msg_control: *mut core::ffi::c_void,
318 pub msg_controllen: usize,
319 pub msg_flags: i32,
320}
321#[repr(C)]
322#[cfg(feature = "sockaddr")]
323#[derive(Clone, Copy)]
324pub struct sockaddr {
325 pub sa_family: super::sockaddr::sa_family_t,
326 pub sa_data: [i8; 14],
327}
328#[cfg(feature = "sockaddr")]
329impl Default for sockaddr {
330 fn default() -> Self {
331 unsafe { core::mem::zeroed() }
332 }
333}
334#[repr(C)]
335#[cfg(feature = "sockaddr")]
336#[derive(Clone, Copy)]
337pub struct sockaddr_storage {
338 pub ss_family: super::sockaddr::sa_family_t,
339 pub __ss_padding: [i8; 118],
340 pub __ss_align: u64,
341}
342#[cfg(feature = "sockaddr")]
343impl Default for sockaddr_storage {
344 fn default() -> Self {
345 unsafe { core::mem::zeroed() }
346 }
347}