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

  1. @Part(UXKERMIT,root="KER:KUSER")
  2. @string{-UXversion="@q<3.0(0)>"}
  3. @Chapter<UNIX KERMIT>
  4. @Begin<Description,Leftmargin +12,Indent -12,spread 0>
  5. @i(Authors:)@\Bill Catchings, Bob Cattani, Chris Maio, Columbia University@*
  6. with fixes and contributions from many others.
  7.  
  8. @i(Documentation:)@\Walter Underwood, Ford Aerospace (Palo Alto, CA)
  9.  
  10. @i(Version:)@\@value(-UXversion)
  11.  
  12. @i(Date: )@\August 1984
  13. @end<Description>
  14.  
  15. @label<-kc>
  16. A sample, working implementation of the Kermit "kernel" was written in the
  17. C language, and widely distributed in the @i<Kermit Protocol Manual>.  This
  18. kernel was intended merely to
  19. illustrate the protocol, and did not include a "user interface", nor some of
  20. the fancy features like server support, 8-bit quoting, file warning, timeouts,
  21. etc.  Several sites have added the necessary trappings to make this a
  22. production version of Kermit, usually under the UNIX operating system.
  23.  
  24. The keyword style of user/program interaction favored by Kermit (program types
  25. prompt, user types command followed by operands, program types another prompt,
  26. etc) is contrary to the UNIX style, so UNIX implementations have a style more
  27. familiar to UNIX users.  C versions of Kermit are running successfully on
  28. VAX and PDP-11 UNIX systems, IBM 370-@|compatible mainframes under Amdahl UTS,
  29. and the SUN Microsystems MC68000-@|based and other workstations.
  30.  
  31. UNIX filespecs are of the form
  32. @example<dir1/dir2/dir3/ ... /filename>
  33. where the tokens delimited by slashes form a @i<path name>, and by convention
  34. are each limited to 14 characters in length.  The final token in a path is the
  35. actual file name.  By convention, it is of the form @q<name.type>, but there is
  36. nothing special about the dot separating name and type;
  37. to UNIX it's just another character, and there may be many dots in a filename.
  38.  
  39. In the tradition of UNIX, here's the UNIX KERMIT "man page".
  40.  
  41. @begin<description>
  42. NAME@\kermit - file transfer, virtual terminal over tty link
  43.  
  44. SYNOPSIS@\kermit c[lbphe] [line] [baud] [par] [esc]
  45.  
  46. @\kermit r[ddilbpt] [line] [baud] [par]
  47.  
  48. @\kermit s[ddilbpt] [line] [baud] [par] file ...
  49.  
  50. DESCRIPTION@\@begin<multiple>Kermit provides reliable file transfer and
  51. primitive virtual terminal communication between machines.  It has been
  52. implemented on many different computers.  The files transferred may be
  53. arbitrary ASCII data (7-bit characters) and may be of any length.  Binary
  54. (8-bit) files may also be transferred under most conditions.  The file transfer
  55. protocol uses small (96 character) checksummed packets, with ACK/NACK responses
  56. and timeouts.  Kermit currently uses a five second timeout and ten retries.
  57.  
  58. The Unix Kermit command line is in the style of TAR.
  59. The arguments are a set of flags (no spaces
  60. between the flags), three optional args (which, if included,
  61. must be in the same order as the flags which indicate their
  62. presence), and, if this is a Send operation a list of one or
  63. more files.
  64.  
  65. Kermit has three modes, Connect, Send, and Receive.  The
  66. first is for a virtual terminal connection, the other two
  67. for file transfer.  These modes are specified by the first
  68. flag, which should be c, s, or r, respectively.  Exactly one
  69. mode must be specified.
  70.  
  71. The d flag (debug) makes kermit a bit more verbose.  The
  72. states kermit goes through are printed along with other
  73. traces of its operation.  A second d flag will cause kermit
  74. to give an even more detailed trace.
  75.  
  76. The i flag (image) allows slightly more efficient file
  77. transfer between Unix machines.  Normally (on Kermits
  78. defined to run on Unix systems) newline is mapped to CRLF on
  79. output, CR's are discarded on input, and bytes are masked to
  80. 7 bits.  If this is set, no mapping is done on newlines, and
  81. all eight bits of each byte are sent or received.  This is
  82. the default for all kermits.
  83.  
  84. The l flag (line) specifies the tty line that kermit should use to communicate
  85. with the other machine.  This is specified as a regular filename, like
  86. "/dev/ttyh1".  If no l option is specified, standard input is used and kermit
  87. assumes it is running on the remote host (ie. NOT the machine to which your
  88. terminal is attached).
  89.  
  90. The b flag (baud) sets the baud rate on the line specified
  91. by the l flag.  No changes are made if the b flag is not
  92. used.  Legal speeds are: 110, 150, 300, 1200, 1800, 2400, 4800,
  93. 9600.  Note that this version of kermit supports this option
  94. on Unix systems only.
  95.  
  96. The e flag (escape) allows the user to set the first character of the two
  97. character escape sequence for Connect mode.  When the escape character is
  98. typed, kermit will hold it and wait for the next character.  If the next
  99. character is c or C, kermit will close the connection with the remote host.  If
  100. the second character is the same as the escape character, the escape character
  101. itself is passed.  Any character other than these two results in a bell being
  102. sent to the user's terminal and no characters passwd to the remote host.  All
  103. other typed characters are passed through unchanged.  The default escape
  104. character is '^'.
  105.  
  106. The p flag (parity) allows parity to be set on outgoing packets and
  107. stripped on incoming ones.  This is useful for communicating with IBM
  108. hosts or over networks, such as TELENET, that usurp the parity bit.
  109. The possible values for parity are mark, space, even, odd or none (the
  110. default). 
  111.  
  112. The t flag (turnaround) tells Kermit while in protocol mode (sending
  113. or receiving) to wait for a turnaround character (XON) from the other
  114. host after receiving every packet.  This is necessary to run Kermit
  115. with a half duplex host such as an IBM mainframe.
  116.  
  117. The h flag (half duplex) makes Kermit echo locally any characters
  118. typed in connect mode.  This is also necessary to communicate with a
  119. half duplex system like an IBM 370.
  120.  
  121. The file arguments are only meaningful to a Send kermit.
  122. The Receiving kermit will attempt to store the file with the
  123. same name that was used to send it.  Unix 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 (/) kermit will strip off the leading
  127. part of the name through the last slash.
  128.  @end<multiple>
  129.  
  130. EXAMPLE@\@begin<multiple>For this example we will assume two Unix machines.  We
  131. are logged onto "unixa" (the local machine), and want to communicate with
  132. "unixb" (the remote machine).  There is a modem on "/dev/tty03".
  133.  
  134. We want to connect to "unixb", then transfer "file1" to that
  135. machine.
  136.  
  137. We type:
  138. @example<kermit clb /dev/tty03 1200>
  139.  
  140. Kermit answers:
  141. @example<Kermit: connected...>
  142.  
  143. Now we dial the remote machine and connect the modem.  Anything typed on the
  144. terminal will be sent to the remote machine and any output from that machine
  145. will be displayed on our terminal.  We hit RETURN, get a "login:" prompt and
  146. login.
  147.  
  148. Now we need to start a kermit on the remote machine so that
  149. we can send the file over.  First we start up the remote,
  150. (in this case receiving) kermit, then the local, (sending)
  151. one.  Remember that we are talking to unixb right now.
  152.  
  153. We type:
  154. @example(kermit r)
  155. (there is now a Receive kermit on unixb)
  156.  
  157. We type @q<^> (the escape character) and then the letter c to kill the
  158. local (Connecting) kermit:
  159. @q<^C>
  160.  
  161. Kermit answers:
  162. @example<Kermit: disconnected.>
  163.  
  164. We type:
  165. @example<kermit slb /dev/tty03 1200 file1>
  166.  
  167. Kermit answers:
  168. @example<Sending file1 as FILE1>
  169.  
  170. When the transmission is finished, kermit will type either
  171. "Send complete", or "Send failed.", depending on the success
  172. of the transfer.  If we now wanted to transfer a file from
  173. unixb (remote) to unixa (local), we would use these commands:
  174.  
  175. @begin<example>
  176. kermit clb /dev/tty03 1200
  177.   @i<(connected to unixb)>
  178. kermit s file9
  179.   ^c @i<(up-arrow c not control-c)>
  180.      @i<(talking to unixa again)>
  181. kermit rl /dev/tty03 1200
  182. @end<example>
  183. After all the transfers were done, we should connect again,
  184. log off of unixb, kill the Connect kermit and hang up the
  185. phone.
  186. @end<multiple>
  187.  
  188. FEATURES@\Kermit can interact strangely with the tty driver.  In particular, a
  189. tty with "hangup on last close" set (stty hup), will reset to 300 Baud between
  190. kermit commands.  It will also hang up a modem at that time.  It is better to
  191. run with "stty -hup", and use "stty 0" to explicitly hang up the modem.
  192.  
  193. @\The KERMIT Protocol uses only printing ASCII characters, Ctrl-A, and CRLF.
  194. Ctrl-S/Ctrl-Q flow control can be used "underneath" the Kermit protocol (TANDEM
  195. line discipline on Berkeley Unix).
  196.  
  197. @\Since BREAK is not an ASCII character, kermit cannot send a BREAK to the
  198. remote machine.  On some systems, a BREAK will be read as a NUL.
  199.  
  200. @\This kermit does have timeouts when run under Unix, so the protocol is stable
  201. when communicating with "dumb" kermits (that don't have timeouts).
  202.  
  203. DIAGNOSTICS@\@begin<multiple>@i<cannot open device>@*
  204.           The file named in the line argument did not exist or
  205.           had the wrong permissions.
  206.  
  207.      @i<bad line speed>@*
  208.           The baud argument was not a legal speed.
  209.  
  210.      @i<Could not create file>@*
  211.           A Receive kermit could not create the file being sent
  212.           to it.
  213.  
  214.      @i<nothing to connect to>@*
  215.           A Connect kermit was started without a line argument.
  216. @end<multiple>
  217. @end<description>
  218.