home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ckc072.zip / ckuker.doc < prev    next >
Text File  |  1989-02-06  |  101KB  |  2,093 lines

  1.  
  2.                               C-KERMIT USER GUIDE
  3.  
  4.  
  5.                 FOR UNIX, VMS, AND MANY OTHER OPERATING SYSTEMS
  6.  
  7.                                 Version 4E(072)
  8.  
  9.                             C. Gianone, F. da Cruz
  10.  
  11.               Columbia University Center for Computing Activities
  12.                            New York, New York 10027
  13.  
  14.  
  15.                                February 8, 1989
  16.  
  17.  
  18.  
  19.                             Copyright (C) 1981,1988
  20.             Trustees of Columbia University in the City of New York
  21.  
  22.      Permission is granted to any individual or institution to use, copy,
  23.     or redistribute this document so long as it is not sold for profit, and
  24.                   provided this copyright notice is retained.
  25.  
  26.  
  27.  
  28. 1. UNIX KERMIT
  29.  
  30. ********
  31. This document is formatted as an ordinary, plain text ASCII disk file.  Typeset
  32. copies are available  in  the  Kermit  User  Guide  from  Columbia  University.
  33. Changes should be made to CKUKER.MSS.
  34. ********
  35.  
  36. Program:    Frank  da  Cruz,  Bill Catchings, Jeff Damens, Columbia University;
  37.             Herm Fischer, Encino CA; contributions by many others.
  38. Language:   C
  39. Documentation:  Christine Gianone, Frank da Cruz
  40. Version:    4E(072)
  41. Date:       February 8, 1989
  42.  
  43. C-Kermit is an implementation of Kermit, written modularly and transportably in
  44. C. The protocol state transition table is written in wart, a  (non-proprietary)
  45. lex-like  preprocessor for C. System-dependent primitive functions are isolated
  46. into separately compiled modules so that the program should be easily  portable
  47. among  Unix systems and also to non-Unix systems that have C compilers, such as
  48. VAX/VMS, Data General AOS/VS, Apollo Aegis, the Apple Macintosh, and  the  Com-
  49. modore  Amiga.   This document applies to Unix implementations of C-Kermit, and
  50. in most ways also to the VMS, Data General, and other implementations.
  51.  
  52.  
  53. Unix Kermit Capabilities At A Glance:
  54.  
  55.   Local operation:                   Yes
  56.   Remote operation:                  Yes
  57.   Login scripts:                     Yes (UUCP style)
  58.   Transfer text files:               Yes
  59.   Transfer binary files:             Yes
  60.   Wildcard send:                     Yes
  61.   File transfer interruption:        Yes
  62.   Filename collision avoidance:      Yes
  63.   Can time out:                      Yes
  64.   8th-bit prefixing:                 Yes
  65.   Repeat count prefixing:            Yes
  66.   Alternate block checks:            Yes
  67.   Terminal emulation:                Yes
  68.   Communication settings:            Yes
  69.   Transmit BREAK:                    Yes (most versions)
  70.   Support for dialout modems:        Yes
  71.   IBM mainframe communication:       Yes
  72.   Transaction logging:               Yes
  73.   Session logging:                   Yes
  74.   Debug logging:                     Yes
  75.   Packet logging:                    Yes
  76.   Act as server:                     Yes
  77.   Talk to server:                    Yes
  78.   Advanced server functions:         Yes
  79.   Local file management:             Yes
  80.   Command/Init files:                Yes
  81.   UUCP and multiuser line locking:   Yes
  82.   Long packets:                      Yes
  83.   Sliding Windows:                   No
  84.   File attributes packets:           No
  85.   Command macros:                    No
  86.   Raw file transmit:                 No
  87.  
  88. All numbers in the C-Kermit documentation are decimal unless noted otherwise.
  89.  
  90. C-Kermit provides traditional Unix command line operation  as  well  as  inter-
  91. active  command  prompting and execution.  The command line options provide ac-
  92. cess to a basic subset of C-Kermit's capabilities; the interactive command  set
  93. is far richer.
  94.  
  95. On  systems  with  dialout  modems,  C-Kermit's command file, DIAL command, and
  96. login script facilities provide a counterpart to UUCP for  file  transfer  with
  97. non-UNIX  operating  systems,  including the use of scheduled (e.g. late night)
  98. unattended operation.
  99.  
  100.  
  101. 1.1. The Unix File System
  102.  
  103. Consult your Unix manual for details about the file system under  your  version
  104. of  Unix.  In general, Unix files have lowercase names, possibly containing one
  105. or more dots or other special characters.   Unix  directories  are  tree-struc-
  106. tured.  Directory levels are separated by slash ("/") characters.  For example,
  107.  
  108.     /usr/foo/bar
  109.  
  110. denotes the file bar in the directory /usr/foo.  Alphabetic case is significant
  111. in  Unix  file and directory names, i.e. "a" is a different file (or directory)
  112. from "A".  Wildcard or "meta" characters allow groups of files to be specified.
  113. "*" matches any string; "?" matches any single character.
  114.  
  115. When  C-Kermit  is  invoked  with  file arguments specified on the Unix command
  116. line, the Unix shell (Bourne Shell, C-Shell, K-Shell,  etc)  expands  the  meta
  117. characters itself, and in this case a wider variety is available.  For example,
  118.  
  119.     kermit -s ~/ck[uvm]*.{upd,bwr}]
  120.  
  121. is expanded by the Berkeley C-Shell into a list of all the files in the  user's
  122. home  directory  (~/) that start with the characters "ck", followed by a single
  123. character "u", "v", or "m", followed by zero or more characters, followed by  a
  124. dot,  followed  by one of the strings "upd" or "bwr".  Internally, the C-Kermit
  125. program itself expands only the "*" and "?" meta characters.
  126.  
  127. Unix files are linear (sequential) streams of 8-bit bytes.  Text files  consist
  128. of 7-bit ASCII characters, with the high-order bit off (0), and lines separated
  129. by the Unix newline character, which is linefeed (LF, ASCII 10).  This  distin-
  130. guishes  Unix text files from those on most other ASCII systems, in which lines
  131. are separated by a carriage-return linefeed sequence (CRLF, ASCII 13,  followed
  132. by  linefeed,  ASCII  10).  Binary files are likely to contain data in the high
  133. bits of the file bytes, and have no particular line or record structure.
  134.  
  135. When transferring files, C-Kermit will convert between  upper  and  lower  case
  136. filenames  and  between LF and CRLF line terminators automatically, unless told
  137. to do otherwise.  When binary files must be transferred, the  program  must  be
  138. instructed  not  to  perform LF/CRLF conversion (-i on the command line or "set
  139. file type binary" interactively; see below).
  140.  
  141.  
  142. 1.2. File Transfer
  143.  
  144. If C-Kermit is in local mode, the screen (stdout)  is  continously  updated  to
  145. show  the  progress  of the file transer.  A dot is printed for every four data
  146. packets, other packets are shown by type:
  147.  
  148.     I Exchange Parameter Information
  149.     R Receive Initiate
  150.     S Send Initiate
  151.     F File Header
  152.     G Generic Server Command
  153.     C Remote Host Command
  154.     N Negative Acknowledgement (NAK)
  155.     E Fatal Error
  156.     T Indicates a timeout occurred
  157.     Q Indicates a damaged, undesired, or illegal packet was received
  158.     % Indicates a packet was retransmitted
  159.  
  160. You may type certain "interrupt" commands during file transfer:
  161.  
  162.     Control-F:  Interrupt the current File, and go on to the next (if any).
  163.     Control-B:  Interrupt the entire Batch of files, terminate the transaction.
  164.     Control-R:  Resend the current packet
  165.     Control-A:  Display a status report for the current transaction.
  166.  
  167. These interrupt characters differ from the ones used in other Kermit  implemen-
  168. tations  to  avoid conflict with commonly used Unix shell interrupt characters.
  169. With Version 7, System III, and System V  implementations  of  Unix,  interrupt
  170. commands must be preceeded by the 'connect' escape character (e.g. normally-\).
  171. Ctrl-F and Ctrl-B are effective only during the transfer of data  (D)  packets,
  172. and cannot be used to interrupt a transfer that has not yet reached that stage.
  173.  
  174.     CAUTION:  If Control-F or Control-B is used to cancel an incoming file,
  175.     and a file of the same name previously existed, and the "file  warning"
  176.     feature  is  not  enabled, then the previous copy of the file will dis-
  177.     appear.
  178.  
  179. EMERGENCY EXIT:  When running Unix Kermit in remote mode, if you have started a
  180. protocol operation (sending or receiving a file, server command wait, etc), you
  181. will not be able to communicate with the terminal in the normal way.   In  par-
  182. ticular,  you  cannot  stop  the  protocol  by typing the normal Unix interrupt
  183. characters, since the terminal has been put in "raw mode".    If  you  need  to
  184. regain  control  quickly  -- for instance, because the protocol is stuck -- you
  185. can type two Control-C's directly to the Unix Kermit program  ("connect"  first
  186. if necessary):
  187.  
  188.     Control-C Control-C
  189.  
  190. This will cause the program to display,
  191.  
  192.     ^C^C...
  193.  
  194. exit, and restore the terminal to normal.
  195.  
  196.  
  197. 1.3. Command Line Operation
  198.  
  199. The  C-Kermit command line syntax conforms to the Proposed Syntax Standards for
  200. Unix System Commands put forth by Kathy Hemenway and Helene  Armitage  of  AT&T
  201. Bell Laboratories in Unix/World, Vol.1, No.3, 1984.  The rules that apply are:
  202.  
  203.    - Command names must be between 2 and 9 characters ("kermit" is 6).
  204.    - Command names must include lower case letters and digits only.
  205.    - An option name is a single character.
  206.    - Options are delimited by '-'.
  207.    - Options  with  no  arguments  may  be  grouped  (bundled)  behind one
  208.      delimiter.
  209.    - Option-arguments cannot be optional.
  210.    - Arguments immediately follow options, separated by whitespace.
  211.    - The order of options does not matter.
  212.    - '-' preceded and followed by whitespace means standard input.
  213.  
  214. A group of bundled options may end with an option that has an argument.
  215.  
  216. The following notation is used in command descriptions:
  217.  
  218. fn      A Unix file specification, possibly containing the  "wildcard"  charac-
  219.         ters  `*'  or  `?' (`*' matches all character strings, `?'  matches any
  220.         single character).
  221.  
  222. fn1     A Unix file specification which may not contain `*' or `?'.
  223.  
  224. rfn     A remote file specification in the remote system's  own  syntax,  which
  225.         may denote a single file or a group of files.
  226.  
  227. rfn1    A remote file specification which should denote only a single file.
  228.  
  229. n       A decimal number between 0 and 94.
  230.  
  231. c       A  decimal  number between 0 and 127 representing the value of an ASCII
  232.         character.
  233.  
  234. cc      A decimal number between 0 and 31, or else  exactly  127,  representing
  235.         the value of an ASCII control character.
  236.  
  237. [ ]     Any field in square braces is optional.
  238.  
  239. {x,y,z} Alternatives are listed in curly braces.
  240.  
  241. C-Kermit  command  line options may specify any combination of actions and set-
  242. tings.  If C-Kermit is invoked with a command line that specifies  no  actions,
  243. then  it  will  issue  a  prompt  and begin interactive dialog.  Action options
  244. specify either protocol transactions or terminal connection.
  245.  
  246. -s fn   Send the specified file or files.    If  fn  contains  wildcard  (meta)
  247.         characters,  the  Unix shell expands it into a list.  If fn is '-' then
  248.         kermit sends from standard input, which may come from a file:
  249.  
  250.             kermit -s - < foo.bar
  251.  
  252.         or a parallel process:
  253.  
  254.             ls -l | grep christin | kermit -s -
  255.  
  256.         You cannot use this mechanism to send terminal typein.  If you want  to
  257.         send  a  file  whose  actual name is "-" you can precede it with a path
  258.         name, as in
  259.  
  260.             kermit -s ./-
  261.  
  262. -r      Receive a file or files.  Wait passively for files to arrive.
  263.  
  264. -k      Receive (passively) a file or files, sending them to  standard  output.
  265.         This option can be used in several ways:
  266.  
  267.         kermit -k
  268.             Displays the incoming files on your screen;  to  be  used  only  in
  269.             "local mode" (see below).
  270.  
  271.         kermit -k > fn1
  272.             Sends the incoming file or files to the named file, fn1.   If  more
  273.             than  one  file  arrives,  all  are  concatenated together into the
  274.             single file fn1.
  275.  
  276.         kermit -k | command
  277.             Pipes the incoming data (single or multiple files) to the indicated
  278.             command, as in
  279.  
  280.                 kermit -k | sort > sorted.stuff
  281.  
  282. -a fn1  If you have specified a file transfer option, you may give an alternate
  283.         name for a single file with the -a ("as") option.  For example,
  284.  
  285.             kermit -s foo -a bar
  286.  
  287.         sends  the file foo telling the receiver that its name is bar.  If more
  288.         than one file arrives or is sent, only the first file  is  affected  by
  289.         the -a option:
  290.  
  291.             kermit -ra baz
  292.  
  293.         stores the first incoming file under the name baz.
  294.  
  295. -x      Begin server operation.  May be used in either local or remote mode.
  296.  
  297. Before  proceeding, a few words about remote and local operation are necessary.
  298. C-Kermit is "local" if it is running on PC or workstation that  you  are  using
  299. directly, or if it is running on a multiuser system and transferring files over
  300. an external communication line -- not your job's controlling terminal  or  con-
  301. sole.   C-Kermit is remote if it is running on a multiuser system and transfer-
  302. ring files over its own controlling  terminal's  communication  line  (normally
  303. /dev/tty), connected to your PC or workstation.
  304.  
  305. If  you  are  running C-Kermit on a PC, it is normally used in local mode, with
  306. the "back port" designated for file transfer and terminal connection.   If  you
  307. are  running C-Kermit on a multiuser (timesharing) system, it is in remote mode
  308. unless you explicitly point it at an external line for file  transfer  or  ter-
  309. minal connection.  The following command sets C-Kermit's "mode":
  310.  
  311. -l dev  Line  --  Specify a terminal line to use for file transfer and terminal
  312.         connection, as in
  313.  
  314.             kermit -l /dev/ttyi5
  315.  
  316. When an external line is being used, you will also need some additional options
  317. for successful communication with the remote system:
  318.  
  319. -b n    Baud  --  Specify the baud rate for the line given in the -l option, as
  320.         in
  321.  
  322.             kermit -l /dev/ttyi5 -b 9600
  323.  
  324.         This option should always be included with the  -l  option,  since  the
  325.         speed of an external line is not necessarily what you expect.
  326.  
  327. -p x    Parity  --  e,o,m,s,n  (even, odd, mark, space, or none).  If parity is
  328.         other than none, then the 8th-bit prefixing mechanism will be used  for
  329.         transferring  8-bit  binary  data, provided the opposite Kermit agrees.
  330.         The default parity is none.
  331.  
  332. -t      Specifies half duplex,  line  turnaround  with  XON  as  the  handshake
  333.         character.
  334.  
  335. The  following  commands may be used only with a C-Kermit which is local either
  336. by default or else because the -l option has been specified.
  337.  
  338. -g rfn  Actively request a remote server to send the named file or  files;  rfn
  339.         is a file specification in the remote host's own syntax.  If fn happens
  340.         to contain any special shell characters, like  space,  '*',  '[',  etc,
  341.         these must be quoted, as in
  342.  
  343.             kermit -g x\*.\?
  344.  
  345.         or
  346.  
  347.             kermit -g "profile exec"
  348.  
  349. -f      Send a 'finish' command to a remote server.
  350.  
  351. -c      Establish  a  terminal  connection  over  the specified or default com-
  352.         munication line, before any protocol transaction takes place.  Get back
  353.         to   the   local  system  by  typing  the  escape  character  (normally
  354.         Control-Backslash) followed by the letter 'c'.
  355.  
  356. -n      Like -c, but after a protocol transaction takes place; -c  and  -n  may
  357.         both  be used in the same command.  The use of -n and -c is illustrated
  358.         below.
  359.  
  360. If the other Kermit is on a remote system, the -l and -b options should also be
  361. included with the -r, -k, or -s options.
  362.  
  363. Several other command-line options are provided:
  364.  
  365. -i      Specifies that files should be sent or received exactly "as is" with no
  366.         conversions.  This option is necessary for transmitting  binary  files.
  367.         It may also be used in Unix-to-Unix transfers (it must be given to both
  368.         Unix Kermit programs), where it will improve performance by circumvent-
  369.         ing  the  normal  text-file conversions, and will allow mixture of text
  370.         and binary files in a single file group.
  371.  
  372. -w      Write-Protect -- Avoid filename collisions for incoming files.
  373.  
  374. -e n    Extended packet length -- Specify that C-Kermit is allowed  to  receive
  375.         packets  up  to length n, where n may be between 10 and some large num-
  376.         ber, like 1000, depending on the system.  The  default  maximum  length
  377.         for  received  packets is 90.  Packets longer than 94 will be used only
  378.         if the other Kermit supports, and agrees  to  use,  the  "long  packet"
  379.         protocol extension.
  380.  
  381. -q      Quiet  --  Suppress screen update during file transfer, for instance to
  382.         allow a file transfer to proceed in the background.
  383.  
  384. -d      Debug -- Record debugging information in the file debug.log in the cur-
  385.         rent  directory.    Use  this option if you believe the program is mis-
  386.         behaving, and show the resulting log to your local Kermit maintainer.
  387.  
  388. -h      Help -- Display a brief synopsis of the command line options.
  389.  
  390. The command line may contain no more than one protocol action option.
  391.  
  392. Files are sent with their own names, except that lowercase letters  are  raised
  393. to upper, pathnames are stripped off, certain special characters like (`~') and
  394. (`#') are changed to `X', and if the file name begins with a period, an `X'  is
  395. inserted  before  it.    Incoming files are stored under their own names except
  396. that uppercase letters are lowered, and, if -w  was  specified,  a  "generation
  397. number"  is  appended  to  the name if it has the same name as an existing file
  398. which would otherwise be overwritten.  If the -a option is included,  then  the
  399. same  rules  apply to its argument.  The file transfer display shows any trans-
  400. formations performed upon filenames.
  401.  
  402. During transmission, files are encoded as follows:
  403.  
  404.    - Control characters are converted to prefixed printables.
  405.  
  406.    - Sequences of repeated characters are collapsed via repeat counts,  if
  407.      the other Kermit is also capable of repeated-character compression.
  408.  
  409.    - If  parity  is  being used on the communication line, data characters
  410.      with the 8th (parity) bit on are  specially  prefixed,  provided  the
  411.      other  Kermit  is  capable of 8th-bit prefixing; if not, 8-bit binary
  412.      files cannot be successfully transferred.
  413.  
  414.    - Conversion is done between Unix newlines and carriage-return-linefeed
  415.      sequences unless the -i option was specified.
  416.  
  417.  
  418. Command Line Examples:
  419.  
  420.     kermit -l /dev/ttyi5 -b 1200 -cn -r
  421.  
  422. This command connects you to the system on the other end of ttyi5 at 1200 baud,
  423. where you presumably log in and run Kermit with a 'send' command.    After  you
  424. escape  back,  C-Kermit  waits  for a file (or files) to arrive.  When the file
  425. transfer is completed, you are reconnected to the remote system so that you can
  426. logout.
  427.  
  428.     kermit -l /dev/ttyi4 -b 1800 -cntp m -r -a foo
  429.  
  430. This  command  is like the preceding one, except the remote system in this case
  431. uses half duplex communication with mark parity.  The first file  that  arrives
  432. is stored under the name foo.
  433.  
  434.     kermit -l /dev/ttyi6 -b 9600 -c | tek
  435.  
  436. This  example  uses  Kermit to connect your terminal to the system at the other
  437. end of ttyi6.  The C-Kermit terminal connection does not provide any particular
  438. terminal   emulation,   so   C-Kermit's   standard   i/o  is  piped  through  a
  439. (hypothetical) program called tek, which performs (say) Tektronix emulation.
  440.  
  441.     kermit -l /dev/ttyi6 -b 9600 -nf
  442.  
  443. This command would be used to shut down a remote server and then connect to the
  444. remote system, in order to log out or to make further use of it.  The -n option
  445. is invoked after -f (-c would have been invoked before).
  446.  
  447.     kermit -l /dev/ttyi6 -b 9600 -qg foo.\* &
  448.  
  449. This command causes C-Kermit to be invoked in the background, getting  a  group
  450. of files from a remote server (note the quoting of the `*' character).  No dis-
  451. play occurs on the screen, and the keyboard is  not  sampled  for  interruption
  452. commands.    This  allows other work to be done while file transfers proceed in
  453. the background.
  454.  
  455.     kermit -l /dev/ttyi6 -b 9600 -g foo.\* > foo.log < /dev/null &
  456.  
  457. This command is like the previous one, except the  file  transfer  display  has
  458. been  redirected  to  the  file foo.log.  Standard input is also redirected, to
  459. prevent C-Kermit from sampling it for interruption commands.
  460.  
  461.     kermit -iwx
  462.  
  463. This command starts up C-Kermit as a server.  Files  are  transmitted  with  no
  464. newline/carriage-return-linefeed conversion; the -i option is necessary for bi-
  465. nary file transfer and recommended for Unix-to-Unix transfers.  Incoming  files
  466. that have the same names as existing files are given new, unique names.
  467.  
  468.     kermit -l /dev/ttyi6 -b 9600
  469.  
  470. This  command  sets  the  communication  line  and  speed.   Since no action is
  471. specified, C-Kermit issues a prompt and enters an interactive dialog with  you.
  472. Any  settings  given on the command line remain in force during the dialog, un-
  473. less explicitly changed.
  474.  
  475.     kermit
  476.  
  477. This command starts up Kermit interactively with all default settings.
  478.  
  479. The next example shows how Unix Kermit might be used to send an  entire  direc-
  480. tory  tree  from  one Unix system to another, using the tar program as Kermit's
  481. standard input and output.  On the orginating system, in this case the  remote,
  482. type (for instance):
  483.  
  484.     tar cf - /usr/fdc | kermit -is -
  485.  
  486. This  causes  tar to send the directory /usr/fdc (and all its files and all its
  487. subdirectories and all their files...) to standard output instead of to a tape;
  488. kermit  receives  this as standard input and sends it as a binary file.  On the
  489. receiving system, in this case the local one, type (for instance):
  490.  
  491.     kermit -il /dev/ttyi5 -b 9600 -k | tar xf -
  492.  
  493. Kermit receives the tar archive, and sends it via standard output  to  its  own
  494. copy of tar, which extracts from it a replica of the original directory tree.
  495.  
  496. A  final example shows how a Unix compression utility might be used to speed up
  497. Kermit file transfers:
  498.  
  499.     compress file | kermit -is -     (sender)
  500.     kermit -ik | uncompress          (receiver)
  501.  
  502. Exit Status Codes:
  503.  
  504. Unix Kermit returns an exit status of zero, except when a fatal  error  is  en-
  505. countered,  where  the  exit  status  is set to one.  With background operation
  506. (e.g., `&' at end of invoking command line) driven by scripted interactive com-
  507. mands  (redirected  standard  input  and/or take files), any failed interactive
  508. command (such as failed dial or script attempt) causes the fatal error exit.
  509.  
  510.  
  511. 1.4. Interactive Operation
  512.  
  513. C-Kermit's interactive command prompt is "C-Kermit>".    In  response  to  this
  514. prompt, you may type any valid interactive C-Kermit command.  C-Kermit executes
  515. the command and then prompts you for another command.   The  process  continues
  516. until you instruct the program to terminate.
  517.  
  518. Commands  begin  with a keyword, normally an English verb, such as "send".  You
  519. may omit trailing characters from any keyword, so  long  as  you  specify  suf-
  520. ficient  characters  to  distinguish  it  from  any other keyword valid in that
  521. field.  Certain commonly-used keywords (such as "send",  "receive",  "connect")
  522. also  have special non-unique abbreviations ("s" for "send", "r" for "receive",
  523. "c" for "connect").
  524.  
  525. Certain characters have special functions during  typein  of  interactive  com-
  526. mands:
  527.  
  528.     ?   Question  mark, typed at any point in a command, will produce a message
  529.         explaining what is possible or expected at that point.    Depending  on
  530.         the  context, the message may be a brief phrase, a menu of keywords, or
  531.         a list of files.
  532.  
  533.     ESC (The Escape or Altmode  key)  --  Request  completion  of  the  current
  534.         keyword  or filename, or insertion of a default value.  The result will
  535.         be a beep if the requested operation fails.
  536.  
  537.     TAB (The horizontal Tab key) -- Same as ESC.
  538.  
  539.     DEL (The Delete or Rubout key) -- Delete the previous  character  from  the
  540.         command.  You may also use BS (Backspace, Control-H) for this function.
  541.  
  542.     ^W  (Control-W) -- Erase the rightmost word from the command line.
  543.  
  544.     ^U  (Control-U) -- Erase the entire command.
  545.  
  546.     ^R  (Control-R) -- Redisplay the current command.
  547.  
  548.     SP  (Space) -- Delimits fields (keywords, filenames, numbers) within a com-
  549.         mand.
  550.  
  551.     CR  (Carriage Return) -- Enters the command for execution.   LF  (Linefeed)
  552.         or FF (formfeed) may also be used for this purpose.
  553.  
  554.     \   (Backslash)  --  Enter  any  of  the above characters into the command,
  555.         literally.  To enter a backslash, type two backslashes in a  row  (\\).
  556.         A  backslash  at  the  end of a command line causes the next line to be
  557.         treated as a continuation line; this is useful for readability in  com-
  558.         mand files, especially in the 'script' command.
  559.  
  560.     ^Z  (Control-Z)  --  On  systems (like Berkeley Unix, Ultrix) with job con-
  561.         trol, suspend Kermit, i.e. put it into the  background in  such  a  way
  562.         that  it  can  be  brought  back into the foreground (e.g. with an 'fg'
  563.         shell command) with all its settings intact.
  564.  
  565. You may type the editing characters (DEL, ^W, etc) repeatedly,  to  delete  all
  566. the  way  back to the prompt.  No action will be performed until the command is
  567. entered by typing carriage return, linefeed, or formfeed.  If you make any mis-
  568. takes,  you  will receive an informative error message and a new prompt -- make
  569. liberal use of `?' and ESC to feel your way through the commands.   One  impor-
  570. tant command is "help" -- you should use it the first time you run C-Kermit.
  571.  
  572. A command line beginning with a percent sign "%" is ignored.  Such lines may be
  573. used to include illustrative commentary in Kermit command dialogs.
  574.  
  575. Interactive C-Kermit accepts commands from files as well as from the  keyboard.
  576. When you start C-Kermit, the program looks for the file .kermrc in your home or
  577. current directory (first it looks in the home directory, then  in  the  current
  578. one)  and  executes any commands it finds there.  These commands must be in in-
  579. teractive format, not Unix command-line format.    A  "take"  command  is  also
  580. provided  for  use  at  any  time  during  an  interactive  session,  to  allow
  581. interactive-format commands to be executed from a file; command  files  may  be
  582. nested to any reasonable depth.
  583.  
  584. Here is a brief list of C-Kermit interactive commands:
  585.  
  586.               %  Comment
  587.               !  Execute a Unix shell command, or start a shell.
  588.             bye  Terminate and log out a remote Kermit server.
  589.           close  Close a log file.
  590.         connect  Establish a terminal connection to a remote system.
  591.             cwd  Change Working Directory (also, cd).
  592.            dial  Dial a telephone number.
  593.       directory  Display a directory listing.
  594.            echo  Display arguments literally.
  595.            exit  Exit from the program, closing any open files.
  596.          finish  Instruct a remote Kermit server to exit, but not log out.
  597.             get  Get files from a remote Kermit server.
  598.          hangup  Hang up the phone (for use in local mode).
  599.            help  Display a help message for a given command.
  600.             log  Open a log file -- debugging, packet, session, transaction.
  601.            quit  Same as 'exit'.
  602.         receive  Passively wait for files to arrive.
  603.          remote  Issue file management commands to a remote Kermit server.
  604.          script  Execute a login script with a remote system.
  605.            send  Send files.
  606.          server  Begin server operation.
  607.             set  Set various parameters.
  608.            show  Display values of 'set' parameters.
  609.           space  Display current disk space usage.
  610.      statistics  Display statistics about most recent transaction.
  611.            take  Execute commands from a file.
  612.  
  613. The 'set' parameters are:
  614.  
  615.     block-check  Level of packet error detection.
  616.           delay  How long to wait before sending first packet.
  617.          duplex  Specify which side echoes during 'connect'.
  618.     escape-character  Prefix for "escape commands" during 'connect'.
  619.            file  Set various file parameters.
  620.    flow-control  Communication line full-duplex flow control.
  621.       handshake  Communication line half-duplex turnaround character.
  622.      incomplete  Disposition for incompletely received files.
  623.            line  Communication line device name.
  624.    modem-dialer  Type of modem-dialer on communication line.
  625.          parity  Communication line character parity.
  626.          prompt  The C-Kermit program's interactive command prompt.
  627.         receive  Parameters for inbound packets.
  628.           retry  Packet retransmission limit.
  629.            send  Parameters for outbound packets.
  630.           speed  Communication line speed.
  631.        terminal  Terminal parameters.
  632.  
  633. The 'remote' commands are:
  634.  
  635.             cwd  Change remote working directory.
  636.          delete  Delete remote files.
  637.       directory  Display a listing of remote file names.
  638.            help  Request help from a remote server.
  639.            host  A command to the remote host in its own command language.
  640.           space  Display current disk space usage on remote system.
  641.            type  Display a remote file on your screen.
  642.             who  Display who's logged in, or get information about a user.
  643.  
  644. Most of these commands are described adequately in the Kermit User Guide or the
  645. Kermit book.  Special aspects of certain Unix  Kermit  commands  are  described
  646. below.
  647.  
  648.  
  649.                               THE 'SEND' COMMAND
  650.  
  651. Syntax:  send fn  - or -  send fn1 rfn1
  652.  
  653. Send  the file or files denoted by fn to the other Kermit, which should be run-
  654. ning as a server, or which should be given the 'receive' command.  Each file is
  655. sent  under  its own name (as described above, or as specified by the 'set file
  656. names' command).  If the second form of the 'send' command is used, i.e.   with
  657. fn1 denoting a single Unix file, rfn1 may be specified as a name to send it un-
  658. der.  The 'send' command may be abbreviated to 's', even though 's'  is  not  a
  659. unique abbreviation for a top-level C-Kermit command.
  660.  
  661. The wildcard (meta) characters `*' and `?' are accepted in fn.  If `?' is to be
  662. included, it must be prefixed by `\' to override its normal function of provid-
  663. ing  help.    `*'  matches any string, `?' matches any single character.  Other
  664. notations for file groups, like `[a-z]og', are  not  available  in  interactive
  665. commands  (though  of  course they are available on the command line).  When fn
  666. contains `*' or `?' characters, there is a limit to the number  of  files  that
  667. can  be  matched,  which  varies from system to system.  If you get the message
  668. "Too many files match" then you'll have to make a more judicious selection.  If
  669. fn was of the form
  670.  
  671.     usr/longname/anotherlongname/*
  672.  
  673. then  C-Kermit's  string  space  will  fill  up rapidly -- try doing a cwd (see
  674. below) to the path in question and reissuing the command.
  675.  
  676. In interactive mode, C-Kermit does not presently understand  "~"  notation  for
  677. "home  directory",  as  used in the C-Shell and K-Shell, nor does it understand
  678. "[abc]" or "{txt,doc}" filename metacharacter notation.
  679.  
  680. Note -- C-Kermit sends only from the current or specified directory.   It  does
  681. not traverse directory trees.  If the source directory contains subdirectories,
  682. they will be skipped.  By the same token, C-Kermit does not create  directories
  683. when  receiving files.  If you have a need to do this, you can pipe tar through
  684. C-Kermit, as shown in the example on page 3, or under System III/V Unix you can
  685. use cpio.
  686.  
  687. Another  Note  --  The 'send' command does not skip over "invisible" files that
  688. match the file specification; Unix systems  usually  treat  files  whose  names
  689. start  with  a  dot (like .login, .cshrc, and .kermrc) as invisible.  Similarly
  690. for "temporary" files whose names start with "#".
  691.  
  692.  
  693.                              THE 'RECEIVE' COMMAND
  694.  
  695. Syntax:  receive  - or -  receive fn1
  696.  
  697. Passively wait for files to arrive from the other Kermit, which must  be  given
  698. the 'send' command -- the 'receive' command does not work in conjunction with a
  699. server (use 'get' for that).  If fn1 is specified,  store  the  first  incoming
  700. file under that name.  The 'receive' command may be abbreviated to 'r'.
  701.  
  702.  
  703.                               THE 'GET' COMMAND:
  704.  
  705. Syntax:  get rfn
  706.  
  707.         or: get
  708.                 rfn
  709.                 fn1
  710.  
  711. Request a remote Kermit server to send the named file or files.  Since a remote
  712. file specification (or list)  might  contain  spaces,  which  normally  delimit
  713. fields  of  a C-Kermit command, an alternate form of the command is provided to
  714. allow the inbound file to be given a new name: type 'get' alone on a line,  and
  715. you  will  be prompted separately for the remote and local file specifications,
  716. for example
  717.  
  718.     C-Kermit>get
  719.      Remote file specification: profile exec
  720.      Local name to store it under: profile.exec
  721.  
  722. As with 'receive', if more than one file arrives as a result of the 'get'  com-
  723. mand,  only the first will be stored under the alternate name given by fn1; the
  724. remaining files will be stored under their own names if possible.  If a `?'  is
  725. to be included in the remote file specification, you must prefix it with `\' to
  726. suppress its normal function of providing help.
  727.  
  728. If you have started a multiline 'get' command, you may escape from  its  lower-
  729. level prompts by typing a carriage return in response to the prompt, e.g.
  730.  
  731.     C-Kermit>get
  732.      Remote file specification: foo
  733.      Local name to store it under: (Type a carriage return here)
  734.     (cancelled)
  735.     C-Kermit>
  736.  
  737.  
  738.                              THE 'SERVER' COMMAND:
  739.  
  740. The 'server' command places C-Kermit in "server mode" on the currently selected
  741. communication line.  All further commands must arrive as valid  Kermit  packets
  742. from  the  Kermit  on  the  other  end of the line.  The Unix Kermit server can
  743. respond to the following commands:
  744.  
  745. Command                Server Response
  746.  
  747.   get                    Sends files
  748.   send                   Receives files
  749.   bye                    Attempts to log itself out
  750.   finish                 Exits to level from which it was invoked
  751.   remote directory       Sends directory lising
  752.   remote delete          Removes files
  753.   remote cwd             Changes working directory (also, remote cd)
  754.   remote type            Sends files to your screen
  755.   remote space           Reports about its disk usage
  756.   remote who             Shows who's logged in
  757.   remote host            Executes a Unix shell command
  758.   remote help            Lists these capabilities
  759.  
  760. The Unix Kermit server cannot always respond properly to a  BYE  command.    It
  761. will  attempt to do so using "kill()", but this will not work on all systems or
  762. under all conditions because of the complicated process structures that can  be
  763. set up under Unix.
  764.  
  765. If  the  Kermit  server  is  directed at an external line (i.e. it is in "local
  766. mode") then the console may be used for other work if you have 'set  file  dis-
  767. play  off'; normally the program expects the console to be used to observe file
  768. transfers and enter status queries or interruption commands.  The  way  to  get
  769. C-Kermit  into  background operation from interactive command level varies from
  770. system to system (e.g. on Berkeley Unix you would halt the program with ^Z  and
  771. then  use the C-Shell 'bg' command to continue it in the background).  The more
  772. common method is to invoke the program with the desired command line arguments,
  773. including "-q", and with a terminating "&".
  774.  
  775. When  the  Unix  Kermit server is given a 'remote host' command, it executes it
  776. using the shell invoked upon login, e.g.  the  Bourne  shell  or  the  Berkeley
  777. C-Shell.
  778.  
  779.  
  780.                   THE 'REMOTE', 'BYE', AND 'FINISH' COMMANDS:
  781.  
  782. C-Kermit  may itself request services from a remote Kermit server.  In addition
  783. to 'send' and 'get', the following commands may also be sent from C-Kermit to a
  784. Kermit server:
  785.  
  786.     remote cwd [directory]
  787.         If the optional remote directory specification is included, you will be
  788.         prompted  on a separate line for a password, which will not echo as you
  789.         type it.  If the remote system does not require  a  password  for  this
  790.         operation, just type a carriage return.    'remote cd' is a synonym for
  791.         this command.
  792.  
  793.     remote delete rfn       delete remote file or files.
  794.     remote directory [rfn]  directory listing of remote files.
  795.     remote host command     command in remote host's own command language.
  796.     remote space            disk usage report from remote host.
  797.     remote type [rfn]       display remote file or files on the screen.
  798.     remote who [user]       display information about who's logged in.
  799.     remote help             display remote server's capabilities.
  800.  
  801.     bye and finish:
  802.         When connected to a remote Kermit  server,  these  commands  cause  the
  803.         remote  server  to  terminate;  'finish' returns it to Kermit or system
  804.         command level (depending on the implementation or how the  program  was
  805.         invoked); 'bye' also requests it to log itself out.
  806.  
  807.  
  808.                         THE 'LOG' AND 'CLOSE' COMMANDS:
  809.  
  810. Syntax: log {debugging, packets, session, transactions} [ fn1 ]
  811.  
  812. C-Kermit's  progress  may be logged in various ways.  The 'log' command opens a
  813. log, the 'close' command closes it.  In addition, all open logs are  closed  by
  814. the 'exit' and 'quit' commands.  A name may be specified for a log file; if the
  815. name is omitted, the file is created with a default name as shown below.
  816.  
  817. log debugging
  818.     This produces a voluminous log of the internal workings of C-Kermit, of use
  819.     to Kermit developers or maintainers in tracking down suspected bugs in  the
  820.     C-Kermit  program.   Use of this feature dramatically slows down the Kermit
  821.     protocol.  Default name: debug.log.
  822.  
  823. log packets
  824.     This  produces  a  record of all the packets that go in and out of the com-
  825.     munication port.  This log is of use to Kermit maintainers who are tracking
  826.     down  protocol  problems  in either C-Kermit or any Kermit that C-Kermit is
  827.     connected to.  Default name:  packet.log.
  828.  
  829. log session
  830.     This  log  will  contain a copy of everything you see on your screen during
  831.     the 'connect' command, except for local messages or interaction with  local
  832.     escape commands.  Default name:  session.log.
  833.  
  834. log transactions
  835.     The transaction log is a record of all the files that were sent or received
  836.     while  transaction  logging  was  in  effect.   It includes time stamps and
  837.     statistics, filename transformations, and records of any  errors  that  may
  838.     have occurred.  The transaction log allows you to have long unattended file
  839.     transfer sessions without  fear  of  missing  some  vital  screen  message.
  840.     Default name:  transact.log.
  841.  
  842. The 'close' command explicitly closes a log, e.g. 'close debug'.
  843.  
  844. Note:    Debug  and Transaction logs are a compile-time option; C-Kermit may be
  845. compiled without these logs, in which case it will run faster, it will take  up
  846. less space on the disk, and the commands relating to them will not be present.
  847.  
  848.  
  849.                         LOCAL FILE MANAGEMENT COMMANDS:
  850.  
  851. Unix  Kermit  allows some degree of local file management from interactive com-
  852. mand level:
  853.  
  854. directory [fn]
  855.     Displays  a listing of the names, modes, sizes, and dates of files matching
  856.     fn (which defaults to `*').  Equivalent to `ls -l'.
  857.  
  858. cwd [directory-name]
  859.     Changes  Kermit's  working  directory  to  the one given, or to the default
  860.     directory if the directory name is omitted.  This command affects only  the
  861.     Kermit  process and any processes it may subsequently create.  You may also
  862.     type "cd" instead of "cwd".
  863.  
  864. space
  865.     Display  information about disk space and/or quota in the current directory
  866.     and device.
  867.  
  868. ! [command]
  869.     The  command  is  executed  by the Unix shell.  If no command is specified,
  870.     then an interactive shell is started;  exiting  from  the  shell,  e.g.  by
  871.     typing Control-D or 'exit', will return you to C-Kermit command level.  Use
  872.     the `!' command to provide file  management  or  other  functions  not  ex-
  873.     plicitly  provided  by  C-Kermit  commands.    The  `!' command has certain
  874.     peculiarities:
  875.  
  876.        - C-Kermit attempts to use your preferred, customary (login) shell.
  877.        - At least one space must separate the '!' from the shell command.
  878.        - A 'cd' (change directory) command executed in  this  manner  will
  879.          have no effect -- use the C-Kermit 'cwd' command instead.
  880.  
  881.  
  882.                         THE 'SET' AND 'SHOW' COMMANDS:
  883.  
  884. Since  Kermit  is designed to allow diverse systems to communicate, it is often
  885. necessary to issue special instructions  to  allow  the  program  to  adapt  to
  886. peculiarities  of the another system or the communication path.  These instruc-
  887. tions are accomplished by the 'set' command.  The 'show' command may be used to
  888. display  current  settings.   Here is a brief synopsis of settings available in
  889. the current release of C-Kermit:
  890.  
  891. block-check {1, 2, 3}
  892.     Determines  the  level  of  per-packet  error  detection.  "1" is a single-
  893.     character 6-bit checksum, folded to include the values  of  all  bits  from
  894.     each  character.    "2"  is  a  2-character,  12-bit  checksum.    "3" is a
  895.     3-character, 16-bit cyclic redundancy check (CRC).  The  higher  the  block
  896.     check,  the  better  the  error detection and correction and the higher the
  897.     resulting overhead.  Type 1 is most commonly used; it is supported  by  all
  898.     Kermit  implementations,  and it has proven adequate in most circumstances.
  899.     Types 2 or 3 would be used to  advantage  when  transferring  8-bit  binary
  900.     files over noisy lines.
  901.  
  902. delay n
  903.     How many seconds to wait before sending the first  packet  after  a  'send'
  904.     command.  Used in remote mode to give you time to escape back to your local
  905.     Kermit and issue a 'receive' command.  Normally 5 seconds.
  906.  
  907. duplex {full, half}
  908.     For  use  during  'connect'.    Specifies  which side is doing the echoing;
  909.     'full' means the other side, 'half' means C-Kermit must echo typein itself.
  910.  
  911. escape-character cc
  912.     For use during 'connect' to get C-Kermit's attention.  The escape character
  913.     acts as a prefix to an 'escape command', for instance to close the  connec-
  914.     tion  and  return  to  C-Kermit  or  Unix command level.  The normal escape
  915.     character is Control-Backslash (28).  The escape character is also used  in
  916.     System  III/V  implementations  to  prefix  interrupt  commands during file
  917.     transfers.
  918.  
  919. file {display, names, type, warning}
  920.     Establish various file-related parameters:
  921.  
  922.     display {on, off}
  923.         Normally 'on'; when in local mode, display progress of  file  transfers
  924.         on  the  screen (stdout), and listen to the keyboard (stdin) for inter-
  925.         ruptions.  If off (-q on command line) none of this is  done,  and  the
  926.         file transfer may proceed in the background oblivious to any other work
  927.         concurrently done at the console terminal.
  928.  
  929.     names {converted, literal}
  930.         Normally  converted,  which  means  that  outbound  filenames have path
  931.         specifications stripped, lowercase letters raised to upper, tildes  and
  932.         extra  periods  changed  to X's, and an X inserted in front of any name
  933.         that starts  with  period.    Incoming  files  have  uppercase  letters
  934.         lowered.  Literal means that none of these conversions are done; there-
  935.         fore, any directory path appearing in  a  received  file  specification
  936.         must exist and be write-accessible.  When literal naming is being used,
  937.         the sender should not use path names in the file  specification  unless
  938.         the same path exists on the target system and is writable.
  939.  
  940.     type {binary, text} [{7, 8}]
  941.         The file type is normally text, which means that conversion is done be-
  942.         tween  Unix  newline  characters  and  the carriage-return/linefeed se-
  943.         quences required by the canonical Kermit file transmission format,  and
  944.         in  common use on non-Unix systems.  Binary means to transmit file con-
  945.         tents without conversion.  Binary (`-i' in command  line  notation)  is
  946.         necessary  for  binary  files, and desirable in all Unix-to-Unix trans-
  947.         actions to cut down on overhead.
  948.  
  949.         The optional trailing parameter tells the bytesize for  file  transfer.
  950.         It  is  8  by  default.    If you specify 7, the high order bit will be
  951.         stripped from each byte of sent and received files.  This is useful for
  952.         transferring text files that may have extraneous high order bits set in
  953.         their disk representation (e.g.  Wordstar  or  similar  word  processor
  954.         files).
  955.  
  956.     warning {on, off}
  957.         Normally off, which means that incoming files will  silently  overwrite
  958.         existing files of the same name.  When on (`-w' on command line) Kermit
  959.         will check if an arriving file would overwrite an existing file; if so,
  960.         it  will construct a new name for the arriving file, of the form foo~n,
  961.         where foo is the name they share and n is a "generation number"; if foo
  962.         exists,  then  the new file will be called foo~1.  If foo and foo~1 ex-
  963.         ist, the new file will be foo~2, and so on.  If the new name  would  be
  964.         longer than the maximum length for a filename, then characters would be
  965.         deleted from the end first, for instance, thelongestname  on  a  system
  966.         with a limit of 14 characters would become thelongestn~1.
  967.  
  968.             CAUTION:  If Control-F or Control-B is used to cancel an incom-
  969.             ing file, and a file of the same name previously  existed,  and
  970.             the  "file  warning"  feature is not enabled, then the previous
  971.             copy of the file will disappear.
  972.  
  973. flow-control {none, xon/xoff}
  974.     Normally xon/xoff for full duplex flow control.  Should be set to 'none' if
  975.     the other system cannot do xon/xoff flow control, or if you have  issued  a
  976.     'set  handshake' command.  If set to xon/xoff, then handshake should be set
  977.     to none.  This setting applies during both  terminal  connection  and  file
  978.     transfer.    Warning:  This command may have no effect on certain Unix sys-
  979.     tems, where Kermit puts the communication line into 'rawmode', and  rawmode
  980.     precludes flow control.
  981.  
  982. incomplete {discard, keep}
  983.     Disposition for incompletely received files.  If an incoming file is inter-
  984.     rupted  or  an  error occurs during transfer, the part that was received so
  985.     far is normally discarded.  If you "set incomplete  keep"  then  such  file
  986.     fragments will be kept.
  987.  
  988. handshake {xon, xoff, cr, lf, bell, esc, none}
  989.     Normally none.  Otherwise, half-duplex communication line turnaround  hand-
  990.     shaking  is  done, which means Unix Kermit will not reply to a packet until
  991.     it has received the indicated handshake character or has timed out  waiting
  992.     for  it;  the  handshake setting applies only during file transfer.  If you
  993.     set handshake to other than none, then flow should be set to none.
  994.  
  995. line [device-name]
  996.     The device name for the communication line to be used for file transfer and
  997.     terminal connection, e.g. /dev/ttyi3.  If you specify a device name, Kermit
  998.     will be in local mode, and you should remember to issue any other necessary
  999.     'set' commands, such as 'set speed'.  If you omit the device  name,  Kermit
  1000.     will  revert  to  its  default mode of operation.  If you specify /dev/tty,
  1001.     Kermit will enter remote mode (useful when  logged  in  through  the  "back
  1002.     port"  of  a  system normally used as a local-mode workstation).  When Unix
  1003.     Kermit enters local mode, it attempts to synchronize  with  other  programs
  1004.     (like  uucp)  that  use  external  communication lines so as to prevent two
  1005.     programs using the same  line  at  once;  before  attempting  to  lock  the
  1006.     specified  line,  it  will  close  and  unlock  any  external line that was
  1007.     previously in use.  The method used for locking is the  "uucp  lock  file",
  1008.     explained in more detail later.
  1009.  
  1010. modem-dialer {direct, hayes, racalvadic, ventel, ...}
  1011.     The type of modem dialer on the communication line.  "Direct" indicates ei-
  1012.     ther there is no dialout modem, or that if the line requires carrier detec-
  1013.     tion to open, then 'set line' will  hang  waiting  for  an  incoming  call.
  1014.     "Hayes",  "Ventel",  and  the  others  indicate  that 'set line' (or the -l
  1015.     argument) will prepare for  a  subsequent  'dial'  command  for  the  given
  1016.     dialer.    Support for new dialers is added from time to time, so type 'set
  1017.     modem ?' for a list of those supported in your copy of  Kermit.    See  the
  1018.     description  of the 'dial' command.  NOTE:  the "set modem" command must be
  1019.     given before the "set line" command.
  1020.  
  1021. parity {even, odd, mark, space, none}
  1022.     Specify  character  parity for use in packets and terminal connection, nor-
  1023.     mally none.  If other than none, C-Kermit will  seek  to  use  the  8th-bit
  1024.     prefixing  mechanism  for transferring 8-bit binary data, which can be used
  1025.     successfully only if the other Kermit agrees; if  not,  8-bit  binary  data
  1026.     cannot be successfully transferred.
  1027.  
  1028. prompt [string]
  1029.     The given string will be substituted  for  "C-Kermit>"  as  this  program's
  1030.     prompt.    If the string is omitted, the prompt will revert to "C-Kermit>".
  1031.     If the string is enclosed in doublequotes, the quotes will be stripped  and
  1032.     any leading and trailing blanks will be retained.
  1033.  
  1034. send parameter
  1035.     Establish parameters to use when sending packets.  These will be in  effect
  1036.     only for the initial packet sent, since the other Kermit may override these
  1037.     parameters during the protocol parameter exchange (unless noted below).
  1038.  
  1039.     end-of-packet cc
  1040.         Specifies the control character needed by the other Kermit to recognize
  1041.         the end of a packet.  C-Kermit sends this character at the end of  each
  1042.         packet.    Normally  13  (carriage return), which most Kermit implemen-
  1043.         tations require.  Other Kermits require no  terminator  at  all,  still
  1044.         others may require a different terminator, like linefeed (10).
  1045.  
  1046.     packet-length n
  1047.         Specify the maximum packet length to  send.    Normally  90.    Shorter
  1048.         packet  lengths  can be useful on noisy lines, or with systems or front
  1049.         ends or networks that have small buffers.  The shorter the packet,  the
  1050.         higher  the  overhead,  but the lower the chance of a packet being cor-
  1051.         rupted by noise, and the less time  to  retransmit  corrupted  packets.
  1052.         This  command  overrides the value requested by the other Kermit during
  1053.         protocol initiation unless the other Kermit requests a shorter length.
  1054.  
  1055.     pad-character cc
  1056.         Designate  a  character  to send before each packet.  Normally, none is
  1057.         sent.  Outbound padding is sometimes necessary for  communicating  with
  1058.         slow half duplex systems that provide no other means of line turnaround
  1059.         control.  It can also be used to send special characters to  communica-
  1060.         tions  equipment  that  needs  to  be put in "transparent" or "no echo"
  1061.         mode, when this can be accomplished in by feeding it a certain  control
  1062.         character.
  1063.  
  1064.     padding n
  1065.         How many pad characters to send, normally 0.
  1066.  
  1067.     start-of-packet cc
  1068.         The  normal Kermit packet prefix is Control-A (1); this command changes
  1069.         the prefix C-Kermit puts on outbound packets.  The  only  reasons  this
  1070.         should  ever be changed would be: Some piece of equipment somewhere be-
  1071.         tween the two Kermit programs will not pass through  a  Control-A;  or,
  1072.         some  piece  of of equipment similarly placed is echoing its input.  In
  1073.         the latter case, the recipient of such an echo can  change  the  packet
  1074.         prefix for outbound packets to be different from that of arriving pack-
  1075.         ets, so that the echoed packets will be ignored.  The  opposite  Kermit
  1076.         must also be told to change the prefix for its inbound packets.
  1077.  
  1078.     timeout n
  1079.         Specifies the number of seconds you want the other Kermit to wait for a
  1080.         packet before timing it out and requesting retransmission.
  1081.  
  1082. receive parameter
  1083.     Establish parameters to request the other Kermit to use when sending  pack-
  1084.     ets.
  1085.  
  1086.     end-of-packet cc
  1087.         Requests the other Kermit to terminate its packets with  the  specified
  1088.         character.
  1089.  
  1090.     packet-length n
  1091.         Specify the maximum packet length to that you want the other Kermit  to
  1092.         send,  normally  90.  If you specify a length of 95 or greater, then it
  1093.         will be used if the other Kermit supports, and agrees to use, the  Ker-
  1094.         mit  protocol  extension  for  long packets.  In this case, the maximum
  1095.         length depends upon the systems involved, but there would  normally  be
  1096.         no  reason for packets to be more than about 1000 characters in length.
  1097.         The 'show parameters' command displays C-Kermit's current  and  maximum
  1098.         packet lengths.
  1099.  
  1100.     pad-character cc
  1101.         C-Kermit normally does not need to have incoming packets preceded  with
  1102.         pad characters.  This command allows C-Kermit to request the other Ker-
  1103.         mit to use cc as a pad character.  Default cc is NUL, ASCII 0.
  1104.  
  1105.     padding n
  1106.         How many pad characters to ask for, normally 0.
  1107.  
  1108.     start-of-packet cc
  1109.         Change the prefix C-Kermit looks for on inbound packets  to  correspond
  1110.         with what the other Kermit is sending.
  1111.  
  1112.     timeout n
  1113.         Normally, each Kermit partner sets its packet timeout interval based on
  1114.         what the opposite Kermit requests.  This command allows you to override
  1115.         the normal procedure and specify a timeout interval for Unix Kermit  to
  1116.         use  when waiting for packets from the other Kermit.  If you specify 0,
  1117.         then no timeouts will occur, and Unix Kermit will wait forever for  ex-
  1118.         pected packets to arrive.
  1119.  
  1120. speed {0, 110, 150, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200}
  1121.     The transmission speed ("baud rate") for the external  communication  line.
  1122.     This  command  cannot  be used to change the speed of your own console ter-
  1123.     minal.  Many Unix systems are set up in such a way that you must give  this
  1124.     command after a 'set line' command before you can use the line.  'set baud'
  1125.     is a synomym for 'set speed'.  Use 19200 with caution -- it may not work on
  1126.     all systems.
  1127.  
  1128. terminal
  1129.     Used for specifying terminal parameters.  Currently, 'bytesize' is the only
  1130.     parameter provided, and it can be set to 7 or 8.  It's 7 by default.
  1131.  
  1132.  
  1133.                               THE 'SHOW' COMMAND:
  1134.  
  1135. Syntax: show {parameters, versions}
  1136.  
  1137. The  "show"  command  with  the  default  argument of "parameters" displays the
  1138. values of all the  'set'  parameters  described  above.    If  you  type  "show
  1139. versions",  then C-Kermit will display the version numbers and dates of all its
  1140. internal modules.  You should use the "show versions" command to ascertain  the
  1141. vintage of your Kermit program before reporting problems to Kermit maintainers.
  1142.  
  1143.  
  1144.                            THE 'STATISTICS' COMMAND:
  1145.  
  1146. The  statistics  command  displays  information  about  the  most recent Kermit
  1147. protocol transaction, including file and communication line i/o, timing and ef-
  1148. ficiency,  as  well  as  what  encoding options were in effect (such as 8th-bit
  1149. prefixing, repeat-count compression).
  1150.  
  1151.  
  1152.                         THE 'TAKE' AND 'ECHO' COMMANDS:
  1153.  
  1154. Syntax: take fn1
  1155.      echo [text to be echoed]
  1156.  
  1157. The 'take' command instructs C-Kermit to execute commands from the named  file.
  1158. The  file may contain any interactive C-Kermit commands, including 'take'; com-
  1159. mand files may be nested to any reasonable depth, but it may not  contain  text
  1160. to  be sent to a remote system during the 'connect' command.  This means that a
  1161. command file like this:
  1162.  
  1163.     set line /dev/tty17
  1164.     set speed 9600
  1165.     connect
  1166.     login myuserid
  1167.     mypassword
  1168.     etc
  1169.  
  1170. will not send "login myserid" or any of the following text to the  remote  sys-
  1171. tem.  To carry on a canned dialog, use the 'script' command, described later.
  1172.  
  1173. The '%' command is useful for including comments in take-command files.  It may
  1174. only be used at the beginning of a line.
  1175.  
  1176. The 'echo' command may be used within command files  to  issue  greetings,  an-
  1177. nounce progress, ring the terminal bell, etc.  The 'echo' command should not be
  1178. confused with the Unix 'echo' command, which can  be  used  to  show  how  meta
  1179. characters would be expanded.  The Kermit echo command simply displays its text
  1180. argument (almost) literally at the terminal; the argument may contain octal es-
  1181. capes  of the form "\ooo", where o is an octal digit (0-7), and there may be 1,
  1182. 2, or 3 such digits, whose value specify an ASCII character, such as "\007" (or
  1183. "\07"  or  just "\7") for beep, "\012" for newline, etc.  Of course, each back-
  1184. slash must be must be entered twice in order for it to be passed along  to  the
  1185. echo command by the Kermit command parser.
  1186.  
  1187. Take-command  files  are  in  exactly  the same syntax as interactive commands.
  1188. Note that this implies that if you want  to  include  special  characters  like
  1189. question  mark  or  backslash  that you would have to quote with backslash when
  1190. typing interactive commands, you must quote these characters the  same  way  in
  1191. command  files.  Long lines may be continued by ending them with a single back-
  1192. slash.
  1193.  
  1194. Command files may be used in lieu of command macros, which have  not  been  im-
  1195. plemented  in  this version of C-Kermit.  For instance, if you commonly connect
  1196. to a system called 'B' that is connected to  ttyh7  at  4800  baud,  you  could
  1197. create a file called b containing the commands
  1198.  
  1199.     % C-Kermit command file to connect to System B thru /dev/ttyh7
  1200.     set line /dev/ttyh7
  1201.     set speed 4800
  1202.     % Beep and give message
  1203.     echo \\007Connecting to System B...
  1204.     connect
  1205.  
  1206. and  then simply type 'take b' (or 't b' since no other commands begin with the
  1207. letter 't') whenever you wish to connect to system B. Note  the  comment  lines
  1208. and the beep inserted into the 'echo' command.
  1209.  
  1210. For  connecting  to  IBM  mainframes,  a number of 'set' commands are required;
  1211. these, too, can be conveniently collected into a 'take' file like this one:
  1212.  
  1213.     % Sample C-Kermit command file to set up current line
  1214.     % for IBM mainframe communication
  1215.     %
  1216.     set parity mark
  1217.     set handshake xon
  1218.     set flow-control none
  1219.     set duplex half
  1220.  
  1221. Note that no single command is available to wipe out all of these settings  and
  1222. return  C-Kermit  to its default startup state; to do that, you can either res-
  1223. tart the program, or else make a command file that executes the necessary 'set'
  1224. commands:
  1225.  
  1226.     % Sample C-Kermit command file to restore normal settings
  1227.     %
  1228.     set parity none
  1229.     set handshake none
  1230.     set flow-control xon/xoff
  1231.     set duplex full
  1232.  
  1233. An  implicit  'take'  command  is executed upon your .kermrc file when C-Kermit
  1234. starts up, upon either interactive or command-line  invocation.    The  .kermrc
  1235. file  should  contain  'set'  or other commands you want to be in effect at all
  1236. times.  For instance, you might want override the default action when  incoming
  1237. files have the same names as existing files -- in that case, put the command
  1238.  
  1239.     set file warning on
  1240.  
  1241. in  your  .kermrc  file.    On some non-Unix systems that run C-Kermit, the in-
  1242. itialization file might have a different name, such as kermit.ini.
  1243.  
  1244. Errors encountered during execution of take files (such as failure to  complete
  1245. dial  or script operations) cause termination of the current take file, popping
  1246. to the level that invoked it (take file,  interactive  level,  or  the  shell).
  1247. When  kermit  is  executed in the background, errors during execution of a take
  1248. file are fatal.
  1249.  
  1250. Under Unix, you may  also  use  the  shell's  redirection  mechanism  to  cause
  1251. C-Kermit to execute commands from a file:
  1252.  
  1253.     kermit < cmdfile
  1254.  
  1255. or you can even pipe commands in from another process:
  1256.  
  1257.     command | kermit
  1258.  
  1259.  
  1260.                             THE 'CONNECT' COMMAND:
  1261.  
  1262. The  'connect'  command  ('c'  is  an  acceptable  non-unique  abbreviation for
  1263. 'connect') links your terminal to another computer as if it were a  local  ter-
  1264. minal  to  that  computer, through the device specified in the most recent 'set
  1265. line' command, or through the default device if your system is a PC or worksta-
  1266. tion.   All characters you type at your keyboard are sent out the communication
  1267. line (and if you have 'set duplex half', also displayed on  your  screen),  and
  1268. all  characters arriving at the communication port are displayed on the screen.
  1269. Current settings of speed, parity, duplex, and flow-control  are  honored,  and
  1270. the  data connection is 7 bits wide unless you have given the command 'set ter-
  1271. minal bytesize 8'.  If you have issued a 'log session' command, everything  you
  1272. see  on your screen will also be recorded to your session log.  This provides a
  1273. way to "capture" files from remote systems  that  don't  have  Kermit  programs
  1274. available.
  1275.  
  1276. To  get  back  to your own system, you must type the escape character, which is
  1277. Control-Backslash (^\) unless you have changed it with the  'set  escape'  com-
  1278. mand,   followed  by  a  single-character  command,  such  as  'c'  for  "close
  1279. connection".  Single-character commands include:
  1280.  
  1281.   c     Close the connection
  1282.   b     Send a BREAK signal
  1283.   0     (zero) send a null
  1284.   s     Give a status report about the connection
  1285.   h     Hangup the phone
  1286.   ^\    Send Control-Backslash itself (whatever you  have  defined  the  escape
  1287.         character to be, typed twice in a row sends one copy of it).
  1288.  
  1289. Uppercase  and  control  equivalents  for  (most of) these letters are also ac-
  1290. cepted.  A space typed after the  escape  character  is  ignored.    Any  other
  1291. character will produce a beep.
  1292.  
  1293. The  connect  command simply displays incoming characters on the screen.  It is
  1294. assumed any screen control sequences sent by the host will be  handled  by  the
  1295. firmware  or  emulation  software  in your terminal or PC.  If special terminal
  1296. emulation is desired, then the 'connect' command can invoked from the Unix com-
  1297. mand line (-c or -n), piped through a terminal emulation filter, e.g.
  1298.  
  1299.     kermit -l /dev/acu -b 1200 -c | tek
  1300.  
  1301.  
  1302.                              THE 'HANGUP' COMMAND:
  1303.  
  1304. The 'hangup' command attempts to hang up the modem on a local-mode dialout con-
  1305. nection.
  1306.  
  1307.  
  1308.                               THE 'DIAL' COMMAND:
  1309.  
  1310. Syntax: dial telephone-number-string
  1311.  
  1312. This command controls dialout modems; you should have  already  issued  a  "set
  1313. line"  and  "set  speed"  command  to  identify the terminal device, and a "set
  1314. modem" command to identify the type of modem to be used for dialing.    In  the
  1315. "dial"  command, you supply the phone number and the Kermit program feeds it to
  1316. the modem in the appropriate format and then interprets dialer return codes and
  1317. modem  signals  to  inform  you whether the call was completed.  The telephone-
  1318. number-string may contain imbedded modem-dialer commands,  such  as  comma  for
  1319. Hayes  pause, or `&' for Ventel dialtone wait and `%' for Ventel pause (consult
  1320. your modem manual for details).
  1321.  
  1322. At the time of this writing, support is included for the following modems:
  1323.  
  1324.    - AT&T 7300 Internal Modem
  1325.    - Cermetek Info-Mate 212A
  1326.    - Concord Condor CDS 220
  1327.    - DEC DF03-AC
  1328.    - DEC DF100 Series
  1329.    - DEC DF200 Series
  1330.    - General DataComm 212A/ED
  1331.    - Hayes Smartmodem and compatibles
  1332.    - Penril
  1333.    - Racal Vadic
  1334.    - Rolm CBX
  1335.    - US Robotics 212A
  1336.    - Ventel
  1337.  
  1338. Support for new modems is added to the program from time to time; you can check
  1339. the current list by typing "set modem ?".
  1340.  
  1341. There  are also two "generic" modem types -- "direct" (i.e. no modem at all, so
  1342. that no attempt is made to deal with modem signals), and "unknown" (which tells
  1343. C-Kermit  to  attempt  to honor modem signals, but leaves the dialing mechanism
  1344. unspecified).
  1345.  
  1346. The device used for dialing out is the one selected in  the  most  recent  "set
  1347. line"  command  (or on a workstation, the default line if no "set line" command
  1348. was given).  The "dial" command calls attempts to lock  the  terminal  device's
  1349. path  (see the section on line locking below) and to establish a call on an ex-
  1350. clusive basis.  If it is desired to dial a call and then return  to  the  shell
  1351. (such  as to do kermit activities depending on standard in/out redirection), it
  1352. is necessary to place the dialed call under one device name (say,  "/dev/cua0")
  1353. and then escape to the shell within Kermit on a linked device which is separate
  1354. from the dialed line (say, "/dev/cul0").  This is the same  technique  used  by
  1355. uucp (to allow locks to be placed separately for dialing and conversing).
  1356.  
  1357. Because  modem  dialers have strict requirements to override the carrier-detect
  1358. signal most Unix implementations expect, the sequence for dialing is more rigid
  1359. than most other C-Kermit procedures.
  1360.  
  1361. Example one:
  1362.  
  1363.     kermit -l /dev/cul0 -b 1200
  1364.     C-Kermit>set modem-dialer hayes    hint: abbreviate set m h
  1365.     C-Kermit>dial 9,5551212
  1366.     Connected!
  1367.     C-Kermit>connect                   hint: abbreviate c
  1368.     logon, request remote server, etc.
  1369.     ^\c                                escape back
  1370.     C-Kermit> ...
  1371.     C-Kermit>quit                      hint: abbreviate q
  1372.  
  1373. this disconnects modem, and unlocks line.
  1374.  
  1375. Example two:
  1376.  
  1377.     kermit
  1378.     C-Kermit>set modem-dialer ventel
  1379.     C-Kermit>set line /dev/cul0
  1380.     C-Kermit>dial 9&5551212%
  1381.     Connected!
  1382.     C-Kermit> ...
  1383.  
  1384. Example three:
  1385.  
  1386.     kermit
  1387.     C-Kermit>take my-dial-procedure
  1388.     Connected!
  1389.  
  1390.     file my-dial-procedure:
  1391.     set modem hayes
  1392.     set line /dev/tty99
  1393.     dial 5551212
  1394.     connect
  1395.  
  1396. In  general, C-Kermit requires that the modem provide the "carrier detect" (CD)
  1397. signal when a call is in progress, and remove that signal when  the  call  com-
  1398. pletes  or the line drops.  If a modem switch setting is available to force CD,
  1399. it should normally not be in that setting.  C-Kermit  also  requires  (on  most
  1400. systems)  that  the modem track the computer's "data terminal ready" (DTR) sig-
  1401. nal.  If a switch setting is available to  simulate  DTR  asserted  within  the
  1402. modem,  then  it  should  normally not be in that setting.  Otherwise the modem
  1403. will be unable to hang up at the end of a call or when interrupts are  received
  1404. by Kermit.
  1405.  
  1406. For  Hayes  1200  dialers, two important switch settings are #1 and #6.  Switch
  1407. #1 should be normally be UP so  that  the  modem  can  act  according  to  your
  1408. computer's  DTR  signal.  But if your computer, or particular implementation of
  1409. Kermit, cannot control DTR, then switch 1 should be DOWN.    Switch  #6  should
  1410. normally  be  UP  so  carrier-detect functions properly (but put it DOWN if you
  1411. have trouble with the UP position).  Switches #2 (English versus  digit  result
  1412. codes)  and  #4 (Hayes echoes modem commands) may be in either position.  Hayes
  1413. 2400 modems have equivalent "software" switches.
  1414.  
  1415. If you want to interrupt a dial command in progress (for instance, because  you
  1416. just  realize  that you gave it the wrong number), type a Control-C to get back
  1417. to command level.
  1418.  
  1419.                              THE 'SCRIPT' COMMAND:
  1420.  
  1421. Syntax: script expect send [expect send] . . .
  1422.  
  1423. "expect" has the syntax: expect[-send-expect[-send-expect[...]]]
  1424.  
  1425. The 'script' command carries on a "canned dialog"  with  a  remote  system,  in
  1426. which data is sent according to the remote system's responses.  The typical use
  1427. is for logging in to a remote system automatically.
  1428.  
  1429. C-Kermit's script facility operates in a manner similar to that  commonly  used
  1430. by  the  Unix UUCP system's "L.sys" file entries.  A login script is a sequence
  1431. of the form:
  1432.  
  1433.     expect send [expect send] . . .
  1434.  
  1435. where expect is a prompt or message to be issued by the remote site,  and  send
  1436. is  the  string (names, numbers, etc) to return, and expects are separated from
  1437. sends by spaces.  The send may also be the keyword EOT, to send  Control-D,  or
  1438. BREAK, to send a break signal.  Letters in sends may be prefixed by `~' to send
  1439. special characters, including:
  1440.  
  1441.     ~b  backspace
  1442.     ~s  space
  1443.     ~q  `?'(trapped by Kermit's command interpreter)
  1444.     ~n  linefeed
  1445.     ~r  carriage return
  1446.     ~t  tab
  1447.     ~'  single quote
  1448.     ~~  tilde
  1449.     ~"  double quote
  1450.     ~x  XON (Control-Q)
  1451.     ~c  don't append a carriage return
  1452.     ~o[o[o]]  an octal character
  1453.     ~d  delay approx 1/3 second during send
  1454.     ~w[d[d]]  wait specified interval during expect, then time out
  1455.  
  1456. As with some UUCP systems, sent strings are followed by ~r unless they  have  a
  1457. ~c.
  1458.  
  1459. Only  the last 7 characters in each expect are matched.  A null expect, e.g. ~0
  1460. or two adjacent dashes, causes a short delay before proceeding to the next send
  1461. sequence.  A null expect always succeeds.
  1462.  
  1463. As  with  UUCP, if the expect string does not arrive, the script attempt fails.
  1464. If you expect that a sequence might not arrive, as with UUCP,  conditional  se-
  1465. quences may be expressed in the form:
  1466.  
  1467.     -send-expect[-send-expect[...]]
  1468.  
  1469. where dashed sequences are followed as long as previous expects fail.  Timeouts
  1470. for expects can be specified using ~w; ~w with no arguments waits 15 seconds.
  1471.  
  1472. Expect/send transactions can be easily be  debugged  by  logging  transactions.
  1473. This  records  all  exchanges,  both expected and actual.  The script execution
  1474. will also be logged in the session log, if that is activated.
  1475.  
  1476. Note that `\' characters in login scripts, as in any other C-Kermit interactive
  1477. commands,  must  be doubled up.  A line may be ended with a single `\' for con-
  1478. tinuation.
  1479.  
  1480. Example one:
  1481.  
  1482. Using a modem, dial a UNIX host site.   Expect  "login"  (...gin),  and  if  it
  1483. doesn't come, simply send a null string with a ~r.  (Some Unixes require either
  1484. an EOT or a BREAK instead of the null sequence,  depending  on  the  particular
  1485. site's "logger" program.)  After providing user id and password, respond "x" to
  1486. a question-mark prompt, expect the Bourne shell "$" prompt (and send return  if
  1487. it  doesn't  arrive).   Then cd to directory kermit, and run the program called
  1488. "wermit", entering the interactive connect state after wermit is loaded.
  1489.  
  1490.     set modem ventel
  1491.     set line /dev/tty77
  1492.     set baud 1200
  1493.     dial 9&5551212
  1494.     script gin:--gin:--gin: smith ssword: mysecret ~q x $--$ \
  1495.      cd~skermit $ wermit
  1496.     connect
  1497.  
  1498. Note that 'set line' is issued after 'set modem',  but  before  'set  baud'  or
  1499. other line-related parameters.
  1500.  
  1501. Example two:
  1502.  
  1503. Using  a  modem,  dial the Telenet network.  This network expects three returns
  1504. with slight delays between them.  These are sent following null expects.    The
  1505. single return is here sent as a null string, with a return appended by default.
  1506. Four returns are sent to be safe before looking  for  the  prompt.    Then  the
  1507. Telenet  id and password are entered.  Then Telenet is instructed to connect to
  1508. a host site (c 12345).  The host has a data switch that  asks  "which  system";
  1509. the  script responds "myhost" (if the "which system" prompt doesn't appear, the
  1510. Telenet connect command is reissued).  The script waits for an "@" prompt  from
  1511. the  host,  then  sends  the user ID ("joe") and password ("secret"), looks for
  1512. another "@" prompt, runs Kermit, and in response to the Kermit's prompt  (which
  1513. ends  in  ">"),  gives  the commands "set parity even" and "server".  Files are
  1514. then exchanged.  The commands are in a take file; note the continuation of  the
  1515. 'script' command onto several lines using the `\' terminator.
  1516.  
  1517.     set modem hayes
  1518.     set line /dev/acu
  1519.     set speed 1200
  1520.     set parity mark
  1521.     dial 9,5551212
  1522.     script ~0 ~0 ~0 ~0 ~0 ~0 ~0 ~0 @--@--@ id~saa001122 = 002211 @ \
  1523.         c~s12345 ystem-c~s12345-ystem myhost @ joe~ssecret @ kermit \
  1524.         > set~sparity~seven > server
  1525.     send some.stuff
  1526.     get some.otherstuff
  1527.     bye
  1528.     quit
  1529.  
  1530. Since  these  commands may be executed totally in the background, they can also
  1531. be scheduled.  A typical shell script, which might be scheduled by cron,  would
  1532. be as follows (csh used for this example):
  1533.  
  1534.     #
  1535.     #keep trying to dial and log onto remote host and exchange files
  1536.     #wait 10 minutes before retrying if dial or script fail.
  1537.     #
  1538.     cd someplace
  1539.     while ( 1 )
  1540.             kermit < /tonight.cmd >> nightly.log &
  1541.             if ( ! $status ) break
  1542.             sleep 600
  1543.     end
  1544.  
  1545. File  tonight.cmd  might  have two takes in it, for example, one to take a file
  1546. with the set modem, set line, set baud, dial, and script, and a second take  of
  1547. a  file  with  send/get  commands  for  the  remote  server.  The last lines of
  1548. tonight.cmd should be a bye and a quit.
  1549.  
  1550.  
  1551.                               THE 'HELP' COMMAND:
  1552.  
  1553. Syntax: help
  1554.    or: help keyword
  1555.    or: help {set, remote} keyword
  1556.  
  1557. Brief help messages or menus are always available at interactive command  level
  1558. by  typing  a question mark at any point.  A slightly more verbose form of help
  1559. is available through the 'help' command.  The 'help' command with no  arguments
  1560. prints  a  brief  summary of how to enter commands and how to get further help.
  1561. 'help' may be followed by one of the top-level C-Kermit command keywords,  such
  1562. as  'send', to request information about a command.  Commands such as 'set' and
  1563. 'remote' have a further level of help.  Thus you may type 'help',  'help  set',
  1564. or  'help  set parity'; each will provide a successively more detailed level of
  1565. help.
  1566.  
  1567.  
  1568.                         THE 'EXIT' AND 'QUIT' COMMANDS:
  1569.  
  1570. These two commands are identical.  Both of them do the following:
  1571.  
  1572.    - Attempt to insure that the terminal is returned to normal.
  1573.    - Relinquish access to any communication line assigned via 'set line'.
  1574.    - Relinquish any uucp and multiuser locks on the communications line.
  1575.    - Hang up the modem, if the communications line supports data  terminal
  1576.      ready.
  1577.    - Close any open logs or other files.
  1578.  
  1579. After  exit  from C-Kermit, your default directory will be the same as when you
  1580. started the program.  The 'exit' command is issued implicitly whenever C-Kermit
  1581. halts normally, e.g. after a command line invocation, or after certain kinds of
  1582. interruptions.
  1583.  
  1584.  
  1585. 1.5. UUCP Lock Files
  1586.  
  1587. Unix has no standard way of obtaining exclusive  access  to  an  external  com-
  1588. munication  line.    When you issue the 'set line' command to Unix Kermit, Unix
  1589. would normally grant you access to the line  even  if  some  other  process  is
  1590. making  use  of  it.    The  method adopted by most Unix systems to handle this
  1591. situation is the "UUCP lock  file".    UUCP,  the  Unix-to-Unix  Copy  program,
  1592. creates  a  file  in  its  directory  (usually /usr/spool/uucp, on some systems
  1593. /etc/locks) with a name like LCK..name, where name is the device name, for  in-
  1594. stance tty07.
  1595.  
  1596. Unix Kermit uses UUCP lock files in order to avoid conflicts with UUCP, tip, or
  1597. other programs that follow this convention.  Whenever you attempt to access  an
  1598. external  line using the 'set line' command or `-l' on the command line, Kermit
  1599. looks in the UUCP directory for a lock file corresponding to that device.   For
  1600. instance, if you 'set line /dev/ttyi6' then Kermit looks for the file
  1601.  
  1602.     /usr/spool/uucp/LCK..ttyi6
  1603.  
  1604. If it finds this file, it gives you an error message and a directory listing of
  1605. the file so that you can see who is using it, e.g.
  1606.  
  1607.     -r--r--r--  1 fdc        4 May  7 13:02 /usr/spool/uucp/LCK..ttyi6
  1608.  
  1609. In this case, you would look up user fdc to find out how soon the line will be-
  1610. come free.
  1611.  
  1612. This  convention  requires  that  the  uucp  directory be publicly readable and
  1613. writable.  If it is not, the program will issue an appropriate warning message,
  1614. but will allow you to proceed at your own risk (and the risk of anyone else who
  1615. might also be using the same line).
  1616.  
  1617. If no lock file is found, Unix Kermit will attempt create one, thus  preventing
  1618. anyone  who subsequently tries to run Kermit, UUCP, tip, or similar programs on
  1619. the same line from gaining access until you release the line.  If Kermit  could
  1620. not  create  the  lock  file (for instance because the uucp directory is write-
  1621. protected), then you will receive a warning message  but  will  be  allowed  to
  1622. proceed  at  your  -- and everyone else's -- risk.  When Kermit terminates nor-
  1623. mally, your lock file is removed.
  1624.  
  1625. Even when the lock directory is writable and readable,  the  locking  mechanism
  1626. depends  upon  all  users using the same name for the same device.  If a device
  1627. has more than one path associated with it, then a lock can be  circumvented  by
  1628. using an alias.
  1629.  
  1630. When a lock-creating program abruptly terminates, e.g. because it crashes or is
  1631. killed via shell  command,  the  lock  file  remains  in  the  uucp  directory,
  1632. spuriously  indicating  that  the line is in use.  If the lock file is owned by
  1633. yourself, you may remove it.  Otherwise, you'll have to get the  owner  or  the
  1634. system manager to remove it, or else wait for a system task to do so; uucp sup-
  1635. ports a function (uuclean) which removes these files after a predetermined  age
  1636. -- uucp sites tend to run this function periodically via crontab.
  1637.  
  1638. Locking  is  not needed, or used, if communications occur over the user's login
  1639. terminal line (normally /dev/tty).
  1640.  
  1641. It may be seen that line locking is fraught with peril.  It is included in Unix
  1642. Kermit  only because other Unix communication programs rely on it.  While it is
  1643. naturally desirable to assure exclusive access  to  a  line,  it  is  also  un-
  1644. desirable  to  refuse  access  to a vacant line only because of a spurious lock
  1645. file, or because the uucp directory is not appropriately protected.
  1646.  
  1647.  
  1648. 1.6. C-Kermit under Berkeley or System III/V Unix:
  1649.  
  1650. C-Kermit may be interrupted at command level or during file transfer by  typing
  1651. Control-C.    The  program will perform its normal exit function, restoring the
  1652. terminal and releasing any lock.  If a protocol transaction was in progress, an
  1653. error  packet  will  be  sent  to  the opposite Kermit so that it can terminate
  1654. cleanly.
  1655.  
  1656. C-Kermit may be invoked in the background ("&" on shell commmand line).   If  a
  1657. background  process is "killed", the user will have to manually remove any lock
  1658. file and may need to restore the modem.    This  is  because  the  kill  signal
  1659. (kill(x,9)) cannot be trapped by Kermit.
  1660.  
  1661. During execution of a system command ('directory', 'cwd', or `!'), C-Kermit can
  1662. often be returned to command level by typing a single Control-C.  (With  System
  1663. III/V,  the  usual  interrupt  function  (often  the  DEL  key)  is replaced by
  1664. Control-C.)
  1665.  
  1666. Under Berkeley Unix only: C-Kermit may also be interrupted by  ^Z  to  put  the
  1667. process in the background.
  1668.  
  1669. Control-C, Control-Z, and Control-\ lose their normal functions during terminal
  1670. connection and also during file transfer when the controlling tty line is being
  1671. used for packet i/o.
  1672.  
  1673. If  you are running C-Kermit in "quiet mode" in the foreground, then interrupt-
  1674. ing the program with a console interrupt like Control-C will  not  restore  the
  1675. terminal  to  normal conversational operation.  This is because the system call
  1676. to enable console interrupt traps will cause the program to block if it's  run-
  1677. ning  in  the background, and the primary reason for quiet mode is to allow the
  1678. program to run in the background without blocking, so that  you  can  do  other
  1679. work in the foreground.
  1680.  
  1681. If C-Kermit is run in the background ("&" on shell commmand line), then the in-
  1682. terrupt signal (Control-C) (and System III/V quit signal) are  ignored.    This
  1683. prevents  an interrupt signal intended for a foreground job (say a compilation)
  1684. from being trapped by a background Kermit session.
  1685.  
  1686.  
  1687. 1.7. C-Kermit on the DEC Pro-3xx with Pro/Venix Version 1
  1688.  
  1689. The DEC Professional 300 series are PDP-11/23 based personal computers.   Venix
  1690. Version  1  is a Unix v7 derivative.  It should not be confused with Venix Ver-
  1691. sion 2, which is based on ATT System V; these comments apply to Venix Version 1
  1692. only.    C-Kermit  runs in local mode on the Pro-3xx when invoked from the con-
  1693. sole; the default device is /dev/com1.dout.  When connected to a remote  system
  1694. (using  C-Kermit's  'connect'  command), Pro/Venix itself (not Kermit) provides
  1695. VT52 terminal emulation.  Terminal operation at high speeds  (like  9600  baud)
  1696. requires  xon/xoff  flow  control, which unfortunately interferes with applica-
  1697. tions such as the EMACS that use Control-Q and Control-S as commands.
  1698.  
  1699. When logging in to a Pro-3xx (or any workstation) through the "back  port",  it
  1700. may  be  necessary  to  give  the  command  "set line /dev/tty" in order to get
  1701. C-Kermit to function correctly in remote mode (on a system in which it normally
  1702. expects to be operating in local mode).
  1703.  
  1704.  
  1705. 1.8. C-Kermit under VAX/VMS
  1706.  
  1707. C-Kermit  can  be  built using VAX-11 C to run under VMS.  Most of the descrip-
  1708. tions in this manual hold true, but it should be noted that as of this  writing
  1709. the  VMS  support  is not thoroughly tested, and no explicit support exists for
  1710. the various types of VMS files and their attributes.
  1711.  
  1712. The C-Kermit init file for VMS is called KERMIT.INI.
  1713.  
  1714.  
  1715. 1.9. C-Kermit on the Macintosh and other Systems
  1716.  
  1717. The "protocol kernel" of C-Kermit is also used by Columbia's Macintosh  Kermit.
  1718. The  user  and  system  interface  is  entirely  different, and is covered in a
  1719. separate document.
  1720.  
  1721. There is also a Kermit for the Commodore Amiga based on C-Kermit,  as  well  as
  1722. versions for MS-DOS, Data General operating systems, etc.
  1723.  
  1724.  
  1725. 1.10. C-Kermit Restrictions and Known Bugs
  1726.  
  1727.    1. Editing  characters:    The program's interactive command interrupt,
  1728.       delete, and kill characters are Control-C,  Delete  (or  Backspace),
  1729.       and  Control-U,  respectively.   There is currently no way to change
  1730.       them to suit your taste or match those used by your shell,  in  case
  1731.       those are different.
  1732.  
  1733.    2. Flow control:  C-Kermit attempts to use XON/XOFF flow control during
  1734.       protocol operations, but it also puts the  communication  line  into
  1735.       "rawmode".   On many systems, rawmode disables flow control, so even
  1736.       though you may have "set flow xon/xoff", no  flow  control  will  be
  1737.       done.  This is highly system and Unix-version dependent.
  1738.  
  1739.    3. Modem  controls:   If a connection is made over a communication line
  1740.       (rather than on the controlling terminal line), and  that  line  has
  1741.       modem  controls,  (e.g.  data  terminal  ready and carrier detection
  1742.       implementation), returning to the shell level  will  disconnect  the
  1743.       conversation.    In  that case, one should use interactive mode com-
  1744.       mands, and avoid use of piped shell-level operation (also  see  'set
  1745.       modem-dialer' and 'dial' commands.)
  1746.  
  1747.    4. Login Scripts:  The present login scripts implementation follows the
  1748.       Unix conventions of uucp's "L.sys" file, rather than the normal Ker-
  1749.       mit "INPUT/OUTPUT" style.
  1750.  
  1751.    5. Dial-out  vs  dial-in  communications  lines:    C-Kermit requires a
  1752.       dial-out or dedicated line for the "set line" or "-l" options.  Most
  1753.       systems  have  some  lines  dedicated  to dial-in, which they enable
  1754.       "loggers" on,  and  some  lines  available  for  dial-out.    Recent
  1755.       releases  of  Unix (ATT & Berkeley) have mechanisms for changing the
  1756.       directionality of a line.
  1757.  
  1758.    6. Using C-Kermit on Local Area Networks:   C-Kermit  can  successfully
  1759.       operate  at  speeds up to 19200 baud over LANs, provided the network
  1760.       buffers are big enough to accommodate Kermit packets.
  1761.  
  1762.       When computers are connected to LANs through  asynchronous  terminal
  1763.       interfaces,  then the connection should be configured to do XON/XOFF
  1764.       flow control between the network interface and the computer,  rather
  1765.       than  passing  these  signals  through transparently.  This can help
  1766.       prevent Kermit from overrunning the LAN's buffers if they are  small
  1767.       (or if the LAN is congested), and will can also prevent the LAN from
  1768.       overrunning a slow Kermit's buffers.
  1769.  
  1770.       If the network hardware cannot accept 100 characters at a time,  and
  1771.       flow  control  cannot  be done between the network and the computer,
  1772.       then Kermit's "set send/receive packet-length" command can  be  used
  1773.       to shorten the packets.
  1774.  
  1775.    7. Resetting terminal after abnormal termination or kill: When C-Kermit
  1776.       terminates abnormally (say, for example, by a kill command issued by
  1777.       the  operator)  the  user  may need to reset the terminal state.  If
  1778.       commands do not seem  to  be  accepted  at  the  shell  prompt,  try
  1779.       Control-J  "stty  sane"  Control-J  (use  "reset" on Berkeley Unix).
  1780.       That should take the terminal out of "raw  mode"  if  it  was  stuck
  1781.       there.
  1782.  
  1783.    8. Remote  host  commands  may  time-out  on  lengthy  activity:  Using
  1784.       "remote host" to instruct the C-Kermit server to invoke  Unix  func-
  1785.       tions  (like  "make")  that might take a long time to produce output
  1786.       can cause timeout conditions.
  1787.  
  1788.    9. XOFF deadlocks:  When connecting back to  C-Kermit  after  a  trans-
  1789.       action, or after finishing the server, it may be necessary to type a
  1790.       Control-Q to clear up an  XOFF  deadlock.    There's  not  much  the
  1791.       program can do about this...
  1792.  
  1793.  
  1794. 1.11. How to Build C-Kermit for a Unix System
  1795.  
  1796. The  C-Kermit  files,  as  distributed from Columbia, all begin with the prefix
  1797. "ck".  You should make a directory for these files  and  then  cd  to  it.    A
  1798. makefile  is  provided  to  build  C-Kermit for various Unix systems (there are
  1799. separate makefiles for VMS and the Macintosh).  As  distributed,  the  makefile
  1800. has  the  name  "ckuker.mak".  You should rename it to "makefile" and then type
  1801. "make xxx", where xxx is the symbol for your system, for instance "make bsd" to
  1802. make  C-Kermit for 4.x BSD Unix.  The result will be a program called "wermit".
  1803. You should test this to make sure it works; if it does, then you can rename  it
  1804. to "kermit" and install it for general use.  See the makefile for a list of the
  1805. systems supported and the corresponding "make" arguments.
  1806.  
  1807.  
  1808. 1.12. Adapting C-Kermit to Other Systems
  1809.  
  1810. C-Kermit is designed for portability.  The level of portability is indicated in
  1811. parentheses  after  the module name: "C" means any system that has a C compiler
  1812. that conforms to the description in "The C Programming Language" by Kernighan &
  1813. Ritchie  (Prentice-Hall, 1978).  "Cf" is like "C", but also requires "standard"
  1814. features like printf and fprintf, argument passing via argv/argc, and so on, as
  1815. described in Kernighan & Ritchie.  "Unix" means the module should be useful un-
  1816. der any Unix implementation; it requires features such  as  fork()  and  pipes.
  1817. Anything  else  means  that  the  module is particular to the indicated system.
  1818. C-Kermit file names are of the form:
  1819.  
  1820. ck<system><what>.<type>
  1821.  
  1822. where the part before the dot is no more than 6 characters long, the part after
  1823. the dot no more than 3 characters long, and:
  1824.  
  1825. <type> is the file type:
  1826.  
  1827.   c:    C language source
  1828.   h:    Header file for C language source
  1829.   w:    Wart preprocessor source, converted by Wart (or Lex) to a C program
  1830.   nr:   Nroff/Troff text formatter source
  1831.   mss:  Scribe text formatter source
  1832.   doc:  Documentation
  1833.   ps:   Documentation, Postscript format
  1834.   hlp:  Help text
  1835.   bld:  Instructions for building the program
  1836.   bwr:  A "beware" file - list of known bugs
  1837.   upd:  Program update log
  1838.   mak:  Makefile
  1839.  
  1840. <system> is a single character to tell what system the file applies to:
  1841.  
  1842.   9:    OS-9
  1843.   a:    Descriptive material, documentation
  1844.   c:    All systems with C compilers
  1845.   d:    Data General
  1846.   h:    Harris computers (reserved)
  1847.   i:    Commodore Amiga (Intuition)
  1848.   m:    Macintosh
  1849.   o:    OS/2
  1850.   p:    IBM PC, PC-DOS (reserved)
  1851.   u:    Unix and Unix-like systems
  1852.   v:    VAX/VMS
  1853.   w:    Wart
  1854.  
  1855. <what> is mnemonic (up to 3 characters) for what's in the file:
  1856.  
  1857.   aaa:  A "read-me" file, like this one
  1858.   cmd:  Command parsing
  1859.   con:  Connect command
  1860.   deb:  Debug/Transaction Log formats, Typedefs
  1861.   dia:  Modem/Dialer control
  1862.   fio:  System-depdendent File I/O
  1863.   fns:  Protocol support functions
  1864.   fn2:  More protocol support functions
  1865.   ker:  General C-Kermit definitions, information, documentation
  1866.   mai:  Main program
  1867.   pro:  Protocol
  1868.   scr:  Script command
  1869.   tio:  System-dependent terminal i/o & control and interrupt handing
  1870.   usr:  User interface
  1871.   us2:  More user interface
  1872.   us3:  Still more user interface
  1873.  
  1874. Examples:
  1875.  
  1876. ckufio.c        File i/o for Unix
  1877. ckmtio.c        Terminal i/o for Macintosh
  1878. ckuker.mss      Scribe source for for Kermit User Guide chapter
  1879. ckuker.nr       Nroff source file for Unix C-Kermit man page
  1880.  
  1881. The following material discusses each of the C-Kermit modules briefly.
  1882.  
  1883. ckcmai.c, ckcker.h, ckcdeb.h (Cf):
  1884.     This is the main program.  It contains declarations  for  global  variables
  1885.     and a small amount of code to initialize some variables and invoke the com-
  1886.     mand parser.  In its distributed form, it assumes  that  command  line  ar-
  1887.     guments  are passed to it via argc and argv.  Since this portion of code is
  1888.     only several lines long, it should be easy to replace for systems that have
  1889.     different  styles of user interaction.  The header files define symbols and
  1890.     macros used by the various modules of  C-Kermit.    ckcdeb.h  is  the  only
  1891.     header  file  that  is included by all the C-Kermit modules, so it contains
  1892.     not only the debug format  definitions,  but  also  any  compiler-dependent
  1893.     typedefs.
  1894.  
  1895. ckwart.c (Cf), ckcpro.w (C):
  1896.     The ckcpro module embodies the Kermit protocol state table and the code  to
  1897.     accomplish  state switching.  It is written in "wart", a language which may
  1898.     be regarded as a subset of the Unix "lex" lexical analyzer generator.  Wart
  1899.     implements  enough  of lex to allow the ckprot module to function.  Lex it-
  1900.     self was not used because it is proprietary.  The protocol module  ckcpro.w
  1901.     is  read by wart, and a system-independent C program is produced.  The syn-
  1902.     tax of a Wart program is illustrated  by  ckcpro.w,  and  is  described  in
  1903.     ckwart.doc.
  1904.  
  1905. ckcfns.c (C):
  1906.     The module contains all the Kermit protocol  support  functions  --  packet
  1907.     formation,  encoding,  decoding, block check calculation, filename and data
  1908.     conversion, protocol parameter negotiation, and high-level interaction with
  1909.     the communication line and file system.  To accommodate small systems, this
  1910.     module has been split into two -- ckcfns.c and ckcfn2.c.
  1911.  
  1912. ckutio.c:
  1913.     This module contains the system-dependent primitives for communication line
  1914.     i/o, timers, and interrupts for the various versions of Unix.  Certain  im-
  1915.     portant  variables  are  defined  in  this  module, which determine whether
  1916.     C-Kermit is by default remote or  local,  what  the  default  communication
  1917.     device is, and so forth.  The tio module maintains its own private database
  1918.     of file descriptors and modes for the console terminal and the file  trans-
  1919.     fer  communication  line so that other modules (like ckcfns or the terminal
  1920.     connect module) need not be concerned with them.  The variations among Unix
  1921.     implementations  with  respect  to  terminal  control and timers are accom-
  1922.     modated via conditional compilation.
  1923.  
  1924. ckufio.c:
  1925.     This  module  contains  system-dependent  primitives for file i/o, wildcard
  1926.     (meta character) expansion, file existence and access checking, and  system
  1927.     command execution for the various versions of Unix.  It maintains an inter-
  1928.     nal database of i/o "channels" (file pointers in this case) for  the  files
  1929.     C-Kermit  cares about -- the input file (the file which is being sent), the
  1930.     output file (the file being received), the various logs, the screen, and so
  1931.     forth.  This module varies little among Unix implementations except for the
  1932.     wildcard expansion code; the directory structure of  4.2bsd  Unix  is  dif-
  1933.     ferent  from  that of other Unix systems.  Again, variation among Unix sys-
  1934.     tems is selected using conditional compilation.
  1935.  
  1936. ckuusr.h, ckuusr.c, ckuus2.c, ckuus3.c (Unix):
  1937.     This is the "user interface" for C-Kermit.  It includes the command parser,
  1938.     the screen output functions, and console input functions.  The command par-
  1939.     ser comes in two pieces -- the traditional Unix command line decoder (which
  1940.     is quite small and compact), and the interactive keyword parser  (which  is
  1941.     rather large).  This module is fully replacable; its interface to the other
  1942.     modules is very simple, and is explained at the  beginning  of  the  source
  1943.     file.    The  ckuusr  module  also  includes  code  to execute any commands
  1944.     directly which don't require the Kermit protocol -- local file  management,
  1945.     etc.    The  module  is rated "Unix" because it makes occasional use of the
  1946.     system() function.
  1947.  
  1948.     Note that while ckuusr is logically one module, it has been split  up  into
  1949.     three C source files, plus a header file for the symbols they share in com-
  1950.     mon.  This is to accommodate small systems that cannot handle big  modules.
  1951.     ckuusr.c  has  the  command  line and top-level interactive command parser;
  1952.     ckuus2.c has the help command and strings; ckuus3 has the  set  and  remote
  1953.     commands along with the logging, screen, and "interrupt" functions.
  1954.  
  1955. ckucmd.c, ckucmd.h (Cf):
  1956.     This is an interactive command parsing package developed for C-Kermit.   It
  1957.     is written portably enough to be usable on any system that has a C compiler
  1958.     that supports functions like printf.    The  file  name  parsing  functions
  1959.     depend  upon primitives defined in the fio module; if these primitives can-
  1960.     not be supplied for a certain system, then the filename  parsing  functions
  1961.     can  be deleted, and the package will still be useful for parsing keywords,
  1962.     numbers, arbitrary text strings, and so forth.  The style of interaction is
  1963.     the same as that found on the DECSYSTEM-20.
  1964.  
  1965. ckucon.c (Unix):
  1966.     This is the connect module.  As supplied, it should operate in any Unix en-
  1967.     vironment,  or  any  C-based environment that provides the fork() function.
  1968.     The module requires access to global variables  that  specify  line  speed,
  1969.     parity,  duplex,  flow  control,  etc,  and  invokes functions from the tio
  1970.     module to accomplish the desired settings and input/output,  and  functions
  1971.     from  the  fio module to perform session logging.  No terminal emulation is
  1972.     performed, but since standard i/o is used for  the  console,  this  may  be
  1973.     piped  through a terminal emulation filter.  The ckucon function may be en-
  1974.     tirely replaced, so long as the global settings are honored by its replace-
  1975.     ment.    PC implementations of C-Kermit may require the ck?con module to do
  1976.     screen control, escape sequence interpretation, etc, and may also  wish  to
  1977.     write special code to get the best possible performance.
  1978.  
  1979. ckudia.c (Unix):
  1980.     This is the dialer module.  As supplied, it handles Hayes, Ventel,  Penril,
  1981.     Racal-Vadic, and several other modems.
  1982.  
  1983. ckuscr.c (Unix):
  1984.     This is the login script  module.    As  supplied,  it  handles  uucp-style
  1985.     scripts.
  1986.  
  1987. Moving C-Kermit to a new system entails:
  1988.  
  1989.    1. Creating  a  new ck?tio module in C, assembler, or whatever language
  1990.       is most appropriate for system programming on the new  system.    If
  1991.       the  system  is  Unix-like,  then  support  may  be added within the
  1992.       ckutio.c module itself using conditional compilation.
  1993.  
  1994.    2. Creating a new ck?fio module, as above.
  1995.  
  1996.    3. If the system is not Unix-like, then a new ckuusr module may be  re-
  1997.       quired, as well as a different invocation of it from ckcmai.
  1998.  
  1999.    4. If  the  distributed connect module doesn't work or performs poorly,
  2000.       then it may be replaced.  For instance, interrupt-driven i/o may  be
  2001.       required, especially if the system doesn't have forks.
  2002.  
  2003. Those  who  favor  a  different  style  of  user/program  interaction from that
  2004. provided in ckuusr.c may replace the entire module, for instance with one  that
  2005. provides a mouse/window/icon environment, a menu/function-key environment, etc.
  2006.  
  2007. A few guidelines should be followed to maintain portability:
  2008.  
  2009.    - Keep  variable and function names to 6 characters or less.  Don't use
  2010.      identifiers that are distinguished  from  one  another  only  by  al-
  2011.      phabetic case.
  2012.  
  2013.    - Keep  modules  small.    For instance, on a PDP-11 it is necessary to
  2014.      keep the code segment of each module below 8K in order to  allow  the
  2015.      segment  mapping  to  occur which is necessary to run programs larger
  2016.      than 64K on a non-I-and-D-space machine.
  2017.  
  2018.    - Keep strings short; many compilers have restrictive maximum  lengths;
  2019.      128  is the smallest maximum string constant length we've encountered
  2020.      so far.
  2021.  
  2022.    - Keep (f,s)printf formats short.  If these exceed  some  compiler  de-
  2023.      pendent maximum (say, 128) memory will be overwritten and the program
  2024.      will probably core dump.
  2025.  
  2026.    - Do not introduce system dependencies into ckcpro.w or ckcfn*.c.
  2027.  
  2028.    - If a variable is a character, declare as CHAR, not  int,  to  prevent
  2029.      the  various sign extension and byte swapping foulups that occur when
  2030.      characters are placed in integer variables.
  2031.  
  2032.    - Remember that different systems may use different  length  words  for
  2033.      different  things.  Don't assume an integer can be used as a pointer,
  2034.      etc.
  2035.  
  2036.    - Don't declare static functions; these can wreak  havoc  with  systems
  2037.      that do segment mapping.
  2038.  
  2039.    - In  conditional  compilations expressions, use #ifdef and #ifndef and
  2040.      not #if, which is not supported by some compilers.  Also,  don't  use
  2041.      any  operators  in these expressions; many compilers will fail to un-
  2042.      derstand expressions like #ifdef FOO | BAR.  Also, don't put trailing
  2043.      tokens on #else's or #endif's (use /* comments */).
  2044.  
  2045.    - Don't define multiline macros.
  2046.  
  2047. In  general,  remember that this program will have to be compilable by old com-
  2048. pilers and runnable on small systems.
  2049. Index
  2050.  
  2051.           Autodialer   5, 7
  2052.  
  2053.           Background   3, 4
  2054.  
  2055.           C-Kermit   1
  2056.  
  2057.           Dialout Modem   7
  2058.  
  2059.           Emergency Exit   1
  2060.  
  2061.           File Warning   1
  2062.  
  2063.           Hayes Modem   7
  2064.  
  2065.           IBM   6
  2066.  
  2067.           Modem   7
  2068.  
  2069.           TELENET   8
  2070.  
  2071.           UNIX Kermit   1
  2072.  
  2073.           Warning   1
  2074.  
  2075.                                Table of Contents
  2076.  
  2077. 1. UNIX KERMIT                                                                1
  2078.  
  2079.    1.1. The Unix File System                                                  1
  2080.    1.2. File Transfer                                                         1
  2081.    1.3. Command Line Operation                                                1
  2082.    1.4. Interactive Operation                                                 3
  2083.    1.5. UUCP Lock Files                                                       8
  2084.    1.6. C-Kermit under Berkeley or System III/V Unix:                         9
  2085.    1.7. C-Kermit on the DEC Pro-3xx with Pro/Venix Version 1                  9
  2086.    1.8. C-Kermit under VAX/VMS                                                9
  2087.    1.9. C-Kermit on the Macintosh and other Systems                           9
  2088.    1.10. C-Kermit Restrictions and Known Bugs                                 9
  2089.    1.11. How to Build C-Kermit for a Unix System                              9
  2090.    1.12. Adapting C-Kermit to Other Systems                                   9
  2091.  
  2092. Index                                                                        12
  2093.