home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / os9 / os9ker.mss < prev    next >
Text File  |  2020-01-01  |  9KB  |  221 lines

  1. @begin(comment)
  2. @Part(OS9KERMIT,root="USER")
  3. @Chapter<OS9 KERMIT>
  4. @end(comment)
  5. @Begin<Description,Leftmargin +12,Indent -12,spread 0>
  6. @i(Authors:)@\Bill Catchings, Bob Cattani, Chris Maio, Columbia University@*
  7. Modified from UNIX Kermit to Os9 Kermit By Glean Seaton and Robert A. Larson@*
  8. with fixes and contributions from many others.
  9.  
  10. @i(Documentation:)@\Walter Underwood, Ford Aerospace (Palo Alto, CA)@*
  11. Changed for Os9 Kermit by Robert A. Larson
  12.  
  13. @i(Version:)@\1.5
  14.  
  15. @i(Date: )@\July 1985
  16. @end<Description>
  17.  
  18. @label<-kc>
  19. A sample, working implementation of the Kermit "kernel" was written in the
  20. C language, and widely distributed in the @i<Kermit Protocol Manual>.  This
  21. kernel was intended merely to
  22. illustrate the protocol, and did not include a "user interface", nor some of
  23. the fancy features like server support, 8-bit quoting, file warning, timeouts,
  24. etc.  Several sites have added the necessary trappings to make this a
  25. production version of Kermit, usually under the UNIX operating system.
  26. Limited server functions have also been added to the Os9 version.
  27.  
  28. The keyword style of user/program interaction favored by Kermit (program types
  29. prompt, user types command followed by operands, program types another prompt,
  30. etc) is contrary to the UNIX style, so UNIX implementations have a style more
  31. familiar to UNIX users.  The Os9 version has retained this style of command
  32. interface.  C versions of Kermit are running successfully on
  33. VAX and PDP-11 UNIX systems, IBM 370-@|compatible mainframes under Amdahl UTS,
  34. and the SUN Microsystems MC68000-@|based and other workstations.
  35.  
  36. There is a new version of Kermit written in C called C-Kermit.  (The current
  37. version as of July 1985 is 4c.)  It is recommended for Unix and adapting to
  38. other operating systems if memory is adiquate.  (It is being adapted to
  39. Os9/68000, but is probably to large for Os9/6809.)
  40.  
  41. Os9 filespecs are of the form
  42. @example<dir1/dir2/dir3/ ... /filename>
  43. where the tokens delimited by slashes form a @i<path name>, and 
  44. are each limited to 29 characters in length.  The final token in a path is the
  45. actual file name.  By convention, it is of the form name.type, but there is
  46. nothing special about the dot separating name and type;
  47. to Os9 it's just another character, and there may be many dots in a filename.
  48.  
  49. In the tradition of UNIX, here's the Os9 KERMIT "man page".
  50.  
  51. @begin<description>
  52. NAME@\kermit - file transfer, virtual terminal over tty link
  53.  
  54. SYNOPSIS@\kermit cl[e] line [esc]
  55.  
  56. @\kermit r[ddifl] [line] 
  57.  
  58. @\kermit s[ddifl] [line] file ...
  59.  
  60. @\kermit gl[ddif] line file ...
  61.  
  62. @\kermit ql[ddif] line
  63.  
  64. @\kermit h[ddifl] [line]
  65.  
  66. DESCRIPTION@\@begin<multiple>Kermit provides reliable file transfer and
  67. primitive virtual terminal communication between machines.  It has been
  68. implemented on many different computers, including microprocessors (see below).
  69. The files transferred may be arbitrary ASCII data (7-bit characters) and may be
  70. of any length.  The file transfer protocol uses small (96 character)
  71. check summed packets, with ACK/NACK responses and timeouts.  
  72. Os9 Kermit by defaults (changeable by compilation options)
  73. uses a fifteen "second" timeout and ten retries.
  74.  
  75. The arguments to kermit are a set of flags (no spaces
  76. between the flags), three optional args (which, if included,
  77. must be in the same order as the flags which indicate their
  78. presence), and, if this is a Send or Get operation a list of one or
  79. more files. 
  80.  
  81. Kermit has six modes, Connect, Send, Receive, Get, Quit, and Host.  Connect
  82. is for a virtual terminal connection, Send and Receive may be used to
  83. transfer files in a non-server mode, Send, Get, and Quit are used with
  84. a remote kermit server, and Host is used to make the Os9 system a server
  85. itself.  These modes are specified by the first
  86. flag, which should be c, s, r, g, q, or h respectively.  Exactly one
  87. mode must be specified.
  88.  
  89. The d flag (debug) makes kermit a bit more verbose.  The
  90. states kermit goes through are printed along with other
  91. traces of its operation.  A second, third, and even fourth 
  92. d flag will cause kermit
  93. to give an even more detailed trace.
  94.  
  95. The i flag (image) allows slightly more efficient file
  96. transfer between Os9 machines.  Normally (on Kermits
  97. defined to run on Os9 systems) return is mapped to CRLF on
  98. output, LF's are discarded on input, and bytes are masked to
  99. 7 bits.  If this is set, no mapping is done on returns, and
  100. all eight bits of each byte are sent or received.  
  101.  
  102. The l flag (line) specifies the tty line that kermit should use to communicate
  103. with the other machine.  This is specified as a regular filename, like
  104. "/t2".  If no l option is specified, standard input is used and kermit
  105. assumes it is running on the remote host (i.e.. NOT the machine to which your
  106. terminal is attached).
  107.  
  108. The e flag (escape) allows the user to set the first character of the two
  109. character escape sequence for Connect mode.  When the escape character is
  110. typed, kermit will hold it and wait for the next character.  If the next
  111. character is c or C, kermit will close the connection with the remote host.  If
  112. the second character is the same as the escape character, the escape character
  113. itself is passed.  An exclamation mark ('!') as the second character will
  114. cause shell to be forked.  (Use your EOF character to return to the kermit
  115. connect mode.)
  116. Any character other than these two results in a bell being
  117. sent to the user's terminal and no characters passed to the remote host.  All
  118. other typed characters are passed through unchanged.  The default escape
  119. character is tilde ('~').  (Control-3 on the standard Coco keyboard.)
  120.  
  121. The file arguments are only meaningful to a Send or Get kermit.
  122. The Receiving kermit will attempt to store the file with the
  123. same name that was used to send it.  Os9 kermits normally
  124. convert outgoing file names to uppercase and incoming ones
  125. to lower case (see the f flag).  If a filename contains a
  126. slash (/) all outgoing kermits will strip off the leading
  127. part of the name through the last slash.  In the Get command, filenames
  128. will be sent to the remote host as is and the filenames sent back will
  129. be converted as usual for a receiving kermit.  (Wildcard characters
  130. may be expanded on the remote end.)
  131.  
  132. The Quit command will send a "Generic Finish" packet to the remote
  133. kermit server.
  134.  
  135. The Host command has not been fully implemented and tested as of this
  136. writing.
  137. @end<multiple>
  138.  
  139. EXAMPLE@\@begin<multiple>For this example we will assume two Os9 machines.  We
  140. are logged onto "Os9a" (the local machine), and want to communicate with
  141. "Os9b" (the remote machine).  There is a modem on "/t2".
  142.  
  143. We want to connect to "Os9b", then transfer "file1" to that
  144. machine.
  145.  
  146. We type:
  147. @example<kermit cl /t2>
  148.  
  149. Kermit answers:
  150. @example<Kermit: connected...>
  151.  
  152. Now we dial the remote machine and connect the modem.  Anything typed on the
  153. terminal will be sent to the remote machine and any output from that machine
  154. will be displayed on our terminal.  We hit RETURN, get a "login:" prompt and
  155. login.
  156.  
  157. Now we need to start a kermit on the remote machine so that
  158. we can send the file over.  First we start up the remote,
  159. (in this case receiving) kermit, then the local, (sending)
  160. one.  Remember that we are talking to Os9b right now.
  161.  
  162. We type:
  163. @example(kermit r)
  164. (there is now a Receive kermit on Os9b)
  165.  
  166. We type ~ (the escape character) and then the letter c to kill the
  167. local (Connecting) kermit:
  168. ~c
  169.  
  170. Kermit answers:
  171. @example<Kermit: disconnected.>
  172.  
  173. We type:
  174. @example<kermit sl /t2 file1>
  175.  
  176. Kermit answers:
  177. @example<Sending file1 as FILE1>
  178.  
  179. When the transmission is finished, kermit will type either
  180. "Send complete", or "Send failed.", depending on the success
  181. of the transfer.  If we now wanted to transfer a file from
  182. os9b (remote) to os9a (local), we would use these commands:
  183.  
  184. @begin<example>
  185. kermit cl /t2
  186.   @i<(connected to Os9b)>
  187. kermit s file9
  188.   ~c @i<(talking to Os9a again)>
  189. kermit rl /t2 
  190. @end<example>
  191. After all the transfers were done, we should connect again,
  192. log off of Os9b, kill the Connect kermit and hang up the
  193. phone.
  194. @end<multiple>
  195.  
  196. FEATURES@\Kermit can interact strangely with the tty driver.
  197.  
  198. @\The KERMIT Protocol uses only printing ASCII characters, Ctrl-A, and CRLF.
  199. Ctrl-S/Ctrl-Q flow control can be used "underneath" the Kermit protocol,
  200. but is not currently implemented in Os9 Kermit.
  201.  
  202. @\Since BREAK is not an ASCII character, kermit cannot send a BREAK to the
  203. remote machine.  On some systems, a BREAK will be read as a NUL.
  204.  
  205. @\This kermit does have timeouts when run under Os9, so the protocol is stable
  206. when communicating with "dumb" kermits (that don't have timeouts).
  207.  
  208. DIAGNOSTICS@\@begin<multiple>@i<cannot open device>@*
  209.           The file named in the line argument did not exist or
  210.           had the wrong permissions.
  211.  
  212.      @i<Could not create file>@*
  213.           A Receive kermit could not create the file being sent
  214.           to it.
  215.  
  216.      @i<nothing to connect to>@*
  217.           A Connect kermit was started without a line argument.
  218. @end<multiple>
  219. @end<description>
  220.  
  221.