]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
cleanup netmgr-int.h
authorEvan Hunt <each@isc.org>
Tue, 3 Nov 2020 02:33:20 +0000 (18:33 -0800)
committerEvan Hunt <each@isc.org>
Fri, 27 Aug 2021 16:56:51 +0000 (09:56 -0700)
- fix some duplicated and out-of-order prototypes declared in
  netmgr-int.h
- rename isc_nm_tcpdns_keepalive to isc__nm_tcpdns_keepalive as
  it's for internal use

lib/isc/include/isc/netmgr.h
lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/tcpdns.c
lib/isc/netmgr/tlsdns.c

index 4b54c4a806ee6ed045713dc886ef21494bb914fe..2a1a2dc86cf08f63ff113492cfa2600dbedc9941 100644 (file)
@@ -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.
index 2c7f3d8281d22525050a4eb6a8c1126d59e5d250..1902c3df73de64192a2fa2993616df55c6f7743b 100644 (file)
@@ -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
index da225cae16b1e9424e77414c3922085807a8a9e4..a26d0fc44b3d9e523313533177aaf12645dae3c4 100644 (file)
@@ -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));
index db62ac8343e7242333bddd6b4c5048d6ff8fc371..c4bba552f8be1c1220b1e0a5e3145c9ba18898bf 100644 (file)
@@ -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));