From 14336b7b4c70b3def333ae78e654e8919107176b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Tue, 28 Jun 2016 13:50:57 +0200 Subject: [PATCH 13/17] tcp.7: document TCP_USER_TIMEOUT --- man-pages/man7/tcp.7 | 48 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/man-pages/man7/tcp.7 b/man-pages/man7/tcp.7 index 93b4148..98ccf27 100644 --- a/man-pages/man7/tcp.7 +++ b/man-pages/man7/tcp.7 @@ -46,9 +46,6 @@ .\" TCP_THIN_DUPACK (2..6.34) .\" commit 7e38017557bc0b87434d184f8804cadb102bb903 .\" Author: Andreas Petlund -.\" TCP_USER_TIMEOUT (new in 2.6.37) -.\" Author: Jerry Chu -.\" commit dca43c75e7e545694a9dd6288553f55c53e2a3a3 .\" TCP_REPAIR (3.5) .\" commit ee9952831cfd0bbe834f4a26489d7dce74582e37 .\" Author: Pavel Emelyanov @@ -1038,6 +1035,51 @@ aborting the attempt to connect. It cannot exceed 255. This option should not be used in code intended to be portable. .TP +.BR TCP_USER_TIMEOUT " (since Linux 2.6.37)" +.\" commit dca43c75e7e545694a9dd6288553f55c53e2a3a3 +.\" Author: Jerry Chu +.\" The following text taken nearly verbatim from Jerry Chu's (excellent) +.\" commit message. +.\" +This option takes an +.IR "unsigned int" +as an argument. +When the value is greater than 0, +it specifies the maximum amount of time in milliseconds that transmitted +data may remain unacknowledged before TCP will forcibly close the +corresponding connection and return +.B ETIMEDOUT +to the application. +If the option value is specified as 0, +TCP will to use the system default. + +Increasing user timeouts allows a TCP connection to survive extended +periods without end-to-end connectivity. +Decreasing user timeouts +allows applications to "fail fast", if so desired. +Otherwise, failure may take up to 20 minutes with +the current system defaults in a normal WAN environment. + +This option can be set during any state of a TCP connection, +but is effective only during the synchronized states of a connection +(ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, and LAST-ACK). +Moreover, when used with the TCP keepalive +.RB ( SO_KEEPALIVE ) +option, +.B TCP_USER_TIMEOUT +will override keepalive to determine when to close a +connection due to keepalive failure. + +The option has no effect on when TCP retransmits a packet, +nor when a keepalive probe is sent. + +This option, like many others, will be inherited by the socket returned by +.BR accept (2), +if it was set on the listening socket. + +Further details on the user timeout feature can be found in +RFC\ 793 and RFC\ 5482 ("TCP User Timeout Option"). +.TP .BR TCP_WINDOW_CLAMP " (since Linux 2.4)" .\" Precisely: since 2.3.41 Bound the size of the advertised window to this value. -- 2.7.4