XT(7) —
NAME
xt − multiplexed tty driver for AT&T windowing terminals
DESCRIPTION
The xt driver provides virtual tty(7) circuits multiplexed onto real tty(7) lines. It interposes its own channel multiplexing protocol as a line discipline between the real device driver and the standard tty(7) line disciplines.
Virtual tty(7) circuits are named by character-special files of the form /dev/xt???. File names end in three digits, where the first two represent the channel group and the last represents the virtual tty(7) number (0-7) of the channel group. Allocation of a new channel group is done dynamically by attempting to open a name ending in 0 with the O_EXCL flag set. After a successful open, the tty(7) file onto which the channels are to be multiplexed should be passed to xt via the XTIOCLINK ioctl(2) request. Afterwards, all the channels in the group will behave as normal tty(7) files, with data passed in packets via the real tty(7) line.
The xt driver implements the protocol described in xtproto(5) and in layers(5). Packets are formatted as described in xtproto(5), while the contents of packets conform to the description in layers(5).
There are three groups of ioctl(2) requests recognized by xt. The first group contains all the normal tty ioctl(2) requests described in termio(7), with the addition of the following:
TIOCEXCL Set exclusive use mode; no further opens are permitted until the file has been closed.
TIOCNXCL Reset exclusive use mode; further opens are once again permitted.
The second group of ioctl(2) requests concerns control of the windowing terminal, and is described in the header file <sys/jioctl.h>. The requests are as follows:
JTYPE, JMPX Both return the value JMPX. These are used to identify a terminal device as an xt channel.
JBOOT, JTERM Both generate an appropriate command packet to the windowing terminal affecting the layer associated with the file descriptor argument to ioctl(2). They may return the error code EIO if the system clist is empty.
JTIMO, JTIMOM
JTIMO specifies the timeouts in seconds, and JTIMOM in milliseconds. Invalid except on channel 0. They may return the error code EIO if the system clist is empty.
JWINSIZE Requires the address of a jwinsize structure as an argument. The window sizes of the layer associated with the file descriptor argument to ioctl(2) are copied to the structure.
JZOMBOOT Generate a command packet to the windowing terminal to enter download mode on the channel associated with the file descriptor argument to ioctl(2), like JBOOT; but when the download is finished, make the layer a zombie (ready for debugging). It may return the error code EIO if the system clist is empty.
JAGENT Send the supplied data as a command packet to invoke a windowing terminal agent routine, and return the terminal’s response to the calling process. Invalid except on the file descriptor for channel 0. See jagent(5). It may return the error code EIO if the system clist is empty.
The third group of ioctl(2) requests concerns the configuration of xt, and is described in the header file <sys/xt.h>. The requests are as follows:
XTIOCTYPE Returns the value XTIOCTYPE.
XTIOCLINK Requires an argument that is a structure, xtioclm, containing a file descriptor for the file to be multiplexed and the maximum number of channels allowed. Invalid except on channel 0. This request may return one of the following errors:
EINVAL nchans has an illegal value.
ENOTTY fd does not describe a real tty(7) device.
ENXIO linesw is not configured with xt.
EBUSY An XTIOCLINK request has already been issued for the channel group.
ENOMEM
There is no system memory available for allocating to the tty(7) structures.
EIO The JTIMOM packet described above could not be delivered.
HXTIOCLINK
Like XTIOCLINK, but specifies that ENCODING MODE be used.
XTIOCTRACE Requires the address of a tbuf structure as an argument. The structure is filled with the contents of the driver trace buffer. Tracing is enabled. This request is invalid if tracing is not configured.
XTIOCNOTRACE
Tracing is disabled. This request is invalid if tracing is not configured.
XTIOCSTATS Requires an argument that is the address of an array of size S_NSTATS, of type Stats_t. The array is filled with the contents of the driver statistics array. This request is invalid if statistics are not configured.
XTIOCDATA Requires the address of a maximum-sized Link structure as an argument. The structure is filled with the contents of the driver Link data. This request is invalid if data extraction is not configured.
FILES
/dev/xt/??[0-7] multiplexed special files
/usr/include/sys/jioctl.h packet command types
/usr/include/sys/xtproto.h channel multiplexing protocol definitions
/usr/include/sys/xt.h driver specific definitions
SEE ALSO
ioctl(2), open(2), libwindows(3X), jagent(5), layers(5) in the INTERACTIVE SDS Guide and Programmer’s Reference Manual.
\*U — Version 1.0