diff --git a/lib/isc/include/isc/netmgr.h b/lib/isc/include/isc/netmgr.h index 4b54c4a806..2a1a2dc86c 100644 --- a/lib/isc/include/isc/netmgr.h +++ b/lib/isc/include/isc/netmgr.h @@ -381,24 +381,6 @@ isc_nm_sequential(isc_nmhandle_t *handle); * connection. */ -void -isc_nm_tcpdns_keepalive(isc_nmhandle_t *handle, bool value); -/*%< - * Enable/disable keepalive on this connection by setting it to 'value'. - * - * When keepalive is active, we switch to using the keepalive timeout - * to determine when to close a connection, rather than the idle timeout. - */ - -void -isc_nm_tlsdns_keepalive(isc_nmhandle_t *handle, bool value); -/*%< - * Enable/disable keepalive on this connection by setting it to 'value'. - * - * When keepalive is active, we switch to using the keepalive timeout - * to determine when to close a connection, rather than the idle timeout. - */ - void isc_nm_settimeouts(isc_nm_t *mgr, uint32_t init, uint32_t idle, uint32_t keepalive, uint32_t advertised); @@ -406,7 +388,7 @@ isc_nm_settimeouts(isc_nm_t *mgr, uint32_t init, uint32_t idle, * 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'). + * as 'keepalive'), in milliseconds. * * Requires: * \li 'mgr' is a valid netmgr. diff --git a/lib/isc/netmgr/netmgr-int.h b/lib/isc/netmgr/netmgr-int.h index 2c7f3d8281..1902c3df73 100644 --- a/lib/isc/netmgr/netmgr-int.h +++ b/lib/isc/netmgr/netmgr-int.h @@ -1452,17 +1452,10 @@ isc__nm_async_tlsdobio(isc__networker_t *worker, isc__netievent_t *ev0); void isc__nm_async_tlscancel(isc__networker_t *worker, isc__netievent_t *ev0); - /*%< - * Callback handlers for asynchronouse TLS events. + * Callback handlers for asynchronous TLS events. */ -void -isc__nm_async_tcpdnsaccept(isc__networker_t *worker, isc__netievent_t *ev0); -void -isc__nm_async_tcpdnsconnect(isc__networker_t *worker, isc__netievent_t *ev0); -void -isc__nm_async_tcpdnslisten(isc__networker_t *worker, isc__netievent_t *ev0); void isc__nm_tcpdns_send(isc_nmhandle_t *handle, isc_region_t *region, isc_nm_cb_t cb, void *cbarg); @@ -1492,11 +1485,13 @@ isc__nm_tcpdns_settimeout(isc_nmhandle_t *handle, uint32_t timeout); * associated with 'handle', and the TCP socket it wraps around. */ -void -isc__nm_async_tcpdnslisten(isc__networker_t *worker, isc__netievent_t *ev0); void isc__nm_async_tcpdnsaccept(isc__networker_t *worker, isc__netievent_t *ev0); void +isc__nm_async_tcpdnsconnect(isc__networker_t *worker, isc__netievent_t *ev0); +void +isc__nm_async_tcpdnslisten(isc__networker_t *worker, isc__netievent_t *ev0); +void isc__nm_async_tcpdnscancel(isc__networker_t *worker, isc__netievent_t *ev0); void isc__nm_async_tcpdnsclose(isc__networker_t *worker, isc__netievent_t *ev0); @@ -1504,12 +1499,17 @@ void isc__nm_async_tcpdnssend(isc__networker_t *worker, isc__netievent_t *ev0); void isc__nm_async_tcpdnsstop(isc__networker_t *worker, isc__netievent_t *ev0); - void isc__nm_async_tcpdnsread(isc__networker_t *worker, isc__netievent_t *ev0); +/*%< + * Callback handlers for asynchronous TCPDNS events. + */ void isc__nm_tcpdns_read(isc_nmhandle_t *handle, isc_nm_recv_cb_t cb, void *cbarg); +/* + * Back-end implementation of isc_nm_read() for TCPDNS handles. + */ void isc__nm_tcpdns_cancelread(isc_nmhandle_t *handle); @@ -1518,13 +1518,14 @@ isc__nm_tcpdns_cancelread(isc_nmhandle_t *handle); */ void -isc__nm_async_tlsdnscycle(isc__networker_t *worker, isc__netievent_t *ev0); -void -isc__nm_async_tlsdnsaccept(isc__networker_t *worker, isc__netievent_t *ev0); -void -isc__nm_async_tlsdnsconnect(isc__networker_t *worker, isc__netievent_t *ev0); -void -isc__nm_async_tlsdnslisten(isc__networker_t *worker, isc__netievent_t *ev0); +isc__nm_tcpdns_keepalive(isc_nmhandle_t *handle, bool value); +/*%< + * Enable/disable keepalive on this connection by setting it to 'value'. + * + * When keepalive is active, we switch to using the keepalive timeout + * to determine when to close a connection, rather than the idle timeout. + */ + void isc__nm_tlsdns_send(isc_nmhandle_t *handle, isc_region_t *region, isc_nm_cb_t cb, void *cbarg); @@ -1552,10 +1553,35 @@ isc__nm_tlsdns_settimeout(isc_nmhandle_t *handle, uint32_t timeout); */ void -isc__nm_async_tlsdnslisten(isc__networker_t *worker, isc__netievent_t *ev0); +isc__nm_tlsdns_read(isc_nmhandle_t *handle, isc_nm_recv_cb_t cb, void *cbarg); +/* + * Back-end implementation of isc_nm_read() for TLSDNS handles. + */ + +void +isc__nm_tlsdns_cancelread(isc_nmhandle_t *handle); +/*%< + * Stop reading on a connected TLSDNS handle. + */ + +void +isc__nm_tlsdns_keepalive(isc_nmhandle_t *handle, bool value); +/*%< + * Enable/disable keepalive on this connection by setting it to 'value'. + * + * When keepalive is active, we switch to using the keepalive timeout + * to determine when to close a connection, rather than the idle timeout. + */ + +void +isc__nm_async_tlsdnscycle(isc__networker_t *worker, isc__netievent_t *ev0); void isc__nm_async_tlsdnsaccept(isc__networker_t *worker, isc__netievent_t *ev0); void +isc__nm_async_tlsdnsconnect(isc__networker_t *worker, isc__netievent_t *ev0); +void +isc__nm_async_tlsdnslisten(isc__networker_t *worker, isc__netievent_t *ev0); +void isc__nm_async_tlsdnscancel(isc__networker_t *worker, isc__netievent_t *ev0); void isc__nm_async_tlsdnsclose(isc__networker_t *worker, isc__netievent_t *ev0); @@ -1565,17 +1591,10 @@ void isc__nm_async_tlsdnsstop(isc__networker_t *worker, isc__netievent_t *ev0); void isc__nm_async_tlsdnsshutdown(isc__networker_t *worker, isc__netievent_t *ev0); - void isc__nm_async_tlsdnsread(isc__networker_t *worker, isc__netievent_t *ev0); - -void -isc__nm_tlsdns_read(isc_nmhandle_t *handle, isc_nm_recv_cb_t cb, void *cbarg); - -void -isc__nm_tlsdns_cancelread(isc_nmhandle_t *handle); /*%< - * Stop reading on a connected TLSDNS handle. + * Callback handlers for asynchronous TLSDNS events. */ #if HAVE_LIBNGHTTP2 diff --git a/lib/isc/netmgr/tcpdns.c b/lib/isc/netmgr/tcpdns.c index da225cae16..a26d0fc44b 100644 --- a/lib/isc/netmgr/tcpdns.c +++ b/lib/isc/netmgr/tcpdns.c @@ -1437,7 +1437,7 @@ isc__nm_async_tcpdnscancel(isc__networker_t *worker, isc__netievent_t *ev0) { } void -isc_nm_tcpdns_keepalive(isc_nmhandle_t *handle, bool value) { +isc__nm_tcpdns_keepalive(isc_nmhandle_t *handle, bool value) { isc_nmsocket_t *sock = NULL; REQUIRE(VALID_NMHANDLE(handle)); diff --git a/lib/isc/netmgr/tlsdns.c b/lib/isc/netmgr/tlsdns.c index db62ac8343..c4bba552f8 100644 --- a/lib/isc/netmgr/tlsdns.c +++ b/lib/isc/netmgr/tlsdns.c @@ -2007,7 +2007,7 @@ isc__nm_async_tlsdnscancel(isc__networker_t *worker, isc__netievent_t *ev0) { } void -isc_nm_tlsdns_keepalive(isc_nmhandle_t *handle, bool value) { +isc__nm_tlsdns_keepalive(isc_nmhandle_t *handle, bool value) { isc_nmsocket_t *sock = NULL; REQUIRE(VALID_NMHANDLE(handle));