1 pub type clock_t = ::c_long;
2 pub type c_char = u8;
3 pub type wchar_t = u32;
4 
5 pub type c_long = i64;
6 pub type c_ulong = u64;
7 
8 s! {
9     pub struct sockaddr {
10         pub sa_len: u8,
11         pub sa_family: ::sa_family_t,
12         pub sa_data: [::c_char; 14],
13     }
14 
15     pub struct sockaddr_in6 {
16         pub sin6_len: u8,
17         pub sin6_family: ::sa_family_t,
18         pub sin6_port: ::in_port_t,
19         pub sin6_flowinfo: u32,
20         pub sin6_addr: ::in6_addr,
21         pub sin6_scope_id: u32,
22     }
23 
24     pub struct sockaddr_in {
25         pub sin_len: u8,
26         pub sin_family: ::sa_family_t,
27         pub sin_port: ::in_port_t,
28         pub sin_addr: ::in_addr,
29         pub sin_zero: [::c_char; 8],
30     }
31 }
32 
33 pub const AF_INET6: ::c_int = 23;
34 
35 pub const FIONBIO: ::c_ulong = 1;
36 
37 pub const POLLIN: ::c_short = 0x1;
38 pub const POLLPRI: ::c_short = 0x2;
39 pub const POLLOUT: ::c_short = 0x4;
40 pub const POLLERR: ::c_short = 0x8;
41 pub const POLLHUP: ::c_short = 0x10;
42 pub const POLLNVAL: ::c_short = 0x20;
43 
44 pub const SOL_SOCKET: ::c_int = 65535;
45 
46 pub const MSG_OOB: ::c_int = 1;
47 pub const MSG_PEEK: ::c_int = 2;
48 pub const MSG_DONTWAIT: ::c_int = 4;
49 pub const MSG_DONTROUTE: ::c_int = 0;
50 pub const MSG_WAITALL: ::c_int = 0;
51 pub const MSG_MORE: ::c_int = 0;
52 pub const MSG_NOSIGNAL: ::c_int = 0;
53