NG_HUB(4)
π NG_HUB β packet distribution netgraph node type π
okay bestie, sit down, hydrate, and let me tell you about ng_hub(4) from the Kernel Interfaces Manual section 4. it's a whole vibe and honestly? underrated. π¦
β¨ SYNOPSIS β¨
#include <netgraph/ng_hub.h>
πΈ DESCRIPTION πΈ
so the hub node type is literally just the simplest lil mechanism for spreading packets across several links. that's it. that's the whole personality. π
packets that come in on any of the hooks get forwarded out the other hooks. and the packets? untouched. not altered in any way. no glow-up, no edits, no notes. it's giving "pass it along, I'm just the messenger" main character energy. π
πͺ HOOKS πͺ
a hub node accepts any request to connect β doesn't matter what you named the hook, it's not picky β as long as the name is unique. that's the only rule. one of a kind only, periodt. π
π¨ CONTROL MESSAGES π¨
this node supports all the generic control messages (iykyk), plus this one:
NGM_HUB_SET_PERSISTENT(setpersistent) β this command sets the persistent flag on the node. and it takes no arguments. that's it. no receipts, no extra credit, no nothing. β¨
π SHUTDOWN π
this node shuts down when:
- it receives a
NGM_SHUTDOWNcontrol message, or - all of its hooks have been disconnected. bye bestie! π
but here's the tea π΅ β setting the persistent flag via a NGM_HUB_SET_PERSISTENT control message disables that automatic node shutdown when the last hook gets disconnected. so it just... stays. iconic. π₯
π SEE ALSO π
π HISTORY π
the ng_hub node type appeared in FreeBSD 5.3. vintage, but make it timeless. π§
π AUTHORS π
Ruslan Ermilov <ru@FreeBSD.org>
ngl if you made it this far you're lowkey a netgraph girlie now. no cap. π«Ά
and that's a wrap! this page is from the <strong>Debian</strong> crew, dated <strong>May 5, 2010</strong> β yeah, it's been serving since before some of y'all were born. ππ stay connected, stay unique with those hook names, mwah! ππ
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2004 Ruslan Ermilov
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms