Appendix: Off-loaded Telnet (Part 2)
2.3. The Condition Command
The Condition command is used with Telnet to modify the Transmission characteristics and to enable or disable Telnet options on a Telnet connection.
2.3.1. Specialized Usage
The Condition command takes on specialized usage with Telnet, in addition to its normal usage. It is used to control the option selection and negotiation process, when such selection is performed by the Host (currently, this is done at mediation levels 5 and 1, but not at level 9).
A set of protocol-idiosyncratic parameters has been defined for this purpose. They are based heavily on the Telnet negotiation and subnegotiation mechanisms. For simple negotiations there are two parameters, a negotiation type (from the set {DO, DONT, WILL, WONT}) followed by the code (numeric) or name (symbolic) for the desired option. The codes for the options are identified below. A basic difference between the H-FP interface to Telnet and the internal Telnet protocol is that additional parameters are included with the request (DO or WILL). The Telnet protocol subnegotiation is used internally to communicate that information in the Telnet data stream. Option-specific, protocol-idiosyncratic parameters are used for these additional parameters.
Both the Host and the OPE can issue these Condition
commands. When issued by the Host, it means the user wishes
to enable or disable a particular option. The OPE proceeds
to issue the appropriate negotiation commands (i.e., IAC
<DO> <code>) in the Telnet data stream. When the results of
the option negotiation are available, a response is
generated by the OPE. For the types DO and WILL, a 000
Response indicates the appropriate acceptance (WILL or DO,
respectively). A nonzero Response code may indicate
negotiation failure or negotiation rejection (among other
things). For the types DONT and WONT, a 000 Response
indicates the option will be disabled. A negotiation
rejection should not be expected in those cases.
When the Condition command is issued by the OPE, it means the other end of the connection is negotiating a change. Here the response from the Host indicates the Host's desired action for the option negotiation. Again, valid requests to disable options (DONT and WONT requests) should always get a 000 Response.
2.3.2. Protocol-Idiosyncratic Parameters
There are two protocol-idiosyncratic parameters for primary negotiation using the Condition command. These are the negotiation type and the option code. The negotiation type is one of the set of {DO, DONT, WILL, WONT}. The option code is a numeric value used to identify the particular option being negotiated. The values for these codes are indicated here, but are identical to the codes used in the actual Telnet negotiation. The codes are:
Option Name Option Code Short Name
Transmit Binary 0 Binary
Echo 1 Echo
Suppress Go-Ahead 3 SuppressGA
Approximate Message Size 4 NAMS
Status 5 Status
Timing Mark 6 TimingMark
RCTE 7 RCTE
Line Length 8 LineLength
Page Size 9 PageSize
Carriage Return Disp 10 CRDisp
Horizontal Tabstops 11 HTabStops
Horizontal Tab Disp 12 HTabDisp
Formfeed Disposition 13 FFDisp
Vertical Tabstops 14 VTabStops
Vertical Tab Disposition 15 VTabDisp
Linefeed Disposition 16 LFDisp
Extended ASCII 17 ExASCII
Logout 18 Logout
Data Entry Terminal 20 DET
Terminal Type 24 TermType
Extended options list 255 ExOptions
Options not listed here may of course be used. The code number should be the same as the option code used in Telnet negotiation.
2.3.2.1. Simple Options
Options that do not require additional parameters use the simple negotiation mechanisms described briefly above and in greater detail in the Telnet documentation. No additional parameters are required. These options include the Transmit Binary, Echo, Suppress Go Ahead, Status, Timing Mark, and Logout options.
2.3.2.2. Approximate Message Size Option
The Approximate Message Size option requires two parameters. The first indicates whether the approximate message size being negotiated applies to the local or the remote end of the connection. DS means the size applies to the sender of the command (i.e., if the Host issues the command, DS means the local end of the connection; if issued by the OPE, DS means the remote end of the connection). DR means the size applies to the receiver of the command (i.e., if the Host issues the command, DR means the remote end; if issued by the OPE, DR means the local end of the connection). This convention is consistent with the Telnet subnegotiation mechanisms. The second character is an ASCII encoded numeric value, which is a character count of the message size.
2.3.3. Line Width and Page Size Options
The Line Width and Page Size Options require two additional parameters. The first indicates whether the line width or page size being negotiated applies to the local or the remote end of the connection, and uses the DS and DR convention described above. The second parameter is an ASCII encoded numeric value, which is interpreted as follows (assuming the Condition command was issued by the Host):
0 The Host requests that it handle length or size
considerations for the direction indicated by
the first parameter.
1 to 253 The Host requests that the remote end handle
the size or length considerations for the
direction indicated by the first parameter, but
suggests that the value indicated be used as
the size or length.
254 The Host requests that the remote end handle
the size or length considerations for the
direction indicated by the first parameter, but
suggests that the size or length be considered
to be infinity.
255 The Host requests that the remote end handle
the tabstop considerations, and suggests
nothing about what the value should be.
If the Condition command is issued by the OPE, then the roles of the Host and the remote end are reversed.
2.3.4. Tabstop Options
The Horizontal and Vertical Tabstops options require two option specific parameters. The first is either DR or DS, as was described previously. The second is a list of one or more ASCII encoded numeric values separated by spaces which, assuming the Condition command is issued by the Host, are individually interpreted as:
0 The Host requests that it handle tabstops for
the direction indicated by the first parameter.
1 to 250 The Host requests that the remote end handle
the tabstop considerations for the direction
indicated by the first parameter, but suggests
that the value(s) indicated should be used as
the tabstops.
255 The Host requests that the remote end handle
the tabstop considerations for the direction
indicated by the first parameter, and suggests
nothing about what the value should be.
If the Condition command is issued by the OPE, then the roles of the Host and the remote end are reversed.