Appendix: Off-loaded Telnet (Part 1)
2. Command Level Interface to an Off-loaded Telnet
This appendix is provided to discuss the use of the commands described in the body of this document to provide an interface between a Host process and an off-loaded interpreter of the Telnet protocol.
The interface described here is not based on a formal interface. There are several reasons for this, including the lack of a widely accepted standard interface to Telnet, and its headerless nature. Consequently, the interface described here is very similar to the actual Telnet data stream.
2.1. The Begin Command
The Begin command is used with Telnet to initiate Telnet connections.
2.1.1. Specialized Usage
There are three major specialized usages to the Begin command. They are the meaning of the Mediation Level parameter, the way the number of incoming Telnet connections are supported, and the meaning of the secondary address components.
The mediation level is used in Telnet to control which of the various Telnet activities are performed by the OPE, and which are controlled by the Host. It has been determined that all monitoring of the Telnet Socket should be performed by the OPE. Mediation level 9, which is the default, indicates the Host desires to play no role in Telnet operation. Level 5 means that protocol-idiosyncratic parameters to this Begin command indicate which incoming options the Host wishes to handle; all other options, and all NVT translations, are to be performed by the OPE. Level 0 indicates that the Host will handle all options, while all NVT translations are to be performed in the OPE (see Section B.1.3).
The Host can either accept the connections by fielding OPE generated Begins, or by issuing passive Begins to the OPE. The Host may wish to restrict the number of incoming Telnet connections that it will handle at any particular time. It can do this by rejecting OPE-generated Begins above a certain number, or by limiting the number of Host-issued passive Begins. However, precedence constraints dictate that the Host actually issue additional passive Begins or accept additional Begins from the OPE beyond the maximum number it is normally willing to support, so that high-priority service requests can be accommodated, possibly by preempting lower priority activities.
The secondary address component is used to refer to specific ports. Normally, they are used only when the standard or default ports are not used, such as special purpose applications or testing.
2.1.2. Protocol-Idiosyncratic Parameters
The protocol-idiosyncratic parameters to the Telnet Begin command are the identifiers for the options which the host wishes to negotiate when using mediation level 5. On other mediation levels, these parameters are not used.
2.1.3. Examples of the Command
An example of a passive Begin for an outboard Telnet protocol is:
C BE TEL P ,, 5 N -fc 0 -pi 9 <nl>
Where the parameters are:
TEL Code for the Telnet Protocol
P Passive Begin
,, Skip the Foreign Address Primary Component
5 Mediation Level is 5
N Non Blocking Transmits
-fc Skips over parameters up to Flow Control Advice
S Small Blocks are appropriate for Telnet
-pi Skips over parameters to the Protocol Idiosyncratic
List of Options to be Handled by the Host.
9 Option Code for Line Length Option
Here, no remote address component was specified, since the Host will accept connections from any Host. Similarly, no local addresses are specified, since the default well-known socket for this Host is to be used. In this example, the Host specifies it will handle the line length option (number 9). Other options are handled in the OPE.
An example of an active Begin for an outboard Telnet protocol is:
C BE TEL A ISIA 5 N -fc 0 -pi 9 <nl>
This command is identical to the passive command, except that a remote primary address component is specified to identify the intended Host. No remote secondary component is specified, since the well-known socket at that Host is to be used. No local secondary address components are specified, since the connection can originate from any available socket of the appropriate type selected by the OPE.
2.2. The Transmit Command
The Transmit Command is used to send data across a Telnet connection.
2.2.1. Specialized Usage
The Transmit command is used to transmit data over the Telnet connection. There is one specialized aspect of the Transmit command used with an outboard Telnet interpreter. This is the provision of the Go Ahead feature of Telnet that supports half-duplex devices.
Go Ahead is provided as a protocol idiosyncratic parameter to the Transmit. It is only used if the Host will support it, however. It is our opinion that Go Ahead is probably not a proper thing for the default case.
Go Aheads are a matter between the Host and the terminal. It is difficult to offload the generation of Go Aheads to the OPE, since the OPE is not really cognizant of the semantics of the communication between the Host and the terminal. Hence, the OPE does not know when the Host is done transmitting and willing to pass "the turn" back to the terminal. Similarly when the remote site relinquishes control, the OPE includes Go Ahead in its TR.
We don't believe this Go Ahead problem to be an indictment against outboard processing. It merely illustrates that functionality not found in a Host cannot necessarily be provided by the OPE. Hence, we provide this note to the implementor: if the Host cannot generate the protocol-idiosyncratic Go Ahead parameter, then the DO Suppress Go Ahead must be issued immediately after the connection is established.
2.2.2. Protocol Idiosyncratic Parameters
The protocol idiosyncratic parameter is the Go Ahead indicator. When present, the character "G" is used to mean the Go Ahead can be sent to the other end of the connection, but only after the data associated with that Transmit command is sent. When the character is any other value, or is absent, the Go Ahead should not be sent.
2.2.3. Examples of the Command
An example of the Transmit command is:
C TR -pi G <nl> <DATA>
With this command, the Go Ahead is passed to the other side after the data is sent.