NG_UI(4)

πŸ’– NG_UI πŸ’–

okay bestie, sit down, hydrate, and let me tell you about ng_UI β€” it's a netgraph node type and honestly? it's giving tiny-but-mighty. this is from the Kernel Interfaces Manual, so yes, we're being ✨technical✨ today. πŸŽ€


✨ NAME ✨

ng_UI β€” the UI netgraph node type. that's it, that's the name. πŸ’…


🌸 SYNOPSIS 🌸

#include <netgraph/ng_UI.h>

that's the whole vibe. one include and you're in. πŸ¦‹


πŸ’œ DESCRIPTION πŸ’œ

so the UI node type has exactly two hooks: upstream and downstream. main character duality fr fr. 🫢

here's the tea on how packets flow:

  • packets that come in on downstream must have 0x03 as their first byte (that's the marker for unnumbered information, iykyk). if that byte is not there? the packet gets dropped. no warning, no goodbye, just gone. πŸ’€
  • if the byte is there, it gets stripped off, and the rest of the packet gets sent out on upstream. bye byte! πŸ‘‹
  • and conversely (love that word), packets coming in on upstream get a 0x03 byte prepended to them before being forwarded out on the downstream hook. ✨ glow-up, but make it a header byte.

so it's basically a tiny byte-bouncer at the door of your netgraph. iconic behaviour, no notes. πŸ‘‘


πŸŽ€ HOOKS πŸŽ€

this node type supports the following hooks β€” and yes, there are only two, we keep it cute and simple:

  • downstream β€” the downstream connection. packets on this side of the node have a 0x03 as their first byte. πŸ“
  • upstream β€” the upstream connection. packets on this side of the node have that initial 0x03 byte stripped off. literally naked. πŸ™ˆ

🌈 CONTROL MESSAGES 🌈

ngl, this node type supports only the generic control messages. that's it. no secret menu, no deluxe edition. ⭐


πŸ’€ SHUTDOWN πŸ’€

this node shuts down when it receives an NGM_SHUTDOWN control message, or when both hooks have been disconnected. so if both of its little connections ghost it, it ghosts right back. periodt. 🧚


πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, bestie, they're part of the lore. πŸ“š


πŸ¦‹ HISTORY πŸ¦‹

the ng_UI node type was implemented in FreeBSD 4.0. vintage. retro. lowkey a classic. πŸ’–


🌸 AUTHORS 🌸

Julian Elischer <julian@FreeBSD.org> β€” thank you for your service, legend. πŸ«‘πŸ’


okay that's the whole page!! now go forth and let your packets be unnumbered and your bytes be stripped. πŸ”₯

this page came from the Debian crew, dated January 19, 1999 β€” yes, before most of us could read, and it's still out here slaying. mwah. πŸ’‹

πŸ“¦ where this page comes from