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

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