7. Data Types
TELNET control signals are of two types: one that results in transmission of signals down the network to a receiving site; the other intended for the user/process site only. The latter type will be discussed later. So far, we have discussed the former type, specifically dealing with echo control.
The use of ESC should not be considered a TELNET-wide standard, but a convention limited to the 7 bit ASCII mode of transmission. Other conventions, to be incorporated later, may include binary transmission, EBCDIC, etc. Presumably, each will have its own convention for an escape character to extend its code set.
Since it is expected that conventions other than ASCII will be implemented under TELNET, a code to indicate a DATA TYPE representing each set of conventions will be employed. The control code X'AO' has been selected to represent the ASCII convention in TELNET. Since a number of applications may wish to transmit transparently (i.e., 8 bit binary data), X'Al' is being reserved for that purpose. The TELNET control code X'A2' is reserved for an expected set of EBCDIC conventions. The DATA TYPE is expected as the first byte of data over a TELNET connection. Minimum implementations will be aided by providing a default. That is, if the first byte over a connection has the high order bit set as zero, then the transmission has begun in ASCII mode.
Each set of conventions, i.e., each DATA TYPE will be expected to have a convention for that DATA TYPE to signal that it is returning to control mode. This return may be for the purpose of making use of an existing control codes or to change data type. X'88' is used [4].
Example: At the using site, a terminal has a special device on it (e.g., plotter, laboratory instrument, control box, etc.) that is controlled by binary code in 8 bit bytes. The terminal uses a special "enter" code that routes signals to the device and cuts off printing at the terminal until a special "leave" signal is received from the driving process. The driving process in this case is at a remote serving site. It is assumed in this example that a DLE convention is used for transparent transmission, a single DLE signal representing return to control. Normal transmission has been in ASCII.
Driving Process (at Serving Site) to Using Site) ---->
X'88'X'A1'
Using Site to Serving Site <----
X'88'X'88'
----------->
ENTER code...8 bit binary bytes...
Using Site TELNET to Terminal |
|
V
Enter code...8 bit binary bytes...
Terminal
Turn printer off, feed transparently to special device, look
for LEAVE signal
------------>
8 bit binary bytes...LEAVE signal...single DLE
X'A0'
<-----------
X'88'X'88
------------>
Message
|
|
V
8 bit binary data...LEAVE signal MESSAGE
During this sequence of exchanges - at the terminal, feed binary data to special device until LEAVE signal is sensed, strip off LEAVE signal, turn on printer and block data path to special device, print MESSAGE at terminal.