3 ether \- Ethernet device
6 .B bind -a #l\fIn\fP /net
8 .BI /net/ether n /clone
10 .BI /net/ether n /ifstats
11 .BI /net/ether n /stats
12 .BI /net/ether n /[0-7]
13 .BI /net/ether n /[0-7]/data
14 .BI /net/ether n /[0-7]/ctl
15 .BI /net/ether n /[0-7]/ifstats
16 .BI /net/ether n /[0-7]/stats
17 .BI /net/ether n /[0-7]/type
20 The Ethernet interface,
23 containing subdirectories, one for each distinct Ethernet packet type,
34 are the same as in the subdirectories (see below).
37 returns the MAC address of this interface in hex with no punctuation
38 and no trailing newline.
41 (optional in the bind)
42 is the device number of the card, permitting multiple cards to be used on a single machine.
44 Each directory contains files to control the associated connection,
45 receive and send data,
46 and supply statistics.
47 Incoming Ethernet packets are demultiplexed by packet type and passed up
48 the corresponding open connection.
51 file reads packets of that type arriving from the network.
52 A read will terminate at packet boundaries.
55 file causes a packet to be sent.
56 The Ethernet address of the interface is inserted into
57 the packet header as the source address.
59 A connection is assigned to a packet type by opening its
67 is a decimal integer constant identifying the Ethernet packet type.
68 A type of \-1 enables the connection to receive copies of packets of
69 all types. A type of \-2 enables the connection to receive copies of
70 the first 64 bytes of packets of all types.
71 If multiple connections are assigned to a given packet type
72 a copy of each packet is passed up each connection.
74 Some interfaces also accept unique options when written to the
78 file; see the description of
85 file returns the decimal index of the associated connection, 0 through 7.
88 file returns the decimal value of the assigned Ethernet packet type.
91 file returns status information such as the Ethernet address of the
92 card and general statistics, independent of the interface;
94 contains device-specific data and statistics about the card.
96 An interface normally receives only those packets whose
97 destination address is that of the interface or is the
99 .BR ff:ff:ff:ff:ff:ff .
100 The interface can be made to receive all packets on the
101 network by writing the string
106 The interface remains promiscuous until the control file is
108 The extra packets are passed up connections only of types \-1
111 .B /sys/src/9/*/devether.c