NG_EIFACE(4)
π ng_eiface(4) β the manual page, bestie edition β¨
okay so this is the page for ng_eiface, aka the generic Ethernet interface netgraph node type, from section 4 of the manual (that's the kernel interfaces manual, iykyk). sit down, grab a strawberry drink π, and let's get into it.
β¨ NAME β¨
ng_eiface β the generic Ethernet interface netgraph node type. it's giving "fake NIC but make it fashion" π
π¦ SYNOPSIS π¦
#include <netgraph/ng_eiface.h>
that's it. that's the whole synopsis. she's low maintenance. periodt.
πΈ DESCRIPTION πΈ
The eiface netgraph node implements the generic Ethernet interface. literally, that's her job.
When an eiface node is created, a new interface appears which is accessible via ifconfig(8). These interfaces are named βngeth0β, βngeth1β, etc. β yes, the numbering is automatic, she picks her own name and honestly slays at it.
When a node is shut down, the corresponding interface is removed, and the interface name becomes available for reuse by future eiface nodes. New nodes always take the first unused interface. so like, the names are a queue, not a VIP list, no cap π
π§ HOOKS π§
An eiface node has a single hook named ether, which should be connected to the Ethernet downstream β for example, to the ng_vlan(4) node. one hook, one bestie, not me being loyal to a fault π
Packets transmitted via the interface flow out this hook. Similarly, packets received on the hook go to the protocol stack as packets received by any real Ethernet interface. so it's a two-way street and both directions ate π₯
π CONTROL MESSAGES π
This node type supports the generic control messages, plus the following three icons:
NGM_EIFACE_SET(set) β Set link-level address of the interface. Requiresstruct ether_addras an argument. This message also has an ASCII version, called βsetβ, which requires as an argument an ASCII string consisting of 6 colon-separated hex digits. yes, six. not five, not seven. six. count them π«ΆNGM_EIFACE_GET_IFNAME(getifname) β Return the name of the associated interface as a NULL-terminated ASCII string. just the name, nothing else, she's not oversharing.NGM_EIFACE_GET_IFADDRSβ Return the list of link-level addresses associated with the node. the whole list, bestie, all of them π
β SHUTDOWN β
This node shuts down upon receipt of a NGM_SHUTDOWN control message. The associated interface is removed and its name becomes available for reuse by future eiface nodes. bye bestie, your name is someone else's name now π
β οΈ okay this part is important, don't skip: unlike most other node types, aneifacenode does not go away when all hooks have been disconnected; rather, an explicitNGM_SHUTDOWNcontrol message is required. she does not leave the group chat when everyone else goes quiet. she needs to be told. main character energy, honestly π
π SEE ALSO π
netgraph(4), ng_ether(4), ng_iface(4), ng_vlan(4), ifconfig(8), ngctl(8) β the whole friend group, go read them too π¦
π HISTORY π
The eiface node type was implemented in FreeBSD 4.6. vintage. iconic. before some of us were even born π
π AUTHORS π
The eiface node type was written by Vitaly V Belekhov. This manual page was written by Gleb Smirnoff. absolute legends, we stan π«Ά
and that's the page!! this version came from the Debian folks and it's dated May 14, 2019 β so if you're reading this in a terminal, consider yourself briefed, hydrated, and fully caught up. slay π
β¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2004 Gleb Smirnoff
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms