Feature #1361
closedAdd support for socket options TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL
100%
Description
Linux and couple of other Unix Flavors support 3 IPPROTO_TCP options which are not in solaris. Some opensource programs do not compile due to the absence of these options. They are:
TCP_KEEPIDLE :
the interval in seconds between the last data packet sent (simple ACKs are not considered data) and the first keepalive probe; after the connection is marked to need keepalive.
This is similar to TCP_KEEPALIVE_THRESHOLD in illumos, but TCP_KEEPALIVE_THRESHOLD is in milliseconds
TCP_KEEPCNT
the number of unacknowledged probes to send before considering the connection dead and notifying the application layer
TCP_KEEPINTVL
the interval in seconds between subsequential keepalive probes, regardless of what the connection has exchanged in the meantime
Illumos has an option TCP_KEEPALIVE_ABORT_THRESHOLD which is equal to TCP_KEEPCNT * TCP_KEEPINTVL, but expressed in milliseconds.
It would be good to have these three options in solaris as well so that opensource projects using these, can be compiled with out any modification.
Also, while at this, as per Garrett's suggestion we can have variants of these three with millisecond granularity(TCP_KEEPIDLE_MS, TCP_KEEPCNT_MS, TCP_KEEPINTVL_MS) for those needs which require millisecond granularity.
Updated by James Carlson almost 12 years ago
Vineeth Pillai wrote:
Also, while at this, as per Garrett's suggestion we can have variants of these three with millisecond granularity(TCP_KEEPIDLE_MS, TCP_KEEPCNT_MS, TCP_KEEPINTVL_MS) for those needs which require millisecond granularity.
I don't see any other UNIX variant with those *_MS options. Unless there's a very clear use-case, I suggest leaving them out. They don't seem to add much in the way of value (either for the use of the keepalive feature itself or for interoperability), and they look too much like embrace-and-extend.
Updated by Garrett D'Amore almost 12 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
changeset: 13435:3185061eadee
tag: tip
user: Garrett D'Amore <garrett@nexenta.com>
date: Wed Aug 17 16:31:10 2011 -0700
description:
1361 Add support for socket options TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL
Reviewed by: Pavan <pavan.tc@gmail.com>
Reviewed by: Dan McDonald <danmcd at nexenta.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Garrett D'Amore <garrett@damore.org>