diff options
author | bors <bors@rust-lang.org> | 2018-11-27 15:25:08 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2018-11-27 15:25:08 +0000 |
commit | 914e50a60773b231619ad4abce72f94fb0c13e2f (patch) | |
tree | 9681072412b7bdede0d6247174e5f939e6b56ff0 | |
parent | 50719a33bdfd7d58cf656fd48383f0ffa40d799c (diff) | |
parent | 32a7d173c6601a2426b20b370dd11290ab324aa0 (diff) | |
download | rust-libc-914e50a60773b231619ad4abce72f94fb0c13e2f.tar.gz |
Auto merge of #1151 - Fensteer:Add-TCP-constants, r=gnzlbg
Add some TCP constants
Add some TCP constants according to the sources : https://github.com/freebsd/freebsd/blob/master/sys/netinet/tcp.h#L164
-rw-r--r-- | src/unix/bsd/apple/mod.rs | 1 | ||||
-rw-r--r-- | src/unix/bsd/freebsdlike/dragonfly/mod.rs | 5 | ||||
-rw-r--r-- | src/unix/bsd/freebsdlike/freebsd/mod.rs | 10 | ||||
-rw-r--r-- | src/unix/bsd/freebsdlike/mod.rs | 1 | ||||
-rw-r--r-- | src/unix/bsd/mod.rs | 3 | ||||
-rw-r--r-- | src/unix/bsd/netbsdlike/mod.rs | 8 | ||||
-rw-r--r-- | src/unix/bsd/netbsdlike/openbsdlike/mod.rs | 3 |
7 files changed, 28 insertions, 3 deletions
diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 2dc3245a96..a9ac3ba0e1 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -1549,7 +1549,6 @@ pub const IPV6_LEAVE_GROUP: ::c_int = 13; pub const IPV6_PKTINFO: ::c_int = 46; pub const IPV6_RECVPKTINFO: ::c_int = 61; -pub const TCP_NODELAY: ::c_int = 0x01; pub const TCP_KEEPALIVE: ::c_int = 0x10; pub const SOL_LOCAL: ::c_int = 0; diff --git a/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/src/unix/bsd/freebsdlike/dragonfly/mod.rs index dd7cf1a3bd..3280322663 100644 --- a/src/unix/bsd/freebsdlike/dragonfly/mod.rs +++ b/src/unix/bsd/freebsdlike/dragonfly/mod.rs @@ -682,6 +682,11 @@ pub const IPPROTO_DONE: ::c_int = 257; /// Used by RSS: the layer3 protocol is unknown pub const IPPROTO_UNKNOWN: ::c_int = 258; +// sys/netinet/tcp.h +pub const TCP_SIGNATURE_ENABLE: ::c_int = 16; +pub const TCP_KEEPINIT: ::c_int = 32; +pub const TCP_FASTKEEP: ::c_int = 128; + pub const AF_BLUETOOTH: ::c_int = 33; pub const AF_MPLS: ::c_int = 34; pub const AF_IEEE80211: ::c_int = 35; diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index de73e19dee..1ead1665b5 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -792,6 +792,16 @@ pub const IPPROTO_DIVERT: ::c_int = 258; /// SeND pseudo-protocol pub const IPPROTO_SEND: ::c_int = 259; +// sys/netinet/TCP.h +pub const TCP_MD5SIG: ::c_int = 16; +pub const TCP_INFO: ::c_int = 32; +pub const TCP_CONGESTION: ::c_int = 64; +pub const TCP_CCALGOOPT: ::c_int = 65; +pub const TCP_KEEPINIT: ::c_int = 128; +pub const TCP_FASTOPEN: ::c_int = 1025; +pub const TCP_PCAP_OUT: ::c_int = 2048; +pub const TCP_PCAP_IN: ::c_int = 4096; + pub const IP_BINDANY: ::c_int = 24; pub const PF_SLOW: ::c_int = AF_SLOW; diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index d7b5c91b67..5948a71fc7 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -669,7 +669,6 @@ pub const IPV6_LEAVE_GROUP: ::c_int = 13; pub const IPV6_RECVPKTINFO: ::c_int = 36; pub const IPV6_PKTINFO: ::c_int = 46; -pub const TCP_NODELAY: ::c_int = 1; pub const TCP_KEEPIDLE: ::c_int = 256; pub const TCP_KEEPINTVL: ::c_int = 512; pub const TCP_KEEPCNT: ::c_int = 1024; diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs index a2df23bf18..a7ac8d7874 100644 --- a/src/unix/bsd/mod.rs +++ b/src/unix/bsd/mod.rs @@ -316,7 +316,10 @@ pub const LOG_AUTHPRIV: ::c_int = 10 << 3; pub const LOG_FTP: ::c_int = 11 << 3; pub const LOG_PERROR: ::c_int = 0x20; +pub const TCP_NODELAY: ::c_int = 1; pub const TCP_MAXSEG: ::c_int = 2; +pub const TCP_NOPUSH: ::c_int = 4; +pub const TCP_NOOPT: ::c_int = 8; pub const PIPE_BUF: usize = 512; diff --git a/src/unix/bsd/netbsdlike/mod.rs b/src/unix/bsd/netbsdlike/mod.rs index 9c1ce770bd..3d8c05b1dd 100644 --- a/src/unix/bsd/netbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/mod.rs @@ -431,7 +431,13 @@ pub const IP_DROP_MEMBERSHIP: ::c_int = 13; pub const IPV6_RECVPKTINFO: ::c_int = 36; pub const IPV6_PKTINFO: ::c_int = 46; -pub const TCP_NODELAY: ::c_int = 0x01; +pub const TCP_KEEPIDLE: ::c_int = 3; +pub const TCP_KEEPINTVL: ::c_int = 5; +pub const TCP_KEEPCNT: ::c_int = 6; +pub const TCP_KEEPINIT: ::c_int = 7; +pub const TCP_INFO: ::c_int = 9; +pub const TCP_MD5SIG: ::c_int = 0x10; +pub const TCP_CONGCTL: ::c_int = 0x20; pub const SOL_SOCKET: ::c_int = 0xffff; pub const SO_DEBUG: ::c_int = 0x01; diff --git a/src/unix/bsd/netbsdlike/openbsdlike/mod.rs b/src/unix/bsd/netbsdlike/openbsdlike/mod.rs index 8ffcc99941..01e9cca237 100644 --- a/src/unix/bsd/netbsdlike/openbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/openbsdlike/mod.rs @@ -320,6 +320,9 @@ pub const IPPROTO_DIVERT: ::c_int = 258; pub const IP_RECVDSTADDR: ::c_int = 7; pub const IP_SENDSRCADDR: ::c_int = IP_RECVDSTADDR; +// sys/netinet/in.h +pub const TCP_NOPUSH: ::c_int = 0x10; + pub const AF_ECMA: ::c_int = 8; pub const AF_ROUTE: ::c_int = 17; pub const AF_ENCAP: ::c_int = 28; |