loopback – network link simulation
bind -a #λ /net
The loopback interface,
is a directory containing two subdirectories,
one for each end of a simulated network link.
is the device number of the link, permitting multiple links to be used on a single machine.
Each directory contains files to control the associated connection,
receive and send data,
monitor the simulation parameters,
and supply statistics.
files for the two directories are cross-connected.
Writes to one are divided into packets of at most a certain size,
typically 32768 bytes,
written to a flow-controlled output queue,
transferred across the link,
and put into an input queue where it is readable from the other
Options are set by writing to the
file for the receiving end of the link,
and are reported in the same format by reading
The following options are supported.
delay latency bytedelay
Control the time a packet takes in the link.
bytes long takes
nanoseconds to exit the output queue and
is available for reading
Randomly drop approximately one out of
If zero drop no packets.
Disallow or allow packets to be dropped if the input queue overflows.
Set the input and output queues to hold at most
Clear all of the statistics recorded for the link.
returns a list of 4 tagged numbers representing:
packets sent to this receiver
bytes sent to this receiver
packets dropped due to droprate
packets dropped due to input queue overflows