LAYERS(5) INTERACTIVE UNIX System LAYERS(5)
NAME
layers - protocol used between host and windowing terminal
under layers(1)
SYNOPSIS
#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(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 is undif-
ferentiated and it is up to the terminal process to inter-
pret the contents of packets.
Control information for terminal processes is sent via chan-
nel 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 timeout and jagent information which take 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.
JTIMO Set the timeout parameters for the protocol. The
data consist 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 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).
Rev. C Software Development Set Page 1
LAYERS(5) INTERACTIVE UNIX System LAYERS(5)
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 to the command packet, with
the two command bytes replaced by the return code:
0 for success, -1 for failure. Note that the rou-
tines in the libwindows(3X) library all send
parameters in an agentrect structure. The agent
command codes and their parameters are as follows:
A_NEWLAYER followed by a two-byte channel
number and a rectangle structure
(four two-byte coordinates).
A_CURRENT followed by a two-byte channel
number.
A_DELETE followed by a two-byte channel
number.
A_TOP followed by a two-byte channel
number.
A_BOTTOM followed by a two-byte channel
number.
A_MOVE followed by a two-byte channel
number and a point to move to (two
two-byte coordinates).
A_RESHAPE followed by a two-byte channel
number and the new rectangle (four
two-byte coordinates).
A_NEW followed by a two-byte channel
number and a rectangle structure
(four two-byte coordinates).
A_EXIT no parameters needed.
A_ROMVERSION no parameters needed. The
response packet contains the size
byte, two-byte return code, two
Rev. C Software Development Set Page 2
LAYERS(5) INTERACTIVE UNIX System LAYERS(5)
unused bytes, and the parameter
part of the terminal id string
(e.g., "8;7;3").
Packets from the windowing terminal to the UNIX system all
take the following form:
command, data...
The single-byte commands are as follows:
C_SENDCHAR Send the next byte to the UNIX system
process.
C_NEW 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.
C_UNBLK Unblock transmission to this layer.
There is no data for this command.
C_DELETE Delete the UNIX system process group
attached to this layer. There is no
data for this command.
C_EXIT Exit. Kill all UNIX system process
groups associated with this terminal
and terminate the session. There is
no data for this command.
C_DEFUNCT Layer program has died, send a ter-
minate signal to the UNIX system pro-
cess groups associated with this ter-
minal. There is no data for this com-
mand.
C_SENDNCHARS The rest of the data are characters to
be passed to the UNIX system process.
C_RESHAPE The layer has been reshaped. Change
the window size parameters for this
layer. The data takes the same form
as for the C_NEW command.
SEE ALSO
libwindows(3X), jagent(5), xtproto(5).
Rev. C Software Development Set Page 3
LAYERS(5) INTERACTIVE UNIX System LAYERS(5)
layers(1), xt(7) in the INTERACTIVE UNIX System
User's/System Administrator's Reference Manual.
Rev. C Software Development Set Page 4