home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ckc072.zip / ckdker.doc < prev    next >
Text File  |  1988-08-16  |  89KB  |  1,792 lines

  1. Preface concerning documentation for the Data General C-Kermit:
  2.  
  3. In making this commentary, I only rewrote the host-dependent sections of the
  4. original Unix document.  Very few differences exist between Unix C-Kermit and
  5. Data General C-Kermit.  But the entire document is included because of its
  6. utility to Data General users.  The terms "Unix Kermit", "C-Kermit", "Data
  7. General Kermit", and "Kermit" are used as if they were identical in meaning. 
  8. Discussion about "Unix files" and "Unix-to-Unix" transfers was left alone, so
  9. long was not confusing Data General users.  The terms "DG" and "Data General"
  10. refer to all systems which run this version of Kermit, which includes AOS/VS
  11. (and AOS/DVS) as a minimum, and perhaps includes AOS/RT32 and MV/UX if the
  12. source is recompiled and relinked.  DG/UX would need to re-insert some of the
  13. Unix-isms that I removed to make this version compatible in a non-Unix
  14. environment.  For details on installation or adapting the source, see
  15. ckdker.bld.  Also, DG/UX may not support the calls used from the System Call
  16. Dictionary for AOS/VS and AOS/DVS.  See ckdker.bwr for further details about
  17. this programs limitations. 
  18.  
  19. Additions to the following headers are:
  20.  
  21. Program:    Data General Version by Phil Julian, SAS Institute, Inc.
  22. Language:   DG's version 3.21 of C, with Rev 7.54 of AOS/VS
  23. Documentation:
  24.             Adapted by Phil Julian
  25. Version:    4D(061)
  26. Date:       May 12, 1987
  27.  
  28.  
  29. 9. UNIX KERMIT, adapted to the Data General computers
  30.  
  31. Program:    Frank  da  Cruz,  Bill Catchings, Jeff Damens, Columbia University;
  32.             Herm Fischer, Encino CA; contributions by many others.
  33. Language:   C
  34. Documentation:
  35.             Frank da Cruz, Herm Fischer
  36. Version:    4D(061)
  37. Date:       September 9, 1986 
  38.  
  39.  
  40. C-Kermit is an implementation of Kermit, written modularly and transportably in
  41. C.  The protocol state transition table is written in wart, a (non-proprietary)
  42. lex-like preprocessor for C.  System-dependent primitive functions are isolated
  43. into separately compiled modules so that the program should be easily portable
  44. among Unix systems and also to non-Unix systems that have C compilers, such as
  45. the Apple Macintosh, the Commodore Amiga, and the Data General minicomputers. 
  46. This document applies to Unix implementations of C-Kermit, and in most ways
  47. also to the VMS and other implementations. 
  48.  
  49.  
  50.  
  51. Data General Kermit Capabilities At A Glance:
  52.  
  53.   Local operation:                   Yes
  54.   Remote operation:                  Yes
  55.   Login scripts:                     No
  56.   Transfer text files:               Yes
  57.   Transfer binary files:             Yes
  58.   Wildcard send:                     Yes
  59.   File transfer interruption:        Yes
  60.   Filename collision avoidance:      Yes
  61.   Can time out:                      Yes
  62.   8th-bit prefixing:                 Yes
  63.   Repeat count prefixing:            Yes
  64.   Alternate block checks:            Yes
  65.   Terminal emulation:                Yes
  66.   Communication settings:            Yes
  67.   Transmit BREAK:                    Maybe no (I can't really test this)
  68.   Support for dialout modems:        No DIAL command
  69.   IBM mainframe communication:       Yes
  70.   Transaction logging:               Yes
  71.   Session logging:                   Yes
  72.   Debug logging:                     Yes
  73.   Packet logging:                    Yes
  74.   Act as server:                     Yes
  75.   Talk to server:                    Yes
  76.   Advanced server functions:         Yes
  77.   Local file management:             Yes
  78.   Command/Init files:                Yes
  79.   UUCP and multiuser line locking:   Yes
  80.   File attributes packets:           No
  81.   Command macros:                    No
  82.   Raw file transmit:                 No
  83.  
  84. All numbers in the C-Kermit documentation are decimal unless noted otherwise.
  85.  
  86. C-Kermit provides traditional Data General command line operation as well as
  87. interactive command prompting and execution.  The command line options provide
  88. access to a basic subset of C-Kermit's capabilities; the interactive command
  89. set is far richer. 
  90.  
  91. On  systems  with  dialout  modems,  C-Kermit's  command  file and login script
  92. facilities provide a counterpart  to  UUCP  for  file  transfer  with  non-UNIX
  93. operating  systems, including the use of scheduled (e.g. late night) unattended
  94. operation.
  95.  
  96.  
  97.  
  98. 9.1. The Data General File System
  99.  
  100. Data General has a different file system from Unix.  Consult your book on CLI
  101. (Command Line Interpreter) or the DG operating system.  These comments apply
  102. specifically to AOS/VS.  Other DG operating systems may have different file
  103. structures, and may in fact be supported transparently by the operating system. 
  104. (I have only tested this version of Kermit on AOS/VS, and I leave it to others
  105. to verify the results under AOS/DVS, AOS/RT32, and MV/UX.)
  106.  
  107. In general, Data General files can have lowercase and/or uppercase in its file
  108. names, and the operating system treats names as if they were all upper case. 
  109. Directory levels are separated by colon (":") characters.  For example,
  110.  
  111.   :udd:foo:bar
  112.  
  113. denotes the file bar in the directory :udd:foo.  Wildcard or "meta" characters
  114. allow groups of files to be specified.  "+" matches any string; "*" matches any
  115. single character besides a "."; "-" matches any any string up to the next ".";
  116. "#" matches the current directory and all sub-directories. 
  117.  
  118. When C-Kermit is invoked with file arguments specified on the CLI command line,
  119. the CLI expands the meta characters itself, and in this case a few additional
  120. characters available.  For example,
  121.  
  122.   xeq kermit -s :udd:[!user]:ck<u,v,m>-.<upd,bwr>
  123.  
  124. is expanded by the CLI into a list of all the files in the user's home
  125. directory (:udd:[!user]) that start with the characters "ck", followed by a
  126. single character "u", "v", or "m", followed by zero or more characters,
  127. followed by a dot, followed by one of the strings "upd" or "bwr".  Note the use
  128. of the "<>" macro characters to do an in-line expansion of arguments. 
  129. Internally, the C-Kermit program itself expands only the "-" meta character. 
  130. The "-" meta character does not conflict with the "-" wildcard character,
  131. because of the context of the character.  Also, note that any wildcard is
  132. expanded by the DG Kermit program, and not by the CLI shell.
  133.  
  134. Some additional meta characters are available in AOS/VS, "()", "[]", and "&". 
  135. A "[!" followed directly by a name, and terminated by "]", is a DG
  136. pseudo-macro; for example, "[!user]" expands to the login name used. 
  137. Parentheses will repeat each command for each argument.  For example:
  138.  
  139.   xeq kermit -s :udd:[!user]:ck<uvm>-.(upd bwr)
  140.  
  141. will expand into two CLI commands:
  142.  
  143.   xeq kermit -s :udd:[!user]:ck<uvm>-.upd
  144.   xeq kermit -s :udd:[!user]:ck<uvm>-.bwr
  145.  
  146. The square brackets are used to read from an external file, for example:
  147.  
  148.   xeq kermit [args.file]
  149.  
  150. where args.file contains the line:
  151.  
  152.   -s :udd:[!user]:ck<uvm>-.(upd bwr)
  153.  
  154. Finally, to continue the command to the next line, end the line with an
  155. ampersand character, "&".  In the following example, ")" is the default AOS/VS
  156. prompt, and "&)" is the line continuation prompt:
  157.  
  158.   ) xeq kermit &
  159.   &) -s :udd:[!user]:ck<uvm>-.(upd bwr)
  160.  
  161. Unix  files are linear (sequential) streams of 8-bit bytes.  Text files consist
  162. of 7-bit ASCII characters, with the high-order bit off (0), and lines separated
  163. by  the Unix newline character, which is linefeed (LF, ASCII 10).  This distin-
  164. guishes Unix text files from those on most other ASCII systems, in which  lines
  165. are  separated  by a carriage-return linefeed sequence (CRLF, ASCII 13 followed
  166. by ASCII 10).  Binary files are likely to contain data in the high bits of  the
  167. file bytes, and have no particular line or record structure.
  168.  
  169. When  transferring  files,  C-Kermit  will convert between upper and lower case
  170. filenames and between LF and CRLF line terminators automatically,  unless  told
  171. to  do  otherwise.   When binary files must be transferred, the program must be
  172. instructed not to perform LF/CRLF conversion (-i on the command  line  or  "set
  173. file type binary" interactively; see below).
  174.  
  175.  
  176. 9.2. File Transfer
  177.  
  178. If  C-Kermit  is  in  local mode, the screen (stdout) is continously updated to
  179. show the progress of the file transer.  A dot is printed for  every  four  data
  180. packets, other packets are shown by type:
  181.  
  182.     I Exchange Parameter Information
  183.     R Receive Initiate
  184.     S Send Initiate
  185.     F File Header
  186.     G Generic Server Command
  187.     C Remote Host Command
  188.     N Negative Acknowledgement (NAK)
  189.     E Fatal Error
  190.     T Indicates a timeout occurred
  191.     Q Indicates a damaged, undesired, or illegal packet was received
  192.     % Indicates a packet was retransmitted
  193.  
  194. You may type certain "interrupt" commands during file transfer:
  195.  
  196.     Control-F:  Interrupt the current File, and go on to the next (if any).
  197.     Control-B:  Interrupt the entire Batch of files, terminate the transaction.
  198.     Control-R:  Resend the current packet
  199.     Control-A:  Display a status report for the current transaction.
  200.  
  201. These interrupt characters differ from the ones used in other Kermit
  202. implementations to avoid conflict with commonly used Unix shell interrupt
  203. characters.  With Version 7, System III, and System V implementations of Unix,
  204. interrupt commands must be preceeded by the 'connect' escape character (e.g. 
  205. normally Ctrl-\).  The Data General does not need the escape character, but
  206. accepts the interrupt characters directly.  Ctrl-F and Ctrl-B are effective
  207. only during the transfer of data (D) packets, and cannot be used to interrupt a
  208. transfer that has not yet reached that stage. 
  209.  
  210.     CAUTION:  If Control-F or Control-B is used to cancel an incoming file,
  211.     and  a file of the same name previously existed, and the "file warning"
  212.     feature is not enabled, then the previous copy of the  file  will  dis-
  213.     appear.
  214.  
  215. EMERGENCY EXIT: When running Data General Kermit in remote mode, if you have
  216. started a protocol operation (sending or receiving a file, server command wait,
  217. etc), you will not be able to regain control of the terminal until the protocol
  218. operation has run its course (completed or timed out).  In particular, you
  219. cannot stop the protocol by typing the normal Data General interrupt
  220. characters, since the terminal has been put in "raw mode".  If you need to
  221. regain control quickly -- for instance, because the protocol is stuck -- you
  222. can type the following sequence of three characters directly to the Data
  223. General Kermit program ("connect" first if necessary):
  224.  
  225.     BREAK Control-C Control-A
  226.  
  227.       or
  228.  
  229.     BREAK Control-C Control-B
  230.  
  231. This will cause the program to exit and restore the terminal to normal.
  232.  
  233. WARNING:  Data General Kermit conifigures the console line to 
  234.  
  235.     CHAR/BREAK=BMOB
  236.  
  237. so that a BREAK will exit a binary-mode read operation ("raw mode" input). 
  238. Then the normal interrupt characters for a C program are accepted by the
  239. operating system.  When Kermit ends, the console line characteristics are
  240. restored to their state when the program was initiated.
  241.  
  242.  
  243. 9.3. Command Line Operation
  244.  
  245. The  C-Kermit command line syntax conforms to the Proposed Syntax Standards for
  246. Unix System Commands put forth by Kathy Hemenway and Helene  Armitage  of  AT&T
  247. Bell Laboratories in Unix/World, Vol.1, No.3, 1984.  The rules that apply are:
  248.  
  249.    - Command names must be between 2 and 9 characters ("kermit" is 6).
  250.    - Command names must include lower case letters and digits only.
  251.    - An option name is a single character.
  252.    - Options are delimited by '-'.
  253.    - Options  with  no  arguments  may  be  grouped  (bundled)  behind one
  254.      delimiter.
  255.    - Option-arguments cannot be optional.
  256.    - Arguments immediately follow options, separated by whitespace.
  257.    - The order of options does not matter.
  258.    - '-' preceded and followed by whitespace means standard input.
  259.  
  260. A group of bundled options may end with an option that has an argument.
  261.  
  262. The following notation is used in command descriptions:
  263.  
  264. fn      A DG file specification, possibly containing the  "wildcard" 
  265.         characters  `*', '-', '#', or  `+' (`+' matches all character strings,
  266.         `*' matches any single character, '-' matches any string up to a '.',
  267.         and '#' matches the current and all subdirectories).  Other special
  268.         characters are possible, such as '^' to move up a directory, or '=' to
  269.         use the current working directory, or '@' to use the peripheral
  270.         directory (:PER).
  271.  
  272. fn1     A DG file specification which may not contain  `*', '-', '#', or  `+',
  273.         but it may contain other special characters such as '^' to move up a 
  274.         directory, '=' to use the current working directory, or '@' to use the
  275.         peripheral directory (:PER).
  276.  
  277. rfn     A remote file specification in the remote system's  own  syntax,  which
  278.         may denote a single file or a group of files.
  279.  
  280. rfn1    A remote file specification which should denote only a single file.
  281.  
  282. n       A decimal number between 0 and 94.
  283.  
  284. c       A  decimal  number between 0 and 127 representing the value of an ASCII
  285.         character.
  286.  
  287. cc      A decimal number between 0 and 31, or else  exactly  127,  representing
  288.         the value of an ASCII control character.
  289.  
  290. [ ]     Any field in square braces is optional.
  291.  
  292. {x,y,z} Alternatives are listed in curly braces.
  293.  
  294. C-Kermit  command  line  options  may  specify  either actions or settings.  If
  295. C-Kermit is invoked with a command line that specifies no actions, then it will
  296. issue  a  prompt  and  begin interactive dialog.  Action options specify either
  297. protocol transactions or terminal connection.
  298.  
  299. -s fn   Send the specified file or files.    If  fn  contains  wildcard  (meta)
  300.         characters,  the  DG Kermit program (and not the CLI shell) expands it
  301.         into a list.  If fn is '-' then Kermit sends from standard input, which
  302.         must come from a file:  
  303.  
  304.           xeq kermit/i=foo.bar -s - 
  305.  
  306.         ( Parallel process pipes, signified by "|", are not available except
  307.           perhaps under MV/UX. )
  308.  
  309.         You could use this mechanism to send terminal typein, using control-D
  310.         as the EOF character, such as:
  311.  
  312.           xeq kermit/i=@console -s -
  313.  
  314. -r      Receive a file or files.  Wait passively for files to arrive.
  315.  
  316. -k      Receive (passively) a file or files, sending them to  standard  output.
  317.         This option can be used in several ways:
  318.  
  319.         xeq kermit/o=fn1 -k
  320.             Sends the incoming file or files to the named file, fn1.   If  more
  321.             than  one  file  arrives,  all  are  concatenated together into the
  322.             single file fn1.
  323.  
  324.         "kermit -k | command"  is not available except perhaps on MV/UX.
  325.  
  326. -a fn1  If you have specified a file transfer option, you may give an alternate
  327.         name for a single file with the -a ("as") option.  For example, 
  328.  
  329.           xeq kermit -s foo -a bar
  330.  
  331.         sends  the file foo telling the receiver that its name is bar.  If more
  332.         than one file arrives or is sent, only the first file  is  affected  by
  333.         the -a option:  
  334.  
  335.           xeq kermit -ra baz
  336.  
  337.         stores the first incoming file under the name baz.
  338.  
  339. -x      Begin server operation.  May be used in either local or remote mode.
  340.  
  341. Before  proceeding, a few words about remote and local operation are necessary.
  342. C-Kermit is "local" if it is running on PC or workstation that  you  are  using
  343. directly, or if it is running on a multiuser system and transferring files over
  344. an external communication line -- not your job's controlling terminal  or  con-
  345. sole.   C-Kermit is remote if it is running on a multiuser system and transfer-
  346. ring files over its own controlling  terminal's  communication  line  (normally
  347. @OUTPUT), connected to your PC or workstation.
  348.  
  349. If  you  are running C-Kermit on a PC, it is in local mode by default, with the
  350. "back port" designated for file transfer and terminal connection.  If  you  are
  351. running  C-Kermit on a multiuser (timesharing) system, it is in remote mode un-
  352. less you explicitly point it at an external line for file transfer or  terminal
  353. connection.  The following command sets C-Kermit's "mode":
  354.  
  355. -l dev  Line  --  Specify a terminal line to use for file transfer and terminal
  356.         connection, as in 
  357.  
  358.           xeq kermit -l @con5
  359.  
  360. When an external line is being used, you might also need  some  additional  op-
  361. tions for successful communication with the remote system:
  362.  
  363. -b n    Baud  --  Specify the baud rate for the line given in the -l option, as
  364.         in 
  365.  
  366.           xeq kermit -l @con5 -b 9600
  367.  
  368.         This option should always be included with the  -l  option,  since  the
  369.         speed of an external line is not necessarily what you expect.
  370.  
  371. -p x    Parity  --  e,o,m,s,n  (even, odd, mark, space, or none).  If parity is
  372.         other than none, then the 8th-bit prefixing mechanism will be used  for
  373.         transferring  8-bit  binary  data, provided the opposite Kermit agrees.
  374.         The default parity is none.
  375.  
  376. -t      Specifies half duplex,  line  turnaround  with  XON  as  the  handshake
  377.         character.
  378.  
  379. The  following  commands may be used only with a C-Kermit which is local either
  380. by default or else because the -l option has been specified.
  381.  
  382. -g rfn  Actively request a remote server to send the named file or  files;  rfn
  383.         is a file specification in the remote host's own syntax.  Since CLI
  384.         does not expand wildcard characters, they need not be quoted.  But
  385.         other special characters, "()" or "<>" or "&" if at the end of a line,
  386.         must be entered by using the "[!ascii]" pseudo-macro; for example,
  387.         "<xyz>" becomes "[!ascii 74]xyz[!ascii 76]".
  388.  
  389.           xeq kermit -g x*.?
  390.  
  391. -f      Send a 'finish' command to a remote server.
  392.  
  393. -c      Establish  a  terminal  connection  over  the specified or default com-
  394.         munication line, before any protocol transaction takes place.  Get back
  395.         to   the   local  system  by  typing  the  escape  character  (normally
  396.         Control-Backslash) followed by the letter 'c'.
  397.  
  398. -n      Like -c, but after a protocol transaction takes place; -c  and  -n  may
  399.         both  be used in the same command.  The use of -n and -c is illustrated
  400.         below.
  401.  
  402. On a timesharing system, the -l and -b options will also have  to  be  included
  403. with the -r, -k, or -s options if the other Kermit is on a remote system.
  404.  
  405. Several other command-line options are provided:
  406.  
  407. -i      Specifies that files should be sent or received exactly "as is" with no
  408.         conversions.  This option is necessary for transmitting  binary  files.
  409.         It may also be used in Unix-to-Unix transfers (it must be given to both
  410.         Unix Kermit programs), where it will improve performance by circumvent-
  411.         ing  the  normal  text-file conversions, and will allow mixture of text
  412.         and binary files in a single file group.
  413.  
  414. -w      Write-Protect -- Avoid filename collisions for incoming files.
  415.  
  416. -q      Quiet -- Suppress screen update during file transfer, for  instance  to
  417.         allow a file transfer to proceed in the background.
  418.  
  419. -d      Debug -- Record debugging information in the file debug.log in the cur-
  420.         rent directory.  Use this option if you believe  the  program  is  mis-
  421.         behaving, and show the resulting log to your local kermit maintainer.
  422.  
  423. -h      Help -- Display a brief synopsis of the command line options.
  424.  
  425. The Data General allows several switches on the "xeq" command line for AOS/VS
  426. and AOS/RT32.  These switches are described in chapter 11 of the C reference
  427. manual, and are in summary:
  428.  
  429.     xeq kermit/e ...            Append standard error output to @output
  430.     xeq kermit/e=filename ...   Create "filename" for standard error output
  431.     xeq kermit/ee=filename ...  Append standard error output to "filename"
  432.     xeq kermit/i ...            Get standard input from @DATA
  433.     xeq kermit/i=filename ...   Get standard input from "filename"
  434.     xeq kermit/l ...            Append standard output to @LIST
  435.     xeq kermit/l= ...           Identical to "xeq kermit/o=filename"
  436.     xeq kermit/o=filename ...   Create "filename" for standard output
  437.     xeq kermit/oo=filename ...  Append standard output to "filename"
  438.  
  439. The command line may contain no more than one protocol action option.
  440.  
  441. Files are sent with their own names, except that lowercase letters are raised
  442. to upper, pathnames are stripped off.  Incoming files are stored under their
  443. own names except that all letters are uppercased, and, if -w was specified, a
  444. "generation number" is appended to the name if it has the same name as an
  445. existing file which would otherwise be overwritten.  If the -a option is
  446. included, then the same rules apply to its argument.  The file transfer display
  447. shows any transformations performed upon filenames. 
  448.  
  449. During transmission, files are encoded as follows:
  450.  
  451.    - Control characters are converted to prefixed printables.
  452.  
  453.    - Sequences  of repeated characters are collapsed via repeat counts, if
  454.      the other Kermit is also capable of repeated-character compression.
  455.  
  456.    - If parity is being used on the communication  line,  data  characters
  457.      with  the  8th  (parity)  bit on are specially prefixed, provided the
  458.      other Kermit is capable of 8th-bit prefixing; if  not,  8-bit  binary
  459.      files cannot be successfully transferred.
  460.  
  461.    - Conversion is done between Unix newlines and carriage-return-linefeed
  462.      sequences unless the -i option was specified.
  463.  
  464.  
  465. Command Line Examples:
  466.  
  467.  
  468.     xeq kermit -l @con5 -b 1200 -cn -r
  469.  
  470. This command connects you to the system on the other end of @con5 at 1200 baud,
  471. where  you  presumably  log in and run Kermit with a 'send' command.  After you
  472. escape back, C-Kermit waits for a file (or files) to arrive.    When  the  file
  473. transfer is completed, you are reconnected to the remote system so that you can
  474. logout.
  475.  
  476.  
  477.     xeq kermit -l @con4 -b 1800 -cntp m -r -a foo
  478.  
  479. This command is like the preceding one, except the remote system in  this  case
  480. uses  half  duplex communication with mark parity.  The first file that arrives
  481. is stored under the name foo.
  482.  
  483.     xeq kermit -l @con6 -b 9600 -c | tek        (only perhaps under MV/UX)
  484.  
  485.  
  486.     xeq kermit -l @con6 -b 9600 -nf
  487.  
  488. This command would be used to shut down a remote server and then connect to the
  489. remote system, in order to log out or to make further use of it.  The -n option
  490. is invoked after -f (-c would have been invoked before).
  491.  
  492.  
  493.     Where ")" and "))" are the AOS/VS system prompts, enter the following:
  494.          ) qbatch/i      ;comment -- Add any other needed switches
  495.          )) xeq kermit -l @con6 -b 9600 -qg foo.*
  496.          )))             ;comment -- Enter a ")" to exit the qbatch/i command
  497.  
  498. This command causes C-Kermit to be invoked in a batch job, getting a group of
  499. files from a remote server (note that the '*' character is not quoted, since
  500. the CLI does not expand wildcard characters).  No display occurs on the screen,
  501. and the keyboard is not sampled for interruption commands.  ( Some DG users may
  502. want to provide examples using the PROC command, which is more like a
  503. background job than a batch job.  But we needed a batch example anyway.  )
  504.  
  505.  
  506.     Where ")" and "))" are the AOS/VS system prompts, enter the following:
  507.          ) qbatch/i      ;comment -- Add any other needed switches
  508.          )) x kermit/i=@NULL/o=foo.log -l @con6 -b 9600 -g foo.*
  509.          )))             ;comment -- Enter a ")" to exit the qbatch/i command
  510.  
  511. This  command  is  like  the previous one, except the file transfer display has
  512. been redirected to the file foo.log.  Standard input  is  also  redirected,  to
  513. prevent C-Kermit from sampling it for interruption commands.
  514.  
  515.  
  516.     xeq kermit -iwx
  517.  
  518. This  command  starts  up  C-Kermit as a server.  Files are transmitted with no
  519. newline/carriage-return-linefeed conversion; the -i option is necessary for bi-
  520. nary  file transfer and recommended for Unix-to-Unix transfers.  Incoming files
  521. that have the same names as existing files are given new, unique names.
  522.  
  523.  
  524.     xeq kermit -l @con6 -b 9600
  525.  
  526. This command sets the communication  line  and  speed.    Since  no  action  is
  527. specified,  C-Kermit issues a prompt and enters an interactive dialog with you.
  528. Any settings given on the command line remain in force during the  dialog,  un-
  529. less explicitly changed.
  530.  
  531.  
  532.     xeq kermit
  533.  
  534. This command starts up Kermit interactively with all default settings.
  535.  
  536. The  next  example shows how Unix Kermit might be used to send an entire direc-
  537. tory tree from one Unix system to another, using the tar  program  as  Kermit's
  538. standard  input and output.  On the orginating system, in this case the remote,
  539. type (for instance):
  540.  
  541.     tar cf - /usr/fdc | kermit -is -              (Not available)
  542.     kermit -il /dev/ttyi5 -b 9600 -k | tar xf -   (Not available)
  543.  
  544.     compress file | kermit -is -     (sender)     (Not available)
  545.     kermit -ik | uncompress          (receiver)   (Not available)
  546.  
  547.  
  548. Exit Status Codes:
  549.  
  550. Status codes are not returned, and the string variable is not set to return the
  551. error message.
  552.  
  553.  
  554. 9.4. Interactive Operation
  555.  
  556. WARNING:  If you have a non-DG type of terminal, enter this command:
  557.  
  558.   CHAR/ON/NAS
  559.  
  560. and Kermit will supply the correct backspace character and delete characters
  561. properly on the screen.  In other words, this DG Kermit supports DG and non-DG
  562. style terminals. 
  563.  
  564. C-Kermit's  interactive  command  prompt  is  "C-Kermit>".  In response to this
  565. prompt, you may type any valid command.  C-Kermit executes the command and then
  566. prompts  you for another command.  The process continues until you instruct the
  567. program to terminate.
  568.  
  569. Commands begin with a keyword, normally an English verb, such as "send".    You
  570. may  omit  trailing  characters  from  any keyword, so long as you specify suf-
  571. ficient characters to distinguish it from  any  other  keyword  valid  in  that
  572. field.    Certain commonly-used keywords (such as "send", "receive", "connect")
  573. also have special non-unique abbreviations ("s" for "send", "r" for  "receive",
  574. "c" for "connect").
  575.  
  576. Certain  characters  have  special  functions during typein of interactive com-
  577. mands:
  578.  
  579.     ?   Question mark, typed at any point in a command, will produce a  message
  580.         explaining  what  is  possible or expected at that point.  Depending on
  581.         the context, the message may be a brief phrase, a menu of keywords,  or
  582.         a list of files.
  583.  
  584.     ESC (The  Escape  or  Altmode  key)  --  Request  completion of the current
  585.         keyword or filename, or insertion of a default value.  The result  will
  586.         be a beep if the requested operation fails.
  587.  
  588.     DEL (The  Delete  or  Rubout key) -- Delete the previous character from the
  589.         command.  You may also use BS (Backspace, Control-H) for this function.
  590.  
  591.     ^W  (Control-W) -- Erase the rightmost word from the command line.
  592.  
  593.     ^U  (Control-U) -- Erase the entire command.
  594.  
  595.     ^R  (Control-R) -- Redisplay the current command.
  596.  
  597.     SP  (Space) -- Delimits fields (keywords, filenames, numbers) within a com-
  598.         mand.  HT (Horizontal Tab) may also be used for this purpose.
  599.  
  600.     CR  (Carriage  Return)  -- Enters the command for execution.  LF (Linefeed)
  601.         or FF (formfeed) may also be used for this purpose.
  602.  
  603.     \   (Backslash) -- Enter any of the  above  characters  into  the  command,
  604.         literally.    To enter a backslash, type two backslashes in a row (\\).
  605.         A backslash at the end of a command line causes the  next  line  to  be
  606.         treated  as a continuation line; this is useful for readability in com-
  607.         mand files, especially in the 'script' command.
  608.  
  609. You may type the editing characters (DEL, ^W, etc) repeatedly,  to  delete  all
  610. the  way  back to the prompt.  No action will be performed until the command is
  611. entered by typing carriage return, linefeed, or formfeed.  If you make any mis-
  612. takes,  you  will receive an informative error message and a new prompt -- make
  613. liberal use of `?' and ESC to feel your way through the commands.   One  impor-
  614. tant command is "help" -- you should use it the first time you run C-Kermit.
  615.  
  616. A command line beginning with a percent sign "%" is ignored.  Such lines may be
  617. used to include illustrative commentary in Kermit command dialogs.
  618.  
  619. Interactive C-Kermit accepts commands from files as well as from the keyboard. 
  620. When you enter interactive dialog, C-Kermit looks for the file .kermrc in your
  621. home or current directory (first it looks in the home directory, then in the
  622. current one) and executes any commands it finds there.  These commands must be
  623. in interactive format, not Data General command-line format (the initialization
  624. file is processed if you invoke Kermit with command-line action arguments, such
  625. that it does not enter interactive dialog).  A "take" command is also provided
  626. for use at any time during an interactive session, to allow interactive-format
  627. commands to be executed from a file; command files may be nested to any
  628. reasonable depth. 
  629.  
  630. Here is a brief list of C-Kermit interactive commands:
  631.  
  632.               !  Execute a Data General shell command, or start a shell.
  633.             bye  Terminate and log out a remote Kermit server.
  634.           close  Close a log file.
  635.         connect  Establish a terminal connection to a remote system.
  636.             cwd  Change Working Directory.
  637.            dial  Dial a telephone number.                     (Not Available)
  638.       directory  Display a directory listing.
  639.            echo  Display arguments literally.
  640.            exit  Exit from the program, closing any open files.
  641.          finish  Instruct a remote Kermit server to exit, but not log out.
  642.             get  Get files from a remote Kermit server.
  643.            help  Display a help message for a given command.
  644.             log  Open a log file -- debugging, packet, session, transaction.
  645.            quit  Same as 'exit'.
  646.         receive  Passively wait for files to arrive.
  647.          remote  Issue file management commands to a remote Kermit server.
  648.          script  Execute a login script with a remote system. (Not Available)
  649.            send  Send files.
  650.          server  Begin server operation.
  651.             set  Set various parameters.
  652.            show  Display values of 'set' parameters.
  653.           space  Display current disk space usage.
  654.      statistics  Display statistics about most recent transaction.
  655.            take  Execute commands from a file.
  656.  
  657. The 'set' parameters are:
  658.  
  659.     block-check  Level of packet error detection.
  660.           delay  How long to wait before sending first packet.
  661.          duplex  Specify which side echoes during 'connect'.
  662.     escape-character  Prefix for "escape commands" during 'connect'.
  663.            file  Set various file parameters.
  664.    flow-control  Communication line full-duplex flow control.
  665.       handshake  Communication line half-duplex turnaround character.
  666.      incomplete  Disposition for incompletely received files.
  667.            line  Communication line device name.
  668.    modem-dialer  Type of modem-dialer on communication line.  (Not Available)
  669.          parity  Communication line character parity.
  670.          prompt  The C-Kermit program's interactive command prompt.
  671.         receive  Parameters for inbound packets.
  672.            send  Parameters for outbound packets.
  673.           speed  Communication line speed.
  674.  
  675. The 'remote' commands are:
  676.  
  677.             cwd  Change remote working directory.
  678.          delete  Delete remote files.
  679.       directory  Display a listing of remote file names.
  680.            help  Request help from a remote server.
  681.            host  Issue a command to the remote host in its own command language
  682.           space  Display current disk space usage on remote system.
  683.            type  Display a remote file on your screen.
  684.             who  Display who's logged in, or get information about a user.
  685.  
  686. Most of these commands are described adequately in the Kermit User Guide.  Spe-
  687. cial aspects of certain Unix Kermit commands are described below.
  688.  
  689.  
  690.                               THE 'SEND' COMMAND
  691.  
  692. Syntax:  send fn  - or -  send fn1 rfn1
  693.  
  694. Send the file or files denoted by fn to the other Kermit, which should be
  695. running as a server, or which should be given the 'receive' command.  Each file
  696. is sent under its own name (as described above, or as specified by the 'set
  697. file names' command).  If the second form of the 'send' command is used, i.e. 
  698. with fn1 denoting a single Data General file, rfn1 may be specified as a name
  699. to send it under.  The 'send' command may be abbreviated to 's', even though
  700. 's' is not a unique abbreviation for a top-level C-Kermit command. 
  701.  
  702. The wildcard (meta) characters `+', '-', '#', and `*' are accepted in fn.  "+"
  703. matches any string; "*" matches any single character besides a "."; "-" matches
  704. any any string up to the next "."; "#" matches the current directory and all
  705. sub-directories.  Other notations for file groups, like `<a-z>og', are not
  706. available in interactive commands (though of course they are available on the
  707. command line).  When fn contains `+', '-', '#', or `*' characters, there is a
  708. limit to the number of files that can be matched, which varies from system to
  709. system.  If you get the message "Too many files match" then you'll have to make
  710. a more judicious selection.  If fn was of the form
  711.  
  712.   :udd:longname:anotherlongname:+
  713.  
  714. then C-Kermit's string space will fill up rapidly -- try doing a cwd (see
  715. below) to the path in question and reissuing the command. 
  716.  
  717. Note -- C-Kermit sends only from the current or specified directory.  It only
  718. traverses directory trees when the '#' character is used.  If the source
  719. directory contains subdirectories, they will be skipped (except for '#').  By
  720. the same token, C-Kermit does not create directories when receiving files. 
  721.  
  722. Another Note -- DG has no "invisible" files.
  723.  
  724.  
  725.                              THE 'RECEIVE' COMMAND
  726.  
  727. Syntax:  receive  - or -  receive fn1
  728.  
  729. Passively  wait  for files to arrive from the other Kermit, which must be given
  730. the 'send' command -- the 'receive' command does not work in conjunction with a
  731. server  (use  'get'  for  that).  If fn1 is specified, store the first incoming
  732. file under that name.  The 'receive' command may be abbreviated to 'r'.
  733.  
  734.  
  735.                               THE 'GET' COMMAND:
  736.  
  737. Syntax:  get rfn
  738.  
  739.       or: get
  740.               rfn
  741.               fn1
  742.  
  743. Request a remote Kermit server to send the named file or files.  Since a remote
  744. file  specification  (or  list)  might  contain  spaces, which normally delimit
  745. fields of a C-Kermit command, an alternate form of the command is  provided  to
  746. allow  the inbound file to be given a new name: type 'get' alone on a line, and
  747. you will be prompted separately for the remote and local  file  specifications,
  748. for example
  749.  
  750.   C-Kermit>get
  751.    Remote file specification: profile exec
  752.    Local name to store it under: profile.exec
  753.  
  754. As  with 'receive', if more than one file arrives as a result of the 'get' com-
  755. mand, only the first will be stored under the alternate name given by fn1;  the
  756. remaining  files will be stored under their own names if possible.  If a `?' is
  757. to be included in the remote file specification, you must prefix it with `\' to
  758. suppress its normal function of providing help.
  759.  
  760. If  you  have started a multiline 'get' command, you may escape from its lower-
  761. level prompts by typing a carriage return in response to the prompt, e.g.
  762.  
  763.   C-Kermit>get
  764.    Remote file specification: foo
  765.    Local name to store it under: (Type a carriage return here)
  766.   (cancelled)
  767.   C-Kermit>
  768.  
  769.  
  770.                              THE 'SERVER' COMMAND:
  771.  
  772. The 'server' command places C-Kermit in "server mode" on the currently selected
  773. communication  line.   All further commands must arrive as valid Kermit packets
  774. from the Kermit on the other end of the line.    The  Data General Kermit 
  775. server can respond to the following commands:
  776.  
  777. Command                Server Response
  778.   get                    Sends files
  779.   send                   Receives files
  780.   bye                    Attempts to log itself out     (DG doesn't log off)
  781.   finish                 Exits to level from which it was invoked
  782.   remote directory       Sends directory lising
  783.   remote delete          Removes files
  784.   remote cwd             Changes working directory
  785.   remote type            Sends files to your screen
  786.   remote space           Reports about its disk usage
  787.   remote who             Shows who's logged in
  788.   remote host            Executes a Unix shell command
  789.   remote help            Lists these capabilities
  790.  
  791. Note  that  the  Unix Kermit server cannot always respond to a BYE command.  It
  792. will attempt to do so using "kill()", but this will not work on all systems  or
  793. under all conditions.  The Data General Kermit will only exit Kermit, but it
  794. will not log off.
  795.  
  796. If the Kermit server is directed at an external line (i.e.  it is in "local
  797. mode") then the console may be used for other work if you have 'set file dis-
  798. play off'; normally the program expects the console to be used to observe file
  799. transfers and enter status queries or interruption commands.  The way to get
  800. Data General C-Kermit into background operation from interactive command level
  801. is to run a batch job.  (Perhaps some DG users can add some examples and
  802. information on using the PROC command to run a background task.) The more
  803. common method is to invoke the program with the desired command line arguments,
  804. after entering a "qbatch/i" command. 
  805.  
  806. When the Unix Kermit server is given a 'remote host' command, it executes it
  807. using the shell invoked upon login, which is always CLI, except perhaps on
  808. MV/UX. 
  809.  
  810.                   THE 'REMOTE', 'BYE', AND 'FINISH' COMMANDS:
  811.  
  812. C-Kermit  may itself request services from a remote Kermit server.  In addition
  813. to 'send' and 'get', the following commands may also be sent from C-Kermit to a
  814. Kermit server:
  815.  
  816.     remote cwd [directory]
  817.         If the optional remote directory specification is included, you will be
  818.         prompted  on a separate line for a password, which will not echo as you
  819.         type it.
  820.  
  821.     remote delete rfn       delete remote file or files.
  822.     remote directory [rfn]  directory listing of remote files.
  823.     remote host command     command in remote host's own command language.
  824.     remote space [rfn1]     disk usage report from remote host.
  825.     remote type [rfn]       display remote file or files on the screen.
  826.     remote who [user]       display information about who's logged in.
  827.     remote help             display remote server's capabilities.
  828.  
  829.     bye and finish:
  830.         When  connected  to  a  remote  Kermit server, these commands cause the
  831.         remote server to terminate; 'finish' returns it  to  Kermit  or  system
  832.         command  level  (depending on the implementation or how the program was
  833.         invoked); 'bye' also requests it to log itself out.
  834.  
  835.  
  836.                         THE 'LOG' AND 'CLOSE' COMMANDS:
  837.  
  838. Syntax: log {debugging, packets, session, transactions} [ fn1 ]
  839.  
  840. C-Kermit's progress may be logged in various ways.  The 'log' command  opens  a
  841. log,  the  'close' command closes it.  In addition, all open logs are closed by
  842. the 'exit' and 'quit' commands.  A name may be specified for a log file; if the
  843. name is omitted, the file is created with a default name as shown below.
  844.  
  845. log debugging
  846.     This produces a voluminous log of the internal workings of C-Kermit, of use
  847.     to  Kermit developers or maintainers in tracking down suspected bugs in the
  848.     C-Kermit program.  Use of this feature dramatically slows down  the  Kermit
  849.     protocol.  Default name: debug.log.
  850.  
  851. log packets
  852.     This produces a record of all the packets that go in and out  of  the  com-
  853.     munication port.  This log is of use to Kermit maintainers who are tracking
  854.     down protocol problems in either C-Kermit or any Kermit  that  C-Kermit  is
  855.     connected to.  Default name:  packet.log.
  856.  
  857. log session
  858.     This log will contain a copy of everything you see on  your  screen  during
  859.     the  'connect' command, except for local messages or interaction with local
  860.     escape commands.  Default name:  session.log.
  861.  
  862. log transactions
  863.     The transaction log is a record of all the files that were sent or received
  864.     while transaction logging was in effect.    It  includes  time  stamps  and
  865.     statistics,  filename  transformations,  and records of any errors that may
  866.     have occurred.  The transaction log allows you to have long unattended file
  867.     transfer  sessions  without  fear  of  missing  some  vital screen message.
  868.     Default name:  transact.log.
  869.  
  870. The 'close' command explicitly closes a log, e.g. 'close debug'.
  871.  
  872. Note:  Debug and Transaction logs are a compile-time option;  C-Kermit  may  be
  873. compiled  without these logs, in which case it will run faster, it will take up
  874. less space on the disk, and the commands relating to them will not be present.
  875.  
  876.  
  877.                         LOCAL FILE MANAGEMENT COMMANDS:
  878.  
  879. Unix Kermit allows some degree of local file management from  interactive  com-
  880. mand level:
  881.  
  882. directory [fn]
  883.     Displays a listing of the names, sizes, and dates of files  matching fn
  884.     (which defaults to '+').  Equivalent to `filestatus/assortment'.
  885.  
  886. cwd [directory-name]
  887.     Changes Kermit's working directory to the one  given,  or  to  the  default
  888.     directory  if the directory name is omitted.  This command affects only the
  889.     Kermit process and any processes it may subsequently create.  DG Kermit may
  890.     use '=' to display the current working directory, and '^' may be used to
  891.     traverse up the directory trees.
  892.  
  893. space [directory-name]
  894.     Display  information about disk space and/or quota in the current directory
  895.     and device.  If a directory-name is given, give space for that directory or
  896.     logical device.
  897.  
  898. ! [command]
  899.  
  900.     The command is executed by CLI.  If no command is specified, then an
  901.     interactive shell is started;  exiting  from  the  shell,  e.g.  by typing
  902.     Control-D or 'bye', will return you to C-Kermit command level.  Use the `!'
  903.     command to provide file management or other functions not explicitly 
  904.     provided  by C-Kermit commands.  The `!' command has certain peculiarities: 
  905.  
  906.        - C-Kermit attempts to use your preferred, customary (login) shell,
  907.          which is always CLI, except on MV/UX.
  908.        - At least one space must separate the '!' from the shell command.
  909.        - A 'dir' (change directory) command executed in  this  manner  will
  910.          have no effect -- use the C-Kermit 'cwd' command instead.
  911.  
  912.  
  913.                         THE 'SET' AND 'SHOW' COMMANDS:
  914.  
  915. Since  Kermit  is designed to allow diverse systems to communicate, it is often
  916. necessary to issue special instructions  to  allow  the  program  to  adapt  to
  917. peculiarities  of the another system or the communication path.  These instruc-
  918. tions are accomplished by the 'set' command.  The 'show' command may be used to
  919. display  current  settings.   Here is a brief synopsis of settings available in
  920. the current release of C-Kermit:
  921.  
  922. block-check {1, 2, 3}
  923.     Determines  the  level  of  per-packet  error  detection.  "1" is a single-
  924.     character 6-bit checksum, folded to include the values  of  all  bits  from
  925.     each  character.    "2"  is  a  2-character,  12-bit  checksum.    "3" is a
  926.     3-character, 16-bit cyclic redundancy check (CRC).  The  higher  the  block
  927.     check,  the  better  the  error detection and correction and the higher the
  928.     resulting overhead.  Type 1 is most commonly used; it is supported  by  all
  929.     Kermit  implementations,  and it has proven adequate in most circumstances.
  930.     Types 2 or 3 would be used to  advantage  when  transferring  8-bit  binary
  931.     files over noisy lines.
  932.  
  933. delay n
  934.     How many seconds to wait before sending the first  packet  after  a  'send'
  935.     command.  Used in remote mode to give you time to escape back to your local
  936.     Kermit and issue a 'receive' command.  Normally 5 seconds.
  937.  
  938. duplex {full, half}
  939.     For  use  during  'connect'.    Specifies  which side is doing the echoing;
  940.     'full' means the other side, 'half' means C-Kermit must echo typein itself.
  941.  
  942. escape-character cc
  943.     For use during 'connect' to get C-Kermit's attention.  The escape character
  944.     acts as a prefix to an 'escape command', for instance to close the  connec-
  945.     tion  and  return  to  C-Kermit  or  Unix command level.  The normal escape
  946.     character is Control-Backslash (28).  The escape character is also used  in
  947.     System  III/V  implementations  to  prefix  interrupt  commands during file
  948.     transfers.
  949.  
  950. file {display, names, type, warning}
  951.     Establish various file-related parameters:
  952.  
  953.     display {on, off}
  954.         Normally 'on'; when in local mode, display progress of  file  transfers
  955.         on  the  screen (stdout), and listen to the keyboard (stdin) for inter-
  956.         ruptions.  If off (-q on command line) none of this is  done,  and  the
  957.         file transfer may proceed in the background oblivious to any other work
  958.         concurrently done at the console terminal.
  959.  
  960.     names {converted, literal}
  961.         Normally  converted,  which  means  that  outbound  filenames have path
  962.         specifications stripped, lowercase letters raised to upper, tildes  and
  963.         extra  periods  changed  to X's, and an X inserted in front of any name
  964.         that starts  with  period.    Incoming  files  have  uppercase  letters
  965.         lowered.  Literal means that none of these conversions are done; there-
  966.         fore, any directory path appearing in  a  received  file  specification
  967.         must exist and be write-accessible.  When literal naming is being used,
  968.         the sender should not use path names in the file  specification  unless
  969.         the same path exists on the target system and is writable.
  970.  
  971.     type {binary, text}
  972.         Normally text, which means that conversion is done between Unix newline
  973.         characters  and  the carriage-return/linefeed sequences required by the
  974.         canonical Kermit file transmission format, and in common  use  on  non-
  975.         Unix  systems.   Binary means to transmit file contents without conver-
  976.         sion.  Binary (`-i' in command line notation) is necessary  for  binary
  977.         files,  and  desirable  in all Unix-to-Unix transactions to cut down on
  978.         overhead.
  979.  
  980.     warning {on, off}
  981.         Normally  off,  which means that incoming files will silently overwrite
  982.         existing files of the same name.  When on (`-w' on command line) Kermit
  983.         will check if an arriving file would overwrite an existing file; if so,
  984.         it will construct a new name for the arriving file, of the form  foo?n,
  985.         where foo is the name they share and n is a "generation number"; if foo
  986.         exists, then the new file will be called foo?1.  If foo and  foo?1  ex-
  987.         ist,  the  new file will be foo?2, and so on.  If the new name would be
  988.         longer than the maximum length for a filename, then characters would be
  989.         deleted  from  the  end first, for instance, thelongestname on a system
  990.         with a limit of 14 characters would become thelongestn?1.
  991.  
  992.             CAUTION:  If Control-F or Control-B is used to cancel an incom-
  993.             ing  file,  and a file of the same name previously existed, and
  994.             the "file warning" feature is not enabled,  then  the  previous
  995.             copy of the file will disappear.
  996.  
  997. flow-control {none, xon/xoff}
  998.     Normally xon/xoff for full duplex flow control.  Should be set to 'none' if
  999.     the  other  system cannot do xon/xoff flow control, or if you have issued a
  1000.     'set handshake' command.  If set to xon/xoff, then handshake should be  set
  1001.     to  none.    This  setting applies during both terminal connection and file
  1002.     transfer.  Warning: This command may have no effect on  certain  Unix  sys-
  1003.     tems,  where Kermit puts the communication line into 'rawmode', and rawmode
  1004.     precludes flow control.
  1005.  
  1006. incomplete {discard, keep}
  1007.     Disposition for incompletely received files.  If an incoming file is inter-
  1008.     rupted or an error occurs during transfer, the part that  was  received  so
  1009.     far  is  normally  discarded.   If you "set incomplete keep" then such file
  1010.     fragments will be kept.
  1011.  
  1012. handshake {xon, xoff, cr, lf, bell, esc, none}
  1013.     Normally  none.  Otherwise, half-duplex communication line turnaround hand-
  1014.     shaking is done, which means Unix Kermit will not reply to a  packet  until
  1015.     it  has received the indicated handshake character or has timed out waiting
  1016.     for it; the handshake setting applies only during file transfer.    If  you
  1017.     set handshake to other than none, then flow should be set to none.
  1018.  
  1019. line [device-name]
  1020.     The device name for the communication line to be used for file transfer and
  1021.     terminal connection, e.g. @con3.  If you specify a device name, Kermit will
  1022.     be in local mode, and you should remember to issue any other necessary
  1023.     'set'  commands,  such as 'set speed'.  If you omit the device name, Kermit
  1024.     will revert to its default mode of operation.   If  you  specify  @OUTPUT,
  1025.     Kermit  will  enter  remote  mode  (useful when logged in through the "back
  1026.     port" of a system normally used as a local-mode workstation).    When  Unix
  1027.     Kermit  enters  local  mode, it locks out all other processes from using
  1028.     the line.  If you run Kermit from within Kermit, then you will not be able
  1029.     to use the same communication line as the parent process. The method used
  1030.     for locking is inherent in the operating system and the way that PMGR
  1031.     controls character devices, and will be explained in more detail later.
  1032.  
  1033. modem-dialer {direct, hayes, racalvadic, ventel, ...}
  1034.     Not available.  No DIAL command.
  1035.  
  1036. parity {even, odd, mark, space, none}
  1037.     Specify  character  parity for use in packets and terminal connection, nor-
  1038.     mally none.  If other than none, C-Kermit will  seek  to  use  the  8th-bit
  1039.     prefixing  mechanism  for transferring 8-bit binary data, which can be used
  1040.     successfully only if the other Kermit agrees; if  not,  8-bit  binary  data
  1041.     cannot be successfully transferred.
  1042.  
  1043. prompt [string]
  1044.     The given string will be substituted  for  "C-Kermit>"  as  this  program's
  1045.     prompt.    If the string is omitted, the prompt will revert to "C-Kermit>".
  1046.     If the string is enclosed in doublequotes, the quotes will be stripped  and
  1047.     any leading and trailing blanks will be retained.
  1048.  
  1049. send parameter
  1050.     Establish parameters to use when sending packets.  These will be in  effect
  1051.     only for the initial packet sent, since the other Kermit may override these
  1052.     parameters during the protocol parameter exchange (unless noted below).
  1053.  
  1054.     end-of-packet cc
  1055.         Specifies the control character needed by the other Kermit to recognize
  1056.         the end of a packet.  C-Kermit sends this character at the end of  each
  1057.         packet.    Normally  13  (carriage return), which most Kermit implemen-
  1058.         tations require.  Other Kermits require no  terminator  at  all,  still
  1059.         others may require a different terminator, like linefeed (10).
  1060.  
  1061.     packet-length n
  1062.         Specify the maximum packet length to  send.    Normally  90.    Shorter
  1063.         packet  lengths  can be useful on noisy lines, or with systems or front
  1064.         ends or networks that have small buffers.  The shorter the packet,  the
  1065.         higher  the  overhead,  but the lower the chance of a packet being cor-
  1066.         rupted by noise, and the less time  to  retransmit  corrupted  packets.
  1067.         This  command  overrides the value requested by the other Kermit during
  1068.         protocol initiation.
  1069.  
  1070.     pad-character cc
  1071.         Designate  a  character  to send before each packet.  Normally, none is
  1072.         sent.  Outbound padding is sometimes necessary for  communicating  with
  1073.         slow half duplex systems that provide no other means of line turnaround
  1074.         control.  It can also be used to send special characters to  communica-
  1075.         tions  equipment  that  needs  to  be put in "transparent" or "no echo"
  1076.         mode, when this can be accomplished in by feeding it a certain  control
  1077.         character.
  1078.  
  1079.     padding n
  1080.         How many pad characters to send, normally 0.
  1081.  
  1082.     start-of-packet cc
  1083.         The  normal Kermit packet prefix is Control-A (1); this command changes
  1084.         the prefix C-Kermit puts on outbound packets.  The  only  reasons  this
  1085.         should  ever be changed would be: Some piece of equipment somewhere be-
  1086.         tween the two Kermit programs will not pass through  a  Control-A;  or,
  1087.         some  piece  of of equipment similarly placed is echoing its input.  In
  1088.         the latter case, the recipient of such an echo can  change  the  packet
  1089.         prefix for outbound packets to be different from that of arriving pack-
  1090.         ets, so that the echoed packets will be ignored.  The  opposite  Kermit
  1091.         must also be told to change the prefix for its inbound packets.
  1092.  
  1093.     timeout n
  1094.         Specifies the number of seconds you want the other Kermit to wait for a
  1095.         packet before timing it out and requesting retransmission.  If n is
  1096.         non-zero and less than 2, then n will be given a value of 2, since PMGR
  1097.         does not set device timeouts at less than 2 seconds.
  1098.  
  1099. receive parameter
  1100.     Establish parameters to request the other Kermit to use when sending  pack-
  1101.     ets.
  1102.  
  1103.     end-of-packet cc
  1104.         Requests the other Kermit to terminate its packets with  the  specified
  1105.         character.
  1106.  
  1107.     packet-length n
  1108.         Specify the maximum packet length to that you want the other Kermit  to
  1109.         send.  Normally 90.
  1110.  
  1111.     pad-character cc
  1112.         C-Kermit normally does not need to have incoming packets preceded  with
  1113.         pad characters.  This command allows C-Kermit to request the other Ker-
  1114.         mit to use cc as a pad character.  Default cc is NUL, ASCII 0.
  1115.  
  1116.     padding n
  1117.         How many pad characters to ask for, normally 0.
  1118.  
  1119.     start-of-packet cc
  1120.         Change the prefix C-Kermit looks for on inbound packets  to  correspond
  1121.         with what the other Kermit is sending.
  1122.  
  1123.     timeout n
  1124.         Normally, each Kermit partner sets its packet timeout interval based on
  1125.         what the opposite Kermit requests.  This command allows you to override
  1126.         the normal procedure and specify a timeout interval for Unix Kermit  to
  1127.         use  when waiting for packets from the other Kermit.  If you specify 0,
  1128.         then no timeouts will occur, and Unix Kermit will wait forever for  ex-
  1129.         pected packets to arrive.  If n is non-zero and less than 2, then n
  1130.         will be given a value of 2, since PMGR does not set device timeouts at
  1131.         less than 2 seconds.
  1132.  
  1133. speed {0, 50, 75, 110, 134, 150, 300, 600, 1200, 1800, 2400, 
  1134.        3600, 4800, 7200, 9600, 19200, 38400}
  1135.     The baud rate for the external communication line.  This command cannot  be
  1136.     used  to  change the speed of your own console terminal.  Data General
  1137.     systems require that you must give this command after a 'set line' command 
  1138.     before  you  can  use  the line.  'set baud' is a synomym for 'set speed'.
  1139.  
  1140.  
  1141.                               THE 'SHOW' COMMAND:
  1142.  
  1143. Syntax: show {parameters, versions}
  1144.  
  1145. The "show" command with the  default  argument  of  "parameters"  displays  the
  1146. values  of  all  the  'set'  parameters  described  above.    If you type "show
  1147. versions", then C-Kermit will display the version numbers and dates of all  its
  1148. internal  modules.  You should use the "show versions" command to ascertain the
  1149. vintage of your Kermit program before reporting problems to Kermit maintainers.
  1150.  
  1151.  
  1152.                            THE 'STATISTICS' COMMAND:
  1153.  
  1154. The statistics command  displays  information  about  the  most  recent  Kermit
  1155. protocol transaction, including file and communication line i/o, timing and ef-
  1156. ficiency, as well as what encoding options were  in  effect  (such  as  8th-bit
  1157. prefixing, repeat-count compression).
  1158.  
  1159.  
  1160.                         THE 'TAKE' AND 'ECHO' COMMANDS:
  1161.  
  1162. Syntax: take fn1
  1163.      echo [text to be echoed]
  1164.  
  1165. The  'take' command instructs C-Kermit to execute commands from the named file.
  1166. The file may contain any interactive C-Kermit commands, including 'take';  com-
  1167. mand  files  may  be nested to any reasonable depth.  The 'echo' command may be
  1168. used within command files to issue greetings, announce progress, ring the  ter-
  1169. minal bell, etc.
  1170.  
  1171. The  'echo'  command should not be confused with the Unix 'echo' command, which
  1172. can be used to show how meta characters would be expanded.    The  Kermit  echo
  1173. command  simply  displays its text argument (almost) literally at the terminal;
  1174. the argument may contain octal escapes of the form "\ooo", where o is an  octal
  1175. digit  (0-7),  and  there may be 1, 2, or 3 such digits, whose value specify an
  1176. ASCII character, such as "\007" (or "\07" or just "\7") for  beep,  "\012"  for
  1177. newline, etc.  Of course, each backslash must be must be entered twice in order
  1178. for it to be passed along to the echo command by the Kermit command parser.
  1179.  
  1180. Take-command files are in exactly the  same  syntax  as  interactive  commands.
  1181. Note  that  this  implies  that  if you want to include special characters like
  1182. question mark or backslash that you would have to  quote  with  backslash  when
  1183. typing  interactive  commands,  you must quote these characters the same way in
  1184. command files.  Long lines may be continued by ending them with a single  back-
  1185. slash.
  1186.  
  1187. Command files may be used in lieu of command macros, which have not been imple-
  1188. mented in this version of C-Kermit.  For instance, if you commonly connect to a
  1189. system  called  'B' that is connected to @con7 at 4800 baud, you could create a
  1190. file called b containing the commands
  1191.  
  1192.   % C-Kermit command file to connect to System B thru @con7
  1193.   set line @con7
  1194.   set speed 4800
  1195.   % Beep and give message
  1196.   echo \\007Connecting to System B...
  1197.   connect
  1198.  
  1199. and then simply type 'take b' (or 't b' since no other commands begin with  the
  1200. letter  't')  whenever  you wish to connect to system B. Note the comment lines
  1201. and the beep inserted into the 'echo' command.
  1202.  
  1203. For connecting to IBM mainframes, a number  of  'set'  commands  are  required;
  1204. these, too, are conveniently collected into a 'take' file like this one:
  1205.  
  1206.   % Sample C-Kermit command file to set up current line
  1207.   % for IBM mainframe communication
  1208.   %
  1209.   set parity mark
  1210.   set handshake xon
  1211.   set flow-control none
  1212.   set duplex half
  1213.  
  1214. Note  that no single command is available to wipe out all of these settings and
  1215. return C-Kermit to its default startup state; to do that, you can  either  res-
  1216. tart the program, or else make a command file that executes the necessary 'set'
  1217. commands:
  1218.  
  1219.   % Sample C-Kermit command file to restore normal settings
  1220.   %
  1221.   set parity none
  1222.   set handshake none
  1223.   set flow-control xon/xoff
  1224.   set duplex full
  1225.  
  1226. An implicit 'take' command is executed upon your .kermrc file  upon  C-Kermit's
  1227. initial  entry  into interactive dialog.  The .kermrc file should contain 'set'
  1228. or other commands you want to be in effect at all times.    For  instance,  you
  1229. might  want override the default action when incoming files have the same names
  1230. as existing files -- in that case, put the command 
  1231.  
  1232.   set file warning on
  1233.  
  1234. in your .kermrc file.  On some non-Unix systems that run  C-Kermit,  this  file
  1235. might have a different name, such as kermit.ini.  The Data General
  1236. initialization file is named .kermrc.
  1237.  
  1238.     WARNING:  Unlike the Unix Kermits, the initialization file IS processed if
  1239.     kermit is invoked with an action command from the command line.  
  1240.  
  1241. Commands executed from take files are not echoed at the terminal.  If you  want
  1242. to see the commands as well as their output, you could feed the command file to
  1243. C-Kermit via redirected stdin, as in 
  1244.  
  1245.   'xeq kermit/i=cmdfile'
  1246.  
  1247. Errors encountered during execution of take files (such as failure to  complete
  1248. dial  or script operations) cause termination of the current take file, popping
  1249. to the level that invoked it (take file,  interactive  level,  or  the  shell).
  1250. When  kermit  is  executed in the background, errors during execution of a take
  1251. file are fatal.
  1252.  
  1253.  
  1254.                             THE 'CONNECT' COMMAND:
  1255.  
  1256. The connect command links your terminal to another computer as if it were a lo-
  1257. cal  terminal to that computer, through the device specified in the most recent
  1258. 'set line' command, or through the default device if your system  is  a  PC  or
  1259. workstation.    All  characters you type at your keyboard are sent out the com-
  1260. munication line, all characters arriving at the  communication  port  are  dis-
  1261. played  on  your  screen.  Current settings of speed, parity, duplex, and flow-
  1262. control are honored.  If you have issued a 'log  session'  command,  everything
  1263. you  see  on  your  screen  will  also  be  recorded to your session log.  This
  1264. provides a way to "capture" files from systems that don't have Kermit  programs
  1265. available.
  1266.  
  1267. To  get  back  to your own system, you must type the escape character, which is
  1268. Control-Backslash (^\) unless you have changed it with the  'set  escape'  com-
  1269. mand,   followed  by  a  single-character  command,  such  as  'c'  for  "close
  1270. connection".  Single-character commands include:
  1271.  
  1272.   c     Close the connection
  1273.   b     Send a BREAK signal                 (May not work??)
  1274.   0     (zero) send a null
  1275.   s     Give a status report about the connection
  1276.   h     Hangup the phone
  1277.   ^\    Send Control-Backslash itself (whatever you  have  defined  the  escape
  1278.         character to be, typed twice in a row sends one copy of it).
  1279.  
  1280. Uppercase and control equivalents for these letters are also accepted.  A space
  1281. typed after the escape character is ignored.  Any other character will  produce
  1282. a beep.
  1283.  
  1284. The  connect  command simply displays incoming characters on the screen.  It is
  1285. assumed any screen control sequences sent by the host will be  handled  by  the
  1286. firmware  in  your  terminal or PC.  
  1287.  
  1288.   kermit -l /dev/acu -b 1200 -c | tek     (Not available, except perhaps MV/UX)
  1289.  
  1290. 'c' is an acceptable non-unique abbreviation for 'connect'.
  1291.  
  1292.  
  1293.                               THE 'DIAL' COMMAND:
  1294.  
  1295. Not available.
  1296.  
  1297.  
  1298.                              THE 'SCRIPT' COMMAND:
  1299.  
  1300. Not available.
  1301.  
  1302.  
  1303.                               THE 'HELP' COMMAND:
  1304.  
  1305. Syntax: help
  1306.    or: help keyword
  1307.    or: help {set, remote} keyword
  1308.  
  1309. Brief  help messages or menus are always available at interactive command level
  1310. by typing a question mark at any point.  A slightly more verbose form  of  help
  1311. is  available through the 'help' command.  The 'help' command with no arguments
  1312. prints a brief summary of how to enter commands and how to  get  further  help.
  1313. 'help'  may be followed by one of the top-level C-Kermit command keywords, such
  1314. as 'send', to request information about a command.  Commands such as 'set'  and
  1315. 'remote'  have  a further level of help.  Thus you may type 'help', 'help set',
  1316. or 'help set parity'; each will provide a successively more detailed  level  of
  1317. help.
  1318.  
  1319.  
  1320.                         THE 'EXIT' AND 'QUIT' COMMANDS:
  1321.  
  1322. These two commands are identical.  Both of them do the following:
  1323.  
  1324.    - Attempt to insure that the terminal is returned to normal.
  1325.    - Relinquish access to any communication line assigned via 'set line'.
  1326.    - Relinquish any uucp and multiuser locks on the communications line.
  1327.    - Hang  up the modem, if the communications line supports data terminal
  1328.      ready.
  1329.    - Close any open log files.
  1330.  
  1331. After exit from C-Kermit, your default directory will be the same as  when  you
  1332. started the program.  The 'exit' command is issued implicitly whenever C-Kermit
  1333. halts normally, e.g. after a command line invocation, or after certain kinds of
  1334. interruptions.
  1335.  
  1336.  
  1337. 9.5. UUCP Lock Files
  1338.  
  1339. Data General always gains exclusive access to an external communication line
  1340. after that line is opened.  When you issue the 'set line' command to Data
  1341. General  Kermit, the operating system agent, PMGR, grants exclusive access to
  1342. your process and pid.  But a child process and pid will not be able to access
  1343. that same line, even though (as a user) you still own the line.  You should not
  1344. use a CLI command like "assign @con5" to gain access to an external
  1345. communication line, since this action will prevent Kermit from gaining access
  1346. to the line (i.e., another process or pid owns the line).  When Data General
  1347. Kermit terminates for any reason, the line is closed by the operating system,
  1348. and should be available immediately.
  1349.  
  1350.  
  1351. 9.6. C-Kermit under Berkeley or System III/V Unix:
  1352.  
  1353. C-Kermit  may be interrupted at command level or during file transfer by typing
  1354. Control-C.  The program will perform its normal exit  function,  restoring  the
  1355. terminal and releasing any lock.  If a protocol transaction was in progress, an
  1356. error packet will be sent to the opposite  Kermit  so  that  it  can  terminate
  1357. cleanly.
  1358.  
  1359. C-Kermit  may  be invoked in the background ("&" on shell commmand line).  If a
  1360. background process is "killed", the user will have to manually remove any  lock
  1361. file  and  may  need  to  restore  the  modem.  This is because the kill signal
  1362. (kill(x,9)) cannot be trapped by Kermit.
  1363.  
  1364. During execution of a system command ('directory', 'cwd', or `!'), C-Kermit can
  1365. often  be returned to command level by typing a single Control-C.  (With System
  1366. III/V, the usual  interrupt  function  (often  the  DEL  key)  is  replaced  by
  1367. Control-C.)
  1368.  
  1369. Under  Berkeley  Unix  only:  C-Kermit may also be interrupted by ^Z to put the
  1370. process in the background.  In this case the terminal is  not  restored.    You
  1371. will  have  to type Control-J followed by "reset" followed by another Control-J
  1372. to get your terminal back to normal.
  1373.  
  1374. Control-C, Control-Z, and Control-\ lose their normal functions during terminal
  1375. connection and also during file transfer when the controlling tty line is being
  1376. used for packet i/o.
  1377.  
  1378. If you are running C-Kermit in "quiet mode" in the foreground, then  interrupt-
  1379. ing  the  program  with a console interrupt like Control-C will not restore the
  1380. terminal to normal conversational operation.  This is because the  system  call
  1381. to  enable console interrupt traps will cause the program to block if it's run-
  1382. ning in the background, and the primary reason for quiet mode is to  allow  the
  1383. program  to  run  in  the background without blocking, so that you can do other
  1384. work in the foreground.
  1385.  
  1386. If C-Kermit is run in the background ("&" on shell commmand line), then the in-
  1387. terrupt  signal  (Control-C)  (and System III/V quit signal) are ignored.  This
  1388. prevents an interrupt signal intended for a foreground job (say a  compilation)
  1389. from being trapped by a background Kermit session.
  1390.  
  1391.  
  1392. 9.7. C-Kermit on the DEC Pro-3xx with Pro/Venix Version 1
  1393.  
  1394. The  DEC Professional 300 series are PDP-11/23 based personal computers.  Venix
  1395. Version 1 is a Unix v7 derivative.  It should not be confused with  Venix  Ver-
  1396. sion 2, which is based on ATT System V; these comments apply to Venix Version 1
  1397. only.  C-Kermit runs in local mode on the Pro-3xx when invoked  from  the  con-
  1398. sole;  the default device is /dev/com1.dout.  When connected to a remote system
  1399. (using C-Kermit's 'connect' command), Pro/Venix itself  (not  Kermit)  provides
  1400. VT52  terminal  emulation.   Terminal operation at high speeds (like 9600 baud)
  1401. requires xon/xoff flow control, which unfortunately  interferes  with  applica-
  1402. tions such as the EMACS that use Control-Q and Control-S as commands.
  1403.  
  1404. When  logging  in to a Pro-3xx (or any workstation) through the "back port", it
  1405. may be necessary to give the command  "set  line  /dev/tty"  in  order  to  get
  1406. C-Kermit to function correctly in remote mode (on a system in which it normally
  1407. expects to be operating in local mode).
  1408.  
  1409.  
  1410. 9.8. C-Kermit under VAX/VMS
  1411.  
  1412. Version 4C of C-Kermit can be built using VAX-11 C to run under VMS.   Most  of
  1413. the  descriptions  in  this manual hold true, but it should be noted that as of
  1414. this writing the VMS support is not thoroughly tested, and no explicit  support
  1415. exists for the various types of VMS files and their attributes.
  1416.  
  1417. The C-Kermit init file for VMS is called KERMIT.INI.
  1418.  
  1419.  
  1420. 9.9. C-Kermit on the Macintosh and other Systems
  1421.  
  1422. The  "protocol kernel" of C-Kermit is also used by Columbia's Macintosh Kermit.
  1423. The user and system interface is  entirely  different,  and  is  covered  in  a
  1424. separate document.
  1425.  
  1426. There  is  also  a Kermit for the Commodore Amiga based on C-Kermit, as well as
  1427. versions for MS-DOS.
  1428.  
  1429.  
  1430. 9.10. C-Kermit Restrictions and Known Bugs
  1431.  
  1432.    1. Editing characters:  The program's  interactive  command  interrupt,
  1433.       delete,  and  kill  characters are Control-C, Delete (or Backspace),
  1434.       and Control-U, respectively.  There is currently no  way  to  change
  1435.       them  to  suit your taste or match those used by your shell, in case
  1436.       those are different.  
  1437.       NOTE:  Both DG and non-DG terminals are supported if the correct 
  1438.       "CHAR" command is issued.
  1439.  
  1440.    2. High baud rates:  There's no way to specify baud rates  higher  than
  1441.       9600  baud.  Most Unix systems don't supply symbols for them (unless
  1442.       you use EXTA, EXTB), and even when they do, the program has  no  way
  1443.       of  knowing whether a specific port's serial i/o controller supports
  1444.       those rates.
  1445.       NOTE:  Baud rates up to 38400 baud are supported.
  1446.  
  1447.    3. Modem controls:  If a connection is made over a  communication  line
  1448.       (rather  than  on  the controlling terminal line), and that line has
  1449.       modem controls, (e.g. data  terminal  ready  and  carrier  detection
  1450.       implementation),  returning  to  the shell level will disconnect the
  1451.       conversation.  In that case, one should use  interactive  mode  com-
  1452.       mands,  and  avoid use of piped shell-level operation (also see 'set
  1453.       modem-dialer' and 'dial' commands.)
  1454.       NOTE:  Returning to the shell should not disconnect the conversation 
  1455.       on the Data General minicomputers.
  1456.  
  1457.    4. Login Scripts:  The present login scripts implementation follows the
  1458.       Unix conventions of uucp's "L.sys" file, rather than the normal Ker-
  1459.       mit "INPUT/OUTPUT" style, so there's no way  to  arbitrarily  mingle
  1460.       script  output  with Kermit commands (e.g. changing parity or duplex
  1461.       in the middle of a script).
  1462.  
  1463.    5. Dial-out vs dial-in  communications  lines:    C-Kermit  requires  a
  1464.       dial-out or dedicated line for the "set line" or "-l" options.  Most
  1465.       systems have some lines dedicated  to  dial-in,  which  they  enable
  1466.       "loggers"  on,  and some lines available for dial-out.  Where a line
  1467.       must be shared between dial-in and  dial-out,  several  options  are
  1468.       available (though they are, strictly speaking, outside the pervue of
  1469.       C-Kermit).
  1470.  
  1471.       A simple shell program can be used to change directionality  of  the
  1472.       line  if  your  Unix  has the enable(8) and disable(8) commands.  In
  1473.       that case, the shell program could "grep" a "who" to see if  anybody
  1474.       is  logged  onto  the  desired  line; if not, it could "disable" the
  1475.       line.  The shell program will need to be set-uID'ed to  root.    The
  1476.       shell  program  can  be  called from kermit prior to a dial command,
  1477.       e.g., "! mydisable.shellprog".   Prior  to  the  final  "quit"  from
  1478.       C-Kermit,  another  shell  program could be executed to "enable" the
  1479.       line again.  This program also needs to be set-uID'ed to root.
  1480.  
  1481.       If your Unix lacks the enable(8) and  disable(8)  commands,  another
  1482.       common  technique  works if your system supports the /etc/ttys file.
  1483.       A shell program could call up an awk program to find the line in the
  1484.       file  and  set  the enable byte to 0 (to directly disable the line).
  1485.       Likewise, it can be reenabled by a counterpart at the end.   It  may
  1486.       be  necessary  to pause for 60 seconds after modifying that file be-
  1487.       fore the logger sees it and actually disables the line.
  1488.  
  1489.       NOTE:  DG cannot share a line for both dial-in and dial-out.  Such lines
  1490.       must be defined when the system is initialized by PID 2.  Any dial-out
  1491.       line should be disabled, by issuing the command, for example:
  1492.       
  1493.         CX DISABLE @CON5
  1494.         
  1495.  
  1496.    6. Using C-Kermit on Local Area Networks:   C-Kermit  can  successfully
  1497.       operate  at  speeds  up to 9600 baud over LANs, provided the network 
  1498.       buffers are big enough to accommodate Kermit packets (which are  al-
  1499.       most always less than 100 characters long).
  1500.  
  1501.       When  computers are connected to LAN's through asynchronous terminal
  1502.       interfaces, then the connection should be configured to do  XON/XOFF
  1503.       flow  control between the network interface and the computer, rather
  1504.       than passing these signals through transparently.    This  can  help
  1505.       prevent  Kermit from overrunning the LAN's buffers if they are small
  1506.       (or if the LAN is congested), and will can also prevent the LAN from
  1507.       overrunning a slow Kermit's buffers.
  1508.  
  1509.       If  the network hardware cannot accept 100 characters at a time, and
  1510.       flow control cannot be done between the network  and  the  computer,
  1511.       then  Kermit's  "set send/receive packet-length" command can be used
  1512.       to shorten the packets.
  1513.  
  1514.    7. Resetting terminal after abnormal termination or kill: When C-Kermit
  1515.       terminates abnormally (say, for example, by a kill command issued by
  1516.       the operator) the user may need to reset the  terminal  state.    If
  1517.       commands  do  not  seem  to  be  accepted  at  the shell prompt, try
  1518.       Control-J "stty sane" Control-J  (use  "reset"  on  Berkeley  Unix).
  1519.       That  should  take  the  terminal  out of "raw mode" if it was stuck
  1520.       there.
  1521.       NOTE:  DG does not have this problem.
  1522.  
  1523.    8. Remote host commands  may  time-out  on  lengthy  activity:    Using
  1524.       "remote  host"  to instruct the C-Kermit server to invoke Unix func-
  1525.       tions (like "make") that might take a long time  to  produce  output
  1526.       can cause timeout conditions.
  1527.  
  1528.    9. XOFF  deadlocks:    When  connecting back to C-Kermit after a trans-
  1529.       action, or after finishing the server, it may be necessary to type a
  1530.       Control-Q  to  clear  up  an  XOFF  deadlock.   There's not much the
  1531.       program can do about this...
  1532.  
  1533.   10. PC/IX Login Scripts -- Unfound Bug:  Though login scripts appear  to
  1534.       work  properly  on  most  processors,  in the case of the PC/XT with
  1535.       PC/IX, it appears that longer scripts need  to  be  broken  up  into
  1536.       shorter  scripts (invoked sequentially from the take file).  This is
  1537.       because the portion of the script handler which checks if an  opera-
  1538.       tion timed out seems to leave the processor in a strange state (i.e.
  1539.       hung).
  1540.  
  1541.  
  1542. 9.11. How to Build C-Kermit for a Unix System
  1543.  
  1544. See ckdker.bld for information on building Kermit for Data General systems.
  1545.  
  1546. The C-Kermit files, as distributed from Columbia, all  begin  with  the  prefix
  1547. "ck".    You  should  make  a  directory  for these files and then cd to it.  A
  1548. makefile is provided to build C-Kermit for  various  Unix  systems  (there  are
  1549. separate  makefiles  for  VMS and the Macintosh).  As distributed, the makefile
  1550. has the name "ckuker.mak".  You should rename it to "makefile"  and  then  type
  1551. "make xxx", where xxx is the symbol for your system, for instance "make bsd" to
  1552. make C-Kermit for 4.x BSD Unix.  The result will be a program called  "wermit".
  1553. You  should test this to make sure it works; if it does, then you can rename it
  1554. to "kermit" and install it for general use.  See the makefile for a list of the
  1555. systems supported and the corresponding "make" arguments.
  1556.  
  1557.  
  1558. 9.12. Adapting C-Kermit to Other Systems
  1559.  
  1560. C-Kermit is designed for portability.  The level of portability is indicated in
  1561. parentheses after the module name: "C" means any system that has a  C  compiler
  1562. that conforms to the description in "The C Programming Language" by Kernighan &
  1563. Ritchie (Prentice-Hall, 1978).  "Cf" is like "C", but also requires  "standard"
  1564. features like printf and fprintf, argument passing via argv/argc, and so on, as
  1565. described in Kernighan & Ritchie.  "Unix" means the module should be useful un-
  1566. der  any  Unix  implementation;  it requires features such as fork() and pipes.
  1567. Anything else means that the module is  particular  to  the  indicated  system.
  1568. C-Kermit file names are of the form:
  1569.  
  1570. ck<system><what>.<type>
  1571.  
  1572. where the part before the dot is no more than 6 characters long, the part after
  1573. the dot no more than 3 characters long, and:
  1574.  
  1575. <type> is the file type:
  1576.  
  1577.   c:    C language source
  1578.   h:    Header file for C language source
  1579.   w:    Wart preprocessor source, converted by Wart (or Lex) to a C program
  1580.   nr:   Nroff/Troff text formatter source
  1581.   mss:  Scribe text formatter source
  1582.   doc:  Documentation
  1583.   hlp:  Help text
  1584.   bld:  Instructions for building the program
  1585.   bwr:  A "beware" file - list of known bugs
  1586.   upd:  Program update log
  1587.   mak:  Makefile
  1588.  
  1589. <system> is a single character to tell what system the file applies to:
  1590.  
  1591.   a:    Descriptive material, documentation
  1592.   c:    All systems with C compilers
  1593.   d:    Data General                        (not MS-DOS)
  1594.   m:    Macintosh
  1595.   u:    Unix
  1596.   v:    VAX/VMS
  1597.   w:    Wart
  1598.  
  1599. <what> is mnemonic (up to 3 characters) for what's in the file:
  1600.  
  1601.   aaa:  A "read-me" file, like this one
  1602.   cmd:  Command parsing
  1603.   con:  Connect command
  1604.   deb:  Debug/Transaction Log formats, Typedefs
  1605.   dia:  Modem/Dialer control
  1606.   fio:  System-depdendent File I/O
  1607.   fns:  Protocol support functions
  1608.   fn2:  More protocol support functions
  1609.   ker:  General C-Kermit definitions, information, documentation
  1610.   mai:  Main program
  1611.   pro:  Protocol
  1612.   scr:  Script command
  1613.   tio:  System-dependent terminal i/o & control and interrupt handing
  1614.   usr:  User interface
  1615.   us2:  More user interface
  1616.   us3:  Still more user interface
  1617.  
  1618. Examples:
  1619.  
  1620. ckufio.c        File i/o for Unix
  1621. ckmtio.c        Terminal i/o for Macintosh
  1622. ckuker.mss      Scribe source for for Kermit User Guide chapter
  1623. ckuker.nr       Nroff source file for Unix C-Kermit man page
  1624.  
  1625. The following material discusses each of the C-Kermit modules briefly.
  1626.  
  1627. ckcmai.c, ckcker.h, ckcdeb.h (Cf):
  1628.     This  is  the  main program.  It contains declarations for global variables
  1629.     and a small amount of code to initialize some variables and invoke the com-
  1630.     mand  parser.    In  its distributed form, it assumes that command line ar-
  1631.     guments are passed to it via argc and argv.  Since this portion of code  is
  1632.     only several lines long, it should be easy to replace for systems that have
  1633.     different styles of user interaction.  The header files define symbols  and
  1634.     macros  used  by  the  various  modules  of C-Kermit.  ckcdeb.h is the only
  1635.     header file that is included by all the C-Kermit modules,  so  it  contains
  1636.     not  only  the  debug  format  definitions, but also any compiler-dependent
  1637.     typedefs.
  1638.  
  1639. ckwart.c (Cf), ckcpro.w (C):
  1640.     The  ckcpro module embodies the Kermit protocol state table and the code to
  1641.     accomplish state switching.  It is written in "wart", a language which  may
  1642.     be regarded as a subset of the Unix "lex" lexical analyzer generator.  Wart
  1643.     implements enough of lex to allow the ckprot module to function.   Lex  it-
  1644.     self  was not used because it is proprietary.  The protocol module ckcpro.w
  1645.     is read by wart, and a system-independent C program is produced.  The  syn-
  1646.     tax  of  a  Wart  program  is  illustrated by ckcpro.w, and is described in
  1647.     ckwart.doc.
  1648.  
  1649. ckcfns.c (C):
  1650.     The  module  contains  all  the Kermit protocol support functions -- packet
  1651.     formation, encoding, decoding, block check calculation, filename  and  data
  1652.     conversion, protocol parameter negotiation, and high-level interaction with
  1653.     the communication line and file system.  To accommodate small systems, this
  1654.     module has been split into two -- ckcfns.c and ckcfn2.c.
  1655.  
  1656. ckutio.c:
  1657.     This module contains the system-dependent primitives for communication line
  1658.     i/o,  timers, and interrupts for the various versions of Unix.  Certain im-
  1659.     portant variables are defined  in  this  module,  which  determine  whether
  1660.     C-Kermit  is  by  default  remote  or local, what the default communication
  1661.     device is, and so forth.  The tio module maintains its own private database
  1662.     of  file descriptors and modes for the console terminal and the file trans-
  1663.     fer communication line so that other modules (like ckcfns or  the  terminal
  1664.     connect module) need not be concerned with them.  The variations among Unix
  1665.     implementations with respect to terminal  control  and  timers  are  accom-
  1666.     modated via conditional compilation.
  1667.  
  1668. ckufio.c:
  1669.     This module contains system-dependent primitives  for  file  i/o,  wildcard
  1670.     (meta  character) expansion, file existence and access checking, and system
  1671.     command execution for the various versions of Unix.  It maintains an inter-
  1672.     nal  database  of i/o "channels" (file pointers in this case) for the files
  1673.     C-Kermit cares about -- the input file (the file which is being sent),  the
  1674.     output file (the file being received), the various logs, the screen, and so
  1675.     forth.  This module varies little among Unix implementations except for the
  1676.     wildcard  expansion  code;  the  directory structure of 4.2bsd Unix is dif-
  1677.     ferent from that of other Unix systems.  Again, variation among  Unix  sys-
  1678.     tems is selected using conditional compilation.
  1679.  
  1680. ckuusr.h, ckuusr.c, ckuus2.c, ckuus3.c (Unix):
  1681.     This is the "user interface" for C-Kermit.  It includes the command parser,
  1682.     the screen output functions, and console input functions.  The command par-
  1683.     ser comes in two pieces -- the traditional Unix command line decoder (which
  1684.     is  quite  small and compact), and the interactive keyword parser (which is
  1685.     rather large).  This module is fully replacable; its interface to the other
  1686.     modules  is  very  simple,  and is explained at the beginning of the source
  1687.     file.  The ckuusr  module  also  includes  code  to  execute  any  commands
  1688.     directly  which don't require the Kermit protocol -- local file management,
  1689.     etc.  The module is rated "Unix" because it makes  occasional  use  of  the
  1690.     system() function.
  1691.  
  1692.     Note  that  while ckuusr is logically one module, it has been split up into
  1693.     three C source files, plus a header file for the symbols they share in com-
  1694.     mon.   This is to accommodate small systems that cannot handle big modules.
  1695.     ckuusr.c has the command line and  top-level  interactive  command  parser;
  1696.     ckuus2.c  has  the  help command and strings; ckuus3 has the set and remote
  1697.     commands along with the logging, screen, and "interrupt" functions.
  1698.  
  1699. ckucmd.c, ckucmd.h (Cf):
  1700.     This  is an interactive command parsing package developed for C-Kermit.  It
  1701.     is written portably enough to be usable on any system that has a C compiler
  1702.     that  supports  functions  like  printf.    The file name parsing functions
  1703.     depend upon primitives defined in the fio module; if these primitives  can-
  1704.     not  be  supplied for a certain system, then the filename parsing functions
  1705.     can be deleted, and the package will still be useful for parsing  keywords,
  1706.     numbers, arbitrary text strings, and so forth.  The style of interaction is
  1707.     the same as that found on the DECSYSTEM-20.
  1708.  
  1709. ckucon.c (Unix):
  1710.     This is the connect module.  As supplied, it should operate in any Unix en-
  1711.     vironment, or any C-based environment that provides  the  fork()  function.
  1712.     The  module  requires  access  to global variables that specify line speed,
  1713.     parity, duplex, flow control, etc,  and  invokes  functions  from  the  tio
  1714.     module  to  accomplish the desired settings and input/output, and functions
  1715.     from the fio module to perform session logging.  No terminal  emulation  is
  1716.     performed,  but  since  standard  i/o  is used for the console, this may be
  1717.     piped through a terminal emulation filter.  The ckucon function may be  en-
  1718.     tirely replaced, so long as the global settings are honored by its replace-
  1719.     ment.  PC implementations of C-Kermit may require the ck?con module  to  do
  1720.     screen  control,  escape sequence interpretation, etc, and may also wish to
  1721.     write special code to get the best possible performance.
  1722.  
  1723. ckudia.c (Unix):
  1724.     This  is the dialer module.  As supplied, it handles Hayes, Ventel, Penril,
  1725.     Racal-Vadic, and several other modems.
  1726.  
  1727. ckuscr.c (Unix):
  1728.     This  is  the  login  script  module.    As supplied, it handles uucp-style
  1729.     scripts.
  1730.  
  1731. Moving C-Kermit to a new system entails:
  1732.  
  1733.    1. Creating a new ck?tio module in C, assembler, or  whatever  language
  1734.       is  most  appropriate  for system programming on the new system.  If
  1735.       the system is Unix-like,  then  support  may  be  added  within  the
  1736.       ckutio.c module itself using conditional compilation.
  1737.  
  1738.    2. Creating a new ck?fio module, as above.
  1739.  
  1740.    3. If  the system is not Unix-like, then a new ckuusr module may be re-
  1741.       quired, as well as a different invocation of it from ckcmai.
  1742.  
  1743.    4. If the distributed connect module doesn't work or  performs  poorly,
  1744.       then  it may be replaced.  For instance, interrupt-driven i/o may be
  1745.       required, especially if the system doesn't have forks.
  1746.  
  1747. Those who favor  a  different  style  of  user/program  interaction  from  that
  1748. provided  in ckuusr.c may replace the entire module, for instance with one that
  1749. provides a mouse/window/icon environment, a menu/function-key environment, etc.
  1750.  
  1751. A few guidelines should be followed to maintain portability:
  1752.  
  1753.    - Keep variable and function names to 6 characters or less.  Don't  use
  1754.      identifiers  that  are  distinguished  from  one  another only by al-
  1755.      phabetic case.
  1756.  
  1757.    - Keep modules small.  For instance, on a PDP-11  it  is  necessary  to
  1758.      keep  the  code segment of each module below 8K in order to allow the
  1759.      segment mapping to occur which is necessary to  run  programs  larger
  1760.      than 64K on a non-I-and-D-space machine.
  1761.  
  1762.    - Keep  strings short; many compilers have restrictive maximum lengths;
  1763.      128 is the smallest maximum string constant length we've  encountered
  1764.      so far.
  1765.  
  1766.    - Keep  (f,s)printf  formats  short.  If these exceed some compiler de-
  1767.      pendent maximum (say, 128) memory will be overwritten and the program
  1768.      will probably core dump.
  1769.  
  1770.    - Do not introduce system dependencies into ckcpro.w or ckcfn*.c.
  1771.  
  1772.    - If  a  variable  is a character, declare as CHAR, not int, to prevent
  1773.      the various sign extension and byte swapping foulups that occur  when
  1774.      characters are placed in integer variables.
  1775.  
  1776.    - Remember  that  different  systems may use different length words for
  1777.      different things.  Don't assume an integer can be used as a  pointer,
  1778.      etc.
  1779.  
  1780.    - Don't  declare  static  functions; these can wreak havoc with systems
  1781.      that do segment mapping.
  1782.  
  1783.    - In conditional compilations expressions, use #ifdef and  #ifndef  and
  1784.      not  #if,  which is not supported by some compilers.  Also, don't use
  1785.      any operators in these expressions; many compilers will fail  to  un-
  1786.      derstand expressions like #ifdef FOO | BAR.
  1787.  
  1788.    - Don't define multiline macros.
  1789.  
  1790. In  general,  remember that this program will have to be compilable by old com-
  1791. pilers and runnable on small systems.
  1792.