bind -a #ln /net /net/ethern/clone /net/ethern/[0-7] /net/ethern/[0-7]/data /net/ethern/[0-7]/ctl /net/ethern/[0-7]/stats /net/ethern/[0-7]/type /net/ethern/[0-7]/ifstats
The top level directory has a single directory named ethern, where n is the interface number, starting from 0, assigned in some platform-dependent way. That directory contains a conversation directory for each of 8 Ethernet packet types, and a clone file.
Opening the clone file returns a file descriptor open on the ctl file of an unused conversation directory. Reading the ctl file returns a text string representing the number of the connection. The connection is controlled by writing textual commands to the associated ctl file:
Incoming Ethernet packets are demultiplexed by destination address and packet type and queued for reading by the corresponding open connection(s). Each read of the data file returns each packet in turn, including the Ethernet header. A read will terminate at packet boundaries. Each write to the data file causes a packet to be sent. The Ethernet address of the interface is inserted into the packet header as the source address.
Reading the type file returns the decimal value of the assigned Ethernet packet type.
Reading the stats file returns status information, the value of counters, the `promiscuous' state, and the Ethernet MAC address of the interface.
Reading the ifstats file returns statistics and status information specific to a given hardware interface.
|ETHER(3 )||Rev: Thu Feb 15 14:43:36 GMT 2007|