1 .\" Copyright (c) 2004 Gleb Smirnoff
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd "generic Ethernet interface netgraph node type"
34 .In netgraph/ng_eiface.h
38 netgraph node implements the generic Ethernet interface.
41 node is created, a new interface appears which is accessible via
43 These interfaces are named
47 When a node is shut down, the corresponding interface is removed,
48 and the interface name becomes available for reuse by future
51 New nodes always take the first unused interface.
55 node has a single hook named
57 which should be connected to the
58 Ethernet downstream, for example, to the
61 Packets transmitted via the interface flow out this hook.
62 Similarly, packets received on the hook go to the protocol stack as
63 packets received by any real Ethernet interface.
65 This node type supports the generic control messages, plus the following:
66 .Bl -tag -width indent
67 .It Dv NGM_EIFACE_SET Pq Li set
68 Set link-level address of the interface.
70 .Vt "struct ether_addr"
72 This message also has an
76 which requires as an argument an
78 string consisting of 6 colon-separated hex digits.
79 .It Dv NGM_EIFACE_GET_IFNAME Pq Li getifname
80 Return the name of the associated interface as a
81 .Dv NUL Ns -terminated
84 .It Dv NGM_EIFACE_GET_IFADDRS
85 Return the list of link-level addresses associated with the node.
88 This node shuts down upon receipt of a
91 The associated interface is removed and its name becomes
92 available for reuse by future
96 Unlike most other node types, an
100 go away when all hooks have been disconnected; rather, and explicit
102 control message is required.
113 node type was implemented in
119 node type was written by
120 .An Vitaly V Belekhov .
121 This manual page was written by