Skip to content

Commit 9cd5c4b

Browse files
committed
Add additional TCP options; fix TCP_KEEPIDLE
1 parent c35cc0a commit 9cd5c4b

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/unix/solarish/illumos.rs

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ pub const EFD_SEMAPHORE: ::c_int = 0x1;
2222
pub const EFD_NONBLOCK: ::c_int = 0x800;
2323
pub const EFD_CLOEXEC: ::c_int = 0x80000;
2424

25+
pub const TCP_KEEPIDLE: ::c_int = 34;
26+
pub const TCP_KEEPCNT: ::c_int = 35;
27+
pub const TCP_KEEPINTVL: ::c_int = 36;
28+
2529
extern "C" {
2630
pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
2731

src/unix/solarish/mod.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1386,9 +1386,6 @@ pub const IPV6_JOIN_GROUP: ::c_int = 9;
13861386
pub const IPV6_LEAVE_GROUP: ::c_int = 10;
13871387

13881388
pub const TCP_NODELAY: ::c_int = 1;
1389-
pub const TCP_KEEPIDLE: ::c_int = 34;
1390-
pub const TCP_KEEPCNT: ::c_int = 35;
1391-
pub const TCP_KEEPINTVL: ::c_int = 36;
13921389

13931390
pub const SOL_SOCKET: ::c_int = 0xffff;
13941391
pub const SO_DEBUG: ::c_int = 0x01;

src/unix/solarish/solaris.rs

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ pub const PORT_SOURCE_SIGNAL: ::c_int = 9;
3232
pub const AF_LOCAL: ::c_int = 0;
3333
pub const AF_FILE: ::c_int = 0;
3434

35+
pub const TCP_KEEPIDLE: ::c_int = 0x1d;
36+
pub const TCP_KEEPCNT: ::c_int = 0x1e;
37+
pub const TCP_KEEPINTVL: ::c_int = 0x1f;
38+
3539
extern "C" {
3640
pub fn fexecve(
3741
fd: ::c_int,

0 commit comments

Comments
 (0)