mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Add a utility function to dump all active sockets on a NM instance
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.
This commit is contained in:
@@ -2926,4 +2926,18 @@ isc__nm_dump_active(isc__networker_t *worker) {
|
||||
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
|
||||
|
Reference in New Issue
Block a user