diff options
author | Zac Berkowitz <zac.berkowitz@gmail.com> | 2017-02-28 19:44:33 +0000 |
---|---|---|
committer | Zac Berkowitz <zac.berkowitz@gmail.com> | 2017-03-01 18:06:01 +0000 |
commit | fa1962641aa4653f0f80c394b72d8aeaf6f7382b (patch) | |
tree | b2b9ee0fd28c73da57fc3013c819d6916ae031db /src/unix/bsd | |
parent | 27ce7b1575c102de361ab8e0a0bb7dbeb3da3dfe (diff) | |
download | rust-libc-fa1962641aa4653f0f80c394b72d8aeaf6f7382b.tar.gz |
Added socket constants for apple
Diffstat (limited to 'src/unix/bsd')
-rw-r--r-- | src/unix/bsd/apple/mod.rs | 126 |
1 files changed, 116 insertions, 10 deletions
diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index bbc9583f13..132b69dfe8 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -846,12 +846,100 @@ pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8; pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10; pub const AF_UNSPEC: ::c_int = 0; -pub const AF_UNIX: ::c_int = 1; +pub const AF_LOCAL: ::c_int = 1; +pub const AF_UNIX: ::c_int = AF_LOCAL; pub const AF_INET: ::c_int = 2; +pub const AF_IMPLINK: ::c_int = 3; +pub const AF_PUP: ::c_int = 4; +pub const AF_CHAOS: ::c_int = 5; +pub const AF_NS: ::c_int = 6; +pub const AF_ISO: ::c_int = 7; +pub const AF_OSI: ::c_int = AF_ISO; +pub const AF_ECMA: ::c_int = 8; +pub const AF_DATAKIT: ::c_int = 9; +pub const AF_CCITT: ::c_int = 10; +pub const AF_SNA: ::c_int = 11; +pub const AF_DECnet: ::c_int = 12; +pub const AF_DLI: ::c_int = 13; +pub const AF_LAT: ::c_int = 14; +pub const AF_HYLINK: ::c_int = 15; +pub const AF_APPLETALK: ::c_int = 16; +pub const AF_ROUTE: ::c_int = 17; +pub const AF_LINK: ::c_int = 18; +pub const pseudo_AF_XTP: ::c_int = 19; +pub const AF_COIP: ::c_int = 20; +pub const AF_CNT: ::c_int = 21; +pub const pseudo_AF_RTIP: ::c_int = 22; +pub const AF_IPX: ::c_int = 23; +pub const AF_SIP: ::c_int = 24; +pub const pseudo_AF_PIP: ::c_int = 25; +pub const AF_ISDN: ::c_int = 28; +pub const AF_E164: ::c_int = AF_ISDN; +pub const pseudo_AF_KEY: ::c_int = 29; pub const AF_INET6: ::c_int = 30; +pub const AF_NATM: ::c_int = 31; +pub const AF_SYSTEM: ::c_int = 32; +pub const AF_NETBIOS: ::c_int = 33; +pub const AF_PPP: ::c_int = 34; +pub const pseudo_AF_HDRCMPLT: ::c_int = 35; +#[doc(hidden)] +pub const AF_MAX: ::c_int = 40; + +pub const PF_UNSPEC: ::c_int = AF_UNSPEC; +pub const PF_LOCAL: ::c_int = AF_LOCAL; +pub const PF_UNIX: ::c_int = PF_LOCAL; +pub const PF_INET: ::c_int = AF_INET; +pub const PF_IMPLINK: ::c_int = AF_IMPLINK; +pub const PF_PUP: ::c_int = AF_PUP; +pub const PF_CHAOS: ::c_int = AF_CHAOS; +pub const PF_NS: ::c_int = AF_NS; +pub const PF_ISO: ::c_int = AF_ISO; +pub const PF_OSI: ::c_int = AF_ISO; +pub const PF_ECMA: ::c_int = AF_ECMA; +pub const PF_DATAKIT: ::c_int = AF_DATAKIT; +pub const PF_CCITT: ::c_int = AF_CCITT; +pub const PF_SNA: ::c_int = AF_SNA; +pub const PF_DECnet: ::c_int = AF_DECnet; +pub const PF_DLI: ::c_int = AF_DLI; +pub const PF_LAT: ::c_int = AF_LAT; +pub const PF_HYLINK: ::c_int = AF_HYLINK; +pub const PF_APPLETALK: ::c_int = AF_APPLETALK; +pub const PF_ROUTE: ::c_int = AF_ROUTE; +pub const PF_LINK: ::c_int = AF_LINK; +pub const PF_XTP: ::c_int = pseudo_AF_XTP; +pub const PF_COIP: ::c_int = AF_COIP; +pub const PF_CNT: ::c_int = AF_CNT; +pub const PF_SIP: ::c_int = AF_SIP; +pub const PF_IPX: ::c_int = AF_IPX; +pub const PF_RTIP: ::c_int = pseudo_AF_RTIP; +pub const PF_PIP: ::c_int = pseudo_AF_PIP; +pub const PF_ISDN: ::c_int = AF_ISDN; +pub const PF_KEY: ::c_int = pseudo_AF_KEY; +pub const PF_INET6: ::c_int = AF_INET6; +pub const PF_NATM: ::c_int = AF_NATM; +pub const PF_SYSTEM: ::c_int = AF_SYSTEM; +pub const PF_NETBIOS: ::c_int = AF_NETBIOS; +pub const PF_PPP: ::c_int = AF_PPP; +#[doc(hidden)] +pub const PF_MAX: ::c_int = AF_MAX; + +#[doc(hidden)] +pub const NET_MAXID: ::c_int = AF_MAX; + +pub const NET_RT_DUMP: ::c_int = 1; +pub const NET_RT_FLAGS: ::c_int = 2; +pub const NET_RT_IFLIST: ::c_int = 3; +#[doc(hidden)] +pub const NET_RT_MAXID: ::c_int = 10; + +pub const SOMAXCONN: ::c_int = 128; + +pub const SOCK_MAXADDRLEN: ::c_int = 255; + pub const SOCK_STREAM: ::c_int = 1; pub const SOCK_DGRAM: ::c_int = 2; pub const SOCK_RAW: ::c_int = 3; +pub const SOCK_RDM: ::c_int = 4; pub const SOCK_SEQPACKET: ::c_int = 5; pub const IPPROTO_ICMP: ::c_int = 1; pub const IPPROTO_ICMPV6: ::c_int = 58; @@ -881,6 +969,10 @@ pub const SO_USELOOPBACK: ::c_int = 0x0040; pub const SO_LINGER: ::c_int = 0x0080; pub const SO_OOBINLINE: ::c_int = 0x0100; pub const SO_REUSEPORT: ::c_int = 0x0200; +pub const SO_TIMESTAMP: ::c_int = 0x0400; +pub const SO_DONTTRUNC: ::c_int = 0x2000; +pub const SO_WANTMORE: ::c_int = 0x4000; +pub const SO_WANTOOBFLAG: ::c_int = 0x8000; pub const SO_SNDBUF: ::c_int = 0x1001; pub const SO_RCVBUF: ::c_int = 0x1002; pub const SO_SNDLOWAT: ::c_int = 0x1003; @@ -889,8 +981,31 @@ pub const SO_SNDTIMEO: ::c_int = 0x1005; pub const SO_RCVTIMEO: ::c_int = 0x1006; pub const SO_ERROR: ::c_int = 0x1007; pub const SO_TYPE: ::c_int = 0x1008; +pub const SO_NREAD: ::c_int = 0x1020; +pub const SO_NKE: ::c_int = 0x1021; +pub const SO_NOSIGPIPE: ::c_int = 0x1022; +pub const SO_NOADDRERR: ::c_int = 0x1023; +pub const SO_NWRITE: ::c_int = 0x1024; +pub const MSG_OOB: ::c_int = 0x1; pub const MSG_PEEK: ::c_int = 0x2; +pub const MSG_DONTROUTE: ::c_int = 0x4; +pub const MSG_EOR: ::c_int = 0x8; +pub const MSG_TRUNC: ::c_int = 0x10; +pub const MSG_CTRUNC: ::c_int = 0x20; +pub const MSG_WAITALL: ::c_int = 0x40; +pub const MSG_DONTWAIT: ::c_int = 0x80; +pub const MSG_EOF: ::c_int = 0x100; +pub const MSG_FLUSH: ::c_int = 0x400; +pub const MSG_HOLD: ::c_int = 0x800; +pub const MSG_SEND: ::c_int = 0x1000; +pub const MSG_HAVEMORE: ::c_int = 0x2000; +pub const MSG_RCVMORE: ::c_int = 0x4000; +// pub const MSG_COMPAT: ::c_int = 0x8000; + +pub const SCM_RIGHTS: ::c_int = 0x01; +pub const SCM_TIMESTAMP: ::c_int = 0x02; +pub const SCM_CREDS: ::c_int = 0x03; pub const IFF_LOOPBACK: ::c_int = 0x8; @@ -917,15 +1032,6 @@ pub const MAP_JIT: ::c_int = 0x0800; pub const IPPROTO_RAW: ::c_int = 255; -pub const SO_NREAD: ::c_int = 0x1020; -pub const SO_NKE: ::c_int = 0x1021; -pub const SO_NOSIGPIPE: ::c_int = 0x1022; -pub const SO_NOADDRERR: ::c_int = 0x1023; -pub const SO_NWRITE: ::c_int = 0x1024; -pub const SO_DONTTRUNC: ::c_int = 0x2000; -pub const SO_WANTMORE: ::c_int = 0x4000; -pub const SO_WANTOOBFLAG: ::c_int = 0x8000; - pub const _SC_ARG_MAX: ::c_int = 1; pub const _SC_CHILD_MAX: ::c_int = 2; pub const _SC_CLK_TCK: ::c_int = 3; |