Added socket bits for Darwin
parent
b23a87953a
commit
5418efa1e5
|
@ -771,6 +771,28 @@ pub const IPPROTO_UDP = 17;
|
|||
pub const IPPROTO_IP = 0;
|
||||
pub const IPPROTO_IPV6 = 41;
|
||||
|
||||
pub const SOL_SOCKET = 0xffff;
|
||||
|
||||
pub const SO_DEBUG = 0x0001;
|
||||
pub const SO_ACCEPTCONN = 0x0002;
|
||||
pub const SO_REUSEADDR = 0x0004;
|
||||
pub const SO_KEEPALIVE = 0x0008;
|
||||
pub const SO_DONTROUTE = 0x0010;
|
||||
pub const SO_BROADCAST = 0x0020;
|
||||
pub const SO_USELOOPBACK = 0x0040;
|
||||
pub const SO_LINGER = 0x1080;
|
||||
pub const SO_OOBINLINE = 0x0100;
|
||||
pub const SO_REUSEPORT = 0x0200;
|
||||
pub const SO_ACCEPTFILTER = 0x1000;
|
||||
pub const SO_SNDBUF = 0x1001;
|
||||
pub const SO_RCVBUF = 0x1002;
|
||||
pub const SO_SNDLOWAT = 0x1003;
|
||||
pub const SO_RCVLOWAT = 0x1004;
|
||||
pub const SO_SNDTIMEO = 0x1005;
|
||||
pub const SO_RCVTIMEO = 0x1006;
|
||||
pub const SO_ERROR = 0x1007;
|
||||
pub const SO_TYPE = 0x1008;
|
||||
|
||||
fn wstatus(x: u32) u32 {
|
||||
return x & 0o177;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue