home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / rfc / rfc1184 < prev    next >
Text File  |  1991-04-21  |  52KB  |  1,291 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                               Telnet Working Group
  8. Request for Comments: 1184                             D. Borman, Editor
  9. Obsoletes: RFC 1116                                  Cray Research, Inc.
  10.                                                             October 1990
  11.  
  12.  
  13.                          Telnet Linemode Option
  14.  
  15. Status of this Memo
  16.  
  17.    This memo describes a Draft Standard for the Internet community, and
  18.    requests discussion and suggestions for improvements.  This RFC
  19.    specifies an IAB standards track protocol for the Internet community.
  20.    Please refer to the current edition of the "IAB Official Protocol
  21.    Standards" for the standardization state and status of this protocol.
  22.    Distribution of this memo is unlimited.
  23.  
  24. Changes from RFC1116:
  25.  
  26.       Two new mode bits have been added, SOFT_TAB and LIT_ECHO.  These
  27.       bits allow the server to give the client some advise on how to
  28.       echo tabs and non-printable characters.
  29.  
  30.       Several new special character mappings have been added for cursor
  31.       motion when visual editing is supported.  These are: Move cursor
  32.       one character left/right (SLC_MCL/SLC_MCR), move cursor one word
  33.       left/right (SLC_MCWL/SLC_MCWR), move cursor to begining/end of
  34.       line (SLC_MCBOL/SLC_MCEOL), enter insert/overstrike mode
  35.       (SLC_INSRT/SLC_OVER), erase one character/word to the right
  36.       (SLC_ECR/SLC_EWR), and erase to the beginning/end of the line
  37.       (SLC_EBOL/SLC_EEOL).
  38.  
  39. Overview
  40.  
  41.    Linemode Telnet is a way of doing terminal character processing on
  42.    the client side of a Telnet connection.  While in Linemode with
  43.    editing enabled for the local side, network traffic is reduced to a
  44.    couple of packets per command line, rather than a couple of packets
  45.    per character typed. This is very useful for long delay networks,
  46.    because the user has local response time while typing the command
  47.    line, and only incurs the network delays after the command is typed.
  48.    It is also useful to reduce costs on networks that charge on a per
  49.    packet basis.  Please send comments to the telnet-ietf@cray.com
  50.    mailing list.
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Telnet Working Group                                            [Page 1]
  59.  
  60. RFC 1184                 Telnet Linemode Option             October 1990
  61.  
  62.  
  63. Table of Contents
  64.  
  65.    1.   Command Names and Codes                                        2
  66.    2.   Command Meanings                                               3
  67.    2.1  The LINEMODE function                                          3
  68.    2.2  LINEMODE suboption MODE                                        4
  69.    2.3  LINEMODE suboption FORWARDMASK                                 5
  70.    2.4  LINEMODE suboption SLC, Set Local Characters                   6
  71.    2.5  New control characters                                        10
  72.    3.   Default Specification                                         11
  73.    4.   Motivation                                                    11
  74.    5.   Implementation Rules                                          13
  75.    5.1  User Interface                                                13
  76.    5.2  End of line terminators                                       14
  77.    5.3  Output processing                                             14
  78.    5.4  A terminal driver in Telnet?                                  14
  79.    5.5  Setting of Local Characters                                   14
  80.    5.6  FORWARDMASK and SLC_FORW1 and SLC_FORW2                       15
  81.    5.7  Valid and invalid modes and values                            16
  82.    5.8  Flushing input and output                                     16
  83.    5.9  State diagram for SLC                                         18
  84.    5.10 Example of a connection                                       19
  85.    6.   Other Telnet options and RFCs                                 22
  86.    7.   Security Considerations                                       23
  87.    8.   Author's Address                                              23
  88.  
  89. 1.  Command Names and Codes
  90.  
  91.        LINEMODE        34
  92.            MODE             1
  93.                EDIT             1
  94.                TRAPSIG          2
  95.                MODE_ACK         4
  96.                SOFT_TAB         8
  97.                LIT_ECHO        16
  98.            FORWARDMASK      2
  99.            SLC              3
  100.                SLC_SYNCH        1
  101.                SLC_BRK          2
  102.                SLC_IP           3
  103.                SLC_AO           4
  104.                SLC_AYT          5
  105.                SLC_EOR          6
  106.                SLC_ABORT        7
  107.                SLC_EOF          8
  108.                SLC_SUSP         9
  109.                SLC_EC          10
  110.                SLC_EL          11
  111.  
  112.  
  113.  
  114. Telnet Working Group                                            [Page 2]
  115.  
  116. RFC 1184                 Telnet Linemode Option             October 1990
  117.  
  118.  
  119.                SLC_EW          12
  120.                SLC_RP          13
  121.                SLC_LNEXT       14
  122.                SLC_XON         15
  123.                SLC_XOFF        16
  124.                SLC_FORW1       17
  125.                SLC_FORW2       18
  126.                SLC_MCL         19
  127.                SLC_MCR         20
  128.                SLC_MCWL        21
  129.                SLC_MCWR        22
  130.                SLC_MCBOL       23
  131.                SLC_MCEOL       24
  132.                SLC_INSRT       25
  133.                SLC_OVER        26
  134.                SLC_ECR         27
  135.                SLC_EWR         28
  136.                SLC_EBOL        29
  137.                SLC_EEOL        30
  138.  
  139.                SLC_DEFAULT      3
  140.                SLC_VALUE        2
  141.                SLC_CANTCHANGE   1
  142.                SLC_NOSUPPORT    0
  143.                SLC_LEVELBITS    3
  144.  
  145.                SLC_ACK        128
  146.                SLC_FLUSHIN     64
  147.                SLC_FLUSHOUT    32
  148.        EOF            236
  149.        SUSP           237
  150.        ABORT          238
  151.  
  152. 2.  Command Meanings
  153.  
  154. 2.1 The LINEMODE function
  155.  
  156.    IAC WILL LINEMODE
  157.  
  158.       The sender of this command REQUESTS permission to begin sub-
  159.       negotiation of the editing/signaling status.  This should only be
  160.       sent by the client side of the connection.
  161.  
  162.    IAC WONT LINEMODE
  163.  
  164.       The sender of this command DEMANDS that sub-negotiation of the
  165.       editing/signaling status not be allowed.
  166.  
  167.  
  168.  
  169.  
  170. Telnet Working Group                                            [Page 3]
  171.  
  172. RFC 1184                 Telnet Linemode Option             October 1990
  173.  
  174.  
  175.    IAC DO LINEMODE
  176.  
  177.       The sender of this command REQUESTS that the remote side begin
  178.       sub-negotiation of the editing/signaling status.  This should only
  179.       be sent by the server side of the connection.
  180.  
  181.    IAC DONT LINEMODE
  182.  
  183.       The sender of this command DEMANDS that the remote side not begin
  184.       sub-negotiation of the editing/signaling status.
  185.  
  186. 2.2 LINEMODE suboption MODE
  187.  
  188.    IAC SB LINEMODE MODE mask IAC SE
  189.  
  190.       The sender of this command CONFIRMS, or REQUESTS permission for, a
  191.       switch to the mode defined by "mask".
  192.  
  193.    The "mask" is a bit mask of various modes that the connection can be
  194.    in.  Under normal operation, the server side of the connection will
  195.    initiate mode changes, and the client will confirm the mode changes.
  196.    The currently defined modes are:
  197.  
  198.       EDIT     When set, the client side of the connection should
  199.                process all input lines, performing any editing functions,
  200.                and only send completed lines to the remote side.  When
  201.                unset, client side should not process any input from the
  202.                user, and the server side should take care of all
  203.                character processing that needs to be done.
  204.  
  205.       TRAPSIG  When set, the client side should translate appropriate
  206.                interrupts/signals to their Telnet equivalent.  (These
  207.                would be IP, BRK, AYT, ABORT, EOF, and SUSP) When unset,
  208.                the client should pass interrupts/signals as their normal
  209.                ASCII values.
  210.  
  211.       FLOW     Logically, this belongs in the "mask".  However, this
  212.                would overlap the Telnet TOGGLE-FLOW-CONTROL option, so
  213.                the Telnet TOGGLE-FLOW-CONTROL option is used instead.
  214.                When DO/WILL LINEMODE is negotiated, DO/WILL TOGGLE-
  215.                FLOW-CONTROL should also be negotiated.  See RFC 1080,
  216.                "Telnet Remote Flow Control", for correct usage.
  217.  
  218.       ECHO     Logically, this belongs in the "mask".  However, this
  219.                would overlap the Telnet ECHO option, so the Telnet ECHO
  220.                option is used instead.  The client side should never
  221.                negotiate "WILL ECHO".  When the server has negotiated
  222.                "WILL ECHO", the client should not echo data typed by the
  223.  
  224.  
  225.  
  226. Telnet Working Group                                            [Page 4]
  227.  
  228. RFC 1184                 Telnet Linemode Option             October 1990
  229.  
  230.  
  231.                user back to the user.  When the server has negotiated
  232.                "WONT ECHO", the the client is responsible for echoing
  233.                data typed by the user back to the user.  See RFC 857,
  234.                "Telnet ECHO OPTION" for a complete discussion on the use
  235.                of the Telnet ECHO option.
  236.  
  237.       SOFT_TAB When set, the client side should expand the Horizontal
  238.                Tab (HT) code, USASCII 9, into the appropriate number of
  239.                spaces to move the printer to the next horizontal tab
  240.                stop.  When unset, the client side should allow the
  241.                Horizontal Tab code to pass through un-modified.
  242.  
  243.       LIT_ECHO When set, if the client side is echoing a non-printable
  244.                character that the user has typed to the users screen,
  245.                the character should be echoed as the literal character.
  246.                If the LIT_ECHO bit is not set, then the client side may
  247.                echo the character in any manner that it desires.  (Many
  248.                systems echo unprintable characters as two character
  249.                sequences, for example, they will echo "^A" for an
  250.                ASCII 1 value.)
  251.  
  252.    When the client side of a connection receives a MODE command, it MUST
  253.    agree with at least the state of the EDIT and TRAPSIG bits.  If a
  254.    MODE command is received with a mode mask that is currently in use
  255.    (ignoring the MODE_ACK bit), the MODE command is ignored.  If a MODE
  256.    command is received that is different from the current mode mask,
  257.    then a reply is sent with either the new mode mask and the MODE_ACK
  258.    bit set, or a subset of the new mode mask.  The only exception is
  259.    that if the server receives a MODE with either the EDIT or TRAPSIG
  260.    bits not set, it may set the EDIT and TRAPSIG bits in the response,
  261.    and if the client receives a MODE with the EDIT or TRAPSIG bits set,
  262.    it may not clear them in the response.
  263.  
  264.    When a MODE command is received with the MODE_ACK bit set, and the
  265.    mode is different that what the current mode is, the client will
  266.    ignore the new mode, and the server will switch to the new mode.
  267.    This ensures that both sides of the connection will resolve to the
  268.    same mode.  In all cases, a response is never generated to a MODE
  269.    command that has the MODE_ACK bit set.
  270.  
  271. 2.3 LINEMODE suboption FORWARDMASK
  272.  
  273.    IAC SB LINEMODE DO FORWARDMASK mask0 mask1 ... mask31 IAC SE
  274.  
  275.       The sender of this command request that the other side send any
  276.       buffered data when any of the ASCII characters defined by the bit
  277.       mask are received.  Only the side of the connection that sent DO
  278.       LINEMODE (the server side) may negotiate this.  The mask is up to
  279.  
  280.  
  281.  
  282. Telnet Working Group                                            [Page 5]
  283.  
  284. RFC 1184                 Telnet Linemode Option             October 1990
  285.  
  286.  
  287.       32 octets long.  Each octet represents 8 ASCII character codes.
  288.       The high order bit of mask0 corresponds to an ASCII code of 0.
  289.       The low order bit of mask0 corresponds to an ASCII code of 7.  The
  290.       high order bit of mask1 corresponds to an ASCII code of 8.  The
  291.       low order bit of mask1 corresponds to an ASCII code of 15, and so
  292.       on. The mask list may be terminated before the end of the list, in
  293.       which case all the rest of the mask octets are assumed to be reset
  294.       (equal to zero).  When the server side is in DONT TRANSMIT-BINARY
  295.       mode, then only the first 16 octets of the mask (ASCII codes 0
  296.       through 127) are used.  If any individual octet of the mask is
  297.       equal to IAC, it must be sent as a double IAC.
  298.  
  299.    IAC SB LINEMODE DONT FORWARDMASK IAC SE
  300.  
  301.       The sender of this command requests that the other side stop using
  302.       the forward mask to determine when to send buffered data.
  303.  
  304.    IAC SB LINEMODE WILL FORWARDMASK IAC SE
  305.  
  306.       This command is sent in response to a DO FORWARDMASK command.  It
  307.       indicates that the forward mask will be used to determine when to
  308.       send buffered data.
  309.  
  310.    IAC SB LINEMODE WONT FORWARDMASK IAC SE
  311.  
  312.       This command is sent in response to a DO FORWARDMASK command.  It
  313.       indicates that the forward mask will not be used to determine when
  314.       to send buffered data.
  315.  
  316. 2.4 LINEMODE suboption SLC, Set Local Characters
  317.  
  318.    The SLC suboption uses a list of octet triplets. The first octet
  319.    specifies the function, the second octet specifies modifiers to the
  320.    function, and the third octet specifies the ASCII character for the
  321.    function.
  322.  
  323.    IAC SB LINEMODE SLC <list of octet triplets> IAC SE
  324.  
  325.       The sender of this command REQUESTS that the list of octet
  326.       triplets be used to set the local character to be used to send to
  327.       perform the specified function.
  328.  
  329.       There are four levels that a function may be set to.
  330.       SLC_NOSUPPORT is the lowest, SLC_CANTCHANGE is the next higher
  331.       level, SLC_VALUE is above that, and SLC_DEFAULT is the highest
  332.       level.
  333.  
  334.       If the SLC_LEVELBITS in the second octet are equal to SLC_DEFAULT,
  335.  
  336.  
  337.  
  338. Telnet Working Group                                            [Page 6]
  339.  
  340. RFC 1184                 Telnet Linemode Option             October 1990
  341.  
  342.  
  343.       then this particular function should use the system default on the
  344.       other side of the connection.
  345.  
  346.       If the SLC_LEVELBITS in the second octet are equal to SLC_VALUE,
  347.       then this function is supported, and the current value is
  348.       specified by the third octet.
  349.  
  350.       If the SLC_LEVELBITS in the second octet are equal to
  351.       SLC_CANTCHANGE, then this is a function that is supported, but the
  352.       value for this function, specified in the third octet, cannot be
  353.       changed.
  354.  
  355.       If the SLC_LEVELBITS in the second octet are equal to
  356.       SLC_NOSUPPORT, then this particular function is not supported and
  357.       should be disabled by the other side.
  358.  
  359.       If this is a response to a previous request to change a special
  360.       character, and we are agreeing to the change, then the SLC_ACK bit
  361.       must be set in the second octet.
  362.  
  363.       If the SLC_FLUSHIN bit is set in the second octet, then whenever
  364.       this function is sent, a Telnet "sync" should be sent at the same
  365.       time to flush the input stream.
  366.  
  367.       If the SLC_FLUSHOUT bit is set in the second octet, then whenever
  368.       this function is sent, output data should be flushed.
  369.  
  370.       Only the client may send an octet triplet with the first octet
  371.       equal to zero.  In this case, the SLC_LEVELBITS may only be set to
  372.       SLC_DEFAULT or SLC_VALUE, and the third octet does not matter.
  373.       When the server receives 0 SLC_DEFAULT 0, it should switch to its
  374.       system default special character settings, and send all those
  375.       special characters to the client.  When the server receives 0
  376.       SLC_VALUE 0, it should just send its current special character
  377.       settings.  Note that if the server does not support some of the
  378.       editing functions, they should be sent as XXX SLC_DEFAULT 0,
  379.       rather than as XXX SLC_NOSUPPORT 0, so that the client may choose
  380.       to use its own values for those functions, rather than have to
  381.       disable those functions even if it supports them.
  382.  
  383.       If any of the octets in the list of octet triplets is equal to
  384.       IAC, it must be sent as a double IAC.
  385.  
  386.    When a connection is established, it is the responsibility of the
  387.    client to either request the remote default values for the special
  388.    characters, or to send across what all the special characters should
  389.    be set to.
  390.  
  391.  
  392.  
  393.  
  394. Telnet Working Group                                            [Page 7]
  395.  
  396. RFC 1184                 Telnet Linemode Option             October 1990
  397.  
  398.  
  399.    The function values can be put into two groups, functions that are to
  400.    be translated to their Telnet equivalents before being sent across
  401.    the Telnet connection, and functions that are to be recognized and
  402.    processed locally.
  403.  
  404.    First, we have those characters that are to be mapped into their
  405.    Telnet equivalents:
  406.  
  407.       SLC_SYNCH Synch.  See RFC 854, "TELNET PROTOCOL SPECIFICATION",
  408.                 for a complete description.
  409.  
  410.       SLC_BRK   Break.  See RFC 854, "TELNET PROTOCOL SPECIFICATION",
  411.                 for a complete description.
  412.  
  413.       SLC_IP    Interrupt Process.  See RFC 854, "TELNET PROTOCOL
  414.                 SPECIFICATION", for a complete description.
  415.  
  416.       SLC_AO    Abort Output.  See RFC 854, "TELNET PROTOCOL
  417.                 SPECIFICATION", for a complete description.
  418.  
  419.       SLC_AYT   Are You There.  See RFC 854, "TELNET PROTOCOL
  420.                 SPECIFICATION", for a complete description.
  421.  
  422.       SLC_EOR   End of Record.  See RFC 885, "TELNET END OF RECORD
  423.                 OPTION" for a complete description.
  424.  
  425.       SLC_ABORT Abort.  See section 2.5 for a complete description.
  426.  
  427.       SLC_EOF   End of File.  See section 2.5 for a complete
  428.                 description.
  429.  
  430.       SLC_SUSP  Suspend.  See section 2.5 for a complete description.
  431.  
  432.    Next, we have the locally interpreted functions.
  433.  
  434.       SLC_EC    Erase Character.  This is the character that is typed to
  435.                 erase one character from the input stream.  See RFC 854,
  436.                 "TELNET PROTOCOL SPECIFICATION", for a complete
  437.                 description.
  438.  
  439.       SLC_EL    Erase Line.  This is the character that is typed to
  440.                 erase the entire contents of the current line of input.
  441.                 See RFC 854, "TELNET PROTOCOL SPECIFICATION", for a
  442.                 complete description.
  443.  
  444.       SLC_EW    Erase Word.  This is the character that is typed to
  445.                 erase one word from the input stream.
  446.  
  447.  
  448.  
  449.  
  450. Telnet Working Group                                            [Page 8]
  451.  
  452. RFC 1184                 Telnet Linemode Option             October 1990
  453.  
  454.  
  455.       SLC_RP    Reprint Line.  This is the character that is typed to
  456.                 cause the current line of input to be reprinted, leaving
  457.                 the cursor at the end of the line.
  458.  
  459.       SLC_LNEXT Literal Next.  This is the character that is typed to
  460.                 indicate that the next character is to be taken
  461.                 literally, no character processing should be done with
  462.                 it, and if it is a special character that would normally
  463.                 get mapped into a Telnet option, that mapping should
  464.                 not be done.
  465.  
  466.       SLC_XON   Start Output.  This is the character that is sent to
  467.                 resume output to the users terminal.
  468.  
  469.       SLC_XOFF  Stop Output.  This is the character that is sent to stop
  470.                 output to the users terminal.
  471.  
  472.       SLC_FORW1 Forwarding character.  This is a character that should
  473.                 cause all data currently being buffered, and this
  474.                 character, to be sent immediately.
  475.  
  476.       SLC_FORW2 Forwarding character.  This is another character that is
  477.                 to be treated in the same manner as SLC_FORW1.
  478.  
  479.       SLC_MCL   Move cursor one character left.  When visual editing is
  480.                 supported, this is the character that, when typed, will
  481.                 move the cursor one character to the left in the
  482.                 display.
  483.  
  484.       SLC_MCR   Move cursor one character right.  When visual editing is
  485.                 supported, this is the character that, when typed, will
  486.                 move the cursor one character to the right in the
  487.                 display.
  488.  
  489.       SLC_MCWL  Move cursor one word left.  When visual editing is
  490.                 supported, this is the character that, when typed, will
  491.                 move the cursor one word to the left in the display.
  492.  
  493.       SLC_MCWR  Move cursor one word right.  When visual editing is
  494.                 supported, this is the character that, when typed, will
  495.                 move the cursor one word to the right in the display.
  496.  
  497.       SLC_MCBOL Move cursor to the begining of the line.  When visual
  498.                 editing is supported, this is the character that, when
  499.                 typed, will move the cursor to the begining of the line
  500.                 that is being edited.
  501.  
  502.       SLC_MCEOL Move cursor to the end of the line.  When visual editing
  503.  
  504.  
  505.  
  506. Telnet Working Group                                            [Page 9]
  507.  
  508. RFC 1184                 Telnet Linemode Option             October 1990
  509.  
  510.  
  511.                 is supported, this is the character that, when typed,
  512.                 will move the cursor to the end of the line that is
  513.                 being edited.
  514.  
  515.       SLC_INSRT Enter insert mode.  When visual editing is supported,
  516.                 after this character is typed, all normal characters
  517.                 that are subsequently typed will be inserted into the
  518.                 display.
  519.  
  520.       SLC_OVER  Enter overstrike mode.  When visual editing is
  521.                 supported, after this character is typed, all normal
  522.                 charactersthat are subsequently typed will overwrite
  523.                 any characters in the current display.  If the
  524.                 SLC_INSRT and SLC_OVER variables are set to the same
  525.                 value, then that value is to act as a toggle between
  526.                 overstrike and insert mode.
  527.  
  528.       SLC_ECR   Erase character to the right.  When visual editing is
  529.                 supported, this is the character that, when typed, will
  530.                 erase one character to the right of the cursor.
  531.  
  532.       SLC_EWR   Erase word to the right.  When visual editing is
  533.                 supported, this is the character that, when typed,
  534.                 will erase one word to the right of the cursor.
  535.  
  536.       SLC_EBOL  Erase to the begining of the line.  When visual editing
  537.                 is supported, this is the character that, when typed,
  538.                 will erase all the characters to the left of the cursor.
  539.  
  540.       SLC_EEOL  Erase to the end of the line.  When visual editing is
  541.                 supported, this is the character that, when typed, will
  542.                 erase all characters to the right of the cursor.
  543.  
  544.    For SLC_EEOL, SLC_EWR, and SLC_ECR, if a system has a cursor that is
  545.    not diplayed between characters, but is positioned over a character,
  546.    that character is assumed to be to the right of the cursor.  Thus,
  547.    the SLC_ECR will erase the character that is under the current cursor
  548.    position.
  549.  
  550. 2.5 New control characters
  551.  
  552.    IAC ABORT
  553.  
  554.       Abort.  Similar to "IAC IP", but means only to abort or terminate
  555.       the process to which the NVT is connected.  (The Telnet spec says
  556.       IP may "suspend, interrupt, abort or terminate" the process.) If a
  557.       system does not have two methods of interrupting a process, then
  558.       ABORT and IP should have the same effect.
  559.  
  560.  
  561.  
  562. Telnet Working Group                                           [Page 10]
  563.  
  564. RFC 1184                 Telnet Linemode Option             October 1990
  565.  
  566.  
  567.    IAC SUSP
  568.  
  569.       Suspend the execution of the current process attached to the NVT
  570.       in such a way that another process will take over control of the
  571.       NVT, and the suspended process can be resumed at a later time. If
  572.       the receiving system does not support this functionality, it
  573.       should be ignored.
  574.  
  575.    IAC EOF
  576.  
  577.       End Of File.  The recipient should notify the process connected to
  578.       the NVT that an end of file has been reached.  This is intended
  579.       for systems that support the ability for the user to type in an
  580.       EOF character at the keyboard.
  581.  
  582. 3.  Default Specification
  583.  
  584.    The default specification for this option is
  585.  
  586.       WONT LINEMODE
  587.  
  588.       DONT LINEMODE
  589.  
  590.    meaning there will not be any subnegotiation of the mode of the
  591.    connection.
  592.  
  593.    If WILL LINEMODE is negotiated, the defaults are:
  594.  
  595.       IAC SB LINEMODE MODE 0 IAC SE
  596.       IAC SB LINEMODE WONT FORWARDMASK IAC SE
  597.  
  598.    If DO LINEMODE is negotiated, the defaults are:
  599.  
  600.       IAC SB LINEMODE MODE 0 IAC SE
  601.       IAC SB LINEMODE DONT FORWARDMASK IAC SE
  602.  
  603.    Character values for SLC default to SLC_NOSUPPORT.
  604.  
  605. 4.  Motivation
  606.  
  607.    With increasing Telnet usage, it has become apparent that the ability
  608.    to do command line processing on the local machine and send completed
  609.    lines to the remote machine is a feature necessary in several
  610.    environments.  First, in the case of a connection over long delay
  611.    equipment, it is very frustrating to the user to have the echoing of
  612.    his data take several seconds.  Second, some supercomputers, due to
  613.    their nature, are not good at handling and processing single
  614.    character input.  For these machines, it is better to have the front
  615.  
  616.  
  617.  
  618. Telnet Working Group                                           [Page 11]
  619.  
  620. RFC 1184                 Telnet Linemode Option             October 1990
  621.  
  622.  
  623.    end computer do the character processing, and leave the
  624.    supercomputer's cycles available for doing vectorized number
  625.    crunching.
  626.  
  627.    There have been attempts to make local line editing work within the
  628.    existing Telnet specs.  Indeed, the 4.3 BSD tape includes a version
  629.    of Telnet that attempts to do this through recognition of the state
  630.    of the ECHO and SUPRESS-GO-AHEAD options; other implementations do
  631.    this recognition purely through the ECHO option.
  632.  
  633.    There are problems with both of these methods.  Using just the ECHO
  634.    provides no mechanism to have ECHO to the user turned off, and leave
  635.    local character processing on, for example, when a user is typing a
  636.    password.
  637.  
  638.    The usage of the SUPRESS-GO-AHEAD comes from reading into RFC 858,
  639.    where it states:
  640.  
  641.       "In many TELNET implementations it will be desirable to couple the
  642.       SUPRESS-GO-AHEAD option to the echo option so that when the echo
  643.       option is in effect, the SUPPRESS-GO-AHEAD option is in effect
  644.       simultaneously: both of these options will normally have to be in
  645.       effect simultaneously to effect what it commonly understood to be
  646.       character at a time echoing by the remote computer."
  647.  
  648.    The reverse reading of this is that without the ECHO option or the
  649.    SUPPRESS-GO-AHEAD option, you are in line at a time mode, implying
  650.    local line editing.  This has the obvious problem that that is not
  651.    what the SUPPRESS-GO-AHEAD option is supposed to mean.
  652.  
  653.    Other shortcomings are that the Telnet specification is not rich
  654.    enough to handle all of the special characters that some of the
  655.    current operating systems support.  For example, the ECHO/SGA
  656.    implementation supports two ways of interrupting a process, by
  657.    borrowing the BRK option for the second interrupt.  Some
  658.    implementations have taken the EOR option to send an End-Of-File.
  659.    Obviously, this is using things for which they were not intended, and
  660.    the correct solution would be to define new options.
  661.  
  662.    Another problem is that some implementations of line mode buffer up
  663.    the input until the end of the line, and then send the whole line
  664.    across, editing characters and all.  No local editing of the line has
  665.    been done.
  666.  
  667.    After examining several implementations, it has become clear that the
  668.    correct thing to do is to implement new options to enhance the
  669.    current Telnet specification so that it can support local line
  670.    editing in a reasonable, reliable, and consistent manner.
  671.  
  672.  
  673.  
  674. Telnet Working Group                                           [Page 12]
  675.  
  676. RFC 1184                 Telnet Linemode Option             October 1990
  677.  
  678.  
  679.    There are three states that are of interest.
  680.  
  681.       1) Local line editing and local signal trapping
  682.  
  683.       2) Remote line editing, local signal trapping
  684.  
  685.       3) Remote line editing, remote signal trapping
  686.  
  687.    The case of local line editing and remote signal trapping is not a
  688.    very interesting case, because you don't recognize the signals, and
  689.    cannot send them to the remote side for it to recognize until the
  690.    line has been completed.  Also, special signals usually will have an
  691.    effect on the line editing function, and if they are not being
  692.    trapped locally the desired action will not happen.
  693.  
  694.    Local line editing means that all normal command line character
  695.    processing, like "Erase Character" and "Erase Line", happen on the
  696.    local system, and only when "CR LF" (or some other special character)
  697.    is encountered is the edited data sent to the remote system.
  698.  
  699.    Signal trapping means, for example, that if the user types the
  700.    character associated with the IP function, then the "IAC IP" function
  701.    is sent to the remote side instead of the character typed.  Remote
  702.    signal trapping means, for example, that if the user types the
  703.    character associated with the IP function, then the "IAC IP" function
  704.    is not sent to the remote side, but rather the actual character typed
  705.    is sent to the remote side.
  706.  
  707. 5.  Implementation Rules
  708.  
  709.    It is expected that any implementation that supports the Telnet
  710.    LINEMODE option will support all of this specification.
  711.  
  712. 5.1 User Interface
  713.  
  714.    Normally, the entire user interface is left up to the implementor.
  715.    However, there is functionality that the user should be able to
  716.    specify on the client side of the connection.  During a Telnet
  717.    session, the client side should allow some mechanism for the user to
  718.    give commands to the local Telnet process.  These commands should at
  719.    least allow the user to:
  720.  
  721.       1)  Change the mode of the connection.  The user should be able to
  722.           attempt to turn EDIT, FLOW, TRAPSIG, and ECHO on and off.  The
  723.           server may refuse to change the state of the EDIT and TRAPSIG
  724.           bits.
  725.  
  726.       2)  Import or export SLC.  The user should be able to tell the
  727.  
  728.  
  729.  
  730. Telnet Working Group                                           [Page 13]
  731.  
  732. RFC 1184                 Telnet Linemode Option             October 1990
  733.  
  734.  
  735.           local Telnet process whether he wants to use the local or
  736.           the current or default remote definitions of the special
  737.           characters.
  738.  
  739.       3)  Manual sending of options.  The user should be able to tell
  740.           the local Telnet process to explicitly send any of the Telnet
  741.           options (like IP, ABORT, AYT, etc).
  742.  
  743. 5.2 End of line terminators.
  744.  
  745.    When LINEMODE is turned on, and when in EDIT mode, when any normal
  746.    line terminator on the client side operating system is typed, the
  747.    line should be transmitted with "CR LF" as the line terminator.  When
  748.    EDIT mode is turned off, a carriage return should be sent as "CR
  749.    NUL", a line feed should be sent as LF, and any other key that cannot
  750.    be mapped into an ASCII character, but means the line is complete
  751.    (like a DOIT or ENTER key), should be sent as "CR LF".
  752.  
  753. 5.3 Output processing
  754.  
  755.    Regardless of what mode has been negotiated, the server side is
  756.    responsible for doing all output processing.  Specificly, it should
  757.    send "CR LF" when it wants the "newline" function, "CR NUL" when it
  758.    wants just a carriage return, and "LF" when it wants just a linefeed.
  759.  
  760. 5.4 A terminal driver in Telnet?
  761.  
  762.    Conforming implementations need not do all the line editing
  763.    themselves.  There is nothing wrong with letting the system terminal
  764.    driver handle the line editing, and have it hand to the Telnet
  765.    application the completed and edited line, which is then sent to the
  766.    remote system.
  767.  
  768. 5.5 Setting of Local Characters
  769.  
  770.    When this RFC was being developed, the original thought was that both
  771.    sides of the connection would use their own defaults for the special
  772.    characters, even if they were not the same on both sides of the
  773.    connection.  If this scheme is used, though, the view that the user
  774.    has is that the local special characters are being used, and the
  775.    remote character settings don't matter.  It was decided that the
  776.    client side of the connection should be in control of the character
  777.    settings.
  778.  
  779.    When LINEMODE is negotiated, the client must either export the local
  780.    character settings to the server, or send a request (SLC 0
  781.    SLC_DEFAULT 0) to import the servers special characters.  The usual
  782.    action would be that a client running on a full fledged computer
  783.  
  784.  
  785.  
  786. Telnet Working Group                                           [Page 14]
  787.  
  788. RFC 1184                 Telnet Linemode Option             October 1990
  789.  
  790.  
  791.    would export the special characters, and a client running where there
  792.    are no local defaults (like on some terminal servers) would import
  793.    the special characters.
  794.  
  795.    When an SLC command is received, the action taken should be:
  796.  
  797.       1)  Ignore it if it is the same as the current settings.
  798.  
  799.       2)  If the SLC_LEVELBITS are the same as the current level bits,
  800.           but the value is different and the SLC_ACK bit is set, no
  801.           reply is generated.  On the server side, the command is
  802.           ignored, and on the client side, a switch is made to the
  803.           new value.  This is so that if a request to change the same
  804.           character is generated by both the server and the client,
  805.           they will both settle on the clients requested value.
  806.  
  807.       3)  If we agree with the new setting, we switch to it and reply
  808.           with the same value, but also set the SLC_ACK bit.
  809.  
  810.       4)  If we don't agree, we send a response with what we think the
  811.           value should be.  The SLC_ACK bit is NOT set in this case.
  812.           You may only disagree with a value by sending a different
  813.           value at a lower level.
  814.  
  815.    If the remote system doesn't support some of the line editing
  816.    characters, but the front end does, then the front end may use the
  817.    local definitions for those characters when in line mode. In this
  818.    case, the server should send "SLC xxx SLC_DEFAULT 0" in response to a
  819.    "SLC 0 SLC_DEFAULT 0" request, and just ack whatever value the client
  820.    requests to set the function to.
  821.  
  822.    The SLC_FORW2 character should only be used if SLC_FORW1 is already
  823.    in use.
  824.  
  825. 5.6 FORWARDMASK and SLC_FORW1 and SLC_FORW2
  826.  
  827.    To help ease the amount of work needed to implement the client side,
  828.    two methods of setting forwarding characters are provided.  The
  829.    SLC_FORW1 and SLC_FORW2 allow for the setting of two additional
  830.    characters on which to forward buffered input data.  Since many
  831.    terminal drivers have the ability to set one or more line delimiters,
  832.    it is fairly easy to support these without having to implement
  833.    through the local terminal driver, rather than putting a terminal
  834.    driver into Telnet.  If the local terminal driver has functionality
  835.    that maps easily into the FORWARDMASK, then it can also be easily
  836.    supported.  If the local terminal driver does not support that, then
  837.    it would require more work to support FORWARDMASK.
  838.  
  839.  
  840.  
  841.  
  842. Telnet Working Group                                           [Page 15]
  843.  
  844. RFC 1184                 Telnet Linemode Option             October 1990
  845.  
  846.  
  847.    Also note that the client side is required to forward data when it
  848.    sees one of SLC_FORW1, SLC_FORW2, or FORWARDMASK characters, or when
  849.    any normal line termination or special signal is encountered.  The
  850.    client side is also free to forward on other characters that it
  851.    chooses.  For example, if the server side sent a FORWARDMASK that
  852.    asked for data to be forwarded on the first 20 control characters
  853.    (ASCII codes 1 through 024), and the client side cannot have its
  854.    local terminal driver forward on just the first 20 control
  855.    characters, but it can have the local terminal driver forward on any
  856.    control character (ASCII codes 1 through 039), then the client side
  857.    could validly accept the FORWARDMASK, and forward on any control
  858.    character.  When in EDIT mode, care should be taken to not forward at
  859.    random times, since once that data is forwarded, no more editing on
  860.    the forwarded part of the line can be done.  The only time (other
  861.    than the normal times) that data should be forwarded when in EDIT
  862.    mode would be if a single input line is too long to handle locally.
  863.  
  864. 5.7 Valid and invalid modes and values
  865.  
  866.    At no time should "DO LINEMODE" be negotiated in both directions of
  867.    the Telnet connection.  The side that is the "DO LINEMODE" is
  868.    considered to be the server side, and the side that is "WILL
  869.    LINEMODE" is the client side.
  870.  
  871.    At no time should "SB LINEMODE DO/DONT FORWARDMASK", be sent unless
  872.    "DO LINEMODE" has been previously negotiated.  At no time should "SB
  873.    LINEMODE WILL/WONT FORWARDMASK", be sent unless "WILL LINEMODE" has
  874.    been previously negotiated.
  875.  
  876.    If an ABORT, EOF or SUSP, is received and the system does not support
  877.    that functionality, it may just be ignored.
  878.  
  879. 5.8 Flushing input and output
  880.  
  881.    When an IP, BRK or ABORT is sent, it is usually desirable to be able
  882.    to flush the input stream, and to flush output to the user until the
  883.    IP, BRK, or ABORT is processed.  The SLC_FLUSHIN and SLC_FLUSHOUT
  884.    bits are used to indicate what action should be done.  These bits are
  885.    advisory only, but should be honored if possible.  The standard
  886.    method for processing the SLC_FLUSHIN is to use the Telnet "Synch"
  887.    signal, and the SLC_FLUSHOUT is processed using the TIMING-MARK
  888.    option.  If both are to be sent, the IAC DM is sent before the DO
  889.    TIMING-MARK Thus, the sender would send "IAC XXX IAC DM IAC DO
  890.    TIMING-MARK", where XXX may be IP, BRK or ABORT, or any other special
  891.    character.  The IAC DM is sent as TCP urgent data with the DM as the
  892.    last (or only) data octet; this is used to flush the input stream.
  893.    The "IAC DO TIMING-MARK" is used to tell when to stop flushing
  894.    output; once it is sent, all data is discarded until an "IAC WILL
  895.  
  896.  
  897.  
  898. Telnet Working Group                                           [Page 16]
  899.  
  900. RFC 1184                 Telnet Linemode Option             October 1990
  901.  
  902.  
  903.    TIMING-MARK" or an "IAC WONT TIMING-MARK" is received.
  904.  
  905.    Since the SLC_FLUSHIN and SLC_FLUSHOUT bit are only advisory, the
  906.    user interface should provide a method so that the user can override
  907.    the sending (or not sending) of the "Synch" and TIMING-MARK, but the
  908.    default action should be to send them according to the SLC_FLUSHIN
  909.    and SLC_FLUSHOUT bits.
  910.  
  911.    Whenever an IAC AO is received, a Synch must be returned.  When ever
  912.    a Synch is being processed, (by the TCP connection going into Urgent
  913.    mode), all data must be discarded (but not Telnet commands!) until an
  914.    IAC DM is found, and the connection goes out of Urgent mode.  See RFC
  915.    854, "TELNET PROTOCOL SPECIFICATION", for a complete description of
  916.    the Synch signal.
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954. Telnet Working Group                                           [Page 17]
  955.  
  956. RFC 1184                 Telnet Linemode Option             October 1990
  957.  
  958.  
  959. 5.9 State diagram for SLC
  960.  
  961.    +---------------------------------------------------------------+
  962.    |                                IDLE                           |
  963.    +----------------------+------+------+-------+-------+---------++
  964.     ^      ^     ^        |      | ^    | ^     | ^     |       ^ |
  965.     |      |     |        v      v |    | |     | |     v       | |
  966.     |      |     |    +------+ +---+--+ | |     | | ########### | |
  967.     |      |     |    | Get  | | Send | | |     | | #   Get   # | |
  968.     |      |     |    | SPC0 | | SPC0 | | |     | | # 0,DEF,0 # | |
  969.     |      |     |    +---+--+ +------+ | |     | | ########### | |
  970.     |      |     |        |       ^     | |     | |     |       | |
  971.     |      |     |        v       |     v |     | |     v       | |
  972.     |      |     |       / \      | *********** | | ########### | |
  973.     |      |     |     /     \    | *  Send   * | | # Switch  # | |
  974.     | ********** |Yes/ Same as \  | * 0,VAL,0 * | | # to      # | |
  975.     | * Change * +--<  current? > | *********** | | # default # | |
  976.     | * to new *     \         /  |             v | ########### | |
  977.     | * value  *       \     /    |     ***********     |       | |
  978.     | **********         \ /      |     *  Send   *     v       | |
  979.     |      ^              |No     |     * 0,DEF,0 *  #########  | |
  980.     |      |Yes           v       |     ***********  # Send  #--+ |
  981.     |     / \            / \      |                  # SPC-A #    |
  982.     |   /     \        /     \    |                  #########    |
  983.     | / Is ACK  \ Yes/  Same   \  |                     ^         |
  984.     |<  bit set? ><-<  level as > |                     |         |
  985.     | \         /    \ current?/  |                 ###########   |
  986.     |   \     /        \     /    |                 #   Get   #<--+
  987.     |     \ /            \ /    +-+---+             # 0,VAL,0 #
  988.     |      |No            |No   | Set |             ###########
  989.     |      +--------------+     | ACK |
  990.     |                     v     | bit |      * - Client side only
  991.     |                    / \    +-----+      # - Server side only
  992.     |   +------+       /     \      ^
  993.     |   | Send |  No /  Do we  \ Yes|
  994.     +---| SPC1 |<---<   agree?  >---+
  995.         +------+     \         /
  996.                        \     /
  997.                          \ /
  998.  
  999.            SPC0    Initial setting for a special character
  1000.            SPC1    A changed special character < SPC0
  1001.            SPC-A   All current special character settings
  1002.            VAL     SLC_VALUE level
  1003.            DEF     SLC_DEFAULT level
  1004.  
  1005.    Levels: DEFAULT, VALUE, CANT_CHANGE, NOSUPPORT
  1006.    Flags: ACK
  1007.  
  1008.  
  1009.  
  1010. Telnet Working Group                                           [Page 18]
  1011.  
  1012. RFC 1184                 Telnet Linemode Option             October 1990
  1013.  
  1014.  
  1015.            Receive                 Response
  1016.            -------                 --------
  1017.            f,SLC_DEFAULT,x         f,SLC_VALUE,v
  1018.                                    f,SLC_CANTCHANGE,v
  1019.                                    f,SLC_NOSUPPORT,x
  1020.  
  1021.            f,SLC_VALUE,v           f,SLC_ACK|SLC_VALUE,v
  1022.                                    f,SLC_CANTCHANGE,w
  1023.                                    f,SLC_NOSUPPORT,x
  1024.  
  1025.            f,SLC_CANTCHANGE,v      f,SLC_ACK|SLC_CANTCHANGE,v
  1026.                                    f,SLC_NOSUPPORT,x
  1027.  
  1028.            f,SLC_NOSUPPORT,x       f,SLC_ACK|SLC_NOSUPPORT,x
  1029.  
  1030.            x,SLC_ACK|x,x           no response
  1031.  
  1032. 5.10 Examples of a connection
  1033.  
  1034.    In these examples, the symbolic names are used rather than the actual
  1035.    values, to make them readable.  When two or more symbolic names are
  1036.    joined by a |, it means that the actual value will be the logical
  1037.    "or" of the values of the symbolic names.  In the interest of
  1038.    clarity, for these examples the leading IAC and IAC SB sequences, and
  1039.    the trailing IAC SE sequences have been omitted.  Also, the SLC_
  1040.    prefix has been left off where ever it would normally occur.
  1041.  
  1042.    CLIENT                           SERVER
  1043.                                         DO TOGGLE-FLOW-CONTROL
  1044.                                         DO LINEMODE
  1045.        WILL TOGGLE-FLOW-CONTROL
  1046.        WILL LINEMODE
  1047.        [ Subnegotiation may now proceed in both directions.  The client
  1048.          sends of the list of special characters.  ]
  1049.        LINEMODE SLC SYNCH DEFAULT 0 IP
  1050.        VALUE|FLUSHIN|FLUSHOUT 3 AO
  1051.        VALUE 15 AYT DEFAULT 0 ABORT
  1052.        VALUE|FLUSHIN|FLUSHOUT 28 EOF
  1053.        VALUE 4 SUSP VALUE|FLUSHIN 26 EC
  1054.        VALUE 127 EL VALUE 21 EW VALUE
  1055.        23 RP VALUE 18 LNEXT VALUE 22
  1056.        XON VALUE 17 XOFF VALUE 19
  1057.        [ Now that linemode is enabled, the server sets the initial mode,
  1058.          and acknowledges the special characters.  ]
  1059.                                         LINEMODE MODE EDIT
  1060.  
  1061.                                         LINEMODE SLC SYNCH NOSUPPORT 0
  1062.                                         IP VALUE|FLUSHIN|FLUSHOUT|ACK 3
  1063.  
  1064.  
  1065.  
  1066. Telnet Working Group                                           [Page 19]
  1067.  
  1068. RFC 1184                 Telnet Linemode Option             October 1990
  1069.  
  1070.  
  1071.                                         AO NOSUPPORT 0 AYT NOSUPPORT 0
  1072.                                         ABORT VALUE|FLUSHIN|FLUSHOUT|ACK
  1073.                                         28 EOF VALUE|ACK 4 SUSP NOSUP-
  1074.                                         PORT 0 EC VALUE|ACK 127 EL
  1075.                                         VALUE|ACK 21 EW VALUE|ACK 23 RP
  1076.                                         VALUE|ACK 18 LNEXT VALUE|ACK 22
  1077.                                         XON VALUE|ACK 17 XOFF VALUE|ACK
  1078.                                         19
  1079.        [ The client gets the mode and ack of the special characters, and
  1080.          acks the mode and any special characters that the server
  1081.          changed.  ]
  1082.        LINEMODE MODE EDIT|MODE_ACK
  1083.  
  1084.        LINEMODE SLC SYNCH NOSUPPORT|ACK
  1085.        0 AO NOSUPPORT|ACK 0 AYT|ACK
  1086.        NOSUPPORT 0 SUSP NOSUPPORT|ACK 0
  1087.                                         "Login:"
  1088.        "my_account"
  1089.        [ Turn off echo to the user.  ]
  1090.                                         WILL ECHO
  1091.        DO ECHO
  1092.                                         "Password:"
  1093.        "my_password"
  1094.        [ Turn back on echo to the user.  ]
  1095.                                         WONT ECHO
  1096.        DONT ECHO
  1097.        [ User does some stuff, and then runs an application that wants
  1098.          to use single character mode, doing its own echoing of
  1099.          characters, but keep signal trapping on.  ]
  1100.                                         WILL ECHO
  1101.        DO ECHO
  1102.                                         LINEMODE MODE TRAPSIG
  1103.        LINEMODE MODE TRAPSIG|MODE_ACK
  1104.        [ Application finishes ]
  1105.                                         WONT ECHO
  1106.        DONT ECHO
  1107.                                         LINEMODE MODE EDIT|TRAPSIG
  1108.        LINEMODE MODE
  1109.        EDIT|TRAPSIG|MODE_ACK
  1110.        [ Another application, that wants full control of everything.  ]
  1111.                                         WILL ECHO
  1112.        DO ECHO
  1113.                                         LINEMODE MODE 0
  1114.        LINEMODE MODE 0|MODE_ACK
  1115.        [ Application finishes ]
  1116.                                         WONT ECHO
  1117.        DONT ECHO
  1118.                                         LINEMODE MODE EDIT|TRAPSIG
  1119.  
  1120.  
  1121.  
  1122. Telnet Working Group                                           [Page 20]
  1123.  
  1124. RFC 1184                 Telnet Linemode Option             October 1990
  1125.  
  1126.  
  1127.        LINEMODE MODE
  1128.        EDIT|TRAPSIG|MODE_ACK
  1129.        [ The user changes his erase character to ^H.  ]
  1130.                                         LINEMODE SLC EC VALUE 8
  1131.        LINEMODE SLC EC VALUE|ACK 8
  1132.        [ The user decides to revert to all the original client side
  1133.          special characters.  ]
  1134.        LINEMODE SLC SYNCH DEFAULT 0 IP
  1135.        VALUE|FLUSHIN|FLUSHOUT 3 AO
  1136.        VALUE 15 AYT DEFAULT 0 ABORT
  1137.        VALUE|FLUSHIN|FLUSHOUT 28 EOF
  1138.        VALUE 4 SUSP VALUE|FLUSHIN 26 EC
  1139.        VALUE 127 EL VALUE 21 EW VALUE
  1140.        23 RP VALUE 18 LNEXT VALUE 22
  1141.        XON VALUE 17 XOFF VALUE 19
  1142.                                         LINEMODE SLC SYNCH NOSUPPORT 0
  1143.                                         AO NOSUPPORT 15 AYT NOSUPPORT 0
  1144.                                         SUSP NOSUPPORT|FLUSHIN 26 EC
  1145.                                         VALUE|ACK 127 EW VALUE|ACK 23 RP
  1146.                                         VALUE|ACK 18 LNEXT VALUE|ACK 22
  1147.                                         XON VALUE|ACK 17 XOFF VALUE|ACK
  1148.                                         19
  1149.        LINEMODE SLC SYNCH NOSUPPORT|ACK
  1150.        0 AO NOSUPPORT|ACK 15 AYT
  1151.        NOSUPPORT|ACK 0 SUSP
  1152.        NOSUPPORT|ACK|FLUSHIN 26
  1153.        [ The user decides to import the remote sides default special
  1154.          characters.  ]
  1155.        LINEMODE SLC 0 DEFAULT 0
  1156.                                         LINEMODE SLC IP
  1157.                                         VALUE|FLUSHIN|FLUSHOUT 3 ABORT
  1158.                                         VALUE|FLUSHIN|FLUSHOUT 28 EOF
  1159.                                         VALUE 4 EC VALUE 127 EL VALUE 21
  1160.        [ Since these are the same as the current local settings, no
  1161.          response is generated.  ]
  1162.        [ This next example is what would happen if an editor was fired
  1163.          up, that wanted to let the client side do the echoing and
  1164.          buffering of characters, but did not want it to do any line
  1165.          editing, and only forward the data when got a control
  1166.          character.  Note that we have preceded all the the 0377s
  1167.          in the forward mask with an IAC.  ]
  1168.                                         LINEMODE MODE 0
  1169.                                         LINEMODE DO FORWARDMASK IAC 0377
  1170.                                         IAC 0377 IAC 0377 IAC 0377 0 0 0
  1171.                                         0 0 0 0 0 0 0 0 01
  1172.        LINEMODE MODE 0
  1173.        LINEMODE WILL FORWARDMASK
  1174.        [ Application runs to completion, and then things are to be set
  1175.  
  1176.  
  1177.  
  1178. Telnet Working Group                                           [Page 21]
  1179.  
  1180. RFC 1184                 Telnet Linemode Option             October 1990
  1181.  
  1182.  
  1183.          back to what they were before.  ]
  1184.                                         LINEMODE MODE EDIT|TRAPSIG
  1185.                                         LINEMODE DONT FORWARDMASK
  1186.        LINEMODE MODE EDIT|TRAPSIG
  1187.        LINEMODE WONT FORWARDMASK
  1188.  
  1189. 6.  Other Telnet options and RFCs
  1190.  
  1191.    The following is a list of RFCs for various Telnet options that
  1192.    should be supported along with LINEMODE.
  1193.  
  1194.    1.  Postel, J. and Reynolds, J., "TELNET PROTOCOL SPECIFICATION",
  1195.        RFC 854, ISI, May 1983.
  1196.  
  1197.    2.  Postel, J. and Reynolds, J., "TELNET OPTION SPECIFICATIONS",
  1198.        RFC 855, ISI, May 1983.
  1199.  
  1200.    3.  Postel, J. and Reynolds, J., "TELNET BINARY TRANSMISSION",
  1201.        RFC 856, ISI, May 1983.
  1202.  
  1203.    4.  Postel, J. and Reynolds, J., "TELNET ECHO OPTION", RFC 857,
  1204.        ISI, May 1983.
  1205.  
  1206.    5.  Postel, J. and Reynolds, J., "TELNET SUPRESS GO AHEAD OPTION",
  1207.        RFC 858, ISI, May 1983.
  1208.  
  1209.    6.  Postel, J. and Reynolds, J., "TELNET TIMING MARK OPTION",
  1210.        RFC 860, ISI, May 1983.
  1211.  
  1212.    7.  VanBokkeln, J., "Telnet Terminal-Type Option", RFC 1091,
  1213.        FTP Software, Inc., February 1989.
  1214.  
  1215.    8.  Waitzman, D., "Telnet Window Size Option", RFC 1073, BBN STC,
  1216.        October 1988.
  1217.  
  1218.    9.  Hedrick, C., "Telnet Remote Flow Control Option", RFC 1080,
  1219.        Rutgers University, November, 1988.
  1220.  
  1221.   10.  Hedrick, C., "Telnet Terminal Speed Option", RFC 1079, Rutgers
  1222.        University, December, 1988.
  1223.  
  1224.    The following is a list of RFCs that need not be supported for
  1225.    LINEMODE, but which would enhance any TELNET implementation.
  1226.  
  1227.   11.  Postel, J. and Reynolds, J., "TELNET STATUS OPTION", RFC 859,
  1228.        ISI, May 1983.
  1229.  
  1230.   12.  Postel, J. and Reynolds, J., "TELNET END OF RECORD OPTION",
  1231.  
  1232.  
  1233.  
  1234. Telnet Working Group                                           [Page 22]
  1235.  
  1236. RFC 1184                 Telnet Linemode Option             October 1990
  1237.  
  1238.  
  1239.        RFC 885, ISI, December 1983.
  1240.  
  1241.   13.  Silverman, S., "OUTPUT MARKING TELNET OPTION", RFC 933,
  1242.        MITRE-Washington, January 1985.
  1243.  
  1244.   14.  Marcy, G., "Telnet X Display Location Option", RFC 1096,
  1245.        Carnegie Mellon University, March 1989.
  1246.  
  1247. Security Consideratiions
  1248.  
  1249.    Security issues are not discussed in this memo.
  1250.  
  1251. Author's Address
  1252.  
  1253.    David A. Borman
  1254.    Cray Research Inc.
  1255.    655F Lone Oak Drive
  1256.    Eagan, MN 55123
  1257.  
  1258.    Phone: (612) 452-6650
  1259.    EMail: dab@CRAY.COM
  1260.  
  1261.    IETF Telnet WG Mailing List: telnet-ietf@CRAY.COM
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290. Telnet Working Group                                           [Page 23]
  1291.