|
|
1.1 root 1: .TH LANCE 3
2: .SH NAME
3: lance \- LANCE Ethernet device
4: .SH SYNOPSIS
5: .nf
6: .B bind -a #l /net
7:
8: .B /net/ether/clone
9: .B /net/ether/[0-7]
10: .B /net/ether/[0-7]/data
11: .B /net/ether/[0-7]/ctl
12: .B /net/ether/[0-7]/stats
13: .B /net/ether/[0-7]/type
14: .fi
15: .SH DESCRIPTION
16: The LANCE Ethernet interface is a directory
17: containing 9 stream directories: one for each of 8 Ethernet packet types
18: and a
19: .B clone
20: file.
21: .PP
22: Each stream directory contains files to control the stream,
23: receive and send data,
24: and supply statistics.
25: Incoming Ethernet packets are demultiplexed by packet type and passed up
26: the corresponding open stream.
27: Reading from the
28: .B data
29: file reads packets at the head of the stream.
30: A read will terminate at packet boundaries.
31: Each write to the
32: .B data
33: file causes a packet to be sent.
34: The Ethernet address of the interface is inserted into
35: the packet header as the source address.
36: .PP
37: A stream is assigned a packet type by opening its
38: .B ctl
39: file and
40: writing
41: .B connect
42: .I n
43: where
44: .I n
45: is a decimal integer constant identifying the Ethernet packet type.
46: A value of \-1 stands for all types.
47: If multiple streams are assigned to a given packet type
48: a copy of the packet is passed up each stream.
49: .PP
50: Reading the
51: .B type
52: file returns the decimal value of the assigned Ethernet packet type.
53: Reading the stats
54: file returns status information and the Ethernet address of the
55: interface.
56: .PP
57: An interface normally receives only packets whose
58: destination address is that of the interface or is the
59: broadcast address,
60: .BR ff:ff:ff:ff:ff:ff .
61: The interface can be made to receive all packets on the
62: network by writing the string
63: .B promiscuous
64: to the
65: .B ctl
66: file.
67: The interface remains promiscuous until the control file is
68: closed.
69: The extra packets are passed up only streams of type \-1.
70: .SH SOURCE
71: .B /sys/src/9/port/devlance.c
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.