Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ layers(M) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

jagent(M)

layers(C)

libwindows(S)

mkdev(ADM)

xt(HW)

xtproto(M)


 layers(M)                       19 June 1992                       layers(M)


 Name

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

 Syntax

    #include <sys/jioctl.h>

 Description

    layers are asynchronous windows supported by the operating system in a
    windowing terminal.  Communication between the UNIX system processes and
    terminal processes under layers(C) occurs via multiplexed channels
    managed by the respective operating systems using a protocol as specified
    in xtproto(M).

    To use layers, you must have configured the xt driver.  This is done
    using the mkdev layers script.  For more information, see mkdev(ADM).

    The contents of packets transferring data between a UNIX system process
    and a layer are asymmetric.  Data sent from the UNIX system to a particu-
    lar terminal process is 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.  Pro-
    cess 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 timeout and jagent information which take the form:

       command, data...

    The commands are the bottom eight bits extracted from the following
    ioctl(S) 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.

    JTIMO       Set the timeout parameters for the protocol.  The data con-
                sists of two bytes:  the value of the receive timeout in
                seconds and the value of the transmit timeout in seconds.

    JTIMOM      Set the timeout parameters for the protocol.  The data con-
                sists 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(M)) and con-
                sists 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
                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(S) 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 coordi-
                                  nates).

                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 coordi-
                                  nates).

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

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

                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 exam-
                                  ple, ``8;7;3'').

    Packets from the windowing terminal to the UNIX system all take the fol-
    lowing form:

       command, data...

    The single-byte commands are as follows:

    CSENDCHAR          Send the next byte to the UNIX system process.

    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 is no data
                        for this command.

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

    CEXIT              Exit. Kill all UNIX system process groups associated
                        with this terminal and terminate the session.  There
                        is 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 is 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 takes the same
                        form as for the CNEW command.

 See also

    jagent(M), layers(C), libwindows(S), mkdev(ADM), xt(HW), xtproto(M)


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