Manual pages › Character sets, environment, package files (5)
xtproto(5)
multiplexed channels protocol used by xt driver
From the original Amiga UNIX 2.1 manual. Some things it mentions may not be in this release.
NAME
xtproto - multiplexed channels protocol used by xt driver
DESCRIPTION
This xt protocol is used for communication between multiple UNIX System host processes and an AT&T windowing terminal operating under the layers command; see xt(7). It is a multiplexed protocol that directs traffic between host processes and terminal windows, thereby allowing multiple virtual terminal sessions over a single connection. The protocol is implemented by the xt host driver and corresponding firmware in a windowing terminal.
The xt driver implements two distinct low level protocols. Which protocol is used depends on the media used for communication with the terminal. The regular xt protocol is used when communicating over unreliable media such as RS-232. The regular xt protocol provides flow control and error correction, thereby guaranteeing error-free delivery of data. The network xt protocol is used when communicating over reliable media such as a local area network. In order to achieve maximum possible throughput, the network xt protocol relies on the underlying network to provide flow control and error correction.
The layers command queries the windowing terminal whether to use regular or network xt protocol through an A_XTPROTO JAGENT ioctl system call [see layers(5)]. The layers command then decides what protocol to use based on the return value of A_XTPROTO, baud rate, and the -m option of layers.
The regular xt protocol uses packets with a 2-byte header containing a 3-bit sequence number, 3-bit channel number, control flag, and one byte for data size. The data part of packets sent from the host to the terminal may not be larger than 252 bytes. The maximum data part size can be less than 252 at lower baud rates, or if the -m option of layers was specified. Also, when communicating with some earlier windowing terminals, maximum data part size is fixed at 32 bytes. The maximum data part size of packets sent from the terminal to the host is always fixed at 32 bytes. The trailer contains a CRC-16 code in 2 bytes. Each channel is double-buffered.
Correctly received regular xt packets in sequence are acknowledged with a control packet containing an ACK; however, out of sequence packets generate a control packet containing a NAK, which causes the retransmission in sequence of all unacknowledged packets.
Unacknowledged regular xt packets are retransmitted after a timeout interval that is dependent on baud rate. Another timeout parameter specifies the interval after which incomplete receive packets are discarded.
Network xt protocol uses a 3-byte header containing a 3-bit channel number, various control flags, and 2-bytes for data size. The data part of packets sent from the host to the terminal has no size limit. The data part of packets sent from the terminal to the host is restricted to 1025 bytes.
Since network xt protocol relies on the underlying media to guarantee error-free delivery of data, no CRC codes or timeouts are needed.
Network xt protocol provides a simple flow control mechanism to limit the amount of data sent to a window in the terminal before a NETWORK XT ACK acknowledgement is received by the host. The intent of this flow control is to limit the amount of data sent to a window in the terminal not reading its input because, for example, the user has pressed the scroll lock key. This is necessary to prevent data from backing up and blocking other data directed to other windows. To improve overall throughput, network xt flow control can be disabled by processes in the terminal that always read their input quickly.
FILES
/usr/include/sys/xtproto.h channel multiplexing protocol definitions
SEE ALSO
jagent(5), layers(5). layers(1) in the User's Reference Manual. xt(7) in the Programmer's Guide: STREAMS.