xt(HW)
xt --
multiplexed tty driver for AT&T windowing terminals
Description
The xt driver provides virtual
tty(M)
circuits multiplexed onto real tty lines. It interposes
its own channel multiplexing protocol as a line discipline
between the real device driver and the standard tty line
disciplines.
The xt driver can be configured using the
mkdev layers script. See
mkdev(ADM)
for more information.
Virtual ttys are named /dev/xt??[0-7] and are
allocated in groups of up to eight. Filenames end in three
digits, where the first two digits represent the group and
the last digit represents the virtual tty number of the
group. The /dev/xt form of the name increases
the size of /dev, which adversely affects some
commands; the /dev/xt/ form is not understood by
most commands.
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 file onto which the channels are to
be multiplexed should be passed to xt via the
XTIOCLINK
ioctl(S)
request. Afterwards, all the channels in the group will
behave as normal tty files, with data passed in packets via
the real tty line.
The xt driver implements the protocol described in
xtproto(M)
and in
layers(M).
Packets are formatted as described in the
CM xtproto M
manual page, while the contents of packets conform to the description in
the
layers(M)
manual page.
ioctl calls
There are three groups of ioctl requests
recognized by xt. The first group contains all
the normal tty ioctl requests described in
termio(M),
plus 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 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. 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 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, 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-
Sends 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(M).
It may return the error code EIO if the system
clist is empty.
The third group of ioctl 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
(
fd
) 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 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 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(S),
jagent(M),
layers(C),
layers(M),
libwindows(S),
mkdev(ADM),
open(S),
termio(M),
tty(M)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005