Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ layers(5) — Dell System V Release 4 Issue 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

layers(1)

libwindows(3X)

jagent(5)

xtproto(5)

xt(7)



layers(5)          UNIX System V(Layers Windowing Utilities)          layers(5)


NAME
      layers - protocol used between host and windowing terminal under
      layers(1)

DESCRIPTION
      Layers are asynchronous windows supported by the operating system in a
      windowing terminal.  Communication between the UNIX System processes and
      terminal processes under the layers command [see layers(1)] occurs via
      multiplexed channels managed by the respective operating systems using a
      protocol as specified in xtproto(5).

      The contents of packets transferring data between a UNIX System process
      and a layer are asymmetric.  Data sent from the UNIX System to a
      particular terminal process are undifferentiated and it is up to the
      terminal process to interpret the contents of packets.

      Control information for terminal processes is sent via channel 0.
      Process 0 in the windowing terminal performs the designated functions on
      behalf of the process connected to the designated channel.  These packets
      take the form:

            command, channel

      except for JTIMOM and JAGENT information, which takes the form

            command, data ...

      The commands are the bottom eight bits extracted from the following
      ioctl(2) codes:

      JBOOT     Prepare to load a new terminal program into the designated
                layer.

      JTERM     Kill the downloaded layer program, and restore the default
                window program.

      JTIMOM    Set the timeout parameters for the protocol.  The data consist
                of four bytes in two groups:  the value of the receive timeout
                in milliseconds (the low eight bits followed by the high eight
                bits) and the value of the transmit timeout (in the same
                format).

      JZOMBOOT  Like JBOOT, but do not execute the program after loading.

      JAGENT    Send a source byte string to the terminal agent routine and
                wait for a reply byte string to be returned.

                The data are from a bagent structure [see jagent(5)] and
                consist of a one-byte size field followed by a two-byte agent
                command code and parameters.  Two-byte integers transmitted as
                part of an agent command are sent with the high-order byte
                first.  The response from the terminal is generally identical


10/89                                                                    Page 1







layers(5)          UNIX System V(Layers Windowing Utilities)          layers(5)


                to the command packet, with the two command bytes replaced by
                the return code: 0 for success, -1 for failure.  Note that the
                routines in the libwindows(3X) library all send parameters in
                an agentrect structure.  The agent command codes and their
                parameters are as follows:

                ANEWLAYER      followed by a two-byte channel number and a
                                rectangle structure (four two-byte
                                coordinates).

                ACURRENT       followed by a two-byte channel number.

                ADELETE        followed by a two-byte channel number.

                ATOP           followed by a two-byte channel number.

                ABOTTOM        followed by a two-byte channel number.

                AMOVE          followed by a two-byte channel number and a
                                point to move to (two two-byte coordinates).

                ARESHAPE       followed by a two-byte channel number and the
                                new rectangle (four two-byte coordinates).

                ANEW           followed by a two-byte channel number and a
                                rectangle structure (four two-byte
                                coordinates).

                AEXIT          no parameters needed.

                AROMVERSION    no parameters needed.  The response packet
                                contains the size byte, two-byte return code,
                                two unused bytes, and the parameter part of the
                                terminal ID string (for example, 8;7;3).

      JXTPROTO  Set xt protocol type [see xtproto(5)].  The data consist of one
                byte specifying maximum size for the data part of regular xt
                packets sent from the host to the terminal.  This number may be
                lower than the number returned by AXTPROTO at lower baud rates
                or if the -m option was specified upon invocation of layers(1).
                A size of 1 specifies network xt protocol.

      Packets from the windowing terminal to the UNIX System all take the
      following form:

            command, data ...

      The single-byte commands are as follows:

        CSENDCHAR          Send the next byte to the UNIX System process.




Page 2                                                                    10/89







layers(5)          UNIX System V(Layers Windowing Utilities)          layers(5)


        CNEW               Create a new UNIX System process group for this
                            layer.  Remember the window size parameters for
                            this layer.  The data for this command is in the
                            form described by the jwinsize structure.  The size
                            of the window is specified by two 2-byte integers,
                            sent low byte first.

        CUNBLK             Unblock transmission to this layer.  There are no
                            data for this command.

        CDELETE            Delete the UNIX System process group attached to
                            this layer.  There are no data for this command.

        CEXIT              Exit.  Kill all UNIX System process groups
                            associated with this terminal and terminate the
                            session.  There are no data for this command.

        CDEFUNCT           Layer program has died, send a terminate signal to
                            the UNIX System process groups associated with this
                            terminal.  There are no data for this command.

        CSENDNCHARS        The rest of the data are characters to be passed to
                            the UNIX System process.

        CRESHAPE           The layer has been reshaped.  Change the window
                            size parameters for this layer.  The data take the
                            same form as for the CNEW command.  A SIGWINCH
                            signal is also sent to the process in the window,
                            so that the process knows that the window has been
                            reshaped and it can get the new window parameters.

        CNOFLOW            Disable network xt flow control [see xtproto(5)].

        CYESFLOW           Enable network xt flow control [see xtproto(5)].

FILES
      /usr/include/windows.h
      /usr/include/sys/jioctl.h

SEE ALSO
      layers(1), libwindows(3X), jagent(5), xtproto(5)
      xt(7) in the Programmer's Guide: STREAMS












10/89                                                                    Page 3





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