Debugnet is a simplistic and specialized panic- or debug-time reliable
datagram transport. It can drive a single connection at a time and is
currently unidirectional (debug/panic machine transmit to remote server
It is mostly a verbatim code lift from netdump(4). Netdump(4) remains
the only consumer for now.
The INET-specific logic has been extracted somewhat more thoroughly than
previously in netdump(4), into debugnet_inet.c. UDP-layer logic and up, as
much as possible as is protocol-independent, remains in debugnet.c.
Much of the diff is gratuitous rename from 'netdump_' or 'nd_' to
'debugnet_' or 'dn_' -- sorry. I thought keeping the netdump name on the
generic module would be more confusing than the refactoring.
The only functional change here is the mbuf allocation / tracking.
Instead of functioning solely on netdump-configured interface at
dumpon(8) configuration time, we watch for any debugnet-enabled NIC to
linkup and query it for mbuf parameters at that time. If they exceed
the existing allocation, we re-allocate and track the high watermark.
Otherwise, we leave the pre-panic mbuf allocation alone.
No other functional change intended.