NG_RFC1490(4)

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

πŸ’… NG_RFC1490(4) β€” bestie's guide to the rfc1490 netgraph node ✨

okay so this is page NG_RFC1490(4) from the Kernel Interfaces Manual, and today's main character is ng_rfc1490 β€” the RFC 1490 netgraph node type. buckle up πŸŽ€

🌸 NAME 🌸

ng_rfc1490 β€” the RFC 1490 netgraph node type, no cap πŸ’–

✨ SYNOPSIS ✨

#include <netgraph/ng_rfc1490.h>

literally just that one include and you're in, iykyk πŸ¦‹

πŸ’œ DESCRIPTION πŸ’œ

so the rfc1490 node type does protocol encapsulation, de-encapsulation, and multiplexing according to RFC 1490 β€” which, btw, has since been updated by RFC 2427, so keep that in mind πŸ‘‘. this particular type of encapsulation is often used on top of frame relay DLCI channels, and honestly it's giving very much "the layer underneath everything" energy.

the downstream hook is where you transmit and receive encapsulated frames. then, on the other side of the node, the inet and ppp hooks handle raw IP frames and PPP frames respectively β€” each one minding its own business 🫢. PPP frames get transmitted and received according to RFC 1973; in particular, frames appearing on the ppp hook begin with the PPP protocol number πŸ”₯. and the ethernet hook can be used to transmit and receive Ethernet frames (without a checksum) in RFC 1490's bridging format β€” cute, no checksum, we love a low-effort baddie πŸ’….

typically the inet hook is connected to the inet hook of an ng_iface(4) node. that's the classic combo, fr fr ⭐


πŸ¦‹ HOOKS πŸ¦‹

this node type supports the following hooks, and yes, there's exactly four, I'm not skipping any:

  • downstream β€” connects to the RFC 1490 peer entity 🌈
  • ethernet β€” transmits and receives bridged raw Ethernet frames, without a checksum πŸŽ€
  • inet β€” transmits and receives raw IP frames πŸ’–
  • ppp β€” transmits and receives PPP frames ✨

πŸŽ€ CONTROL MESSAGES πŸŽ€

this node type supports the generic control messages, plus these two icons πŸ‘‘:

  • NGM_RFC1490_SET_ENCAP (setencap) β€” this command sets the encapsulation method for the node. the desired method must be passed as a string message argument, and must be one of the following supported encapsulation modes, bestie, no improvising:
    • "ietf-ip" β€” IP packets are sent using simple RFC1490/2427 encapsulation πŸ’œ
    • "ietf-snap" β€” IP packets are sent inside SNAP frames. also conforms to RFC1490/2427 🌸
    • "cisco" β€” IP packets are sent and received using proprietary Cisco encapsulation method. proprietary! scandalous! πŸ™ˆ
  • NGM_RFC1490_GET_ENCAP (getencap) β€” this command returns the current encapsulation method on the node. vibe check on your own config, we stan self-awareness ⭐

πŸ’€ SHUTDOWN πŸ’€

this node shuts down upon receipt of a NGM_SHUTDOWN control message, or when all hooks have been disconnected. so basically it ghosts you the moment everyone leaves the group chat 😭

πŸ”₯ SEE ALSO πŸ”₯

🌈 HISTORY 🌈

the ng_rfc1490 node type was implemented in FreeBSD 4.0. vintage! iconic! a true elder πŸ’…

🫢 AUTHORS 🫢

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

😭 BUGS 😭

not all of RFC 1490 is implemented. that's it, that's the bug. incomplete slay πŸ’€


lowkey important reminder: this page comes to you from Debian, dated January 19, 1999 β€” so go forth, connect those hooks, and remember: the checksum on the ethernet hook? not there. never was. periodt πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from