Debian Codegraph @

rfc1091.html

raw
1 <pre>Network Working Group J. VanBokkelen
2 Request for Comments: 1091 FTP Software, Inc.
3 Obsoletes: RFC <a href="./rfc930">930</a> February 1989
4
5
6 <span class="h1">Telnet Terminal-Type Option</span>
7
8 Status of This Memo
9
10 This RFC specifies a standard for the Internet community. Hosts on
11 the Internet that exchange terminal type information within the
12 Telnet protocol are expected to adopt and implement this standard.
13
14 This standard supersedes <a href="./rfc930">RFC 930</a>. A change is made to permit cycling
15 through a list of possible terminal types and selecting the most
16 appropriate.
17
18 Distribution of this memo is unlimited.
19
20 <span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Command Name and Code</span>
21
22 TERMINAL-TYPE 24
23
24 <span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Command Meanings</span>
25
26 IAC WILL TERMINAL-TYPE
27
28 Sender is willing to send terminal type information in a
29 subsequent sub-negotiation.
30
31 IAC WON'T TERMINAL-TYPE
32
33 Sender refuses to send terminal type information.
34
35 IAC DO TERMINAL-TYPE
36
37 Sender is willing to receive terminal type information in a
38 subsequent sub-negotiation.
39
40 IAC DON'T TERMINAL-TYPE
41
42 Sender refuses to accept terminal type information.
43
44
45
46
47
48
49
50
51
52 <span class="grey">VanBokkelen [Page 1]</span></pre>
53 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
54 <span class="grey"><a href="./rfc1091">RFC 1091</a> Telnet Terminal-Type Option February 1989</span>
55
56
57 IAC SB TERMINAL-TYPE SEND IAC SE
58
59 Server requests client to transmit his (the client's) next
60 terminal type, and switch emulation modes (if more than one
61 terminal type is supported). The code for SEND is 1. (See
62 below.)
63
64 IAC SB TERMINAL-TYPE IS ... IAC SE
65
66 Client is stating the name of his current (or only) terminal
67 type. The code for IS is 0. (See below.)
68
69 <span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Default</span>
70
71 WON'T TERMINAL-TYPE
72
73 Terminal type information will not be exchanged.
74
75 DON'T TERMINAL-TYPE
76
77 Terminal type information will not be exchanged.
78
79 <span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Motivation for the Option</span>
80
81 On most machines with bit-mapped displays (e.g., PCs and graphics
82 workstations) a client terminal emulation program is used to simulate
83 a conventional ASCII terminal. Most of these programs have multiple
84 emulation modes, frequently with widely varying characteristics.
85 Likewise, modern host system software and applications can deal with
86 a variety of terminal types. What is needed is a means for the
87 client to present a list of available terminal emulation modes to the
88 server, from which the server can select the one it prefers (for
89 arbitrary reasons). There is also need for a mechanism to change
90 emulation modes during the course of a session, perhaps according to
91 the needs of applications programs.
92
93 Existing terminal-type passing mechanisms within Telnet were not
94 designed with multiple emulation modes in mind. While multiple names
95 are allowed, they are assumed to be synonyms. Emulation mode changes
96 are not defined, and the list of modes can only be scanned once.
97
98 This document defines a simple extension to the existing mechanisms,
99 which meets both of the above criteria. It makes one assumption
100 about the behaviour of implementations coded to the previous standard
101 in order to obtain full backwards-compatibility.
102
103
104
105
106
107
108 <span class="grey">VanBokkelen [Page 2]</span></pre>
109 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
110 <span class="grey"><a href="./rfc1091">RFC 1091</a> Telnet Terminal-Type Option February 1989</span>
111
112
113 <span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Description of the Option</span>
114
115 Willingness to exchange terminal-type information is agreed upon via
116 conventional Telnet option negotiation. WILL and DO are used only to
117 obtain and grant permission for future discussion. The actual
118 exchange of status information occurs within option subcommands (IAC
119 SB TERMINAL-TYPE...).
120
121 Once the two hosts have exchanged a WILL and a DO, the sender of the
122 DO TERMINAL-TYPE (the server) is free to request type information.
123 Only the server may send requests (IAC SB TERMINAL-TYPE SEND IAC SE)
124 and only the client may transmit actual type information (within an
125 IAC SB TERMINAL-TYPE IS ... IAC SE command). Terminal type
126 information may not be sent spontaneously, but only in response to a
127 request.
128
129 The terminal type information is an NVT ASCII string. Within this
130 string, upper and lower case are considered equivalent. The complete
131 list of valid terminal type names can be found in the latest
132 "Assigned Numbers" RFC [<a href="#ref-4" title="&quot;Assigned Numbers&quot;">4</a>].
133
134 The transmission of terminal type information by the Telnet client in
135 response to a query from the Telnet server implies that the client
136 must simultaneously change emulation mode, unless the terminal type
137 sent is a synonym of the preceding terminal type, or there are other
138 prerequisites for entering the new regime (e.g., having agreed upon
139 the Telnet binary option). The receipt of such information by the
140 Telnet server does not imply any immediate change of processing.
141 However, the information may be passed to a process, which may alter
142 the data it sends to suit the particular characteristics of the
143 terminal. For example, some operating systems have a terminal driver
144 that accepts a code indicating the type of terminal being driven.
145 Using the TERMINAL TYPE and BINARY options, a telnet server program
146 on such a system could arrange to have terminals driven as if they
147 were directly connected, including special functions not available to
148 a standard Network Virtual Terminal.
149
150 Note that this specification is deliberately asymmetric. It is
151 assumed that server operating systems and applications in general
152 cannot change terminal types at arbitrary points in a session. Thus,
153 the client may only send a new type (and potentially change emulation
154 modes) when the server requests that it do so.
155
156 <span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Implementation Issues</span>
157
158 The "terminal type" information may be any NVT ASCII string
159 meaningful to both ends of the negotiation. The list of terminal
160 type names in "Assigned Numbers" is intended to minimize confusion
161
162
163
164 <span class="grey">VanBokkelen [Page 3]</span></pre>
165 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
166 <span class="grey"><a href="./rfc1091">RFC 1091</a> Telnet Terminal-Type Option February 1989</span>
167
168
169 caused by alternative "spellings" of the terminal type. For example,
170 confusion would arise if one party were to call a terminal "IBM3278-
171 2" while the other called it "IBM-3278/2". There is no negative
172 acknowledgement for a terminal type that is not understood, but
173 certain other options (such as switching to BINARY mode) may be
174 refused if a valid terminal type name has not been specified.
175
176 In some cases, either a particular terminal may be known by more than
177 one name, for example a specific type and a more generic type, or the
178 client may be a workstation with integrated display capable of
179 emulating more than one kind of terminal. In such cases, the sender
180 of the TERMINAL-TYPE IS command should reply to successive TERMINAL-
181 TYPE SEND commands with the various names. In this way, a telnet
182 server that does not understand the first response can prompt for
183 alternatives. If different terminal emulations are supported by the
184 client, the mode of the emulator must be changed to match the last
185 type sent, unless the particular emulation has other Telnet options
186 (e.g., BINARY) as prerequisites (in which case, the emulation will
187 switch to the last type sent when the prerequisite is fulfilled).
188 When types are synonyms, they should be sent in order from most to
189 least specific.
190
191 When the server (the receiver of the TERMINAL-TYPE IS) receives the
192 same response two consecutive times, this indicates the end of the
193 list of available types. Similarly, the client should indicate it
194 has sent all available names by repeating the last one sent. If an
195 additional request is received, this indicates that the server (the
196 sender of the IS) wishes to return to the top of the list of
197 available types (probably to select the least of N evils).
198
199 Server implementations conforming to the previous standard will cease
200 sending TERMINAL-TYPE SEND commands after receiving the same response
201 two consecutive times, which will work according to the old standard.
202 It is assumed that client implementations conforming to the previous
203 standard will send the last type on the list in response to a third
204 query (as well as the second). New-style servers must recognize this
205 and not send more queries.
206
207 The type "UNKNOWN" should be used if the type of the terminal is
208 unknown or unlikely to be recognized by the other party.
209
210 The complete and up-to-date list of terminal type names will be
211 maintained in the "Assigned Numbers". The maximum length of a
212 terminal type name is 40 characters.
213
214 <span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. User Interfaces</span>
215
216 Telnet clients and servers conforming to this specification should
217
218
219
220 <span class="grey">VanBokkelen [Page 4]</span></pre>
221 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
222 <span class="grey"><a href="./rfc1091">RFC 1091</a> Telnet Terminal-Type Option February 1989</span>
223
224
225 provide the following functions in their user interfaces:
226
227 Clients supporting multiple emulation modes should allow the user to
228 specify which of the modes is preferred (which name is sent first),
229 prior to connection establishment. The order of the names sent
230 cannot be changed after the negotiation has begun. This initial mode
231 will also become the default with servers which do not support
232 TERMINAL TYPE.
233
234 Servers should store the current terminal type name and the list of
235 available names in a manner such that they are accessible to both the
236 user (via a keyboard command) and any applications which need the
237 information. In addition, there should be a corresponding mechanism
238 to request a change of terminal types, by initiating a series of
239 SEND/IS sub-negotiations.
240
241 <span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Examples</span>
242
243 In this example, the server finds the first type acceptable.
244
245 Server: IAC DO TERMINAL-TYPE
246
247 Client: IAC WILL TERMINAL-TYPE
248
249 (Server may now request a terminal type at any time.)
250
251 Server: IAC SB TERMINAL-TYPE SEND IAC SE
252
253 Client: IAC SB TERMINAL-TYPE IS IBM-3278-2 IAC SE
254
255 In this example, the server requests additional terminal types, and
256 accepts the second (and last on the client's list) type sent (<a href="./rfc930">RFC 930</a>
257 compatible):
258
259 Server: IAC DO TERMINAL-TYPE
260
261 Client: IAC WILL TERMINAL-TYPE
262
263 (Server may now request a terminal type at any time.)
264
265 Server: IAC SB TERMINAL-TYPE SEND IAC SE
266
267 Client: IAC SB TERMINAL-TYPE IS ZENITH-H19 IAC SE
268
269 Server: IAC SB TERMINAL-TYPE SEND IAC SE
270
271 Client: IAC SB TERMINAL-TYPE IS UNKNOWN IAC SE
272
273
274
275
276 <span class="grey">VanBokkelen [Page 5]</span></pre>
277 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
278 <span class="grey"><a href="./rfc1091">RFC 1091</a> Telnet Terminal-Type Option February 1989</span>
279
280
281 Server: IAC SB TERMINAL-TYPE SEND IAC SE
282
283 Client: IAC SB TERMINAL-TYPE IS UNKNOWN IAC SE
284
285 In this example, the server requests additional terminal types, and
286 proceeds beyond the end-of-list, to select the first type offered by
287 the client (new-type client and server):
288
289 Server: IAC DO TERMINAL-TYPE
290
291 Client: IAC WILL TERMINAL-TYPE
292
293 (Server may now request a terminal type at any time.)
294
295 Server: IAC SB TERMINAL-TYPE SEND IAC SE
296
297 Client: IAC SB TERMINAL-TYPE IS DEC-VT220 IAC SE
298
299 Server: IAC SB TERMINAL-TYPE SEND IAC SE
300
301 Client: IAC SB TERMINAL-TYPE IS DEC-VT100 IAC SE
302
303 Server: IAC SB TERMINAL-TYPE SEND IAC SE
304
305 Client: IAC SB TERMINAL-TYPE IS DEC-VT52 IAC SE
306
307 Server: IAC SB TERMINAL-TYPE SEND IAC SE
308
309 Client: IAC SB TERMINAL-TYPE IS DEC-VT52 IAC SE
310
311 Server: IAC SB TERMINAL-TYPE SEND IAC SE
312
313 Client: IAC SB TERMINAL-TYPE IS DEC-VT220 IAC SE
314
315 <span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. References:</span>
316
317 [<a id="ref-1">1</a>] Postel, J., and J. Reynolds, "Telnet Protocol Specification",
318 <a href="./rfc854">RFC 854</a>, USC Information Sciences Institute, May 1983.
319
320 [<a id="ref-2">2</a>] Postel, J., and J. Reynolds, "Telnet Option Specification",
321 <a href="./rfc855">RFC 855</a>, USC Information Sciences Institute, May 1983.
322
323 [<a id="ref-3">3</a>] Solomon, M., and E. Wimmers, "Telnet Terminal Type Option",
324 <a href="./rfc930">RFC 930</a>, University of Wisconsin - Madison, January 1985.
325
326 [<a id="ref-4">4</a>] Reynolds, J., and J. Postel, "Assigned Numbers", <a href="./rfc1010">RFC 1010</a>,
327 USC Information Sciences Institute, May 1987.
328
329
330
331
332 <span class="grey">VanBokkelen [Page 6]</span></pre>
333 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
334 <span class="grey"><a href="./rfc1091">RFC 1091</a> Telnet Terminal-Type Option February 1989</span>
335
336
337 Reviser's note:
338
339 I owe much of this text to RFCs 884 and 930, by Marvin Solomon and
340 Edward Wimmers of the University of Wisconsin - Madison, and I owe
341 the idea of the extension to discussions on the "tn3270" mailing list
342 in the Summer of 1987.
343
344 Author's Address
345
346 James VanBokkelen
347 FTP Software, Inc.
348 26 Princess Street
349 Wakefield, MA 01880-3004
350
351 Phone: (617) 246-0900
352
353 Email: [email protected]
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388 VanBokkelen [Page 7]
389 </pre>