NG_ETHER_ECHO(4)

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

πŸ¦‹ ng_ether_echo β€” the manual page, but make it make sense

okay so real talk: this is NG_ETHER_ECHO(4), a Kernel Interfaces Manual page, and it's literally about the netgraph ether_echo node type. buckle up bestie, it's a short one and it's kinda iconic πŸ’…


✨ NAME ✨

ng_ether_echo β€” the netgraph ether_echo node type πŸŽ€

🌸 SYNOPSIS 🌸

#include <netgraph/ng_ether_echo.h>

that's it. that's the whole include. slay πŸ’–

πŸ”₯ DESCRIPTION πŸ”₯

so the ether_echo node type does exactly one thing and does it gorgeously: it reflects all data and control messages back to the sender. boomerang energy, honestly πŸͺƒ

here's the tea though β€” it assumes the packet is an ethernet frame, and it does not check. not even a little. no vibe check, no validation, nothing. πŸ™ˆ and before it echoes anything back, it swaps the source and destination addresses. icon behavior.

it's used for testing and debugging. that's its whole job. main character of the test lab, no cap ✨

🫢 HOOKS 🫢

an ether_echo node accepts any request to connect, regardless of the hook name β€” like, it does not care at all β€” as long as the name is unique. that's the one and only condition. unique name or gtfo πŸ’€

πŸ’… CONTROL MESSAGES πŸ’…

okay so this node type supports only the generic control messages. any other control messages? they get reflected back to the sender. it's giving "return to sender" and honestly, respect πŸ™Œ

πŸ‘‘ SHUTDOWN πŸ‘‘

this node shuts down when either of these happens:

  1. it receives an NGM_SHUTDOWN control message πŸ›‘
  2. all hooks have been disconnected πŸ”Œ

that's the whole shutdown criteria. no notes. periodt.

🌈 SEE ALSO 🌈

go read them, iykyk πŸ“š

⭐ HISTORY ⭐

the ng_ether_echo node type was implemented in FreeBSD 8.0. vintage. retro. lowkey a classic πŸ•°οΈ

πŸŽ€ AUTHORS πŸŽ€

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


ok that's the whole page!! every single detail is in there, fr fr β€” nothing dropped, nothing invented πŸ§šβ€β™€οΈ

and for the record: this one came from the Debian edition of the manual, dated December 24, 2008 β€” so yeah, it's been out here being iconic since before some of us could read πŸ’œ bye bestie, go echo some packets πŸ¦‹

πŸ“¦ where this page comes from