ng_eiface(4)

ng_eiface4

Generic ethernet interface netgraph node

Usage

#include <netgraph/ng_eiface.h>

Overview

The eiface netgraph node implements the generic Ethernet interface. When an eiface node is created, a new interface appears which is accessible via ifconfig(8). These interfaces are named “ngeth0”, “ngeth1”, etc. 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.

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. 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.

Control messages

This node type supports the generic control messages, plus the following:

NGM_EIFACE_SET (set)

Set link-level address of the interface. Requires struct ether_addr as 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.

NGM_EIFACE_GET_IFNAME (getifname)

Return the name of the associated interface as a NULL-terminated ASCII string.

NGM_EIFACE_GET_IFADDRS

Return the list of link-level addresses associated with the node.

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.

Unlike most other node types, an eiface node does not go away when all hooks have been disconnected; rather, an explicit NGM_SHUTDOWN control message is required.

Releases

52 releases since FreeBSD 5.3-RELEASE; the text changed 35 times.

  1. 5.3
  2. 5.4–5.5
  3. 6.0–6.3
  4. 6.4
  5. 7.0
  6. 7.1
  7. 7.2
  8. 7.3
  9. 7.4
  10. 8.0
  11. 8.1
  12. 8.2
  13. 8.3
  14. 8.4
  15. 9.0
  16. 9.1
  17. 9.2
  18. 9.3
  19. 10.0
  20. 10.1
  21. 10.2
  22. 10.3
  23. 10.4
  24. 11.0
  25. 11.1
  26. 11.2
  27. 11.3
  28. 11.4
  29. 12.0
  30. 12.1
  31. 12.2
  32. 12.3
  33. 12.4
  34. 13.0–13.2
  35. 13.3–15.1
  36. 16.0

History

The eiface node type was implemented in FreeBSD 4.6.

Authors

The eiface node type was written by Vitaly V Belekhov. This manual page was written by Gleb Smirnoff.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.