NG_GIF(4)
π NG_GIF β the netgraph girlies' guide to generic tunnel interfaces π
okay so bestie, this is a section 4 page from the Kernel Interfaces Manual, and it's about ng_gif, the netgraph node type that lets your gif(4) interfaces hang out with the whole netgraph(4) friend group. it's giving tunnel-girl crossover episode and honestly? iconic. π¦
β¨ NAME β¨
ng_gif β generic tunnel interface netgraph node type. no cap, that's the whole thing, that's her. π
β¨ SYNOPSIS β¨
#include <netgraph/ng_gif.h>
like yes girl, include the header, it's right there π
β¨ DESCRIPTION β¨
so the ng_gif netgraph node type is literally the matchmaker between gif(4) interfaces and the netgraph(4) networking subsystem. once the ng_gif module gets loaded into the kernel, a node is automatically created for every single gif(4) interface in the system β not me getting a whole node without even asking, main character energy fr fr. π
each node will attempt to name itself with the same name as the associated interface (cute, matching names, couple goals). and all ng_gif nodes are persistent for as long as the interface itself exists β they're not leaving until the interface leaves, periodt. π
the hooks (there's two of them)
two hooks are supported: lower and orphans. βοΈ
- the hook name
divertmay be used as an alias forlower, and it's provided for compatibility withng_ether(4). in reality the two names represent the same hook β so don't be out here thinking you got three hooks, bestie, you got two. π
lower is a connection to the raw gif(4) device. when it's connected, all incoming packets are diverted out this hook. writing to this hook results in a raw encapsulated packet being transmitted by the device. and here's the important lil detail: normal outgoing packets are not affected by lower being connected. ngl that's a very specific vibe and we respect it. πΈ
orphans is equivalent to lower, except that only unrecognized packets (the ones that would otherwise just be discarded, sad) are written to the hook, and normal incoming traffic is unaffected. so it's like lower but it only takes in the strays. π₯Ί
β οΈ at most one oforphansandlowermay be connected at any time. pick a lane bestie, you cannot have both, that's the rule. π«
in all cases, frames are raw packets with the address family of the packet attached to the front. (the address family is up front, like a little name tag. precious.) π·οΈ
and when no hooks are connected? packets just flow normally upwards and downwards. business as usual, no drama, we love a chill default. β¨
π HOOKS π
this node type supports the following hooks:
lowerβ connection to the lower device link layer.orphansβ likelower, but only receives unrecognized packets.
that's it, that's the list, short and sweet like a good text back. π
π CONTROL MESSAGES π
this node type supports only the generic control messages. no special ones, no extras, no secret menu. it's lowkey minimalist and honestly? obsessed. π
π₯ EXAMPLES π₯
this command dumps all unrecognized packets received by the gif0 interface to standard output, decoded in hex and ASCII β yes it's giving hacker movie aesthetic, yes you can screenshot it:
nghook -a gif0: orphans
note the : β the node name, then a colon, then the hook name. gif0: orphans is a whole address and she's serving. π
π SEE ALSO π
gif(4), netgraph(4), netintro(4), ifconfig(8), ngctl(8), nghook(8)
go read the rest of the friend group, they're all connected, iykyk. π«Ά
π AUTHORS π
Brooks Davis <brooks@FreeBSD.org> β thank you for your service, king, we are forever grateful for this node type. π
and that's the whole page, bestie!! π this one came from the Debian build of the manual, dated September 18, 2001 β yes she's an elder but she still slays, a true vintage icon. go forth and hook responsibly, mwah πβ¨
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright 2000 The Aerospace Corporation. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms