diff options
author | Joshua M. Clulow <jmc@oxide.computer> | 2020-11-25 16:34:58 -0800 |
---|---|---|
committer | Joshua M. Clulow <jmc@oxide.computer> | 2020-11-25 16:34:58 -0800 |
commit | 6b78ca9e7283b4269bd1f4cb08cfa6610adbcdce (patch) | |
tree | 851c2dbdc93213210555a24336f51cc518bbf6df | |
parent | 297c00203ab8bf79f13c635a8c37689d0976fc3d (diff) | |
download | rust-libc-6b78ca9e7283b4269bd1f4cb08cfa6610adbcdce.tar.gz |
add missing TCP socket options for illumos
The socket2 crate now depends on TCP_MAXSEG, and the rest of the options
may as well come along for the ride.
-rw-r--r-- | src/unix/solarish/illumos.rs | 1 | ||||
-rw-r--r-- | src/unix/solarish/mod.rs | 19 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/unix/solarish/illumos.rs b/src/unix/solarish/illumos.rs index 433aa4d3a6..49aeb9c9d5 100644 --- a/src/unix/solarish/illumos.rs +++ b/src/unix/solarish/illumos.rs @@ -25,6 +25,7 @@ pub const EFD_CLOEXEC: ::c_int = 0x80000; pub const TCP_KEEPIDLE: ::c_int = 34; pub const TCP_KEEPCNT: ::c_int = 35; pub const TCP_KEEPINTVL: ::c_int = 36; +pub const TCP_CONGESTION: ::c_int = 37; extern "C" { pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int; diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs index 695c7ebf04..0f53fe92dc 100644 --- a/src/unix/solarish/mod.rs +++ b/src/unix/solarish/mod.rs @@ -1385,7 +1385,24 @@ pub const IP_DROP_MEMBERSHIP: ::c_int = 20; pub const IPV6_JOIN_GROUP: ::c_int = 9; pub const IPV6_LEAVE_GROUP: ::c_int = 10; -pub const TCP_NODELAY: ::c_int = 1; +// These TCP socket options are common between illumos and Solaris, while higher +// numbers have generally diverged: +pub const TCP_NODELAY: ::c_int = 0x1; +pub const TCP_MAXSEG: ::c_int = 0x2; +pub const TCP_KEEPALIVE: ::c_int = 0x8; +pub const TCP_NOTIFY_THRESHOLD: ::c_int = 0x10; +pub const TCP_ABORT_THRESHOLD: ::c_int = 0x11; +pub const TCP_CONN_NOTIFY_THRESHOLD: ::c_int = 0x12; +pub const TCP_CONN_ABORT_THRESHOLD: ::c_int = 0x13; +pub const TCP_RECVDSTADDR: ::c_int = 0x14; +pub const TCP_INIT_CWND: ::c_int = 0x15; +pub const TCP_KEEPALIVE_THRESHOLD: ::c_int = 0x16; +pub const TCP_KEEPALIVE_ABORT_THRESHOLD: ::c_int = 0x17; +pub const TCP_CORK: ::c_int = 0x18; +pub const TCP_RTO_INITIAL: ::c_int = 0x19; +pub const TCP_RTO_MIN: ::c_int = 0x1a; +pub const TCP_RTO_MAX: ::c_int = 0x1b; +pub const TCP_LINGER2: ::c_int = 0x1c; pub const SOL_SOCKET: ::c_int = 0xffff; pub const SO_DEBUG: ::c_int = 0x01; |