Debian Codegraph @

rfc2355.html

raw
1 <pre>Network Working Group B. Kelly
2 Request for Comments: 2355 Auburn University
3 Obsoletes: <a href="./rfc1647">1647</a> June 1998
4 Category: Standards Track
5
6
7 <span class="h1">TN3270 Enhancements</span>
8
9 Status of this Memo
10
11 This document specifies an Internet standards track protocol for the
12 Internet community, and requests discussion and suggestions for
13 improvements. Please refer to the current edition of the "Internet
14 Official Protocol Standards" (STD 1) for the standardization state
15 and status of this protocol. Distribution of this memo is unlimited.
16
17 Copyright Notice
18
19 Copyright (C) The Internet Society (1998). All Rights Reserved.
20
21 Abstract
22
23 This document describes a protocol that more fully supports 3270
24 devices than do traditional tn3270 practices. Specifically, it
25 defines a method of emulating both the terminal and printer members
26 of the 3270 family of devices via Telnet; it provides for the ability
27 of a Telnet client to request that it be assigned a specific device-
28 name (also referred to as "LU name" or "network name"); finally, it
29 adds support for a variety of functions such as the ATTN key, the
30 SYSREQ key, and SNA response handling.
31
32 This protocol is negotiated under the TN3270E Telnet Option, and is
33 unrelated to the Telnet 3270 Regime Option as defined in <a href="./rfc1041">RFC 1041</a>
34 [<a href="#ref-1" title="&quot;Telnet 3270 Regime Option&quot;">1</a>].
35
36 TABLE OF CONTENTS
37
38 <a href="#section-1">1</a>. Introduction ............................................... <a href="#page-2">2</a>
39 <a href="#section-1.1">1.1</a> Changes to <a href="./rfc1647">RFC 1647</a> .................................... <a href="#page-4">4</a>
40 <a href="#section-2">2</a>. TN3270E OVERVIEW ........................................... <a href="#page-5">5</a>
41 <a href="#section-3">3</a>. COMMAND NAMES AND CODES .................................... <a href="#page-6">6</a>
42 <a href="#section-4">4</a>. COMMAND MEANINGS ........................................... <a href="#page-7">7</a>
43 <a href="#section-5">5</a>. DEFAULT SPECIFICATION ...................................... <a href="#page-9">9</a>
44 <a href="#section-6">6</a>. MOTIVATION ................................................. <a href="#page-9">9</a>
45 <a href="#section-7">7</a>. TN3270E SUB-NEGOTIATION RULES .............................. <a href="#page-9">9</a>
46 <a href="#section-7.1">7.1</a> DEVICE-TYPE Negotiation ................................ <a href="#page-9">9</a>
47 <a href="#section-7.1.1">7.1.1</a> Device Pools ...................................... <a href="#page-10">10</a>
48 <a href="#section-7.1.2">7.1.2</a> CONNECT Command ................................... <a href="#page-12">12</a>
49
50
51
52 <span class="grey">Kelly Standards Track [Page 1]</span></pre>
53 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
54 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
55
56
57 <a href="#section-7.1.3">7.1.3</a> ASSOCIATE Command ................................. <a href="#page-12">12</a>
58 <a href="#section-7.1.4">7.1.4</a> Accepting a Request ............................... <a href="#page-13">13</a>
59 <a href="#section-7.1.5">7.1.5</a> REJECT Command .................................... <a href="#page-13">13</a>
60 <a href="#section-7.2">7.2</a> FUNCTIONS Negotiation .................................. <a href="#page-14">14</a>
61 <a href="#section-7.2.1">7.2.1</a> Commands .......................................... <a href="#page-14">14</a>
62 <a href="#section-7.2.2">7.2.2</a> List of TN3270E Functions ......................... <a href="#page-16">16</a>
63 <a href="#section-8">8</a>. TN3270E DATA MESSAGES ...................................... <a href="#page-16">16</a>
64 <a href="#section-8.1">8.1</a> The TN3270E Message Header ............................. <a href="#page-18">18</a>
65 <a href="#section-8.1.1">8.1.1</a> DATA-TYPE Field ................................... <a href="#page-18">18</a>
66 <a href="#section-8.1.2">8.1.2</a> REQUEST-FLAG Field ................................ <a href="#page-19">19</a>
67 <a href="#section-8.1.3">8.1.3</a> RESPONSE-FLAG Field ............................... <a href="#page-19">19</a>
68 <a href="#section-8.1.4">8.1.4</a> SEQ-NUMBER Field .................................. <a href="#page-20">20</a>
69 <a href="#section-9">9</a>. BASIC TN3270E .............................................. <a href="#page-20">20</a>
70 <a href="#section-9.1">9.1</a> 3270 Mode and NVT Mode ................................. <a href="#page-21">21</a>
71 <a href="#section-10">10</a>. DETAILS OF PROCESSING TN3270E FUNCTIONS .................... <a href="#page-22">22</a>
72 <a href="#section-10.1">10.1</a> The SCS-CTL-CODES Function ............................. <a href="#page-22">22</a>
73 <a href="#section-10.2">10.2</a> The DATA-STREAM-CTL Function ........................... <a href="#page-23">23</a>
74 <a href="#section-10.3">10.3</a> The BIND-IMAGE Function ................................ <a href="#page-24">24</a>
75 <a href="#section-10.4">10.4</a> The RESPONSES Function ................................. <a href="#page-25">25</a>
76 <a href="#section-10.4.1">10.4.1</a> Response Messages ................................. <a href="#page-26">26</a>
77 <a href="#section-10.5">10.5</a> The SYSREQ Function .................................... <a href="#page-28">28</a>
78 <a href="#section-10.5.1">10.5.1</a> Background ........................................ <a href="#page-28">28</a>
79 <a href="#section-10.5.2">10.5.2</a> TN3270E Implementation of SYSREQ .................. <a href="#page-29">29</a>
80 <a href="#section-11">11</a>. THE 3270 ATTN KEY .......................................... <a href="#page-30">30</a>
81 <a href="#section-12">12</a>. 3270 STRUCTURED FIELDS ..................................... <a href="#page-31">31</a>
82 <a href="#section-13">13</a>. IMPLEMENTATION GUIDELINES .................................. <a href="#page-31">31</a>
83 <a href="#section-13.1">13.1</a> 3270 Data Stream Notes ................................. <a href="#page-31">31</a>
84 <a href="#section-13.2">13.2</a> Negotiation of the TN3270E Telnet Option ............... <a href="#page-32">32</a>
85 <a href="#section-13.3">13.3</a> A "Keep-alive" Mechanism ............................... <a href="#page-32">32</a>
86 <a href="#section-13.4">13.4</a> Examples ............................................... <a href="#page-32">32</a>
87 <a href="#section-14">14</a>. SECURITY CONSIDERATIONS .................................... <a href="#page-36">36</a>
88 <a href="#section-15">15</a>. REFERENCES ................................................. <a href="#page-36">36</a>
89 <a href="#section-16">16</a>. AUTHOR'S NOTE .............................................. <a href="#page-37">37</a>
90 <a href="#section-17">17</a>. AUTHOR'S ADDRESS ........................................... <a href="#page-37">37</a>
91 <a href="#section-18">18</a>. Full Copyright Statement ................................... <a href="#page-38">38</a>
92
93 <span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
94
95 Traditionally, support for 3270 terminal emulation over Telnet has
96 been accomplished by the de facto standard of negotiating three
97 separate Telnet Options - Terminal-Type [<a href="#ref-2" title="&quot;Telnet Terminal-Type Option&quot;">2</a>], Binary Transmission [<a href="#ref-3" title="&quot;Telnet Binary Transmission&quot;">3</a>],
98 and End of Record [<a href="#ref-4" title="&quot;Telnet End of Record Option&quot;">4</a>]. Note that there is no RFC that specifies this
99 negotiation as a standard. <a href="./rfc1041">RFC 1041</a> attempted to standardize the
100 method of negotiating 3270 terminal support by defining the 3270
101 Regime Telnet Option. Very few developers and vendors ever
102 implemented <a href="./rfc1041">RFC 1041</a>.
103
104
105
106
107
108 <span class="grey">Kelly Standards Track [Page 2]</span></pre>
109 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
110 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
111
112
113 This document will refer to the existing practice of negotiating
114 these three Telnet Options before exchanging the 3270 data stream as
115 "traditional tn3270". Traditional tn3270 is documented in [<a href="#ref-10" title="&quot;TN3270 Current Practices&quot;">10</a>].
116
117 NOTE: Except where otherwise stated, this document does not
118 distinguish between Telnet servers that represent SNA devices and
119 those that represent non-SNA 3270 devices.
120
121 All references in this document to the 3270 data stream, 3270 data
122 stream commands, orders, structured fields and the like rely on [<a href="#ref-5" title="&quot;3270 Information Display System - Data Stream Programmer's Reference&quot;">5</a>].
123
124 References to SNA Request and Response Units rely on [<a href="#ref-6" title="&quot;SNA Formats&quot;">6</a>]. References
125 to SNA versus non-SNA operation rely on [<a href="#ref-7" title="&quot;3174 Establishment Controller Functional Description&quot;">7</a>].
126
127 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
128 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
129 document are to be interpreted as described in <a href="./rfc2119">RFC 2119</a>.
130
131 There were several shortcomings in traditional tn3270; among them
132 were the following:
133
134 - It provided no capability for Telnet clients to emulate the 328x
135 class of printers.
136
137 - There was no mechanism by which a Telnet client could request that
138 a connection be associated with a given 3270 device-name. This
139 can be of importance when a terminal session is being established,
140 since many host applications behave differently depending on the
141 network name of the terminal. In the case of printer emulation,
142 this capability is an absolute necessity because a large number of
143 host applications have some method of pre-defining printer
144 destinations.
145
146 - The 3270 ATTN and SYSREQ keys were not universally supported.
147
148 - There was no support for the SNA positive/negative response
149 process. This is particularly important if printer emulation is
150 to function properly, but is also useful for some terminal
151 applications. A positive response is used to indicate that the
152 previously received data has been successfully processed. A
153 negative response indicates some sort of error has occurred while
154 processing the previously received data; this could be caused by
155 the host application building a 3270 data stream that contains an
156 invalid command, or by a mechanical error at the client side,
157 among other things.
158
159
160
161
162
163
164 <span class="grey">Kelly Standards Track [Page 3]</span></pre>
165 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
166 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
167
168
169 - There was no mechanism by which the client could access the SNA
170 Bind information. The Bind image contains a detailed description
171 of the session between the Telnet server and the host application.
172
173 - There was no mechanism by which the server could determine whether
174 a client supported 3270 structured fields, or a client could
175 request that it receive them.
176
177 <span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a> Changes to <a href="./rfc1647">RFC 1647</a></span>
178
179 This document replaces <a href="./rfc1647">RFC 1647</a>; the following is a summary of the
180 changes that have been incorporated:
181
182 - Reworded the Introduction to refer to traditional tn3270 in the
183 past tense.
184
185 Affected sections: 1.
186
187 - Added this section documenting changes to <a href="./rfc1647">RFC 1647</a>
188
189 Affected sections: 1.1
190
191 - Clarified the specification of numeric literals contained in the
192 document.
193
194 Affected sections: 3. (first paragraph)
195
196 - Extensively revised several sections to
197
198 1) clarify the motivation behind and use of the ASSOCIATE
199 command
200 2) remove restrictive wording regarding the organization
201 and use of server maintained device pools
202 3) distinguish between device-names and resource-names in the
203 TN3270E device-type negotiation, and define a maximum length for
204 device-names and resource-names
205
206 Affected sections: 4. (DEVICE-TYPE REQUEST command) and 7.1.1
207 through 7.1.6
208
209 - Corrected the erroneous specification of the format of the
210 function-list sent during TN3270E functions negotiation.
211
212 Affected sections: 7.2.1 (first paragraph)
213
214
215
216
217
218
219
220 <span class="grey">Kelly Standards Track [Page 4]</span></pre>
221 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
222 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
223
224
225 - Added a statement addressing what a client or server should do
226 if an impasse is reached during TN3270E functions negotiation.
227
228 Affected sections: 7.2.1 (last paragraph)
229
230 - Added a DATA-TYPE of PRINT-EOJ with a value of 0x08 to support
231 the end-of-job indication for printers.
232
233 Affected sections: 8.1.1, 10.1, 10.2
234
235 - Clarified the description of the SEQ-NUMBER Field to state that
236
237 1) the field should be sent in network byte order (big endian)
238 2) either byte that contains a 0xff must be doubled to 0xffff
239 before sending, and stripped back to 0xff after receipt.
240
241 Affected sections: 8.1.4
242
243 - Defined the format and maximum length of the Bind image.
244
245 Affected sections: 10.3 (fourth paragraph)
246
247 - Clarified the misleading wording regarding allowable DATA-TYPEs
248 when BIND-IMAGE has been negotiated and a BIND has been sent.
249
250 Affected sections: 10.3 (last paragraph)
251
252 - Clarified the use of the SEQ-NUMBER field in regards to when it
253 should be reset to zero.
254
255 Affected sections: 10.4 (last paragraph)
256
257 - Clarified the format of the data when the DATA-TYPE field is
258 SSCP-LU-DATA.
259
260 Affected sections: 10.5.2 (fourth paragraph)
261
262 - Reworded the Security section to refer to Kerberos.
263
264 Affected sections: 14.
265
266 <span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. TN3270E Overview</span>
267
268 In order to address these issues, this document proposes a new Telnet
269 Option - TN3270E. Telnet clients and servers would be free to
270 negotiate support of the TN3270E option or not. If either side does
271 not support TN3270E, traditional tn3270 can be used; otherwise, a
272 sub-negotiation will occur to determine what subset of TN3270E will
273
274
275
276 <span class="grey">Kelly Standards Track [Page 5]</span></pre>
277 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
278 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
279
280
281 be used on the session. It is anticipated that a client or server
282 capable of both types of 3270 emulation would attempt to negotiate
283 TN3270E first, and only negotiate traditional tn3270 if the other
284 side refuses TN3270E.
285
286 Once a client and server have agreed to use TN3270E, negotiation of
287 the TN3270E suboptions can begin. The two major elements of TN3270E
288 sub-negotiation are:
289
290 - a device-type negotiation that is similar to, but somewhat
291 more complicated than, the existing Telnet Terminal-Type Option.
292
293 - the negotiation of a set of supported 3270 functions, such as
294 printer data stream type (3270 data stream or SNA Character
295 Stream), positive/negative response exchanges, device status
296 information, and the passing of BIND information from server to
297 client.
298
299 Successful negotiation of these two suboptions signals the beginning
300 of 3270 data stream transmission. In order to support several of the
301 new functions in TN3270E, each data message must be prefixed by a
302 header. This header will contain flags and indicators that convey
303 such things as positive and negative responses and what type of data
304 follows the header (for example, 3270 data stream, SNA Character
305 Stream, or device status information).
306
307 <span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Command Names and Codes</span>
308
309 Please note that all numeric literals in this document specify
310 decimal values, unless they are preceded by "0x", in which case a
311 hexadecimal value is represented.
312
313 TN3270E 40
314 ASSOCIATE 00
315 CONNECT 01
316 DEVICE-TYPE 02
317 FUNCTIONS 03
318 IS 04
319 REASON 05
320 REJECT 06
321 REQUEST 07
322 SEND 08
323
324 Reason-codes
325 CONN-PARTNER 00
326 DEVICE-IN-USE 01
327 INV-ASSOCIATE 02
328 INV-NAME 03
329
330
331
332 <span class="grey">Kelly Standards Track [Page 6]</span></pre>
333 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
334 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
335
336
337 INV-DEVICE-TYPE 04
338 TYPE-NAME-ERROR 05
339 UNKNOWN-ERROR 06
340 UNSUPPORTED-REQ 07
341
342 Function Names
343 BIND-IMAGE 00
344 DATA-STREAM-CTL 01
345 RESPONSES 02
346 SCS-CTL-CODES 03
347 SYSREQ 04
348
349 <span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Command Meanings</span>
350
351 Refer to the Telnet Protocol Specification [<a href="#ref-8" title="&quot;Telnet Protocol Specification&quot;">8</a>] for the meaning of
352 IAC, DO, WILL, etc.
353
354 IAC WILL TN3270E
355
356 The sender of this command is willing to send TN3270E information
357 in subsequent sub-negotiations.
358
359 IAC WON'T TN3270E
360
361 The sender of this command refuses to send TN3270E information.
362
363 IAC DO TN3270E
364
365 The sender of this command is willing to receive TN3270E
366 information in subsequent sub-negotiations.
367
368 IAC DON'T TN3270E
369
370 The sender of this command refuses to receive TN3270E information.
371
372 Note that while they are not explicitly negotiated, the equivalent of
373 the Telnet Binary Transmission Option [<a href="#ref-3" title="&quot;Telnet Binary Transmission&quot;">3</a>] and the Telnet End of
374 Record Option [<a href="#ref-4" title="&quot;Telnet End of Record Option&quot;">4</a>] is implied in the negotiation of the TN3270E
375 Option. That is, a party to the negotiation that agrees to support
376 TN3270E is automatically required to support bi-directional binary
377 and EOR transmissions.
378
379 IAC SB TN3270E SEND DEVICE-TYPE IAC SE
380
381 Only the server may send this command. This command is used to
382 request that the client transmit a device-type and, optionally,
383 device-name information.
384
385
386
387
388 <span class="grey">Kelly Standards Track [Page 7]</span></pre>
389 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
390 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
391
392
393 IAC SB TN3270E DEVICE-TYPE REQUEST &lt;device-type&gt;
394 [ [CONNECT &lt;resource-name&gt;] | [ASSOCIATE &lt;device-name&gt;] ] IAC SE
395
396 Only the client may send this command. It is used in response to
397 the server's SEND DEVICE-TYPE command, as well as to suggest
398 another device-type after the server has sent a DEVICE-TYPE REJECT
399 command (see below). This command requests emulation of a
400 specific 3270 device type and model. The REQUEST command may
401 optionally include either the CONNECT or the ASSOCIATE command
402 (but not both). If present, CONNECT must be followed by
403 &lt;resource-name&gt; and ASSOCIATE must be followed by &lt;device-name&gt;.
404 (See the section entitled "DEVICE-TYPE Negotiation" for more
405 detailed information.)
406
407 IAC SB TN3270E DEVICE-TYPE IS &lt;device-type&gt; CONNECT
408 &lt;device-name&gt; IAC SE
409
410 Only the server may send this command. This command is used to
411 accept a client's DEVICE-TYPE REQUEST command and to return the
412 server-defined device-name.
413
414 IAC SB TN3270E DEVICE-TYPE REJECT REASON &lt;reason-code&gt; IAC SE
415
416 Only the server may send this command. This command is used to
417 reject a client's DEVICE-TYPE REQUEST command.
418
419 IAC SB TN3270E FUNCTIONS REQUEST &lt;function-list&gt; IAC SE
420
421 Either side may send this command. This command is used to
422 suggest a set of 3270 functions that will be supported on this
423 session. It is also sent as an implicit rejection of a previous
424 FUNCTIONS REQUEST command sent by the other side (see the section
425 entitled "FUNCTIONS Negotiation" for more information). Note that
426 when used to reject a FUNCTIONS REQUEST command, the function-list
427 must not be identical to that received in the previous REQUEST
428 command.
429
430 IAC SB TN3270E FUNCTIONS IS &lt;function-list&gt; IAC SE
431
432 Either side may send this command. This command is sent as a
433 response to a FUNCTIONS REQUEST command and implies acceptance of
434 the set of functions sent to it in the REQUEST command. Note that
435 the list of functions in the FUNCTIONS IS command must match the
436 list that was received in the previous FUNCTIONS REQUEST command.
437
438
439
440
441
442
443
444 <span class="grey">Kelly Standards Track [Page 8]</span></pre>
445 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
446 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
447
448
449 <span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Default Specification</span>
450
451 WON'T TN3270E
452
453 DON'T TN3270E
454
455 i.e., TN3270E will not be used.
456
457 <span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Motivation</span>
458
459 See the section entitled "Introduction".
460
461 <span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. TN3270E Sub-negotiation Rules</span>
462
463 Once it has been agreed that TN3270E will be supported, the first
464 sub-negotiation must concern the DEVICE-TYPE (and possibly device-
465 name) information. Only after that has been successfully negotiated
466 can the client and server exchange FUNCTIONS information. Only after
467 both DEVICE-TYPE and FUNCTIONS have been successfully negotiated can
468 3270 data stream transmission occur.
469
470 <span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a> DEVICE-TYPE Negotiation</span>
471
472 Device-type names are NVT ASCII strings, all upper case.
473
474 Device-type (and device-name) negotiation begins when the server
475 transmits the DEVICE-TYPE SEND command to the client. The client
476 responds with the DEVICE-TYPE REQUEST command, which must include a
477 device-type and may include a resource-name or device-name request.
478
479 Valid device-types are:
480
481 erminals: IBM-3278-2 IBM-3278-2-E (24 row x 80 col display)
482 IBM-3278-3 IBM-3278-3-E (32 row x 80 col display)
483 IBM-3278-4 IBM-3278-4-E (43 row x 80 col display)
484 IBM-3278-5 IBM-3278-5-E (27 row x 132 col display)
485 IBM-DYNAMIC (no pre-defined display size)
486
487 printers: IBM-3287-1
488
489 Note that the use of '3278' and '3287' is NOT intended to exclude any
490 particular device capabilities; they are used here only because they
491 are commonly known designations for a terminal and a printer member
492 of the 3270 family of devices. The intention is to simplify the
493 device-type negotiation (in comparison to traditional tn3270) by
494 minimizing the number of possible device-types, and by breaking the
495 association of a specific piece of IBM hardware with a related set of
496 data stream capabilities. For example, negotiation of device-type
497
498
499
500 <span class="grey">Kelly Standards Track [Page 9]</span></pre>
501 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
502 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
503
504
505 IBM-3278-2-E does NOT in and of itself preclude the use of any of the
506 functions associated with a physical 3279 model S2B. A client's
507 ability to support the more advanced functions of the 3270 data
508 stream will be indicated not by negotiation of an IBM device type and
509 model number, but rather by the combination of Read Partition Query
510 and Query Reply.
511
512 All of the terminal device-types support a "primary" display size of
513 24 rows by 80 columns. The "-3", "-4" and "-5" types each support an
514 "alternate" display size as noted in the above list. The IBM-DYNAMIC
515 device-type implies no pre-defined alternate display size; this value
516 will be passed from the client to host applications as part of the
517 Query Reply structured field, and it can represent any display size
518 the client and the host application can support.
519
520 Terminal device-types with the "-E" suffix should only be negotiated
521 by clients that are willing to support some subset of the 3270
522 "extended data stream". This usually includes at a minimum support
523 for extended colors and highlighting, but may also include a number
524 of other functions, such as graphics capability, alternate character
525 sets, and partitions.
526
527 Clients that negotiate a terminal device-type with the "-E" suffix or
528 the DYNAMIC type, as well as those that negotiate a printer device-
529 type, must be able to accept and respond to a Read Partition Query
530 command (see the section entitled "3270 Structured Fields"). This
531 allows the client to indicate to host applications which subsets of
532 the 3270 extended data stream the client is willing to support.
533
534 In a VTAM/SNA environment, negotiation of IBM-DYNAMIC as the device-
535 type should result in a Bind in which the Presentation Services Usage
536 screen field (the eleventh byte in the logmode's PSERVIC field) is
537 set to 0x03, indicating that the alternate screen size will be
538 determined by the Query Reply (Usable Area).
539
540 <span class="h4"><a class="selflink" id="section-7.1.1" href="#section-7.1.1">7.1.1</a> Device Pools</span>
541
542 An explanation of the CONNECT and ASSOCIATE commands first requires a
543 discussion of the organization of terminal and printer device pools
544 that the server maintains and from which it selects device-names to
545 assign to session requests. Definition of a few terms is also in
546 order.
547
548 The terms "device-name", "LU name" and "network name" can be
549 considered interchangeable in this document. They refer to a
550 specific terminal or printer device.
551
552
553
554
555
556 <span class="grey">Kelly Standards Track [Page 10]</span></pre>
557 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
558 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
559
560
561 The term "resource-name" is less specific; it may refer to a device-
562 name, but it may also be the name of a pool of printer or terminal
563 devices. Such a named pool could serve to group devices with similar
564 operational or administrative characteristics. In fact, this
565 document places no restrictions on how a server makes use of
566 resource-names, so long as the server can take a resource-name
567 specified by the client and use it to come up with a device-name to
568 assign to the session. Note, however, that servers must avoid
569 allowing ambiguity; for example, they must not allow the definition
570 of a device-name with the same name as that of a pool of devices.
571
572 Device-names and resource-names are specified as NVT ASCII strings in
573 which upper and lower case are considered equivalent. The length of
574 device-names and resource-names should not exceed 8 bytes.
575
576 A "generic session request" is one which includes neither the CONNECT
577 nor the ASSOCIATE command, while a "specific session request" is one
578 that includes either the CONNECT or the ASSOCIATE command.
579
580 If a TN3270E server wishes to support traditional tn3270 clients, it
581 must maintain a set of terminal device-names that can be used to
582 satisfy requests from such clients for terminal sessions. This same
583 pool could be used to satisfy generic requests for terminal sessions
584 from TN3270E clients.
585
586 The server may also maintain any number of other pools of device-
587 names. For example, there could be a pool of terminal device-names
588 reserved for a specific department within the organization, or a pool
589 of terminal device-names that have access to certain applications on
590 the host.
591
592 For any of these terminal device pools, the TN3270E server may also
593 have defined a "partner" or "paired" printer device for each terminal
594 in the pool. There should be a unique, one-to-one mapping between a
595 terminal and its associated printer. The reasoning behind such a
596 configuration is to allow for those host applications that produce
597 printed output bound for a printer whose device-name is determined by
598 the device-name of the terminal that initiated the print request.
599 These printer devices can only be assigned to specific printer
600 session requests that use the ASSOCIATE command (see below).
601
602 In addition, the TN3270E server may also maintain one or more pools
603 of printer device-names that are not associated with any terminal.
604 These printer devices can only be assigned to specific printer
605 session requests that use the CONNECT command (see below). This
606 allows for those host applications that generate printed output bound
607 for a printer whose device-name is determined by something other than
608 the device-name of the terminal that initiated the print request (for
609
610
611
612 <span class="grey">Kelly Standards Track [Page 11]</span></pre>
613 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
614 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
615
616
617 example, when the userid of the person signed on to a terminal
618 determines the print destination). It is also possible that a pool
619 of printer device-names could be maintained to satisfy generic
620 requests for printers (i.e., those that specify neither CONNECT nor
621 ASSOCIATE).
622
623 <span class="h4"><a class="selflink" id="section-7.1.2" href="#section-7.1.2">7.1.2</a> CONNECT Command</span>
624
625 CONNECT can be used by the client in two ways: if the resource-name
626 it specifies is a device-name, then the client is requesting a
627 specific device-name. If the specified resource-name is not a
628 device-name, then the client is requesting any one of the device-
629 names associated with the resource-name.
630
631 In either case, the resource indicated by the specified resource-name
632 must not conflict with the device-type; e.g., if the client requests
633 DEVICE-TYPE IBM-3287-1 (a printer) and specifies CONNECT T1000001,
634 but T1000001 is a device-name defined at the host as a terminal, then
635 the server must deny the request. Further, if the requested
636 resource-name is a device-name already associated with some other
637 Telnet session, or if it is not defined to the server, the server
638 must deny the request.
639
640 <span class="h4"><a class="selflink" id="section-7.1.3" href="#section-7.1.3">7.1.3</a> ASSOCIATE Command</span>
641
642 ASSOCIATE can be used by the client only when requesting a DEVICE-
643 TYPE that represents a printer, and the specified device-name must be
644 that of a terminal that was returned by the server in a previous
645 DEVICE-TYPE IS &lt;device-type&gt; CONNECT &lt;device-name&gt; command.
646
647 The ASSOCIATE command requests that this session be assigned the
648 device-name of the printer that is paired with the terminal named in
649 the request. If the device-type does not represent a printer, or if
650 the device-name is not that of a terminal, then the server must deny
651 the request. Also, if the server does not have defined a partner
652 printer for the specified terminal, it must deny the request.
653
654 The use of the ASSOCIATE command is to be as follows: A client first
655 connects and requests a terminal from one of the terminal pools; it
656 then uses the terminal device-name returned by the server (see
657 "Accepting a Request", <a href="#section-7.1.4">section 7.1.4</a> below) in a second session
658 request, this time asking for the printer that is paired with the
659 terminal session it just established. This allows clients to
660 associate a printer session with a terminal rather than having to
661 have prior knowledge of a printer device-name.
662
663
664
665
666
667
668 <span class="grey">Kelly Standards Track [Page 12]</span></pre>
669 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
670 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
671
672
673 <span class="h4"><a class="selflink" id="section-7.1.4" href="#section-7.1.4">7.1.4</a> Accepting a Request</span>
674
675 The server must accept the client's request or deny it as a whole -
676 it cannot, for example, accept the DEVICE-TYPE request but deny the
677 CONNECT portion.
678
679 If the server wishes to accept the request, it sends back the
680 DEVICE-TYPE IS command confirming the requested device-type and the
681 CONNECT command specifying the device-name of the terminal or printer
682 assigned to this session.
683
684 Normally, the client should accept any DEVICE-TYPE IS &lt;device-type&gt;
685 CONNECT &lt;device-name&gt; sent by the server. An exception to this would
686 be if the client must (e.g., to satisfy local-site policy) be
687 connected to a specific LU name and is presented with a device-name
688 which does not match the one requested by the client (this could
689 happen, for example, if the client requested what it thought was a
690 device-name, but what was defined at the server as the name of a pool
691 of devices). In this case, the client should reject the DEVICE-TYPE
692 IS command by terminating TN3270E negotiations.
693
694 <span class="h4"><a class="selflink" id="section-7.1.5" href="#section-7.1.5">7.1.5</a> REJECT Command</span>
695
696 If the server wishes to deny the request, it sends back the DEVICE-
697 TYPE REJECT command with one of the following reason-codes:
698
699 Reason code name Explanation
700 ---------------- -----------------------------------
701 INV-DEVICE-TYPE The server does not support the
702 requested device-type.
703
704 INV-NAME The resource-name or device-name
705 specified in the CONNECT or ASSOCIATE
706 command is not known to the server.
707
708 DEVICE-IN-USE The requested device-name is
709 already associated with another
710 session.
711
712 TYPE-NAME-ERROR The requested device-name or
713 resource-name is incompatible
714 with the requested device-type
715 (such as terminal/printer mismatch).
716
717 UNSUPPORTED-REQ The server is unable to satisfy
718 the type of request sent by the
719 client; e.g., a specific terminal
720 or printer was requested but the
721
722
723
724 <span class="grey">Kelly Standards Track [Page 13]</span></pre>
725 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
726 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
727
728
729 server does not have any such pools of
730 device-names defined to it, or the
731 ASSOCIATE command was used but no
732 partner printers are defined to the
733 server.
734
735 INV-ASSOCIATE The client used the ASSOCIATE
736 command and either the device-type
737 is not a printer or the device-name
738 is not a terminal.
739
740 CONN-PARTNER The client used the CONNECT command
741 to request a specific printer but
742 the device-name requested is the
743 partner to some terminal.
744
745 UNKNOWN-ERROR Any other error in device type or
746 name processing has occurred.
747
748 The process of negotiating a device-type and device-name that are
749 acceptable to both client and server may entail several iterations of
750 DEVICE-TYPE REQUEST and DEVICE-TYPE REJECT commands. The client must
751 make use of the reason-code specified by the server in any DEVICE-
752 TYPE REJECT command(s) to minimize the amount of negotiation
753 necessary. For example, if the client initially requests that it be
754 assigned a specific terminal device-name via the CONNECT command, and
755 the server rejects the request with a reason-code of UNSUPPORTED-REQ,
756 the client must make no further specific terminal requests in the
757 negotiations. If at any point in the process either side wishes to
758 "bail out," it can simply send a WON'T (or DON'T) TN3270E command to
759 the other side. At this point both sides are free to negotiate other
760 Telnet options (including traditional tn3270).
761
762 <span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a> FUNCTIONS Negotiation</span>
763
764 Once the DEVICE-TYPE negotiation has successfully completed (i.e,
765 when the client receives a DEVICE-TYPE IS command that is
766 acceptable), the client must initiate the FUNCTIONS negotiation by
767 sending the FUNCTIONS REQUEST command to the server. After this
768 initial REQUEST command, both sides are free to transmit FUNCTIONS
769 REQUEST and FUNCTIONS IS commands as needed.
770
771 <span class="h4"><a class="selflink" id="section-7.2.1" href="#section-7.2.1">7.2.1</a> Commands</span>
772
773 The FUNCTIONS REQUEST command contains a list of the TN3270E
774 functions that the sender would like to see supported on this
775 session. All functions not in the list are to be considered
776 unsupported. The list is terminated by the IAC code that precedes
777
778
779
780 <span class="grey">Kelly Standards Track [Page 14]</span></pre>
781 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
782 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
783
784
785 the SE command. Functions may appear in any order in the list.
786
787 Upon receipt of a FUNCTIONS REQUEST command, the recipient has two
788 choices:
789
790 - it may respond in the positive (meaning it agrees to support
791 all functions in the list, and not to transmit any data related to
792 functions not in the list). To do this, it sends the FUNCTIONS IS
793 command with the function-list exactly as it was received. At this
794 point, FUNCTIONS negotiation has successfully completed.
795
796 - it may respond in the negative by sending a FUNCTIONS
797 REQUEST command in which the function-list differs from the one it
798 received (and not simply in the order of appearance of functions in
799 the list; at least one function must have been added to, or removed
800 from, the list).
801
802 To avoid endlessly looping, both parties must not add to the
803 function-list it receives any function that it has previously added
804 and that the other side has removed.
805
806 The process of sending FUNCTIONS REQUEST commands back and forth
807 continues until one side receives a function-list it is willing to
808 live with. It uses the FUNCTIONS IS command to accept the list,
809 and, once this command is received by the other side, all necessary
810 negotiation has been completed. At this point, 3270 data stream
811 transmission can begin.
812
813 Note that it is possible that the function-list agreed to is null;
814 this is referred to as "basic TN3270E". See the section entitled
815 "Basic TN3270E" for more information.
816
817 If an impasse is reached during FUNCTIONS negotiation (for example,
818 if a client requested and was granted a DEVICE-TYPE representing a
819 printer, but refuses to accept either the SCS-CTL-CODES or DATA-
820 STREAM-CTL function), then the "offended" party should terminate
821 the negotiation by sending an IAC DON'T (or WON'T) TN3270E.
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836 <span class="grey">Kelly Standards Track [Page 15]</span></pre>
837 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
838 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
839
840
841 <span class="h4"><a class="selflink" id="section-7.2.2" href="#section-7.2.2">7.2.2</a> List of TN3270E Functions</span>
842
843 The following list briefly describes the 3270 functions that may be
844 negotiated in the function-list:
845
846 Function Name Description
847 ------------- -----------
848 SCS-CTL-CODES (Printer sessions only). Allows the use
849 of the SNA Character Stream (SCS) and SCS
850 control codes on the session. SCS is
851 used with LU type 1 SNA sessions.
852
853 DATA-STREAM-CTL (Printer sessions only). Allows the use
854 of the standard 3270 data stream. This
855 corresponds to LU type 3 SNA sessions.
856
857 RESPONSES Provides support for positive and
858 negative response handling. Allows the
859 server to reflect to the client any and
860 all definite, exception, and no response
861 requests sent by the host application.
862
863 BIND-IMAGE Allows the server to send the SNA Bind
864 image and Unbind notification to the
865 client.
866
867 SYSREQ Allows the client and server to emulate
868 some (or all, depending on the server) of
869 the functions of the SYSREQ key in an SNA
870 environment.
871
872 See the section entitled "Details of Processing TN3270E Functions"
873 for a more detailed explanation of the meaning and use of these
874 functions.
875
876 If in the process of functions negotiation an unrecognized function
877 code is recieved, the recipient should simply remove that function
878 code from the list and continue normal functions negotiation.
879
880 <span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. TN3270E Data Messages</span>
881
882 3270 device communications are generally understood to be block
883 oriented in nature. That is, each partner buffers data until an
884 entire "message" has been built, at which point the data is sent to
885 the other side. The "outbound message" (from host to device)
886 consists of a 3270 command and a series of buffer orders, buffer
887 addresses, and data, while the "inbound message" contains only buffer
888 orders, addresses and data. The end of a message is understood to be
889
890
891
892 <span class="grey">Kelly Standards Track [Page 16]</span></pre>
893 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
894 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
895
896
897 the last byte transmitted (note that this discussion disregards SNA
898 chaining). The Telnet EOR command is used to delimit these natural
899 blocks of 3270 data within the Telnet data stream.
900
901 In TN3270E, each 3270 message must be prefixed with a TN3270E header,
902 which consists of five bytes and whose format is defined below (see
903 the section entitled "The TN3270E Message Header"). A "data message"
904 in TN3270E therefore has the following construction:
905
906 &lt;TN3270E Header&gt;&lt;data&gt;&lt;IAC EOR&gt;
907
908 It should be noted that it is possible that, for certain message
909 types, there is no data portion present. In this case, the TN3270E
910 data message consists of:
911
912 &lt;TN3270E Header&gt;&lt;IAC EOR&gt;
913
914 If either side wishes to transmit the decimal value 255 and have it
915 interpreted as data, it must "double" this byte. In other words, a
916 single occurrence of decimal 255 will be interpreted by the other
917 side as an IAC, while two successive bytes containing decimal 255
918 will be treated as one data byte with a value of decimal 255.
919
920 It is strongly recommended that Telnet commands (other than IAC IAC)
921 should be sent between TN3270E data messages, with no header and no
922 trailing IAC EOR. If a TN3270E data message containing either IAC IP
923 (to be interpreted as 3270 Attention) or IAC AO (to be interpreted as
924 SYSREQ) is received, the receiver should defer processing the command
925 until the 3270 data has been processed (see the appropriate sections
926 for discussion of 3270 Attention and SYSREQ). If a TN3270E data
927 message containing any other IAC-command sequence (other than IAC
928 IAC) is received, it is implementation dependent when the IAC-command
929 sequence will be processed, but it must be processed. The receiver
930 may process it immediately, which in effect causes it to be processed
931 as if it had been received before the current TN3270E data message,
932 or the processing may be deferred until after the current TN3270E
933 data message has been processed. It is because of this ambiguity
934 that the presence of Telnet commands within a TN3270E data message
935 (i.e., between the header and the trailing IAC EOR) is not
936 recommended; neither clients nor servers should send such data.
937
938
939
940
941
942
943
944
945
946
947
948 <span class="grey">Kelly Standards Track [Page 17]</span></pre>
949 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
950 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
951
952
953 <span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a> The TN3270E Message Header</span>
954
955 As stated earlier, each data message in TN3270E must be prefixed by a
956 header, which consists of five bytes and is formatted as follows:
957
958 -----------------------------------------------------------
959 | DATA-TYPE | REQUEST-FLAG | RESPONSE-FLAG | SEQ-NUMBER |
960 -----------------------------------------------------------
961 1 byte 1 byte 1 byte 2 bytes
962
963 <span class="h4"><a class="selflink" id="section-8.1.1" href="#section-8.1.1">8.1.1</a> DATA-TYPE Field</span>
964
965 The DATA-TYPE field indicates how the data portion of the message is
966 to be interpreted by the receiver. Possible values for the DATA-TYPE
967 field are:
968
969 Data-type Name Code Meaning
970 -------------- ---- ---------------------------------
971 3270-DATA 0x00 The data portion of the message
972 contains only the 3270 data stream.
973
974 SCS-DATA 0x01 The data portion of the message
975 contains SNA Character Stream data.
976
977 RESPONSE 0x02 The data portion of the message
978 constitutes device-status information
979 and the RESPONSE-FLAG field indicates
980 whether this is a positive or negative
981 response (see below).
982
983 BIND-IMAGE 0x03 The data portion of the message is
984 the SNA bind image from the session
985 established between the server and the
986 host application.
987
988 UNBIND 0x04 The data portion of the message is
989 an Unbind reason code.
990
991 NVT-DATA 0x05 The data portion of the message is to
992 be interpreted as NVT data.
993
994 REQUEST 0x06 There is no data portion present in
995 the message. Only the REQUEST-FLAG
996 field has any meaning.
997
998 SSCP-LU-DATA 0x07 The data portion of the message is
999 data from the SSCP-LU session.
1000
1001
1002
1003
1004 <span class="grey">Kelly Standards Track [Page 18]</span></pre>
1005 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
1006 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1007
1008
1009 PRINT-EOJ 0x08 There is no data portion present in
1010 the message. This value can be sent
1011 only by the server, and only on a
1012 printer session.
1013
1014 <span class="h4"><a class="selflink" id="section-8.1.2" href="#section-8.1.2">8.1.2</a> REQUEST-FLAG Field</span>
1015
1016 The REQUEST-FLAG field only has meaning when the DATA-TYPE field has
1017 a value of REQUEST; otherwise, the REQUEST-FLAG field must be ignored
1018 by the receiver and should be set to 0x00 by the sender. Possible
1019 values for the REQUEST-FLAG field are:
1020
1021 Request-Flag Name Code Meaning
1022 ----------------- ---- ---------------------------------
1023 ERR-COND-CLEARED 0x00 The client sends this to the server
1024 when some previously encountered
1025 printer error condition has been
1026 cleared. (See the section entitled
1027 "The RESPONSES Function" below.)
1028
1029 <span class="h4"><a class="selflink" id="section-8.1.3" href="#section-8.1.3">8.1.3</a> RESPONSE-FLAG Field</span>
1030
1031 The RESPONSE-FLAG field only has meaning for certain values of the
1032 DATA-TYPE field. For DATA-TYPE field values of 3270-DATA and SCS-
1033 DATA, the RESPONSE-FLAG is an indication of whether or not the sender
1034 of the data expects to receive a response. In this case the possible
1035 values of RESPONSE-FLAG are:
1036
1037 Response-Flag Name Code Meaning
1038 ------------------ ---- ---------------------------------
1039 NO-RESPONSE 0x00 The sender does not expect the
1040 receiver to respond either
1041 positively or negatively to this
1042 message. The receiver must
1043 therefore not send any response
1044 to this data-message.
1045
1046 ERROR-RESPONSE 0x01 The sender only expects the
1047 receiver to respond to this message
1048 if some type of error occurred, in
1049 which case a negative response must
1050 be sent by the receiver.
1051
1052 ALWAYS-RESPONSE 0x02 The sender expects the receiver to
1053 respond negatively if an error
1054 occurs, or positively if no errors
1055 occur. One or the other must
1056 always be sent by the receiver.
1057
1058
1059
1060 <span class="grey">Kelly Standards Track [Page 19]</span></pre>
1061 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
1062 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1063
1064
1065 For a DATA-TYPE field value of RESPONSE, the RESPONSE-FLAG is an
1066 actual response to a previous data message (which must by definition
1067 have had a DATA-TYPE of either 3270-DATA or SCS-DATA and a RESPONSE-
1068 FLAG value of either ERROR-RESPONSE or ALWAYS-RESPONSE). In this
1069 case the possible values of RESPONSE-FLAG are:
1070
1071 Response-Flag Name Code Meaning
1072 ------------------ ---- ---------------------------------
1073 POSITIVE-RESPONSE 0x00 The previous message was received
1074 and executed successfully with
1075 no errors.
1076
1077 NEGATIVE-RESPONSE 0x01 The previous message was received
1078 but an error(s) occurred while
1079 processing it.
1080
1081 Accompanying status information will be found in the data portion of
1082 the message.
1083
1084 For any other values of the DATA-TYPE field, the RESPONSE-FLAG field
1085 must be ignored by the receiver and should be set to 0x00 by the
1086 sender.
1087
1088 <span class="h4"><a class="selflink" id="section-8.1.4" href="#section-8.1.4">8.1.4</a> SEQ-NUMBER Field</span>
1089
1090 The SEQ-NUMBER field is only used when the RESPONSES function has
1091 been agreed to. It contains a 2 byte binary number, and is used to
1092 correlate positive and negative responses to the data messages for
1093 which they were intended. This field must be sent in network byte
1094 order ("big endian"). If either byte contains a 0xff, it should be
1095 doubled to 0xffff before sending and stripped back to 0xff upon
1096 receipt; this is standard IAC escaping. See the section entitled
1097 "The RESPONSES Function" for further information on the use of the
1098 SEQ-NUMBER field. When the RESPONSES function is not agreed to, this
1099 field should always be set to 0x0000 by the sender and ignored by the
1100 receiver.
1101
1102 <span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Basic TN3270E</span>
1103
1104 As has been stated earlier, whether or not the use of each of the
1105 TN3270E functions is allowed on a session is negotiated when the
1106 connection is established. It is possible that none of the functions
1107 are agreed to (in this case, the function-list in the FUNCTIONS
1108 REQUEST and FUNCTIONS IS commands is null). This mode of operation
1109 is referred to as "basic TN3270E". Note that, since neither the
1110 SCS-CTL-CODES function nor the DATA-STREAM-CTL function is agreed to,
1111 basic TN3270E refers to terminal sessions only.
1112
1113
1114
1115
1116 <span class="grey">Kelly Standards Track [Page 20]</span></pre>
1117 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
1118 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1119
1120
1121 Basic TN3270E requires the support of only the following TN3270E
1122 header values:
1123
1124 Header field Value
1125 ------------ -----
1126 DATA-TYPE 3270-DATA
1127 DATA-TYPE NVT-DATA
1128
1129 The REQUEST-FLAG, RESPONSE-FLAG and SEQ-NUMBER fields are not used in
1130 basic TN3270E.
1131
1132 <span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a> 3270 Mode and NVT Mode</span>
1133
1134 At any given time, a TN3270E connection can be considered to be
1135 operating in either "3270 mode" or "NVT mode". In 3270 mode, each
1136 party may send data messages with the DATA-TYPE flag set to 3270-
1137 DATA; sending a DATA-TYPE flag set to NVT-DATA constitutes a request
1138 to switch modes. In NVT mode, each party may send data messages with
1139 the DATA-TYPE flag set to NVT-DATA; sending 3270-DATA is a request to
1140 switch modes. The connection is initially in 3270 mode when TN3270E
1141 operation is successfully negotiated. When a party receives a
1142 message with a DATA-TYPE different from the mode it is operating in,
1143 the mode of operation for the connection is switched. Switching
1144 modes results in the client performing the equivalent of a 3270
1145 Erase/Reset operation, as described in [<a href="#ref-5" title="&quot;3270 Information Display System - Data Stream Programmer's Reference&quot;">5</a>], using the default
1146 partition (screen) size. The server cannot assume the client
1147 preserves any attributes of the previous environment across a mode
1148 switch.
1149
1150 Note that even when sending NVT-DATA, each side should buffer data
1151 until an entire message is built (for the client, this would normally
1152 mean until the user presses Enter). At that point, a complete
1153 TN3270E data message should be built to transmit the NVT data.
1154
1155 Typically, NVT data is used by a server to interact with the user of
1156 a client. It allows the server to do this using a simple NVT data
1157 stream, instead of requiring a 3270 data stream. An example would be
1158 a server which displays a list of 3270 applications to which it can
1159 connect the client. The server would use NVT data to display the
1160 list and read the user's choice. Then the server would connect to
1161 the application, and begin the exchange of 3270 data between the
1162 application and the client.
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172 <span class="grey">Kelly Standards Track [Page 21]</span></pre>
1173 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
1174 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1175
1176
1177 <span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Details of Processing TN3270E Functions</span>
1178
1179 Agreement by both parties to a specific function in the FUNCTIONS
1180 REQUEST function-list implies agreement by each party to support a
1181 related set of values in the TN3270E header. It also implies a
1182 willingness to adhere to the rules governing the processing of data
1183 messages with regard to the agreed upon function. Either party that
1184 fails to accept header values associated either with agreed upon
1185 functions or with basic TN3270E, or attempts to use header values
1186 associated with a function that is not a part of basic TN3270E and
1187 was not agreed upon, will be considered non-conforming and in
1188 violation of the protocol. The following sections detail for each
1189 TN3270E function the associated header values and processing rules.
1190
1191 <span class="h3"><a class="selflink" id="section-10.1" href="#section-10.1">10.1</a> The SCS-CTL-CODES Function</span>
1192
1193 This function can only be supported on a 3270 printer session.
1194
1195 Agreement to support this function requires that the party support
1196 the following TN3270E header values:
1197
1198 Header field Value
1199 ------------ -----
1200 DATA-TYPE SCS-DATA
1201 DATA-TYPE PRINT-EOJ
1202
1203 A client representing a printer device uses this function to indicate
1204 its willingness to accept a data stream that includes SCS control
1205 codes. For the purposes of NVT mode versus 3270 mode, SCS-DATA must
1206 be treated exactly like 3270-DATA (i.e., it can cause a switch from
1207 NVT mode to 3270 mode).
1208
1209 When a printer device-type has been negotiated, either the SCS-CTL-
1210 CODES function or the DATA-STREAM-CTL function, or both, must be
1211 negotiated. This enables the server to know when it should and
1212 should not accept a session with a host application on behalf of the
1213 client. If only the SCS-CTL-CODES function is agreed to, then the
1214 server will not establish sessions with host applications that would
1215 send 3270 data stream control. If both SCS-CTL-CODES and DATA-
1216 STREAM-CTL are agreed to, then the server will establish sessions
1217 both with host applications that would send SCS control codes and
1218 with those that would send 3270 orders.
1219
1220 The server should send a TN3270E message with DATA-TYPE set to
1221 PRINT-EOJ at the end of each print job to indicate to the client that
1222 it may now take whatever action is appropriate for its environment
1223 (e.g., close a disk or spool file, etc.). The server may have
1224 multiple criteria for determining when it should send a PRINT-EOJ,
1225
1226
1227
1228 <span class="grey">Kelly Standards Track [Page 22]</span></pre>
1229 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
1230 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1231
1232
1233 such as receipt of SNA End Bracket from the host application, or
1234 expiration of a pre-defined timeout value.
1235
1236 <span class="h3"><a class="selflink" id="section-10.2" href="#section-10.2">10.2</a> The DATA-STREAM-CTL Function</span>
1237
1238 This function can only be supported on a 3270 printer session.
1239
1240 Agreement to support this function requires that the party support
1241 the following TN3270E header values:
1242
1243 Header field Value
1244 ------------ -----
1245 DATA-TYPE 3270-DATA
1246 DATA-TYPE PRINT-EOJ
1247
1248 A client representing a printer device uses this function to indicate
1249 its willingness to accept a data stream that includes 3270 orders and
1250 attributes.
1251
1252 When a printer device-type has been negotiated, either the SCS-CTL-
1253 CODES function or the DATA-STREAM-CTL function, or both, must be
1254 negotiated. This enables the server to know when it should and
1255 should not accept a session with a host application on behalf of the
1256 client. If only the DATA-STREAM-CTL function is agreed to, then the
1257 server will not establish sessions with host applications that would
1258 send SCS control codes in a data stream. If both SCS-CTL-CODES and
1259 DATA-STREAM-CTL are agreed to, then the server will establish
1260 sessions both with host applications that would send SCS control
1261 codes and with those that would send 3270 orders.
1262
1263 The server should send a TN3270E message with DATA-TYPE set to
1264 PRINT-EOJ at the end of each print job to indicate to the client that
1265 it may now take whatever action is appropriate for its environment
1266 (e.g., close a disk or spool file, etc.). The server may have
1267 multiple criteria for determining when it should send a PRINT-EOJ,
1268 such as receipt of SNA End Bracket from the host application, or
1269 expiration of a pre-defined timeout value.
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284 <span class="grey">Kelly Standards Track [Page 23]</span></pre>
1285 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
1286 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1287
1288
1289 <span class="h3"><a class="selflink" id="section-10.3" href="#section-10.3">10.3</a> The BIND-IMAGE Function</span>
1290
1291 This function can only be supported when the TN3270E server
1292 represents SNA terminals and printers.
1293
1294 Agreement to support this function requires that the party support
1295 the following TN3270E header values:
1296
1297 Header field Value
1298 ------------ -----
1299 DATA-TYPE BIND-IMAGE
1300 DATA-TYPE UNBIND
1301 DATA-TYPE SSCP-LU-DATA
1302
1303 When BIND-IMAGE is in effect, the server must inform the client when
1304 an SNA session has been established with a host application, and when
1305 such a session has been terminated. It uses DATA-TYPE values of
1306 BIND-IMAGE and UNBIND to convey this information.
1307
1308 When establishing an SNA session on behalf of a client, the server
1309 will receive a Bind RU from the host application. It will also
1310 receive a Start Data Traffic RU. Once both of these have been
1311 responded to positively by the server, it must then inform the client
1312 of the presence of this session by sending it a data message with the
1313 DATA-TYPE flag set to BIND-IMAGE. The data portion of this message
1314 must contain the bind image exactly as it was received in the Bind RU
1315 that the server accepted on behalf of the client. The format and
1316 maximum length of this bind image are defined in [<a href="#ref-6" title="&quot;SNA Formats&quot;">6</a>].
1317
1318 When an SNA session between the server and a host application is
1319 terminated, the server must send a data message to the client with
1320 the DATA-TYPE flag set to UNBIND. If the server was notified of the
1321 session termination via an SNA Unbind RU, it should include the
1322 Unbind reason code in the data portion of the message it sends to the
1323 client. If the server itself requested the SNA session termination
1324 (for example, as part of SYSREQ key processing), it should set the
1325 data portion of the UNBIND message to 0x01, indicating "normal end of
1326 session".
1327
1328 Another aspect of the BIND-IMAGE function alters the allowable DATA-
1329 TYPE flag values slightly from the behavior described in the section
1330 entitled "Basic TN3270E". When BIND-IMAGE is in effect, data
1331 messages with DATA-TYPE set to 3270-DATA or SCS-DATA are not allowed
1332 before the first BIND-IMAGE is received by the client; only SSCP-LU-
1333 DATA or NVT-DATA can be used to transmit user- oriented data. The
1334 same applies to data messages exchanged after an UNBIND is sent and
1335 before another BIND-IMAGE is received by the client. Once the client
1336 receives a BIND-IMAGE data message, the allowable DATA-TYPE values,
1337
1338
1339
1340 <span class="grey">Kelly Standards Track [Page 24]</span></pre>
1341 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
1342 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1343
1344
1345 in addition to SSCP-LU-DATA, now include 3270-DATA and/or SCS-DATA,
1346 depending on whether a terminal or printer device-type was
1347 negotiated, and whether a printer client agreed to DATA-STREAM-CTL or
1348 SCS-CTL-CODES, or both. (See the section entitled "The SYSREQ
1349 Function" for further discussion of the SSCP-LU session in an SNA
1350 environment.)
1351
1352 <span class="h3"><a class="selflink" id="section-10.4" href="#section-10.4">10.4</a> The RESPONSES Function</span>
1353
1354 This function can be supported for both terminal and printer sessions
1355 connected to both SNA and non-SNA servers.
1356
1357 Agreement to support this function requires that the party support
1358 the following TN3270E header values:
1359
1360 Header field Value
1361 ------------ -----
1362 DATA-TYPE RESPONSE
1363 DATA-TYPE REQUEST
1364 RESPONSE-FLAG -all values-
1365 REQUEST-FLAG ERR-COND-CLEARED
1366 SEQ-NUMBER binary values from 0-32767
1367
1368 Whenever a data message is sent with a DATA-TYPE of either SCS-DATA
1369 or 3270-DATA, the sender must set the RESPONSE-FLAG field to either
1370 NO-RESPONSE, ERROR-RESPONSE, or ALWAYS-RESPONSE. It is anticipated
1371 that the client side will normally set RESPONSE-FLAG to NO-RESPONSE.
1372 The server, if it represents an SNA device, should set RESPONSE-FLAG
1373 to reflect the response value set in the RH of the RU that generated
1374 this data message - Definite Response resulting in a RESPONSE-FLAG
1375 value of ALWAYS-RESPONSE, Exception Response resulting in ERROR-
1376 RESPONSE being set, and No Response causing a setting of NO-RESPONSE.
1377 A non-SNA server should set RESPONSE-FLAG to ERROR-RESPONSE.
1378
1379 In addition, the sender must keep a count of the messages with a
1380 DATA-TYPE of 3270-DATA or SCS-DATA that it sends on a given TN3270E
1381 session. This counter should start at zero for the first such
1382 message, and be incremented by one for each subsequent message. Note
1383 that this counter is independent of any SNA sequence numbers, and
1384 should not be reset to zero as a result of Bind or Unbind. If the
1385 counter reaches the maximum of 32767, it should be restarted at zero.
1386 The sender must place this value in the SEQ-NUMBER field of the
1387 TN3270E header before it sends the message. Note that the SEQ-NUMBER
1388 field must be set regardless of the value of the RESPONSE-FLAG field.
1389
1390
1391
1392
1393
1394
1395
1396 <span class="grey">Kelly Standards Track [Page 25]</span></pre>
1397 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
1398 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1399
1400
1401 <span class="h4"><a class="selflink" id="section-10.4.1" href="#section-10.4.1">10.4.1</a> Response Messages</span>
1402
1403 Whenever a data message with a DATA-TYPE of either SCS-DATA or 3270-
1404 DATA is received, the receiver must attempt to process the data in
1405 the data portion of the message, then determine whether or not it
1406 should send a data message with a DATA-TYPE of RESPONSE. If the data
1407 message it has just processed had a RESPONSE-FLAG value of NO-
1408 RESPONSE, or if it had a value of ERROR-RESPONSE and there were no
1409 errors encountered while processing the data, then no RESPONSE type
1410 message should be sent. Otherwise, a data message should be sent in
1411 which the header DATA-TYPE field is set to RESPONSE, and in which the
1412 SEQ-NUMBER field is a copy of the SEQ-NUMBER field from the message
1413 to which this response corresponds. The RESPONSE-FLAG field in this
1414 header must have a value of either POSITIVE-RESPONSE or NEGATIVE-
1415 RESPONSE. A POSITIVE-RESPONSE should be sent if the previously
1416 processed message's header specified ALWAYS-RESPONSE and no errors
1417 were encountered in processing the data. A NEGATIVE-RESPONSE should
1418 be sent when
1419
1420 1) the previously processed message specified ERROR-RESPONSE
1421 or ALWAYS-RESPONSE and
1422
1423 2) some kind of error occurred while processing the data.
1424
1425 Normally only the client will be constructing and sending these
1426 RESPONSE messages. A negative response sent by the client to the
1427 server is the equivalent of a Unit Check Status [<a href="#ref-7" title="&quot;3174 Establishment Controller Functional Description&quot;">7</a>]. All references
1428 to device status and sense codes in this section rely on [<a href="#ref-7" title="&quot;3174 Establishment Controller Functional Description&quot;">7</a>].
1429
1430 The data portion of a RESPONSE message must consist of one byte of
1431 binary data. The value of this byte gives a more detailed account of
1432 the results of having processed the previously received data message.
1433 The possible values for this byte are:
1434
1435 For a RESPONSE-FLAG value of POSITIVE-RESPONSE -
1436
1437 Value Meaning
1438 ----- -------
1439 0x00 Successful completion (when sent by the client,
1440 this is equivalent to "Device End").
1441
1442 For a RESPONSE-FLAG value of NEGATIVE-RESPONSE -
1443
1444 Value Meaning
1445 ----- -------
1446 0x00 An invalid 3270 command was received
1447 (equivalent to "Command Reject").
1448
1449
1450
1451
1452 <span class="grey">Kelly Standards Track [Page 26]</span></pre>
1453 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
1454 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1455
1456
1457 0x01 Printer is not ready (equivalent to
1458 "Intervention Required").
1459
1460 0x02 An illegal 3270 buffer address or order
1461 sequence was received (equivalent to
1462 "Operation Check").
1463
1464 0x03 Printer is powered off or not connected
1465 (equivalent to "Component Disconnected").
1466
1467 When the server receives any of the above responses, it should pass
1468 along the appropriate information to the host application. The
1469 appropriate information is determined by whether the server
1470 represents an SNA or a non-SNA device.
1471
1472 An SNA server should pass along a POSITIVE-RESPONSE from the client
1473 as an SNA positive Response Unit to the host application. It should
1474 translate a NEGATIVE-RESPONSE from the client into an SNA negative
1475 Response Unit in which the Sense Data Indicator bit is on and which
1476 contains one of the following sense codes:
1477
1478 RESPONSE-FLAG Equivalent SNA Sense Code
1479 ------------- ---------- --------------
1480 0x00 Command Reject 0x10030000
1481
1482 0x01 Intervention Required 0x08020000
1483
1484 0x02 Operation Check 0x10050000
1485
1486 0x03 Component Disconnected 0x08310000
1487
1488 A non-SNA server should pass along a POSITIVE-RESPONSE from the
1489 client by setting the Device End Status bit on. It should reflect a
1490 NEGATIVE-RESPONSE from the client by setting the Unit Check Status
1491 Bit on, and setting either the Command Reject, Intervention Required,
1492 or Operation Check Sense bit on when responding to the Sense command.
1493
1494 In the case of Intervention Required or Component Disconnected being
1495 passed by the server to the host application, the host would normally
1496 refrain from sending any further data to the printer. If and when
1497 the error condition at the client has been resolved, the client must
1498 send to the server a data message whose header DATA-TYPE field is set
1499 to REQUEST, and whose REQUEST-FLAG is set to ERR-COND-CLEARED. Note
1500 that this message has no data portion. Upon receipt of this message,
1501 the server should pass along the appropriate information to the host
1502 application so that it may resume sending printer output. Again, the
1503 form of this information depends on whether the server represents an
1504 SNA or a non-SNA device.
1505
1506
1507
1508 <span class="grey">Kelly Standards Track [Page 27]</span></pre>
1509 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
1510 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1511
1512
1513 An SNA server should reflect an ERR-COND-CLEARED to the host
1514 application by sending an SNA LUSTAT RU with one of the following
1515 sense codes:
1516
1517 - if the previous error condition was an Intervention
1518 Required, the server should send sense code 0x00010000
1519
1520 - if the previous error condition was Component
1521 Disconnected, the server should send sense code 0x082B0000
1522
1523 A non-SNA server should set the corresponding bits in the Ending
1524 Status and Sense Condition bytes.
1525
1526 <span class="h3"><a class="selflink" id="section-10.5" href="#section-10.5">10.5</a> The SYSREQ Function</span>
1527
1528 This function can only be supported when the TN3270E server
1529 represents SNA devices.
1530
1531 Agreement to support this function requires that the party support
1532 the following TN3270E header values:
1533
1534 Header field Value
1535 ------------ -----
1536 DATA-TYPE SSCP-LU-DATA
1537
1538 The 3270 SYSREQ key can be useful in an SNA environment when the ATTN
1539 key is not sufficient to terminate a process. (See the section
1540 entitled "The 3270 ATTN Key" for more information.)
1541
1542 <span class="h4"><a class="selflink" id="section-10.5.1" href="#section-10.5.1">10.5.1</a> Background</span>
1543
1544 In SNA, there is a session between the host application (the PLU, or
1545 Primary Logical Unit) and the TN3270E server representing the client
1546 (the SLU, or Secondary Logical Unit). This is referred to as the
1547 PLU-SLU session, and it is the one on which normal communications
1548 flow. There is also a session between the host telecommunications
1549 access method (the SSCP, or System Services Control Point) and the
1550 SLU, and it is referred to as the SSCP-LU session. This session is
1551 used to carry various control information and is normally transparent
1552 to the user; normal 3270 data stream orders are not allowed in this
1553 data. For more information, refer to [<a href="#ref-7" title="&quot;3174 Establishment Controller Functional Description&quot;">7</a>].
1554
1555 The terminal display and keyboard are usually "owned" by the PLU-SLU
1556 session, meaning any data the user types is sent to the host
1557 application. The SYSREQ key is used to toggle ownership of the
1558 keyboard and display between the PLU-SLU session and the SSCP-LU
1559 session. In other words, the user is able to press SYSREQ and then
1560 communicate directly with the host SSCP. The user may then enter any
1561
1562
1563
1564 <span class="grey">Kelly Standards Track [Page 28]</span></pre>
1565 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
1566 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1567
1568
1569 valid Unformatted Systems Services commands, which are defined in the
1570 USS table associated with the SLU. The most common USS command users
1571 employ is "LOGOFF," which requests that the SSCP immediately
1572 terminate the PLU-SLU session. The usual reason for requesting such
1573 an action is that the host application (the PLU) has stopped
1574 responding altogether.
1575
1576 Whenever the keyboard and display are owned by the SSCP-LU session,
1577 no data is allowed to flow in either direction on the PLU-SLU
1578 session. Once "in" the SSCP-LU session, the user may decide to
1579 switch back to the PLU-SLU session by again pressing the SYSREQ key.
1580
1581 <span class="h4"><a class="selflink" id="section-10.5.2" href="#section-10.5.2">10.5.2</a> TN3270E Implementation of SYSREQ</span>
1582
1583 The design of some TN3270E servers allows them to fully support the
1584 SYSREQ key because they are allowed to send USS commands on the
1585 SSCP-LU session. Other TN3270E servers operate in an environment
1586 which does not allow them to send USS commands to the SSCP; this
1587 makes full support of the SYSREQ key impossible. For such servers,
1588 TN3270E provides for emulation of a minimal subset of functions,
1589 namely, for the sequence of pressing SYSREQ and typing LOGOFF that
1590 many users employ to immediately terminate the PLU-SLU session.
1591
1592 The Telnet Abort Output (AO) command is the mechanism used to
1593 implement SYSREQ key support in TN3270E because, in a real SNA
1594 session, once the user presses the SYSREQ key, the host application
1595 is prevented from sending any more output to the terminal (unless the
1596 user presses SYSREQ a second time), but the user's process continues
1597 to execute.
1598
1599 In order to implement SYSREQ key support, TN3270E clients that have
1600 agreed to the SYSREQ function should provide a key (or combination of
1601 keys) that is identified as mapping to the 3270 SYSREQ key. When the
1602 user presses this key(s), the client should transmit a Telnet AO
1603 command to the server.
1604
1605 Upon receipt of the AO command, a TN3270E server that has agreed to
1606 the SYSREQ function should enter what will be loosely termed
1607 "suspended mode" for the connection. If a server that has not agreed
1608 to the SYSREQ function receives an AO command, it should simply
1609 ignore it. Any attempt by the host application to send data to the
1610 client while the connection is "suspended" should be responded to by
1611 the server with a negative response, sense code 0x082D, indicating an
1612 "LU Busy" condition. The server should not transmit anything to the
1613 client on behalf of the host application. While the connection is
1614 "suspended," any data messages exchanged between the client and
1615 server should have the DATA-TYPE flag set to SSCP-LU-DATA; the data
1616 stream will be as defined in [<a href="#ref-7" title="&quot;3174 Establishment Controller Functional Description&quot;">7</a>], specifically the section entitled
1617
1618
1619
1620 <span class="grey">Kelly Standards Track [Page 29]</span></pre>
1621 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
1622 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1623
1624
1625 "Operation in SSCP-SLU Session."
1626
1627 At this point, the behavior of the server depends upon whether or not
1628 it is allowed to send USS commands on the SSCP-LU session. Servers
1629 that have this ability should simply act as a vehicle for passing USS
1630 commands and responses between the client and the SSCP.
1631
1632 Servers that are not allowed to send USS commands on the SSCP-LU
1633 session should behave as follows:
1634
1635 - if the user transmits the string LOGOFF (upper or lower case),
1636 the server should send an Unbind SNA RU to the host application.
1637 This will result in termination of the PLU-SLU session. If the
1638 BIND-IMAGE function was agreed upon, then the server should also
1639 send a data message to the client with the DATA-TYPE flag set to
1640 UNBIND and the data portion set to 0x01.
1641
1642 - if the user transmits anything other than LOGOFF, the server
1643 should respond with the string "COMMAND UNRECOGNIZED" to the
1644 client. The server should not send anything to the host
1645 application on behalf of the client.
1646
1647 Regardless of which kind of server is present (i.e., whether or not
1648 it may send USS commands on the SSCP-LU session), while the
1649 connection is suspended, the user may press the "SYSREQ" key again.
1650 This will result in the transmission of another AO to the server.
1651 The server should then send to the host application an LUSTAT RU with
1652 a value of 0x082B indicating "presentation space integrity lost". The
1653 server will then "un-suspend" the Telnet connection to the client,
1654 meaning it will allow the host application to once again send data to
1655 the client.
1656
1657 <span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. The 3270 ATTN Key</span>
1658
1659 The 3270 ATTN key is interpreted by many host applications in an SNA
1660 environment as an indication that the user wishes to interrupt the
1661 execution of the current process. The Telnet Interrupt Process (IP)
1662 command was defined expressly for such a purpose, so it is used to
1663 implement support for the 3270 ATTN key. This requires two things:
1664
1665 - TN3270E clients should provide as part of their keyboard
1666 mapping a single key or a combination of keys that map to the
1667 3270 ATTN key. When the user presses this key(s), the client
1668 should transmit a Telnet IP command to the server.
1669
1670 - TN3270E servers should translate the IP command received from
1671 a TN3270E client into the appropriate form and pass it along to
1672 the host application as an ATTN key. In other words, the
1673
1674
1675
1676 <span class="grey">Kelly Standards Track [Page 30]</span></pre>
1677 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
1678 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1679
1680
1681 server representing an SLU in an SNA session should send a
1682 SIGNAL RU to the host application.
1683
1684 The ATTN key is not supported in a non-SNA environment; therefore, a
1685 TN3270E server representing non-SNA 3270 devices should ignore any
1686 Telnet IP commands it receives from a client.
1687
1688 <span class="h2"><a class="selflink" id="section-12" href="#section-12">12</a>. 3270 Structured Fields</span>
1689
1690 3270 structured fields provide a much wider range of features than
1691 "old-style" 3270 data, such as support for graphics, partitions and
1692 IPDS printer data streams. It would be unreasonable to expect all
1693 TN3270E clients to support all possible structured field functions,
1694 yet there must be a mechanism by which those clients that are capable
1695 of supporting some or all structured field functions can indicate
1696 their wishes.
1697
1698 The design of 3270 structured fields provides a convenient means to
1699 convey the level of support (including no support) for the various
1700 structured field functions. This mechanism is the Read Partition
1701 Query command, which is sent from the host application to the device.
1702 The device responds with a Query Reply structured field(s) listing
1703 which, if any, structured field functions it supports.
1704
1705 The Query Reply is also used to indicate some device capabilities
1706 which do not require the use of structured fields, such as extended
1707 color support and extended highlighting capability. Most host
1708 applications will use Read Partition Query to precisely determine a
1709 device's capabilities when there has been some indication that the
1710 device supports the "extended data stream".
1711
1712 Therefore, all TN3270E clients that negotiate a terminal device-type
1713 that contains a "-E" suffix, the DYNAMIC terminal type, or a printer
1714 device-type, must be able to respond to a Read Partition Query
1715 command. Note that these clients must support both the Read
1716 Partition Query (Type 02), and all forms of the Read Partition Query
1717 List (Type 03).
1718
1719 <span class="h2"><a class="selflink" id="section-13" href="#section-13">13</a>. Implementation Guidelines</span>
1720
1721 <span class="h3"><a class="selflink" id="section-13.1" href="#section-13.1">13.1</a> 3270 Data Stream Notes</span>
1722
1723 Implementors of TN3270E clients should note that the command codes
1724 for the various 3270 Read and Write commands have different values
1725 depending on how the server is connected to the host (local versus
1726 remote, SNA versus non-SNA). Clients should be coded to check for
1727 the various possible values if they wish to be compatible with the
1728 widest range of servers. See [<a href="#ref-7" title="&quot;3174 Establishment Controller Functional Description&quot;">7</a>] for further details.
1729
1730
1731
1732 <span class="grey">Kelly Standards Track [Page 31]</span></pre>
1733 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
1734 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1735
1736
1737 <span class="h3"><a class="selflink" id="section-13.2" href="#section-13.2">13.2</a> Negotiation of the TN3270E Telnet Option</span>
1738
1739 Since TN3270E is a Telnet Option governed by [<a href="#ref-8" title="&quot;Telnet Protocol Specification&quot;">8</a>], both client and
1740 server are free to attempt to initiate negotiation of TN3270E by
1741 sending a DO TN3270E command. However, just as is usually the case
1742 with the Telnet DO TERMINAL-TYPE, it is anticipated that the server
1743 will normally be the one sending the DO TN3270E, and the client will
1744 be responding with a WILL or a WON'T TN3270E.
1745
1746 <span class="h3"><a class="selflink" id="section-13.3" href="#section-13.3">13.3</a> A "Keep-alive" Mechanism</span>
1747
1748 In many environments, it is very helpful to have in place a mechanism
1749 that allows timely notification of the loss of a 3270 session.
1750 TN3270E does not require that any form of keep-alive mechanism be
1751 employed by either clients or servers, but implementors wishing to
1752 support such a mechanism should consider the following guidelines.
1753
1754 There are at least three possible means of providing a keep-alive
1755 mechanism in TN3270E: the TCP Keepalive, the Telnet IAC NOP command
1756 [<a href="#ref-8" title="&quot;Telnet Protocol Specification&quot;">8</a>], and the Telnet DO TIMING-MARK option [<a href="#ref-9" title="&quot;Telnet Timing Mark Option&quot;">9</a>]. Each method has its
1757 advantages and disadvantages. It is recommended that TN3270E clients
1758 and servers that support keep-alives should support all three
1759 methods, and that both sides should always respond to TIMING-MARKs.
1760
1761 Note that both clients and servers could be configured to "actively"
1762 implement keep-alives. That is, both sides could send a TIMING-MARK
1763 or a NOP or issue a TCP Keepalive in order to determine whether or
1764 not the partner is still alive. Alternatively, network
1765 administrators may wish to configure only one side to send keep-
1766 alives; in this case, the other side would be a "passive" participant
1767 which simply responds to the keep-alives it receives.
1768
1769 Implementors who want their code to be capable of being an "active"
1770 keep-alive participant should make their client or server
1771 configurable so that administrators can set which, if any, keep-alive
1772 mechanism should be employed, and how often it should be used.
1773
1774 Upon failure of a session on which keep-alives are used, both parties
1775 should make the proper notifications. A client should give the user
1776 some indication of the failure, such as an error code in the Operator
1777 Information Area of the screen. A server should notify the host
1778 application that the session has been terminated, for example by
1779 sending an UNBIND with type CLEANUP in an SNA environment.
1780
1781 <span class="h3"><a class="selflink" id="section-13.4" href="#section-13.4">13.4</a> Examples</span>
1782
1783 The following example shows a TN3270E-capable server and a
1784 traditional tn3270 client establishing a connection:
1785
1786
1787
1788 <span class="grey">Kelly Standards Track [Page 32]</span></pre>
1789 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
1790 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1791
1792
1793 Server: IAC DO TN3270E
1794 Client: IAC WON'T TN3270E
1795 Server: IAC DO TERMINAL-TYPE
1796 Client: IAC WILL TERMINAL-TYPE
1797 Server: IAC SB TERMINAL-TYPE SEND IAC SE
1798 Client: IAC SB TERMINAL-TYPE IS IBM-3278-2 IAC SE
1799 Server: IAC DO EOR IAC WILL EOR
1800 Client: IAC WILL EOR IAC DO EOR
1801 Server: IAC DO BINARY IAC WILL BINARY
1802 Client: IAC WILL BINARY IAC DO BINARY
1803 (3270 data stream is exchanged)
1804
1805 The following example shows a TN3270E-capable server and a TN3270E-
1806 capable client establishing a generic pool (non-specific) terminal
1807 session:
1808
1809 Server: IAC DO TN3270E
1810 Client: IAC WILL TN3270E
1811 Server: IAC SB TN3270E SEND DEVICE-TYPE IAC SE
1812 Client: IAC SB TN3270E DEVICE-TYPE REQUEST IBM-3278-2 IAC SE
1813 Server: IAC SB TN3270E DEVICE-TYPE IS IBM-3278-2 CONNECT
1814 anyterm IAC SE
1815 Client: IAC SB TN3270E FUNCTIONS REQUEST RESPONSES IAC SE
1816 Server: IAC SB TN3270E FUNCTIONS IS RESPONSES IAC SE
1817 (3270 data stream is exchanged)
1818
1819 The following example shows a TN3270E-capable server and a TN3270E-
1820 capable client establishing a terminal session where the client
1821 requests a specific device-name:
1822
1823 Server: IAC DO TN3270E
1824 Client: IAC WILL TN3270E
1825 Server: IAC SB TN3270E SEND DEVICE-TYPE IAC SE
1826 Client: IAC SB TN3270E DEVICE-TYPE REQUEST IBM-3278-5-E
1827 CONNECT myterm IAC SE
1828 Server: IAC SB TN3270E DEVICE-TYPE IS IBM-3278-5-E CONNECT
1829 myterm IAC SE
1830 Client: IAC SB TN3270E FUNCTIONS REQUEST RESPONSES
1831 BIND-IMAGE IAC SE
1832 Server: IAC SB TN3270E FUNCTIONS IS RESPONSES BIND-IMAGE
1833 IAC SE
1834 (3270 data stream is exchanged)
1835
1836 The following example shows a TN3270E-capable server and a TN3270E-
1837 capable client establishing a terminal session where the client
1838 requests a resource-name and is returned a device-name chosen by the
1839 server:
1840
1841
1842
1843
1844 <span class="grey">Kelly Standards Track [Page 33]</span></pre>
1845 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-34" ></span>
1846 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1847
1848
1849 Server: IAC DO TN3270E
1850 Client: IAC WILL TN3270E
1851 Server: IAC SB TN3270E SEND DEVICE-TYPE IAC SE
1852 Client: IAC SB TN3270E DEVICE-TYPE REQUEST IBM-3278-5-E
1853 CONNECT pool1 IAC SE
1854 Server: IAC SB TN3270E DEVICE-TYPE IS IBM-3278-5-E CONNECT
1855 term0013 IAC SE
1856 Client: IAC SB TN3270E FUNCTIONS REQUEST BIND-IMAGE IAC SE
1857 Server: IAC SB TN3270E FUNCTIONS IS BIND-IMAGE IAC SE
1858 (3270 data stream is exchanged)
1859
1860 The following example shows a TN3270E-capable server and a TN3270E-
1861 capable client attempting to establish a terminal session; multiple
1862 attempts are necessary because the device-name initially requested by
1863 the client is already in use:
1864
1865 Server: IAC DO TN3270E
1866 Client: IAC WILL TN3270E
1867 Server: IAC SB TN3270E SEND DEVICE-TYPE IAC SE
1868 Client: IAC SB TN3270E DEVICE-TYPE REQUEST IBM-3278-5
1869 CONNECT myterm IAC SE
1870 Server: IAC SB TN3270E DEVICE-TYPE REJECT REASON
1871 DEVICE-IN-USE IAC SE
1872 Client: IAC SB TN3270E DEVICE-TYPE REQUEST IBM-3278-2
1873 CONNECT herterm IAC SE
1874 Server: IAC SB TN3270E DEVICE-TYPE IS IBM-3278-2 CONNECT
1875 herterm IAC SE
1876 Client: IAC SB TN3270E FUNCTIONS REQUEST RESPONSES IAC SE
1877 Server: IAC SB TN3270E FUNCTIONS IS RESPONSES IAC SE
1878 (3270 data stream is exchanged)
1879
1880 The following example shows a TN3270E-capable server and a TN3270E-
1881 capable client establishing a printer session where the client
1882 requests a specific device-name, and where some amount of 3270
1883 function negotiation is required before an agreement is reached:
1884
1885 Server: IAC DO TN3270E
1886 Client: IAC WILL TN3270E
1887 Server: IAC SB TN3270E SEND DEVICE-TYPE IAC SE
1888 Client: IAC SB TN3270E DEVICE-TYPE REQUEST IBM-3287-1 CONNECT
1889 myprt IAC SE
1890 Server: IAC SB TN3270E DEVICE-TYPE IS IBM-3287-1 CONNECT
1891 myprt IAC SE
1892 Client: IAC SB TN3270E FUNCTIONS REQUEST DATA-STREAM-CTL IAC
1893 Server: IAC SB TN3270E FUNCTIONS REQUEST DATA-STREAM-CTL
1894 RESPONSES IAC SE
1895 Client: IAC SB TN3270E FUNCTIONS REQUEST DATA-STREAM-CTL IAC
1896 Server: IAC SB TN3270E FUNCTIONS IS DATA-STREAM-CTL IAC SE
1897
1898
1899
1900 <span class="grey">Kelly Standards Track [Page 34]</span></pre>
1901 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-35" ></span>
1902 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1903
1904
1905 (3270 data stream is exchanged)
1906
1907 The following example shows a TN3270E-capable server and a TN3270E-
1908 capable client establishing first a specific terminal session, then a
1909 printer session where the "partner" printer for the assigned terminal
1910 is requested:
1911
1912 Server: IAC DO TN3270E
1913 Client: IAC WILL TN3270E
1914 Server: IAC SB TN3270E SEND DEVICE-TYPE IAC SE
1915 Client: IAC SB TN3270E DEVICE-TYPE REQUEST IBM-3278-2 CONNECT
1916 termxyz IAC SE
1917 Server: IAC SB TN3270E DEVICE-TYPE IS IBM-3278-2 CONNECT
1918 termxyz IAC SE
1919 Client: IAC SB TN3270E FUNCTIONS REQUEST RESPONSES IAC SE
1920 Server: IAC SB TN3270E FUNCTIONS IS RESPONSES IAC SE
1921 (3270 data stream is exchanged)
1922 . .
1923 . .
1924 (user decides to request a printer session,
1925 so client again connects to Telnet port on server)
1926 Server: IAC DO TN3270E
1927 Client: IAC WILL TN3270E
1928 Server: IAC SB TN3270E SEND DEVICE-TYPE IAC SE
1929 Client: IAC SB TN3270E DEVICE-TYPE REQUEST IBM-3287-1
1930 ASSOCIATE termxyz IAC SE
1931 Server: IAC SB TN3270E DEVICE-TYPE IS IBM-3287-1 CONNECT
1932 termxyz's-prt IAC SE
1933 Client: IAC SB TN3270E FUNCTIONS REQUEST SCS-CTL-CODES
1934 RESPONSES IAC SE
1935 Server: IAC SB TN3270E FUNCTIONS IS SCS-CTL-CODES RESPONSES
1936 IAC SE
1937 (3270 data stream is exchanged)
1938
1939 The following example shows a TN3270E-capable server and a TN3270E-
1940 capable client establishing first a terminal session where a
1941 resource-name was requested and a server chosen device-name was
1942 returned, then a printer session where the "partner" printer for the
1943 assigned terminal is requested:
1944
1945 Server: IAC DO TN3270E
1946 Client: IAC WILL TN3270E
1947 Server: IAC SB TN3270E SEND DEVICE-TYPE IAC SE
1948 Client: IAC SB TN3270E DEVICE-TYPE REQUEST IBM-3278-5 CONNECT
1949 poolxyz IAC SE
1950 Server: IAC SB TN3270E DEVICE-TYPE IS IBM-3278-5 CONNECT
1951 terma IAC SE
1952 Client: IAC SB TN3270E FUNCTIONS REQUEST RESPONSES IAC SE
1953
1954
1955
1956 <span class="grey">Kelly Standards Track [Page 35]</span></pre>
1957 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-36" ></span>
1958 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
1959
1960
1961 Server: IAC SB TN3270E FUNCTIONS IS RESPONSES IAC SE
1962 (3270 data stream is exchanged)
1963 . .
1964 . .
1965 (user decides to request a printer session,
1966 so client again connects to Telnet port on server)
1967 Server: IAC DO TN3270E
1968 Client: IAC WILL TN3270E
1969 Server: IAC SB TN3270E SEND DEVICE-TYPE IAC SE
1970 Client: IAC SB TN3270E DEVICE-TYPE REQUEST IBM-3287-1
1971 ASSOCIATE terma IAC SE
1972 Server: IAC SB TN3270E DEVICE-TYPE IS IBM-3287-1 CONNECT
1973 terma's-prt IAC SE
1974 Client: IAC SB TN3270E FUNCTIONS REQUEST SCS-CTL-CODES
1975 RESPONSES IAC SE
1976 Server: IAC SB TN3270E FUNCTIONS IS SCS-CTL-CODES RESPONSES
1977 IAC SE
1978 (3270 data stream is exchanged)
1979
1980 <span class="h2"><a class="selflink" id="section-14" href="#section-14">14</a>. Security Considerations</span>
1981
1982 These extensions to telnet do not provide any security features
1983 beyond that of ordinary telnet; so a TN3270E session is no more
1984 secure than an ordinary telnet session. Once standard authentication
1985 and/or privacy mechanisms for telnet have been defined, these may
1986 also be usable by TN3270E. One of the important uses of
1987 authentication would be to answer the question of whether or not a
1988 given user should be allowed to "use" a specific terminal or printer
1989 device-name.
1990
1991 <span class="h2"><a class="selflink" id="section-15" href="#section-15">15</a>. References</span>
1992
1993 [<a id="ref-1">1</a>] Rekhter, J., "Telnet 3270 Regime Option", <a href="./rfc1041">RFC 1041</a>, January 1988.
1994
1995 [<a id="ref-2">2</a>] VanBokkelen, J., "Telnet Terminal-Type Option", <a href="./rfc1091">RFC 1091</a>,
1996 February 1989.
1997
1998 [<a id="ref-3">3</a>] Postel, J., and J. Reynolds, "Telnet Binary Transmission", STD
1999 27, <a href="./rfc856">RFC 856</a>, May 1983.
2000
2001 [<a id="ref-4">4</a>] Postel, J., "Telnet End of Record Option", <a href="./rfc885">RFC 885</a>, December
2002 1983.
2003
2004 [<a id="ref-5">5</a>] "3270 Information Display System - Data Stream Programmer's
2005 Reference", publication number GA24-0059, IBM Corporation.
2006
2007 [<a id="ref-6">6</a>] "SNA Formats", publication number GA27-3136, IBM Corporation.
2008
2009
2010
2011
2012 <span class="grey">Kelly Standards Track [Page 36]</span></pre>
2013 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-37" ></span>
2014 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
2015
2016
2017 [<a id="ref-7">7</a>] "3174 Establishment Controller Functional Description",
2018 publication number GA23-0218, IBM Corporation.
2019
2020 [<a id="ref-8">8</a>] Postel, J., and J. Reynolds, "Telnet Protocol Specification", STD
2021 8, <a href="./rfc854">RFC 854</a>, May 1983.
2022
2023 [<a id="ref-9">9</a>] Postel, J., and J. Reynolds, "Telnet Timing Mark Option", STD 31,
2024 <a href="./rfc860">RFC 860</a>, May 1983.
2025
2026 [<a id="ref-10">10</a>] J. Penner, "TN3270 Current Practices", <a href="./rfc1576">RFC 1576</a>, January, 1994.
2027
2028 <span class="h2"><a class="selflink" id="section-16" href="#section-16">16</a>. Author's Note</span>
2029
2030 Portions of this document were drawn from the following sources:
2031
2032 - A White Paper written by Owen Reddecliffe, WRQ Corporation,
2033 October 1991.
2034
2035 - Experimental work on the part of Cleve Graves and Michelle
2036 Angel, OpenConnect Systems, 1992 - 1993.
2037
2038 - Discussions at the 1993 IETF meetings.
2039
2040 - Discussions on the "TN3270E" list, 1993-94 and 1997.
2041
2042 <span class="h2"><a class="selflink" id="section-17" href="#section-17">17</a>. Author's Address</span>
2043
2044 Bill Kelly
2045 Division of University Computing
2046 144 Parker Hall
2047 Auburn University, AL 36849
2048
2049 Phone: (334) 844-4512
2050 EMail: [email protected]
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068 <span class="grey">Kelly Standards Track [Page 37]</span></pre>
2069 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-38" ></span>
2070 <span class="grey"><a href="./rfc2355">RFC 2355</a> TN3270 Enhancements June 1998</span>
2071
2072
2073 <span class="h2"><a class="selflink" id="section-18" href="#section-18">18</a>. Full Copyright Statement</span>
2074
2075 Copyright (C) The Internet Society (1998). All Rights Reserved.
2076
2077 This document and translations of it may be copied and furnished to
2078 others, and derivative works that comment on or otherwise explain it
2079 or assist in its implementation may be prepared, copied, published
2080 and distributed, in whole or in part, without restriction of any
2081 kind, provided that the above copyright notice and this paragraph are
2082 included on all such copies and derivative works. However, this
2083 document itself may not be modified in any way, such as by removing
2084 the copyright notice or references to the Internet Society or other
2085 Internet organizations, except as needed for the purpose of
2086 developing Internet standards in which case the procedures for
2087 copyrights defined in the Internet Standards process must be
2088 followed, or as required to translate it into languages other than
2089 English.
2090
2091 The limited permissions granted above are perpetual and will not be
2092 revoked by the Internet Society or its successors or assigns.
2093
2094 This document and the information contained herein is provided on an
2095 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
2096 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
2097 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
2098 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
2099 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124 Kelly Standards Track [Page 38]
2125 </pre>