Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ xt(HW) — OpenDesktop 1.0.0y

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

layers(C)

termio(M)

tty(M)

ioctl(S)

open(S)

libwindows(S)

jagent(M)

layers(M)

XT(HW)


     XT(HW)                                     UNIX System V



     Name
          xt - multiplexed tty driver for AT&T windowing terminals


     Description
          The xt driver provides virtual tty(M)  circuits  multiplexed
          onto  real  tty(M)  lines.   It  interposes  its own channel
          multiplexing protocol as a line discipline between the  real
          device driver and the standard tty(M) line disciplines.

          Virtual tty(M) 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(M) 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 OEXCL flag set.  After a successful  open,  the  tty(M)
          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(M) files, with data passed  in  packets  via  the
          real tty(M) 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(S)  requests  recognized  by
          xt.   The  first  group contains all the normal tty ioctl(S)
          requests described in termio(M), 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(S) 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(S).  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(S) 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(S), 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(M).   It  may  return the error code
                           EIO if the system clist is empty.

          The  third  group  of   ioctl(S)   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(M)
                                  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(M)
                                  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
          layers(C),    termio(M),    tty(M),    ioctl(S),    open(S),
          libwindows(S), jagent(M), layers(M)


     (printed 8/30/89)                                  XT(HW)

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