Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xt(HW) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctl(S)

jagent(M)

layers(C)

layers(M)

libwindows(S)

mkdev(ADM)

open(S)

termio(M)

tty(M)


 xt(HW)                          19 June 1992                          xt(HW)


 Name

    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 dis-
    ciplines.

    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 under-
    stood by most commands.

    Allocation of a new channel group is done dynamically by attempting to
    open a name ending in ``0'' with the OEXCL 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 xtproto(M), while the
    contents of packets conform to the description in layers(M).

    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 ter-
    minal, 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 win-
                     dowing 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 argu-
                     ment.  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 sys-
                     tem 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, con-
                     taining a file descriptor (fd) for the file to be multi-
                     plexed 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 allo-
                               cating 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 SNSTATS, of type Statst.  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 con-
                     tents 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)


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026