home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / e / id-tko-00.txt < prev    next >
Text File  |  2020-01-01  |  17KB  |  445 lines

  1. Internet Engineering Task Force                        Jeffrey E. Altman
  2. INTERNET-DRAFT                                             Frank da Cruz
  3. <draft-altman-telnet-kermit-server-00.txt>           Columbia University
  4.                                                            7 August 1998
  5.                                                Expires: 12 February 1999
  6.  
  7.  
  8.                           TELNET KERMIT OPTION
  9.  
  10.                                 DRAFT 00
  11.  
  12. STATUS OF THIS MEMO
  13.  
  14. This document is an Internet-Draft.  Internet-Drafts are working
  15. documents of the Internet Engineering Task Force (IETF), its areas, and
  16. its working groups.  Note that other groups may also distribute working
  17. documents as Internet-Drafts.
  18.  
  19. Internet-Drafts are draft documents valid for a maximum of six months
  20. and may be updated, replaced, or obsoleted by other documents at any
  21. time.  It is inappropriate to use Internet-Drafts as reference material
  22. or to cite them other than as "work in progress".
  23.  
  24. To view the entire list of current Internet-Drafts, please check the
  25. "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
  26. Directories on ftp.is.ca.za (Africa), ftp.nordu.net (Northern Europe),
  27. ftp.nis.garr.it (Southern Europe), munnari.oz.au (Pacific Rim),
  28. ftp.ietf.org (US East Coast), or ftp.isi.edu (US West Coast).
  29.  
  30.  
  31. ABSTRACT
  32.  
  33. This memo proposes an optional extension to the Telnet protocol to allow
  34. the negotiation, coordination, and use of the Kermit file transfer and
  35. management protocol within a Telnet session.
  36.  
  37.  
  38. CONTENTS
  39.  
  40.   1. INTRODUCTION
  41.   2. DEFINITIONS
  42.   3. TELNET KERMIT OPTION
  43.   4. KERMIT PROTOCOL IMPLICATIONS
  44.   5. EXAMPLES
  45.   5.1. EXAMPLE 1
  46.   5.2. EXAMPLE 2
  47.   5.3. EXAMPLE 3
  48.   5.4. EXAMPLE 4
  49.   5.5. EXAMPLE 5
  50.   6. REFERENCES
  51.   7. AUTHORS' ADDRESS
  52.  
  53.  
  54. 1. INTRODUCTION
  55.  
  56. The Kermit protocol [KER] performs error-corrected file transfer and
  57. management over many types of connections, including terminal
  58. connections, among diverse hardware and software platforms.  It is
  59. supported by a large number of Telnet clients and is also widely
  60. available on the Internet hosts to which Telnet connections are made.
  61.  
  62. Traditionally, the Kermit protocol connection is started manually by a
  63. user, or perhaps by an automated script.  It is the user's
  64. responsibility to start the Kermit server on one end of the connection
  65. and the Kermit client on the other, or to start a Kermit "send"
  66. operation on one end and a Kermit "receive" on the other.
  67.  
  68. This procedure grew out of necessity on ordinary direct-dial
  69. connections, and serves its purpose within the limitations of that
  70. context.  But it introduces timing and dexterity problems, and lacks an
  71. effective way for each Kermit program to determine the "mode" of the
  72. other, or even its very presence, and therefore to know with certainty
  73. which operations and procedures are legal on the connection at any given
  74. time.
  75.  
  76. When Kermit services are offered on the Internet, however, a strong
  77. coupling can be established between the two end applications by having
  78. the Telnet protocol [TEL] serve as a supervisor for Kermit sessions,
  79. ensuring that a valid and known relationship is always obtained.  Kermit
  80. sessions are, in effect, embedded within Telnet sessions, with Telnet
  81. providing the mechanism for starting and stopping them and defining
  82. which end is the Kermit client and which is the Kermit server, possibly
  83. changing the relationship in response to user actions.
  84.  
  85. Kermit clients and servers that implement the Telnet Kermit Option can
  86. form the basis of a new Internet Kermit Service, described in a separate
  87. Internet Draft [IKS].
  88.  
  89. This draft assumes knowledge of Transmission Control Protocol, the
  90. Telnet Protocol [TEL], and the Kermit File Transfer Protocol [KER].
  91.  
  92. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  93. "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
  94. document are to be interpreted as described in RFC 2119 [BCP].
  95.  
  96. 2. DEFINITIONS
  97.  
  98. Kermit server
  99.   A software program that is ready to accept and act upon commands in
  100.   the form of well-defined Kermit packets [KER].
  101.  
  102. Kermit client
  103.   A software program that receives requests through its user interface
  104.   from a human agent (or a script or other source) and translates them to
  105.   command packets, which it sends to a Kermit server, thus initiating a
  106.   Kermit protocol transaction such as the transfer of one or more files.
  107.  
  108. Availability of Kermit server
  109.   For the purposes of this document, a Kermit server is said to be
  110.   available if, through the negotiations described herein, its Telnet
  111.   partner knows that it is a Kermit server.
  112.  
  113.  
  114. 3. TELNET KERMIT OPTION
  115.  
  116. Support for a Kermit server is negotiated separately in each direction,
  117. allowing Kermit service to be embedded in the Telnet client, the Telnet
  118. server, or in both.  The proposed Telnet extensions are, therefore,
  119. symmetrical.
  120.  
  121. When the connection is first opened, Kermit service is unavailable in
  122. both directions.
  123.  
  124. The availability of Kermit service is negotiated using the following
  125. Telnet option:
  126.  
  127.   KERMIT           47 (or other number assigned by IANA)
  128.  
  129. NOTE: 47 is currently the lowest unassigned Telnet Option number,
  130. but by the time you read this, it might well be assigned to some other
  131. option.  As noted above, do not consider this draft an authoritative
  132. source of information.
  133.  
  134. The state of the connection is controlled by the following Telnet
  135. subnegotiation function codes:
  136.  
  137.   START-SERVER      0
  138.   STOP-SERVER       1
  139.   REQ-START-SERVER  2
  140.   REQ-STOP-SERVER   3
  141.   SOP               4
  142.  
  143. The KERMIT OPTION is negotiated using the standard Telnet mechanisms:
  144.  
  145. IAC WILL KERMIT
  146.   The sender of this command incorporates a Kermit server and is willing
  147.   to negotiate its use.
  148.  
  149. IAC WONT KERMIT
  150.   The sender of this command does not incorporate a Kermit server or
  151.   refuses to negotiate its use.
  152.  
  153. IAC DO KERMIT
  154.   The sender of this command requests that the receiver negotiate use of
  155.   a Kermit server.
  156.  
  157. IAC DONT KERMIT
  158.   The sender of this command refuses to negotiate the use of a Kermit
  159.   server.
  160.  
  161. Once WILL KERMIT is negotiated in a particular direction, subnegotiations
  162. are used to indicate or request a change in state of the connection, or to
  163. convey other information.  Subnegotiations may be sent at any time.
  164.  
  165. IAC SB KERMIT START-SERVER
  166.   This command is sent by the WILL side to indicate that the Kermit
  167.   server is now active; that is, that client-initiated Kermit packets
  168.   will be accepted.
  169.  
  170. IAC SB KERMIT STOP-SERVER
  171.   This command is sent by the WILL side to indicate that the Kermit
  172.   server is no longer active, and therefore that it is not ready to
  173.   accept Kermit packets.
  174.  
  175. IAC SB KERMIT REQ-START-SERVER
  176.   This command is sent by the DO side to request that the Kermit server
  177.   be started.
  178.  
  179. IAC SB KERMIT REQ-STOP-SERVER
  180.   This command is sent by the DO side to request that the Kermit server
  181.   be stopped.
  182.  
  183. IAC SB KERMIT SOP <octet>
  184.   Kermit Start Of Packet.  The sender of this command specifies the
  185.   octet it will use to mark the beginning of the Kermit packets it
  186.   sends.  This command must be sent by each connection partner upon the
  187.   first WILL/DO pair to allow unambigious identification of Kermit
  188.   packets in the data stream.  This subnegotiation must be sent whenever
  189.   the Start of Packet character changes.  The values are restricted to
  190.   ASCII C0 control characters other than Carriage Return and NUL.  The
  191.   normal value is 1 (ASCII SOH).  The two Kermit partners normally use
  192.   the same SOP, but may use distinct ones if desired.
  193.  
  194. IAC SB KERMIT SOP is necessary to allow each Telnet partner to recognize
  195. subsequent incoming Kermit packets.  Data following the SOP is processed
  196. by the Kermit packet analyzer.  All other Kermit protocol parameters are
  197. automatically negotiated within the Kermit protocol upon the initial
  198. exchange of Kermit packets [KER].
  199.  
  200. START-SERVER and STOP-SERVER commands must be sent by the WILL side
  201. whenever the state of the Kermit server changes.  Therefore, by
  202. definition, the Kermit server is unavailable at the beginning of
  203. negotiations.
  204.  
  205. The receiver of a REQ-START-SERVER or REQ-STOP-SERVER is not required to
  206. agree to the request to change state.  The receiver must respond with
  207. either START-SERVER or STOP-SERVER to indicate the state of the Kermit
  208. Server subsequent to the request.
  209.  
  210. If the Kermit server receives a Kermit packet commanding it to cease
  211. Kermit service (such as a FINISH, REMOTE EXIT or BYE packet [KER]), it
  212. must send IAC SB KERMIT STOP-SERVER if the command is accepted.
  213.  
  214. These rules ensure that the Telnet client's user interface always knows
  215. whether (and on which end) a Kermit server is available, and can
  216. therefore present the user only with valid choices, and that changes in
  217. state of one Telnet partner automatically switch the other to a
  218. complementary and valid state.
  219.  
  220.  
  221. 4. KERMIT PROTOCOL IMPLICATIONS
  222.  
  223. The Kermit protocol is described elsewhere [KER].  It is an extensible
  224. and self-configuring protocol, like Telnet, and thus any two proper
  225. Kermit implementations should interoperate automatically.
  226.  
  227. In Kermit, as in Telnet, one particular octet is distinguished.  In
  228. Telnet's case, it is IAC (decimal 255); in Kermit's it is the character
  229. specified by the IAC SB KERMIT SOP negotiation, normally SOH (decimal 1,
  230. Ctrl-A).  All Kermit packets must begin with the SOP, and must not
  231. contain IAC unless it is quoted with another IAC according to Telnet
  232. rules (or else transformed and quoted according to Kermit rules).
  233.  
  234. Telnet protocol takes precedence over Kermit protocol; whenever an IAC
  235. is detected, it is processed as the beginning of a Telnet command.
  236. Telnet commands can contain any characters at all, including the SOP
  237. octet, transparently to the Kermit protocol, and in fact Telnet commands
  238. are not seen by the Kermit protocol at all.
  239.  
  240. Kermit protocol must follow Telnet NVT rules in each direction when
  241. Telnet binary mode is not negotiated for that direction.
  242.  
  243. If 8-bit transparency is desired, Telnet binary mode may be negotiated
  244. upon entry to Kermit protocol in the appropriate direction, and the
  245. previous mode (NVT or binary) restored upon exit from Kermit protocol.
  246. Telnet binary mode can result in more efficient transfers, but is not
  247. required for data transfer, since Kermit protocol does not require a
  248. transparent path.
  249.  
  250.  
  251. 5. EXAMPLES
  252.  
  253. 5.1. EXAMPLE 1
  254.  
  255. The Telnet server contains a Kermit server.  The Telnet client includes
  256. Kermit protocol but does not implement the Telnet KERMIT Option.
  257.  
  258.   Telnet Server                   Telnet Client
  259.   -----------------------------   -----------------------------
  260.   <starts negotiations>
  261.   WILL KERMIT
  262.   DO KERMIT
  263.                                   <responds to negotiations>
  264.                                   DONT KERMIT
  265.                                   WONT KERMIT
  266.  
  267. From this point, no subnegotiations take place, and the Kermit
  268. client/server relationship is under manual control of the user of the
  269. Telnet client.  This will be the case (for example) with existing
  270. Kermit-capable Telnet clients.
  271.  
  272. 5.2. EXAMPLE 2
  273.  
  274. The Telnet server contains a Kermit server and starts a Kermit server
  275. immediately after a connection is made.  The Telnet client does not
  276. offer a Kermit server.
  277.  
  278.   Telnet Server                   Telnet Client
  279.   -----------------------------   -----------------------------
  280.   <starts negotiations>
  281.   WILL KERMIT
  282.   DO KERMIT
  283.                                   <responds to negotiations>
  284.                                   DO KERMIT
  285.                                   SB KERMIT SOP <0x01>
  286.                                   WONT KERMIT
  287.   SB KERMIT SOP <0x01>
  288.  
  289.   <starts Kermit Server>
  290.   SB KERMIT START-SERVER
  291.  
  292. At this point the Telnet client knows that a Kermit server is on the
  293. other end of the connection, and so may customize its command set or
  294. menus to allow only those commands that are valid as a client of a
  295. Kermit server.
  296.  
  297. 5.3. EXAMPLE 3
  298.  
  299. Telnet server and Telnet client both contain a Kermit server.  Telnet
  300. client Kermit server is active whenever its terminal emulator is active,
  301. and not active at other times.  The Telnet server is used for shell
  302. access and does not start a Kermit Server unless requested.
  303.  
  304.   Telnet Server                 Telnet Client
  305.   ---------------------------   -----------------------------
  306.   <starts negotiations>
  307.   WILL KERMIT
  308.   DO KERMIT
  309.                                 <responds to negotiations>
  310.                                 DO KERMIT
  311.                                 SB KERMIT SOP <0x01>
  312.                                 WILL KERMIT
  313.   SB KERMIT SOP <0x01>
  314.                                 <telnet client enters terminal emulator>
  315.                                 SB KERMIT START-SERVER
  316.  
  317.                                 <client leaves terminal emulator>
  318.                                 SB KERMIT STOP-SERVER
  319.  
  320.                                 <client requests Kermit service>
  321.                                 SB KERMIT REQ-START-SERVER
  322.   <starts Kermit server>
  323.   SB KERMIT START-SERVER
  324.                                 <client sends Kermit FINISH packet>
  325.   <stops Kermit server>
  326.   SB KERMIT STOP-SERVER
  327.                                 <client returns to terminal emulator>
  328.                                 SB KERMIT START-SERVER
  329.  
  330.  
  331. 5.4. EXAMPLE 4
  332.  
  333. Telnet server and Telnet client both contain a Kermit server.  Telnet
  334. client's Kermit server is active whenever the terminal emulator is
  335. active.  Telnet server is used solely for Kermit protocol and
  336. automatically starts a Kermit Server upon accepting the connection.
  337.  
  338.   Telnet Server                 Telnet Client
  339.   ---------------------------   -----------------------------
  340.   <starts negotiations>
  341.   WILL KERMIT
  342.   DO KERMIT
  343.                                 <responds to negotiations>
  344.                                 DO KERMIT
  345.                                 SB KERMIT SOP <0x01>
  346.                                 WILL KERMIT
  347.  
  348.   SB KERMIT SOP <0x01>
  349.                                 <client enters terminal emulator>
  350.                                 SB KERMIT START-SERVER
  351.  
  352.   <in response to DO>
  353.   SB KERMIT SOP <0x01>
  354.   SB KERMIT START-SERVER
  355.                                 <client restricts command set to
  356.                                  Kermit protocol commands>
  357.                                 SB KERMIT STOP-SERVER
  358.  
  359.                                 <client performs Kermit protocol
  360.                                  operations>
  361.  
  362.                                 <client want to enter terminal mode>
  363.                                 SB KERMIT REQ-STOP-SERVER
  364.  
  365.   <Kermit Server refuses>
  366.   SB KERMIT START-SERVER
  367.  
  368.  
  369. 5.5. EXAMPLE 5
  370.  
  371. This is an example of something that should not be allowed to happen.
  372. Some Telnet clients that implement file transfer capabilities are
  373. designed to accept incoming connections.  In this situation the Telnet
  374. Client acts as a pseudo Telnet Server but without the ability to provide
  375. shell access or many of the other functions associated with Telnet.  If
  376. both Telnet clients support this option and contain a Kermit server that
  377. is active during terminal emulation there is the potential for a
  378. deadlock situation if scripting is also supported.  This is because
  379. Telnet clients that support a script language do not process input while
  380. waiting for the next command to be issued.
  381.  
  382.   Telnet Client One             Telnet Client Two
  383.   ---------------------------   -----------------------------
  384.   <starts negotiations>
  385.   WILL KERMIT
  386.   DO KERMIT
  387.                                 <responds to WILL>
  388.                                 DO KERMIT
  389.                                 SB KERMIT SOP <0x01>
  390.  
  391.   <in response to DO>
  392.   SB KERMIT SOP <0x01>
  393.   SB KERMIT START-SERVER
  394.                                 <responds to DO>
  395.                                 WILL KERMIT
  396.                                 SB KERMIT START-SERVER
  397.  
  398.   <client one restricts command
  399.    set to Kermit protocol and
  400.    disables Kermit Server>
  401.   SB KERMIT STOP-SERVER
  402.                                 <client two restricts command
  403.                                  set to Kermit protocol and
  404.                                  disables Kermit Server>
  405.                                 SB KERMIT STOP-SERVER
  406.  
  407. At this point both clients have restricted their command set to Kermit
  408. Protocol commands.  However, in both cases neither side is processing
  409. input.  Therefore the following restriction MUST be enforced: A Telnet
  410. partner may not restrict the command set if it accepted the incoming
  411. connection.
  412.  
  413.  
  414. 6. REFERENCES
  415.  
  416. [BCP] Bradner, Scott, RFC 2119, "Best Current Practice", March 1997.
  417.  
  418. [KER] da Cruz, Frank, "Kermit, A File Transfer Protocol", Digital Press/
  419.       Butterworth Heinemann, Newton, MA, ISBN 0-932376-88-6 (1987).
  420.  
  421. [IKS] da Cruz, Frank, and Jeffrey E. Altman, "Internet Kermit Service",
  422.       Internet Draft <draft-columbia-kermit-service-00.txt>,
  423.       August 1998.
  424.  
  425. [TEL] Postel, J., and J. Reynolds, "Telnet Protocol Specification",
  426.       RFC854, May 1983, et seq.
  427.  
  428.  
  429. 7. AUTHORS' ADDRESS
  430.  
  431. Jeffrey E. Altman
  432. jaltman@columbia.edu
  433.  
  434. Frank da Cruz
  435. fdc@columbia.edu
  436.  
  437. The Kermit Project
  438. Columbia University
  439. 612 West 115th Street
  440. New York NY 10025-7799
  441. USA
  442. http://www.columbia.edu/kermit/
  443.  
  444. (End)
  445.