1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
use super::linux_socket::*;
pub const NPROTO: i32 = AF_MAX;
pub const SYS_SOCKET_: i32 = 1;
pub const SYS_BIND_: i32 = 2;
pub const SYS_CONNECT_: i32 = 3;
pub const SYS_LISTEN_: i32 = 4;
pub const SYS_ACCEPT_: i32 = 5;
pub const SYS_GETSOCKNAME_: i32 = 6;
pub const SYS_GETPEERNAME_: i32 = 7;
pub const SYS_SOCKETPAIR_: i32 = 8;
pub const SYS_SEND_: i32 = 9;
pub const SYS_RECV_: i32 = 10;
pub const SYS_SENDTO_: i32 = 11;
pub const SYS_RECVFROM_: i32 = 12;
pub const SYS_SHUTDOWN_: i32 = 13;
pub const SYS_SETSOCKOPT_: i32 = 14;
pub const SYS_GETSOCKOPT_: i32 = 15;
pub const SYS_SENDMSG_: i32 = 16;
pub const SYS_RECVMSG_: i32 = 17;
pub const SYS_ACCEPT4_: i32 = 18;
pub const SYS_RECVMMSG_: i32 = 19;
pub const SYS_SENDMMSG_: i32 = 20;
pub type socket_state_t = i32;
pub const SS_FREE: socket_state_t = 0;
pub const SS_UNCONNECTED: socket_state_t = 1;
pub const SS_CONNECTING: socket_state_t = 2;
pub const SS_CONNECTED: socket_state_t = 3;
pub const SS_DISCONNECTING: socket_state_t = 4;
pub const __SO_ACCEPTCON: i32 = 1 << 16;