Add the new isc__nm_dump_active_manager() function that can be used
for debugging purposes: it dumps all active sockets withing the
network manager instance.
ISC_REFCOUNT_DECL(isc__networker);
+#ifdef ISC_NETMGR_TRACE
void
isc__nm_dump_active(isc__networker_t *worker);
+void
+isc__nm_dump_active_manager(isc_nm_t *netmgr);
+#endif /* ISC_NETMGR_TRACE */
+
/*
* A general handle for a connection bound to a networker. For UDP
* connections we have peer address here, so both TCP and UDP can be
nmsocket_dump(sock);
}
}
+
+void
+isc__nm_dump_active_manager(isc_nm_t *netmgr) {
+ size_t i = 0;
+
+ for (i = 0; i < netmgr->nloops; i++) {
+ isc__networker_t *worker = &netmgr->workers[i];
+
+ if (!ISC_LIST_EMPTY(worker->active_sockets)) {
+ fprintf(stderr, "Worker #%zu (%p)\n", i, worker);
+ isc__nm_dump_active(worker);
+ }
+ }
+}
#endif