shithub: 9ferno

ref: b502a62da2ec6058923db94f87ecc2d29db2fa77
dir: /man/3/plap/

View raw version
plap \- USR/3Com Edgeserver packet bus link access protocol
.B bind -a '#X' /net
.B /net/plap/clone
.BI /net/plap/ n /ctl
.BI /net/plap/ n /data
.BI /net/plap/ n /local
.BI /net/plap/ n /remote
.BI /net/plap/ n /status
.BI /net/plap/ n /listen
.I plap
driver serves a three-level directory giving access to the link level
protocol used by an Edgeserver card to communicate with
other cards in a USR/3Com chassis.
On first
.I attach
(usually by a
.IR bind (1)
.BR /net )
the driver opens a connection to the packet bus device
.B #Y
described in
.IR pbus (3).
It multiplexes that connection using a specialised member of the LAP family
of protocols.
The top level directory contains a single directory naming the protocol,
.BR plap .
It contains a
.B clone
file and a set of conversation directories numbered from 0 to 127;
only active conversation directories are present.
Opening the
.B clone
file allocates a new conversation directory
.IR n .
The file descriptor will point to the control file,
.BR ctl ,
of that directory.
Reading the file returns a text string giving the conversation number.
Each conversation directory contains six files.
The connection is controlled by writing text strings to the
.B ctl
Once a connection has been established, data is exchanged with the
remote peer by reading and writing the
.B data
.I plap
address has the form:
.IB slot .
.IB chan ! sap
.I slot
is a chassis slot number,
.I chan
is a logical channel (eg, a modem number),
.I sap
is a number representing a `service access point'.
The following control messages are supported:
.BI connect " remoteaddr \fP\fR[\fP \fIlocaladdr\fP ]\fI "
Make a connection to the given
remote address (of the form given above).
If a local address is not specified, the
system will assign an unused address dynamically
(the local chassis slot number is of course fixed).
Connect fails if the connection is already announced or connected,
.I localaddr
is already in use.
.BI announce address
Set the local address to
.I address
and accept incoming calls to that address.
If no address is specified, all incoming calls to addresses not explicitly announced
will be accepted by this connection.
Announce fails if the connection is already announced or connected,
or the local
.I address
specified is already in use.
.B remote
.B local
files contain the remote and local addresses for the connection
in the full address form
.IB slot . chan ! sap.
.B status
file returns a line giving the directory name, number of active opens, and the state
of the connection.
A process listens for incoming calls by opening the
.B listen
file using
.IR sys-open (2).
The open will block until a call arrives, when it will return a file descriptor
open on the
.B ctl
file of the newly accepted connection, which can be read to find the directory
number and thus the other files.
The device follows the conventions that allow
.BR dial ,
.BR announce
.B listen
.IR dial (2)
to do the work needed to establish and manipulate network connections.
.B /os/pc/devplap.c
.IR pbus (3)
The driver cannot be included in the public distribution.