Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sxt(7) — A/UX 0.7

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

shl(1)

stty(1)

ioctl(2)

line_push(3)

open(2)

streams(7)

termio(7)



     sxt(7)                                                     sxt(7)



     NAME
          sxt - pseudo-device driver

     DESCRIPTION
          sxt is a pseudo-device driver that interposes a discipline
          between the standard tty line disciplines and a real device
          driver.  The standard disciplines manipulate virtual tty
          structures (channels) declared by the sxt driver.  sxt acts
          as a discipline manipulating a real tty structure declared
          by a real device driver.  The sxt driver is used only by the
          shl(1) command.

          Virtual ttys are named by inodes in the subdirectory
          /dev/sxt and are allocated in groups of up to eight.  To
          allocate a group, a program should exclusively open a file
          with a name of the form /dev/sxt/??0 (channel 0) and then
          execute a SXTIOCLINK ioctl call to initiate the
          multiplexing.

          Only one channel, the controlling channel, can receive input
          from the keyboard at a time; others attempting to read will
          be blocked.

          sxt supports two groups of ioctl(2) commands.  The first
          group contains the standard ioctl commands described in
          termio(7), with the following additions:

          TIOCEXCL         Set exclusive use mode: permit no further
                           opens until the file is closed.

          TIOCNXCL         Reset exclusive use mode: permit further
                           opens.

          The second group are directives to sxt itself.  Some of
          these may only be executed on channel 0.

          SXTIOCLINK       Allocate a channel group and multiplex the
                           virtual ttys onto the real tty.  The
                           argument is the number of channels to
                           allocate.  This command may only be
                           executed on channel 0.  Possible errors
                           include:

                           EINVAL The argument is out of range.

                           ENOTTY A real tty did not issue the
                                  command.

                           ENXIO  sxt did not configure linesw.

                           EBUSY  Already issued an SXTIOCLINK command
                                  for this real tty.



     Page 1                                        (last mod. 1/15/87)





     sxt(7)                                                     sxt(7)



                           ENOMEM There is no system memory available
                                  for allocating the virtual tty
                                  structures.

                           EBADF  Did not open channel 0 before this
                                  call.

          SXTIOCSWTCH      Set the controlling channel.  Possible
                           errors include:

                           EINVAL Gave an invalid channel number.

                           EPERM  Did not execute the command from
                                  channel 0.

          SXTIOCWF         Cause a channel to wait until it is the
                           controlling channel.  This command returns
                           the error EINVAL if it is given an invalid
                           channel number.

          SXTIOCUBLK       Turn off the loblk control flag in the
                           virtual tty of the indicated channel.
                           Returns the error EINVAL if it is given an
                           invalid number or channel 0.

          SXTIOCSTAT       Get the status (blocked on input or output)
                           of each channel and store in the sxtblock
                           structure the argument references.  Returns
                           the error EFAULT if it cannot write the
                           structure.

          SXTIOCTRACE      Enable tracing.  This command has no effect
                           if tracing is not configured.

          SXTIOCNOTRACE    Disable tracing.  This command has no
                           effect if tracing is not configured.

          If the device driver is a streams device driver (see
          streams(7)) then it will respond to all the sxt ioctls
          above, provided they are made using the streams ISTR ioctl.
          To turn on shell layering on a streams device, first pop the
          normal line discipline off the stream, push on the line
          discipline shlr onto the stream, and then push the line
          discipline line back onto the stream.  This open file
          descriptor will now become the controlling virtual tty.  To
          open a slave virtual tty, open /dev/shl and push a line
          discipline onto it (using linepush(3), for example).
          /dev/shl is a clone device so will automatically be opened
          exclusively for you (TIOCEXCL is not required or supported).

     FILES
          /dev/sxt/??[0-7]            Virtual tty devices



     Page 2                                        (last mod. 1/15/87)





     sxt(7)                                                     sxt(7)



          /usr/include/sys/sxt.h      Driver-specific definitions.
          /dev/shl

     SEE ALSO
          shl(1), stty(1), ioctl(2), line_push(3), open(2),
          streams(7), termio(7).

















































     Page 3                                        (last mod. 1/15/87)



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