mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Change the isc_nm_(get|set)timeouts() to work with milliseconds
The RFC7828 specifies the keepalive interval to be 16-bit, specified in units of 100 milliseconds and the configuration options tcp-*-timeouts are following the suit. The units of 100 milliseconds are very unintuitive and while we can't change the configuration and presentation format, we should not follow this weird unit in the API. This commit changes the isc_nm_(get|set)timeouts() functions to work with milliseconds and convert the values to milliseconds before passing them to the function, not just internally.
This commit is contained in:
@@ -166,7 +166,7 @@ void
|
||||
isc_nmhandle_cleartimeout(isc_nmhandle_t *handle);
|
||||
/*%<
|
||||
* Set/clear the read/recv timeout for the socket connected to 'handle'
|
||||
* to 'timeout', and reset the timer, in miliseconds.
|
||||
* to 'timeout' (in milliseconds), and reset the timer.
|
||||
*
|
||||
* When this is called on a 'wrapper' socket handle (for example,
|
||||
* a TCPDNS socket wrapping a TCP connection), the timer is set for
|
||||
@@ -433,10 +433,10 @@ void
|
||||
isc_nm_settimeouts(isc_nm_t *mgr, uint32_t init, uint32_t idle,
|
||||
uint32_t keepalive, uint32_t advertised);
|
||||
/*%<
|
||||
* Sets the initial, idle, and keepalive timeout values to use for
|
||||
* TCP connections, and the timeout value to advertise in responses using
|
||||
* Sets the initial, idle, and keepalive timeout values (in milliseconds) to use
|
||||
* for TCP connections, and the timeout value to advertise in responses using
|
||||
* the EDNS TCP Keepalive option (which should ordinarily be the same
|
||||
* as 'keepalive'), in tenths of seconds.
|
||||
* as 'keepalive').
|
||||
*
|
||||
* Requires:
|
||||
* \li 'mgr' is a valid netmgr.
|
||||
@@ -447,7 +447,7 @@ isc_nm_gettimeouts(isc_nm_t *mgr, uint32_t *initial, uint32_t *idle,
|
||||
uint32_t *keepalive, uint32_t *advertised);
|
||||
/*%<
|
||||
* Gets the initial, idle, keepalive, or advertised timeout values,
|
||||
* in tenths of seconds.
|
||||
* in milliseconds.
|
||||
*
|
||||
* Any integer pointer parameter not set to NULL will be updated to
|
||||
* contain the corresponding timeout value.
|
||||
|
Reference in New Issue
Block a user