home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / rfc / 1 / rfc0559.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  10.4 KB  |  284 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                 Abhay K. Bushan
  8. Request For Comments #559                             MIT Project MAC
  9. NIC # 18482                                           August 15, 1973
  10.  
  11.  
  12.  
  13.        Comments on the new TELNET Protocol and its Implementation
  14.  
  15.  
  16.      We at MIT-DN have implemented the new TELNET protocol (both server
  17. and user).  This RFC describes our experience with the implementation
  18. (particularly the use of GO AHEAD) and in bringing the new User and
  19. Server TELNET's in operation (the new TELNET is not compatible with the
  20. old).  We have a few suggestions here which should help other
  21. implementors and lead to a smoother transition to the new protocol.
  22.  
  23. I. OUR TELNET SERVER IMPLEMENTATION
  24.  
  25.      Our new server TELNET accepts both the "old" and the "new" TELNET
  26. "control sequences".  Currently we have the ECHO and the "Suppress Go
  27. Ahead" options implemented and do the "right thing" to varying degrees
  28. with the Interrupt Process (IP), Erase Character (EC), Abort Output
  29. (AO), Are You There (AYT), Break, and Synch character sequences.
  30.  
  31.  A. The ECHO Option
  32.  
  33.      The TELNET server comes up in the default local echo mode and
  34. accepts both the old and the new TELNET control sequences.  The server
  35. starts the negotiation for remote echo (server echoing) by sending the
  36. sequence "IAC WILL ECHO" but changes the echo mode only when an
  37. affirmative "IAC DO ECHO" is received.  After the cutoff date for old
  38. protocol we will stop "honoring" the old TELNET control sequences.
  39.  
  40.  B. The Go Ahead and Suppress GA option
  41.  
  42.      The server comes up in the send GA mode and transmits the required
  43. "IAC GA" sequence whenever the server detects that it needs to send a
  44. GA.  It should be noted that our scheme for sending GA's works most but
  45. not all of the time.
  46.  
  47.      There is really no reliable way for our server TELNET to find out
  48. when a process is actually waiting for network input.  On our system,
  49. the server TELNET does not "control" user's process, it only acts as a
  50. terminal handler at the TTY level.
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Bushan                                                          [Page 1]
  59.  
  60. RFC 559                    Comments on TELNET                August 1973
  61.  
  62.  
  63.      A quick investigation revealed that the above problem (of sending
  64. GA's reliably) is not confined to the ITS operating system alone.  In
  65. fact TENEX (ref. conversation with Ray Tomlinson) and DEC-10 (ref.
  66. conversation with Ed Taft at Harvard) systems will encounter similar
  67. problems.
  68.  
  69.      Our solution to the GA sending problem was to have the server wait
  70. 2.5 seconds after sending output to see if there is more output to be
  71. sent.  If the server has been "idle" for more than 2.5 seconds in the
  72. "output-sent" state it sends a GA and goes in an I/O wait state (looking
  73. for input or output).  This scheme works most (but not guaranteed all)
  74. of the time and doesn't cause any noticeable delay.  It is possible for
  75. the server to send an extra GA.  Our experimentation revealed that 1-5
  76. seconds was a good range for this "idling time constant".
  77.  
  78.      We do implement the "suppress GA" option and will not send GA to
  79. hosts who agree to negotiate out of it.  Our server tries to negotiate
  80. these suppress GA option.
  81.  
  82.  C. Other Options and TELNET Control Sequences
  83.  
  84.      Our server will refuse all other options by sending the appropriate
  85. DONTs and WONTs.  In addition to the ECHO and Suppress GA options we
  86. recognize the following TELNET "control sequences".
  87.  
  88. 1. Interrupt Process (IP) - The server substitutes the system wide
  89. interrupt character <control-Z> (ACII SUB) which immediately interrupts
  90. the process, moving control to the immediately superior process.  If the
  91. user is several levels down his process tree he may have to send several
  92. IP's to reach top level.  It should be noted that the IP does not
  93. interrupt the running process in the sense a <control-G> interrupts
  94. muddle but only passes control to the superior.
  95.  
  96. 2. Erase Character (EC) - The server substitutes the system wide
  97. standard erase character <rubout> (ACII DEL).  The deletion however is
  98. done not by the server but by the receiving process.  It is conceivable
  99. that some process (such as a user TELNET) take no action on receiving
  100. EC.  Most processes will echo the deleted character(s).  Several EC's
  101. will delete the several previous characters.  (If the console is
  102. declared to be an IMLAC, the deleted character is removed from the
  103. screen).
  104.  
  105. 3. Abort Output (AO) - The server substitutes the character <control-S>
  106. (ACII DC3).  The control-S convention is followed by many but not all of
  107. our programs.  The action taken on receiving AO varies with the program.
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Bushan                                                          [Page 2]
  115.  
  116. RFC 559                    Comments on TELNET                August 1973
  117.  
  118.  
  119. A normal occurrence is that output and the current command are aborted
  120. (without necessarily going to completion).  In many programs there is no
  121. way to stop output except by sending an IP and "killing" the inferior
  122. process.
  123.  
  124. 4. Are You There (AYT) - The server will print the message
  125. "****connections still open*****" preceded and followed by CRLF's upon
  126. receiving an AYT.  At some later time we may report on the state of the
  127. user's job as well.
  128.  
  129. 5. Erase Line (EL) - since we are a character-at-a-time system, the EL
  130. has little meaning on our system and we throw it (and the preceding IAC)
  131. away.
  132.  
  133. 6. Break (BRK) - We substitute three NUL's upon receiving BRK.  This
  134. convention is consistent with what happens when the "Break" key is hit
  135. on local teletypes.  The programs generally do nothing useful when break
  136. is received (except echo "|@|@|@") but sending BRK may cause strange
  137. program reactions, so beware.
  138.  
  139. 7. Synch - Whenever the server receives the synch INS, it flushes all
  140. except the interesting (control sequences) characters till the receipt
  141. of a DM.  We also cause an implicit IP on receipt of SYNCH.
  142.  
  143. 8. We follow the CRLF and CRNUL convention for transmitting EOL and CR
  144. respectively.
  145.  
  146. II. OUR USER-TELNET IMPLEMENTATION
  147.  
  148.      The new user-TELNET (implemented in CALICO NETWORK by using a new
  149. "TELCOM" subroutine), accepts negotiation for the ECHO and suppress GA
  150. options.  The program tries to negotiate out of receiving GA's and tries
  151. the ECHO negotiation if the settings file for the host indicate remote
  152. echo.  Special characters and symbols are defined for EC, EL, AO, AYT,
  153. BRK, SYNCH, IP, and the ESCAPE character to command level.  These
  154. symbols have a default character value which the user can change by
  155. typing the symbol followed by the new character value at NETWRK command
  156. level.  To send EC, EL, etc, the user only has to type the special
  157. character for the function.  In addition the user can send these
  158. characters by using the send.special command at NETWRK command level.
  159. In "line mode", EC and EL do a "local" character and line erase rather
  160. than send the EC and EL to the remote host.  The following are the
  161. default values for the "special" characters in TELNET :
  162.  
  163.      ESCAPE - backslash
  164.      EC - <DEL>
  165.      EL - <CAN> or |X
  166.      AO - |S
  167.  
  168.  
  169.  
  170. Bushan                                                          [Page 3]
  171.  
  172. RFC 559                    Comments on TELNET                August 1973
  173.  
  174.  
  175.      IP - |R
  176.      AYT - |T
  177.      Synch - |Y
  178.      Break - no preassigned value.
  179.  
  180.      The user can change his echo mode by escaping to NETWRK command
  181. level and using the commands "echo.local" or "echo.remote".  Note that
  182. the modes are changed only when the negotiation for mode change is
  183. successful.  In either event the user is notified of the results of the
  184. negotiation.
  185.  
  186. III. INSTALLING THE NEW TELNETS
  187.  
  188.      On Monday July 2, we brought up the user and server TELNETs briefly
  189. to find that most of the hosts did not "recognize" IAC's and did not
  190. honor the new protocol.  Much to our dismay usage of both our server and
  191. user TELNET's was chaotic.  Consequently, we did not install the new
  192. user and server TELNETs, and the old TELNETs remain operational.
  193.  
  194.      The new and the old TELNETs are definitely not compatible.  The
  195. server tries to (and should try to) negotiate out of sending GA's and
  196. also to send echo.  This negotiation causes problems with the
  197. "old-style" user TELNETs.  Also if the negotiation for Suppress GA is
  198. unsuccessfully (which is the case with "old" user-TELNETs) the server
  199. will keep sending IAC GA's when appropriate.  One solution we found to
  200. making our "new" server compatible with "old" user TELNETs was to come
  201. up in a mode that does not start any option negotiation and does not
  202. send GA's unless requested to do so (ie default is to suppress GA"s).
  203. As mentioned earlier the server also accepts the old "TELNET control"
  204. sequences.  This solution makes the server compatible with both the old
  205. and the new user TELNETs (except it violates protocol by not sending
  206. GA's).  We propose to install this server on our socket 1.
  207.  
  208.      To promote experimentation with the new TELNET protocol, we have
  209. installed the new server TELNET on socket 60 (octal 105).  This new
  210. server follows the new protocol (ie it sends GA's) and starts
  211. spontaneous negotiation for remote echo and suppress GA.  The
  212. implementors on other Hosts are encouraged to use this service to debug
  213. their user TELNETs (and our server).  We feel that transition to the new
  214. protocol will be smoother if new TELNET servers are brought up on
  215. experimental sockets.  We are also willing to help debug other servers
  216. from our User TELNET.
  217.  
  218.      Finally we would like to lobby for making suppress GA the default
  219. (as our present server on socket 1).  It appears that only a few Hosts
  220. require the GA's (AMES-67 and UCLA-CON).  It seems to me that the reason
  221. why sending GA is default in the current specification of protocol is
  222. that representatives from the concerned Hosts wanted the GA to be
  223.  
  224.  
  225.  
  226. Bushan                                                          [Page 4]
  227.  
  228. RFC 559                    Comments on TELNET                August 1973
  229.  
  230.  
  231. implemented.  It doesn't matter to them if sending GA or suppress GA is
  232. default, as long as they can get a remote server to send a GA.  The
  233. protocol can be so specified as to require every one to implement a
  234. "send GA option".  Making "suppress GA" the default will have the
  235. advantage that it will obviate unnecessary negotiation in a great
  236. majority of cases.  Another advantage is that not sending GA's makes the
  237. new server compatible with both old and new user TELNETs.
  238.  
  239.  
  240.        [ This RFC was put into machine readable form for entry ]
  241.          [ into the online RFC archives by Serge Hallyn 9/97 ]
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282. Bushan                                                          [Page 5]
  283.  
  284.