The objective of the project is to implement TCP UTO(User Timeout Option, defined by RFC 5482) in FreeBSD's TCP stack. The TCP user timeout controls how long transmitted data may remain unacknowledged before a connection is forcefully closed and it is a local, per-connection parameter. RFC 5482 specifies a new TCP option -- the TCP User Timeout Option -- that allows one end of a TCP connection to advertise its current user timeout value and provides advice to the other end of the TCP connection to adapt its user timeout accordingly. Increasing the user timeouts on both ends of a TCP connection allows it to survive extended periods without end-to-end connectivity in bad network condition. Decreasing the user timeouts allows busy servers to explicitly notify their clients that they will maintain the connection state only for a short time without connectivity.

TCP maintains four per-connection state variables to control the operation of the UTO option, they are USER_TIMEOUT, ADV_UTO, ENABLED, and CHANGEABLE. For more details, see RFC 5428.

Sending a TCP User Timeout Option informs the other end of the connection of the current local user timeout and suggests that the other end adapt its user timeout accordingly. The user timeout value included in a UTO option contains the ADV_UTO value that is expected to be adopted for the TCP's USER TIMEOUT parameter during the synchronized states of a connection (ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, or LAST-ACK). Connections in other states MUST use the default timeout values defined in [RFC0793] and [RFC1122].

FangWang/TCPUTO (last edited 2022-10-27T04:07:59+0000 by KubilayKocak)