NG_HOLE(4)
β¨ NG_HOLE(4) β¨ β the netgraph discard node type, bestie edition π
okay so. ng_hole is a netgraph(4) node type, and honestly? she's iconic for one reason: she hears everything and says nothing. no cap. π³οΈβ¨
π SYNOPSIS π
#include <sys/types.h>
#include <netgraph/ng_hole.h>
like, you gotta include those two headers first, bestie. both of them. yes even sys/types.h. it's giving "trust the process". π«Ά
π DESCRIPTION π
The hole node type silently discards all data and control messages it receives. literally all of them. it does not respond, it does not save them, it does not tell anyone β she just takes the message and lets it go, main character energy, no notes. π¦
This type is used for testing and debugging. that's her whole job and she ate. π
πΈ HOOKS πΈ
super chill about this part ngl: an ng_hole node accepts any request to connect, regardless of the hook name, as long as the name is unique. so call your hook whatever you want, bestie β literally whatever β just don't be out here duplicating names, because unique is the vibe check. πβ¨
π₯ CONTROL MESSAGES π₯
This node type supports the generic control messages, plus these three little icons π:
NGM_HOLE_GET_STATS(getstats) β takes an ASCII string argument (that's the hook name, bestie) and returns the statistics associated with the hook as astruct ng_hole_hookstat. receipts, but make them a struct. πNGM_HOLE_CLR_STATS(clrstats) β takes an ASCII string argument, the hook name, and clears the statistics associated with the hook. fresh start era. π§ΉNGM_HOLE_GETCLR_STATS(getclrstats) β identical toNGM_HOLE_GET_STATS, except that the statistics are also atomically cleared. so you get the stats and the reset in one go β two birds, one atomic slay. β
π SHUTDOWN π
This node shuts down when it receives a NGM_SHUTDOWN control message, or when all hooks have been disconnected. either one, whichever comes first. she's not clingy. π
π SEE ALSO π
go read those too, iykyk π
π¦ HISTORY π¦
The ng_hole node type was implemented in FreeBSD 4.0. vintage queen behavior, honestly. π
π AUTHORS π
Julian Elischer <julian@FreeBSD.org> β we stan. thank you for the hole. π«Άβ¨
this page came from the Debian crew, dated May 19, 2004 β and that's the whole manual page, bestie. ng_hole(4), done and dusted. no cap, she's a keeper π³οΈππ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 1996-1999 Whistle Communications, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms