ether – Ethernet device
bind -a #ln /net
The Ethernet interface,
is a directory
containing subdirectories, one for each distinct Ethernet packet type,
are the same as in the subdirectories (see below).
returns the MAC address of this interface in hex with no punctuation
and no trailing newline.
(optional in the bind)
is the device number of the card, permitting multiple cards to be used on a single machine.
Each directory contains files to control the associated connection,
receive and send data,
and supply statistics.
Incoming Ethernet packets are demultiplexed by packet type and passed up
the corresponding open connection.
Reading from the
file reads packets of that type arriving from the network.
A read will terminate at packet boundaries.
Each write to the
file causes a packet to be sent.
The Ethernet address of the interface is inserted into
the packet header as the source address.
A connection is assigned to a packet type by opening its
is a decimal integer constant identifying the Ethernet packet type.
A type of –1 enables the connection to receive copies of packets of
all types. A type of –2 enables the connection to receive copies of
the first 64 bytes of packets of all types.
If multiple connections are assigned to a given packet type
a copy of each packet is passed up each connection.
Some interfaces also accept unique options when written to the
file; see the description of
file returns the decimal index of the associated connection, 0 through 7.
file returns the decimal value of the assigned Ethernet packet type.
file returns status information such as the Ethernet address of the
card and general statistics, independent of the interface;
contains device-specific data and statistics about the card.
An interface normally receives only those packets whose
destination address is that of the interface or is the
The interface can be made to receive all packets on the
network by writing the string
The interface remains promiscuous until the control file is
The extra packets are passed up connections only of types –1
Writing packets to the
file automatically fills the
source address before sending. To allow implementations of
layer 2 bridges like
connections can be set to bridge mode by writing