NG_IFACE(4FREEBSD) - Linux man page online | Special files
Interface netgraph node type.
January 12, 2015
NG_IFACE(4) BSD Kernel Interfaces Manual NG_IFACE(4)
BSD January 12, 2015 BSD
NAMEng_iface — interface netgraph node type
DESCRIPTIONAn iface node is both a netgraph node and a system networking interface. When an iface node is created, a new interface appears which is accessible via ifconfig(8). Iface node inter‐ faces are named ng0, ng1, etc. When a node is shutdown, the corresponding interface is removed and the interface name becomes available for reuse by future iface nodes; new nodes always take the first unused interface. The node itself is assigned the same name as its interface, unless the name already exists, in which case the node remains unnamed. An iface node has a single hook corresponding to each supported protocol. Packets transmit‐ ted via the interface flow out the corresponding protocol-specific hook. Similarly, packets received on a hook appear on the interface as packets received into the corresponding proto‐ col stack. The currently supported protocols are IP, IPv6, ATM, NATM, and NS. An iface node can be configured as a point-to-point interface or a broadcast interface. The configuration can only be changed when the interface is down. The default mode is point-to- point. Iface nodes support the Berkeley Packet Filter (BPF).
HOOKSThis node type supports the following hooks: inet Transmission and reception of IP packets. inet6 Transmission and reception of IPv6 packets. atm Transmission and reception of ATM packets. natm Transmission and reception of NATM packets. ns Transmission and reception of NS packets.
CONTROL MESSAGESThis node type supports the generic control messages, plus the following: NGM_IFACE_GET_IFNAME (getifname) Returns the name of the associated interface as a NUL-terminated ASCII string. Nor‐ mally this is the same as the name of the node. NGM_IFACE_GET_IFINDEX (getifindex) Returns the global index of the associated interface as a 32 bit integer. NGM_IFACE_POINT2POINT (point2point) Set the interface to point-to-point mode. The interface must not currently be up. NGM_IFACE_BROADCAST (broadcast) Set the interface to broadcast mode. The interface must not currently be up.
SHUTDOWNThis node shuts down upon receipt of a NGM_SHUTDOWN control message. The associated inter‐ face is removed and becomes available for use by future iface nodes. Unlike most other node types, an iface node does not go away when all hooks have been dis‐ connected; rather, and explicit NGM_SHUTDOWN control message is required. ALTQ Support The ng_iface interface supports ALTQ bandwidth management feature. However, ng_iface is a special case, since it is not a physical interface with limited bandwidth. One should not turn ALTQ on ng_iface if the latter corresponds to some tunneled connection, e.g. PPPoE or PPTP. In this case, ALTQ should be configured on the interface that is used to transmit the encapsulated packets. In case when your graph ends up with some kind of serial line, either synchronous or modem, the ng_iface is the right place to turn ALTQ on.
SEE ALSOaltq(4), bpf(4), netgraph(4), ng_cisco(4), ifconfig(8), ngctl(8)
HISTORYThe iface node type was implemented in FreeBSD 4.0.
AUTHORSArchie Cobbs <@FreeBSD.org>
|This manual||Reference||Other manuals|
|ng_iface(4freebsd)||referred by||ALTQ(4freebsd) | altq(4freebsd) | netgraph(4freebsd) | ng_cisco(4freebsd) | ng_eiface(4freebsd) | ng_nat(4freebsd) | ng_netflow(4freebsd) | ng_ppp(4freebsd) | ng_rfc1490(4freebsd) | ng_sppp(4freebsd) | ng_vjc(4freebsd) | udbp(4freebsd)|
|refer to||bpf(4freebsd) | ifconfig(8) | netgraph(4freebsd) | ng_cisco(4freebsd)|