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
This commit is contained in:
bors 2018-11-27 15:25:08 +00:00
commit 914e50a607
7 changed files with 28 additions and 3 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;