]>
Commit | Line | Data |
---|---|---|
f035d41b | 1 | pub type clock_t = ::c_long; |
041b39d2 XL |
2 | pub type c_char = u8; |
3 | pub type wchar_t = u32; | |
4 | ||
5 | pub type c_long = i32; | |
6 | pub type c_ulong = u32; | |
e74abb32 XL |
7 | |
8 | s! { | |
9 | pub struct sockaddr { | |
10 | pub sa_family: ::sa_family_t, | |
11 | pub sa_data: [::c_char; 14], | |
12 | } | |
13 | ||
14 | pub struct sockaddr_in6 { | |
15 | pub sin6_family: ::sa_family_t, | |
16 | pub sin6_port: ::in_port_t, | |
17 | pub sin6_flowinfo: u32, | |
18 | pub sin6_addr: ::in6_addr, | |
19 | pub sin6_scope_id: u32, | |
20 | } | |
21 | ||
22 | pub struct sockaddr_in { | |
23 | pub sin_family: ::sa_family_t, | |
24 | pub sin_port: ::in_port_t, | |
25 | pub sin_addr: ::in_addr, | |
26 | pub sin_zero: [u8; 8], | |
27 | } | |
28 | ||
29 | pub struct sockaddr_storage { | |
30 | pub ss_family: ::sa_family_t, | |
31 | pub __ss_padding: [u8; 26], | |
32 | } | |
33 | } | |
34 | ||
f035d41b XL |
35 | pub const FIONBIO: ::c_ulong = 1; |
36 | ||
37 | pub const POLLIN: ::c_short = 0x1; | |
38 | pub const POLLPRI: ::c_short = 0x2; | |
e74abb32 | 39 | pub const POLLHUP: ::c_short = 0x4; |
f035d41b XL |
40 | pub const POLLERR: ::c_short = 0x8; |
41 | pub const POLLOUT: ::c_short = 0x10; | |
42 | pub const POLLNVAL: ::c_short = 0x20; | |
43 | ||
44 | pub const SOL_SOCKET: ::c_int = 65535; |