---
name: "ng_eiface"
section: "4"
platform: "linux"
package: "freebsd-manpages"
version: "6.0-5"
release: "Debian 4.0 (Etch)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/ng_eiface"
---

# ng\_eiface(4)

generic Ethernet interface netgraph node type

## NAME

**ng\_eiface** – generic Ethernet interface netgraph node type

## SYNOPSIS

**#include \<netgraph/ng\_eiface.h\>**

## DESCRIPTION

The *eiface* netgraph node implements the generic Ethernet interface. When *eiface* node is created, a new interface appears which is accessible via [ifconfig(8)](/ifconfig/8.md). 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)](/ng_vlan/4.md) 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 NUL-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, and explicit NGM\_SHUTDOWN control message is required.

## SEE ALSO

[netgraph(4)](/netgraph/4.md), [ng\_ether(4)](/ng_ether/4.md), [ng\_iface(4)](/ng_iface/4.md), [ng\_vlan(4)](/ng_vlan/4.md), [ifconfig(8)](/ifconfig/8.md), [ngctl(8)](/ngctl/8.md)

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