home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 1000s / rfc1041.txt < prev    next >
Text File  |  1988-01-27  |  11KB  |  334 lines

  1. Network Working Group                                         J. Rekhter
  2. Request For Comments:  1041             T.J. Watson Research Center, IBM
  3.                                                             January 1988
  4.  
  5.  
  6.                        Telnet 3270 Regime Option
  7.  
  8.  
  9. STATUS OF THIS MEMO
  10.  
  11.    This RFC specifies a proposed standard for the Internet community.
  12.    Hosts on the Internet, that want to support 3270 data stream within
  13.    the Telnet protocol, are expected to adopt and implement this
  14.    standard.  Distribution of this memo is unlimited.
  15.  
  16. 1.  Command Name and Code
  17.  
  18.    3270-REGIME     29
  19.  
  20. 2.  Command Meaning
  21.  
  22.    IAC WILL 3270-REGIME
  23.  
  24.       Sender is willing to send list of supported 3270 Regimes in
  25.       a subsequent sub-negotiation.
  26.  
  27.    IAC WON'T 3270-REGIME
  28.  
  29.       Sender refuses to send the list of supported 3270 Regimes.
  30.  
  31.    IAC DO 3270-REGIME
  32.  
  33.       Sender is willing to receive a list of supported 3270 Regimes in a
  34.       subsequent sub-negotiation.
  35.  
  36.    IAC DON'T 3270-REGIME
  37.  
  38.       Sender refuses to accept the list of supported 3270 Regimes.
  39.  
  40.    IAC SB 3270-REGIME ARE REGIME-LIST IAC SE
  41.  
  42.       Sender sends the list of all possible 3270 Regimes it is able to
  43.       support.  The code for ARE is 1.
  44.  
  45.       REGIME-LIST is an ASCII string which has meaning to both sides of
  46.       the negotiation.  This string may be composed of different
  47.       terminal type names (as specified in the "Assigned Numbers") which
  48.       are separated by space character.  Terminal type names which have
  49.  
  50.  
  51.  
  52. Rekhter                                                         [Page 1]
  53.  
  54. RFC 1041               Telnet 3270 Regime Option            January 1988
  55.  
  56.  
  57.       imbedded spaces should escape it with backslash character ('\').
  58.       Backslash character imbedded into terminal type name should be
  59.       escaped with another backslash character.
  60.  
  61.       Empty REGIME-LIST means, that sender is able to support only NVT
  62.       ASCII terminal as defined in [4].
  63.  
  64.    IAC SB 3270-REGIME IS REGIME IAC SE
  65.  
  66.       Sender is stating the name of the terminal it is willing to
  67.       support.  The code for IS is 0.
  68.  
  69.       REGIME is an ASCII string (possibly empty) which is substring of
  70.       the received REGIME-LIST string.  Empty string means that the
  71.       sender is willing to support only NVT ASCII terminal as defined in
  72.       [4].
  73.  
  74. 3.  Default
  75.  
  76.    WON'T 3270-REGIME
  77.  
  78.       3270 Regime will not be established.
  79.  
  80.    DON'T 3270-REGIME
  81.  
  82.       3270 Regime will not be established.
  83.  
  84. 4.  Motivation for the option
  85.  
  86.    This option allows a telnet server running VM or MVS to negotiate
  87.    with the telnet client on the type of data stream (3270 or NVT ASCII)
  88.    which both sides are willing support.
  89.  
  90.    The main reason for this option is to allow simple and efficient way
  91.    to:
  92.  
  93.       o state, that both client and server want to exchange 3270 data
  94.         stream,
  95.  
  96.       o switch from 3270 Regime into NVT ASCII Regime and back into 3270
  97.         Regime,
  98.  
  99.       o dynamically renegotiate 3270 Regime parameters (like terminal
  100.         type).
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108. Rekhter                                                         [Page 2]
  109.  
  110. RFC 1041               Telnet 3270 Regime Option            January 1988
  111.  
  112.  
  113.    Support for 3270 data stream requires that both sides:
  114.  
  115.       o be able to exchange binary data,
  116.  
  117.       o be able to put well defined delimiters into inbound/outbound
  118.         data stream,
  119.  
  120.       o be able to establish the agreement between client and server on
  121.         what type of terminal will be used.
  122.  
  123.    Current implementations requires 3 different options, TERMINALTYPE
  124.    [1], BINARY [2] and EOR [3], to be successfully negotiated between
  125.    client and server prior to establishing 3270 Regime.  Moreover, it is
  126.    unclear at what point in this negotiation process, 3270 regime is
  127.    actually established (whether after TERMINALTYPE or after BINARY or
  128.    after EOR).  Also, order for these negotiations was never specified.
  129.  
  130.    Subnegotiation for the TERMINALTYPE is possible with only single
  131.    terminal type at a time.
  132.  
  133.    Once 3270 Regime is established, there is no standard of how to get
  134.    out of this regime back into NVT ASCII mode.
  135.  
  136.    Based on the 3270 Regime requirements, which stated above, we feel
  137.    that separate negotiation for EOR and BINARY should not be done.
  138.    Rather, 3270 Regime establishment should imply that:
  139.  
  140.       o each character in the Telnet data stream should be interpreted
  141.         as 8 bits of binary data,
  142.  
  143.       o both sides agreed to use a certain character sequence(Telnet IAC
  144.         EOR) as a delimiter in inbound/outbound Telnet data stream,
  145.  
  146.       o both sides agreed on the type of the terminal they are willing
  147.         to support.
  148.  
  149.    By providing the list of possible terminals which Telnet client can
  150.    support, telnet server could select the type of the terminal it can
  151.    support and pass it back to the Telnet client, thus eliminating
  152.    multiple TERMINALTYPE negotiations.
  153.  
  154.    As stated in [5], "The purpose of the Telnet Protocol is to provide a
  155.    fairly general, bi-directional, eight-bit byte oriented communication
  156.    facility."  Therefore we feel that such issues as color support,
  157.    graphics support, extended data streams mapping, etc., do not belong
  158.    logically to the Telnet protocol, but rather should be considered as
  159.    a part of a separate protocol which defines 3270 inbound/outbound
  160.    data stream (see [5], [6], [7], [8]).  The purpose of this memo is
  161.  
  162.  
  163.  
  164. Rekhter                                                         [Page 3]
  165.  
  166. RFC 1041               Telnet 3270 Regime Option            January 1988
  167.  
  168.  
  169.    not to describe (or define) protocols which are used in 3270 Regime,
  170.    but rather define a new option for the Telnet Protocol, which would
  171.    allow both sides to negotiate for the 3270 Regime establishment over
  172.    the telnet connection.
  173.  
  174.    While this options does not include direct negotiation for such
  175.    things as colors, graphics, structured fields, etc., certain features
  176.    (like the ability to support colors) may be negotiated indirectly by
  177.    using certain terminal type names specified in 3270-REGIME
  178.    subnegotiation.
  179.  
  180.    We also feel that such issues as keyboard mapping, whether to have
  181.    one telnet for both ASCII and 3270 mode or two separate programs, one
  182.    for ASCII and another for 3270 mode, are implementation dependent and
  183.    should be considered as a local matter.
  184.  
  185. 5.  Description of the Option
  186.  
  187.    WILL and DO commands are used to obtain and grant permission for the
  188.    subsequent subnegotiation.  Both sides must exchange WILL 3270-REGIME
  189.    and DO 3270-REGIME prior to subnegotiation.  The actual exchange of
  190.    information is done within the option subcommand (IAC SB
  191.    3270-REGIME).
  192.  
  193.    Either Telnet client or Telnet server can initialize 3270-REGIME
  194.    negotiation.  However, in order to simplify negotiation, only Telnet
  195.    client is allowed to send IAC SB 3270-REGIME ARE... IAC SE command,
  196.    and only Telnet server is allowed to reply with IAC SB 3270-REGIME
  197.    IS... IAC SE command.
  198.  
  199.    Since this negotiation is asymmetric, each time Telnet client/server
  200.    decide to negotiate/renegotiate this option they have to perform
  201.    complete negotiation process (DO...  WILL... SB 3270-REGIME...).
  202.  
  203.    The following is an example of use of the option:
  204.  
  205.       1.  Host A: IAC DO 3270-REGIME
  206.  
  207.       2.  Host B: IAC WILL 3270-REGIME
  208.  
  209.       3.  Host B: IAC DO 3270-REGIME
  210.  
  211.       4.  Host A: IAC WILL 3270-REGIME
  212.  
  213.       5.  (At this point side which runs Telnet client can start
  214.           subnegotiation.)
  215.  
  216.  
  217.  
  218.  
  219.  
  220. Rekhter                                                         [Page 4]
  221.  
  222. RFC 1041               Telnet 3270 Regime Option            January 1988
  223.  
  224.  
  225.       6.  Host A: IAC SB 3270-REGIME ARE 'ibm3279-3 ibm3279-2 ibm3278-3'
  226.           IAC SE
  227.  
  228.       7.  Host B: IAC SB 3270-REGIME IS 'ibm3279-2' IAC SE
  229.  
  230. 6.  Implementation Suggestions
  231.  
  232.    If the side is able to support more that one terminal type, then
  233.    terminal type names are listed in REGIME-LIST from most desirable to
  234.    least desirable.  Other side upon receive of the REGIME-LIST scans it
  235.    from left to right and finds the first terminal type which it is able
  236.    to support returns it in REGIME part of the 3270-REGIME IS
  237.    subnegotiation.
  238.  
  239.    The side which wants to switch into NVT ASCII mode should send empty
  240.    REGIME-LIST.  Since empty string is a subset of empty string, the
  241.    side which receives empty REGIME-LIST should reply with empty REGIME.
  242.    At that point both sides are switched to NVT ASCII mode.
  243.  
  244.    It is possible to renegotiate 3270 Regime parameters (like terminal
  245.    type).  Certain precaution should be taken to insure that such
  246.    renegotiation would not cause switch into NVT ASCII mode.  As a
  247.    possible measure, the side which wants to renegotiate for another
  248.    terminal should include both the current and the new terminal type
  249.    names into REGIME-LIST.  This way, if the other side is unable to
  250.    change 3270 Regime terminal type, it will continue to use current
  251.    terminal type.
  252.  
  253.    Since IAC character (255 decimal) is used as a delimiter (together
  254.    with EOR) in inbound/outbound data stream, care must be taken to
  255.    escape IAC characters which are part of data stream itself with
  256.    another IAC character.
  257.  
  258.    To prevent ambiguity in interpreting inbound/outbound data stream
  259.    during negotiation process the following rules should be observed:
  260.  
  261.  
  262.       1.  Telnet client should not accept any data from the user as soon
  263.           as it enters 3270 Regime negotiation.
  264.  
  265.       2.  Telnet client should not send any data to the Telnet server
  266.           after it sends "3270-REGIME ARE....".
  267.  
  268.       3.  Telnet server should try not to send any data to the telnet
  269.           client while negotiation is in progress.
  270.  
  271.       4.  Telnet server may reply with "3270-REGIME IS..." to the telnet
  272.           client only after all outstanding data have been already sent
  273.  
  274.  
  275.  
  276. Rekhter                                                         [Page 5]
  277.  
  278. RFC 1041               Telnet 3270 Regime Option            January 1988
  279.  
  280.  
  281.           to the Telnet client.
  282.  
  283.       5.  Telnet server can switch from its previous regime to the new
  284.           regime only after it sends "IAC SB 3270-REGIME IS 'regime' IAC
  285.           SE" to the telnet client.
  286.  
  287.       6.  Telnet client can switch from its previous regime to the new
  288.           regime only after it receives "IAC SB 3270-REGIME IS 'regime'
  289.           IAC SE".
  290.  
  291.       7.  Switch from one regime to another may require flushing of all
  292.           outstanding data in both telnet client and telnet server.
  293.  
  294. 7.  References
  295.  
  296.    [1] RFC-854, Telnet Terminal Type Option.
  297.  
  298.    [2] RFC-856, Telnet Binary Transmission.
  299.  
  300.    [3] RFC-885, Telnet End Of Record Option.
  301.  
  302.    [4] RFC-854, Telnet Protocol Specification.
  303.  
  304.    [5] IBM 3270 Information Display System.  3274 Control Unit
  305.        Description and Programmer's Guide.  GA23-0061-1.
  306.  
  307.    [6] IBM 3279 Information Display System: Color and Programmed
  308.        Symbols.  GA33-3056-1.
  309.  
  310.    [7] IBM 3270 Information Display System. Data Stream Programmer's
  311.        Reference. GA23-0059-1.
  312.  
  313.    [8] IBM 3270 Information Display System.  Description and
  314.        Configuration: APL/Text Feature.  GA18-2044-0.
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332. Rekhter                                                         [Page 6]
  333.  
  334.