NG_SPLIT(4)
π ng_split(4) β the netgraph split node, explained by your favorite Unix bestie
okay so real talk, this page is from the Kernel Interfaces Manual and it's literally called NG_SPLIT(4) β say it with me, it's giving "bidirectional stream goes brrr and then gets un-bidirectionaled" π¦
β¨ NAME β¨
ng_split β a netgraph node that separates your incoming flow from your outgoing flow, no cap π
β¨ SYNOPSIS β¨
#include <netgraph/ng_split.h>
that's it. that's the include. iconic behavior honestly π
πΈ DESCRIPTION πΈ
bestie, here's the whole vibe: the split node type takes a bidirectional stream of packets and splits it into two separate unidirectional streams of packets. one way in, one way out, zero drama. π₯
π¦ HOOKS π¦
this node type supports the following three hooks β count 'em, three, i'm obsessed:
inβ packets received oninget forwarded tomixed. slay, that's the whole job.outβ packets received onoutare discarded as illegal π like, don't do that. that's not what this hook is for, bestie.mixedβ packets received onmixedget forwarded toout. yes queen, straight through.
β CONTROL MESSAGES β
this node type supports only the generic control messages. that's it. no special extras, no secret menu, nothing. lowkey refreshing ngl π
π§ 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. bye bestie π
π SEE ALSO π
go read those, they're the main character energy this page is supporting π«Ά
π HISTORY π
the ng_split node type was implemented in FreeBSD 3.5 but incorporated into FreeBSD in FreeBSD 5.0. yes, the lore is real, and yes, the timeline is a little unhinged. we love a glow-up era π
π AUTHORS π
- Julian Elischer
<julian@FreeBSD.org> - Vitaly V. Belekhov
<vitaly@riss-telecom.ru>
give them their flowers, they built this π
π okay that's the whole page, nothing skipped, every flag and hook accounted for. go split some packets responsibly.
Debian β’ February 19, 2001 β’ NG_SPLIT(4) β mwah, drink water, and remember: it's literally in the manual π
β¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2001 FreeBSD inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms