NG_SPLIT(4)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… 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 on in get forwarded to mixed. slay, that's the whole job.
  • out β€” packets received on out are discarded as illegal πŸ’€ like, don't do that. that's not what this hook is for, bestie.
  • mixed β€” packets received on mixed get forwarded to out. 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