Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dkconfig(8) [plan9 man page]

DKCONFIG(8)						      System Manager's Manual						       DKCONFIG(8)

NAME
dkconfig - configure Datakit interface SYNOPSIS
dkconfig [ -d dev ] [ -n netname ] [ -c csc nlines ] [ -b baud ] [ -w window ] [ -ai ] DESCRIPTION
Dkconfig configures the device dev (default #h) as a Datakit link and gives it kernel id netname (default dk). Any subsequent reference to the device #kname and its subdirectories refers to conversations multiplexed on this link. As a convenience, dkconfig performs a bind("#kname", "/net", MBEFORE) to make the dk device available to dial(2). Option -c allows the common signaling channel, csc, and the number of Datakit lines, nlines, to be specified. Option -w sets the window size to window, a decimal number of bytes. This is most important on the PC's Incon interface, which overflows if the window size is greater than 256. Option -i causes an Incon device (default #i) to be configured as the Datakit connection. Option -a causes the a serial line (default /dev/eia0) to be configured as the Datakit connection. The async line protocol is pushed onto the serial line's stream to provide a multiplexed connection. FILES
#h default device #i incon device #k*/dk/* Datakit devices /net/dk by convention, Datakit device bind point SOURCE
/sys/src/cmd/dkconfig.c SEE ALSO
listen(8), datakit(3), dk(3), dial(2) netstat(1) DKCONFIG(8)

Check Out this Related Man Page

DK(3)							     Library Functions Manual							     DK(3)

NAME
dk - Datakit conversations SYNOPSIS
bind #kname /net/dk bind #iname /net/dk ctlfd = open(".../ctl", ORDWR); write(ctlfd, "push dkmux", 10); write(ctlfd, "config csc [no]restart name nvc window", n); DESCRIPTION
A Datakit device--either k for the regular Datakit or i for the Incon--is a directory containing up to 256 directories, one per virtual circuit, named 0 through 255, and a special file named clone. The specifier name matches the Datakit device to a physical device that its virtual circuits are multiplexed over (see dkmux below). Normally, the standard routines dial, hangup, listen, and announce (see dial(2)) are used to make, listen for, and control calls over any network. The routines expect the following properties of any multiplexed network, not just Datakit. Opening the clone file opens the ctl file of an unused virtual circuit. Reading any ctl file returns the name of the virtual circuit directory. For example, reading #k/17/ctl will return the string 17. Each virtual circuit directory contains the files: ctl to control the virtual circuit: establish a connection, hang it up, etc. data to converse with the remote end (via read and write) listen to listen for calls (after announcing; see below) other information about the conversation raddr the address of the remote end ruser the id of the user at the remote end (when applicable) To set up and tear down virtual circuits a process writes textual commands to the ctl file: connect addr connect to address addr. If the connection fails, the write returns an error. hangup tear down a connected virtual circuit. announce name announce the readiness to accept calls to name. accept n accept the call on virtual circuit n. reject n e reject the call on virtual circuit n with error code e. E must be a number from 0 to 7. Once a virtual circuit is set up, a process can converse with the remote service by reading and writing the data file. Write boundaries are preserved. Accepting calls to name requires the following dance: 1) announce name on a virtual circuit. 2) open the listen file in that virtual circuit's directory. When a call comes in on a virtual circuit for name, the open will return with the file descriptor open to the control file of the incoming virtual circuit. 3) accept or reject the call by writing an accept or reject command to the ctl file of the announced virtual circuit. A dkmux module pushed onto a stream makes that stream a multiplexed connection to a Datakit. The subsequent config control message config- ures the multiplexer and matches it to a dk device. The parameters to the config message are csc the line number of the common signaling channel (must be > 0) nvc the number of virtual circuits (optional; default chosen by Datakit) [no]restart the word restart or norestart (optional; default is restart). Restart tells the Datakit to forget all previous connections and authentications for this machine. name The name used in binding dk device. window the default URP window size for virtual circuits on this Datakit line (default is 2048). FILES
#k/clone #k/[0-255] #k/[0-255]/data #k/[0-255]/ctl #k/[0-255]/listen #k/[0-255]/ruser #k/[0-255]/raddr SEE ALSO
stream(3), dkconfig(8), datakit(3) SOURCE
/sys/src/9/*/devdk.c DK(3)
Man Page