xfr = query->lookup->rdtype == dns_rdatatype_ixfr ||
query->lookup->rdtype == dns_rdatatype_axfr;
- if (xfr && isc_nm_is_tlsdns_handle(query->handle) &&
+ if (xfr && isc_nm_socket_type(query->handle) == isc_nm_tlsdnssocket &&
!isc_nm_xfr_allowed(query->handle))
{
dighost_error("zone transfers over the "
* 'cb'.
*/
-bool
-isc_nm_is_tlsdns_handle(isc_nmhandle_t *handle);
/*%<
* Returns 'true' iff 'handle' is associated with a socket of type
* 'isc_nm_tlsdnssocket'.
* connection.
*/
+isc_nmsocket_type
+isc_nm_socket_type(const isc_nmhandle_t *handle);
+/*%<
+ * Returns the handle's underlying socket type.
+ *
+ * Requires:
+ * \li 'handle' is a valid netmgr handle object.
+ */
+
void
isc_nm_task_enqueue(isc_nm_t *mgr, isc_task_t *task, int threadid);
/*%<
isc_statsformat_xml,
isc_statsformat_json
} isc_statsformat_t;
+
+typedef enum isc_nmsocket_type {
+ isc_nm_nonesocket = 0,
+ isc_nm_udpsocket = 1 << 1,
+ isc_nm_tcpsocket = 1 << 2,
+ isc_nm_tcpdnssocket = 1 << 3,
+ isc_nm_tlssocket = 1 << 4,
+ isc_nm_tlsdnssocket = 1 << 5,
+ isc_nm_httpsocket = 1 << 6,
+ isc_nm_maxsocket,
+
+ isc_nm_udplistener, /* Aggregate of nm_udpsocks */
+ isc_nm_tcplistener,
+ isc_nm_tlslistener,
+ isc_nm_tcpdnslistener,
+ isc_nm_tlsdnslistener,
+ isc_nm_httplistener
+} isc_nmsocket_type;
+
+typedef isc_nmsocket_type isc_nmsocket_type_t;
#endif
};
-typedef enum isc_nmsocket_type {
- isc_nm_udpsocket,
- isc_nm_udplistener, /* Aggregate of nm_udpsocks */
- isc_nm_tcpsocket,
- isc_nm_tcplistener,
- isc_nm_tcpdnslistener,
- isc_nm_tcpdnssocket,
- isc_nm_tlslistener,
- isc_nm_tlssocket,
- isc_nm_tlsdnslistener,
- isc_nm_tlsdnssocket,
- isc_nm_httplistener,
- isc_nm_httpsocket
-} isc_nmsocket_type;
-
/*%
* A universal structure for either a single socket or a group of
* dup'd/SO_REUSE_PORT-using sockets listening on the same interface.
return (false);
}
-bool
-isc_nm_is_tlsdns_handle(isc_nmhandle_t *handle) {
- REQUIRE(VALID_NMHANDLE(handle));
- REQUIRE(VALID_NMSOCK(handle->sock));
-
- return (handle->sock->type == isc_nm_tlsdnssocket);
-}
-
bool
isc_nm_is_http_handle(isc_nmhandle_t *handle) {
REQUIRE(VALID_NMHANDLE(handle));
}
}
+isc_nmsocket_type
+isc_nm_socket_type(const isc_nmhandle_t *handle) {
+ REQUIRE(VALID_NMHANDLE(handle));
+ REQUIRE(VALID_NMSOCK(handle->sock));
+
+ return (handle->sock->type);
+}
+
#ifdef NETMGR_TRACE
/*
* Dump all active sockets in netmgr. We output to stderr
query_error(client, DNS_R_NOTIMP, __LINE__);
return;
}
- if (isc_nm_is_tlsdns_handle(handle) &&
- !isc_nm_xfr_allowed(handle)) {
+ if (isc_nm_socket_type(handle) == isc_nm_tlsdnssocket &&
+ !isc_nm_xfr_allowed(handle))
+ {
/*
* Currently this code is here for DoT, which
* has more complex requirements for zone