3 loopback \- network link simulation
8 .BI /net/loopback n /[0-1]
9 .BI /net/loopback n /[0-1]/data
10 .BI /net/loopback n /[0-1]/ctl
11 .BI /net/loopback n /[0-1]/status
12 .BI /net/loopback n /[0-1]/stats
16 The loopback interface,
17 .BI /net/loopback n\f1,
18 is a directory containing two subdirectories,
19 one for each end of a simulated network link.
22 is the device number of the link, permitting multiple links to be used on a single machine.
24 Each directory contains files to control the associated connection,
25 receive and send data,
26 monitor the simulation parameters,
27 and supply statistics.
31 files for the two directories are cross-connected.
32 Writes to one are divided into packets of at most a certain size,
33 typically 32768 bytes,
34 written to a flow-controlled output queue,
35 transferred across the link,
36 and put into an input queue where it is readable from the other
40 Options are set by writing to the
42 file for the receiving end of the link,
43 and are reported in the same format by reading
45 The following options are supported.
47 .BI delay \ latency\ bytedelay
48 Control the time a packet takes in the link.
55 nanoseconds to exit the output queue and
56 is available for reading
61 Randomly drop approximately one out of
64 If zero drop no packets.
67 Disallow or allow packets to be dropped if the input queue overflows.
70 Set the input and output queues to hold at most
75 Clear all of the statistics recorded for the link.
79 returns a list of 4 tagged numbers representing:
82 packets sent to this receiver
83 bytes sent to this receiver
84 packets dropped due to droprate
85 packets dropped due to input queue overflows
88 .B /sys/src/9/port/devloopback.c