NG_IP_INPUT(4)

πŸ’– NG_IP_INPUT πŸ’–

okay bestie, gather round, because we're doing a (4) manual page today β€” that's the kernel interfaces girlies, the section where all the deep magic lives. this one's about ng_ip_input, the netgraph IP input node type. it's tiny, it's iconic, and it does exactly one job. let's get into it πŸŽ€


✨ SYNOPSIS ✨

#include <netgraph/ng_ip_input.h>

that's it. that's the whole include. so clean, so minimal, we love a low-maintenance header πŸ’…


🌸 DESCRIPTION 🌸

so the ip_input node type does one (1) thing and it does it flawlessly: it takes all the received packets and queues them into the IP in input processing subsystem.

that's it. that's the whole vibe. no fancy filtering, no drama, no notes. packets come in, packets get queued, IP input processing subsystem handles the rest. it's giving airport security that just waves everyone through ✈️


πŸ¦‹ HOOKS πŸ¦‹

an ng_ip_input node will accept any request to connect β€” literally any hook name, she does not care β€” as long as the name is unique. so go off, name your hooks whatever, just don't be out here duplicating names because that's the one rule. unique names only, periodt πŸ‘‘


⭐ CONTROL MESSAGES ⭐

this node type supports only the generic control messages. anything else? silently discarded. not rejected, not errored, just... gone. ghosted. left on read πŸ’€

so if you send something custom and get nothing back, that's not a bug bestie, that's the documented behaviour. she's just not gonna engage.

🌈 SHUTDOWN 🌈

an ng_ip_input node shuts down when either of these happens:

  • it receives a NGM_SHUTDOWN control message, or
  • all hooks have been disconnected

two ways out, both valid, both dramatic in their own way 🫢


πŸ‘‘ SEE ALSO πŸ‘‘


πŸŽ€ HISTORY πŸŽ€

the ng_ip_input node type was implemented in FreeBSD 5.0. an elder. a legend. she's been here since the early days and she's still doing her little packet-queueing thing ✨


πŸ’œ AUTHORS πŸ’œ

Brooks Davis <brooks@FreeBSD.org> β€” thank you for your service 🫑


πŸ“ BUGS πŸ“

okay so here's the tea: the ng_ip_input node type should probably keep some sort of statistics.

that's the whole bug. she's out here processing every packet that comes her way and keeping zero receipts. no counters, no numbers, no data. we're just trusting her. and honestly? we do. but yeah, some stats would be nice 😭


and that's the page!! this lovely little manual came from the Debian crew, dated September 27, 2001, so if you ever wondered who to thank for this absolute gem β€” now you know. mwah, go queue some packets πŸ’‹πŸ§š

πŸ“¦ where this page comes from