ng_hole — netgraph discard node type
Contents
Control Messages
This node type supports the generic control messages, plus the following:
NGM_HOLE_GET_STATS (getstats)
This command takes an ASCII string argument, the hook name, and returns the statistics associated
with the hook as a structng_hole_hookstat.
NGM_HOLE_CLR_STATS (clrstats)
This command takes an ASCII string argument, the hook name, and clears the statistics associated
with the hook.
NGM_HOLE_GETCLR_STATS (getclrstats)
This command is identical to NGM_HOLE_GET_STATS, except that the statistics are also atomically
cleared.
Description
The hole node type silently discards all data and control messages it receives. This type is used for
testing and debugging.
History
The ng_hole node type was implemented in FreeBSD 4.0.
Hooks
A ng_hole node accepts any request to connect, regardless of the hook name, as long as the name is
unique.
Name
ng_hole — netgraph discard node type
See Also
netgraph(4), ng_echo(4), ngctl(8)
Shutdown
This node shuts down upon receipt of a NGM_SHUTDOWN control message, or when all hooks have been
disconnected.
Synopsis
#include<sys/types.h>#include<netgraph/ng_hole.h>
