C-KERMIT (part 1 of 10)

gregg at okstate.UUCP gregg at okstate.UUCP
Fri Mar 8 17:40:00 AEST 1985



echo x - ckermi.mss part1
sed '1,$s/^X//' <<\!FUNKY!STUFF! > ckermi.mss
X at comment[	-*-Text-*-	]
X at Part(CKUNIX,root="KER:KUSER")
X at string(-ckversion="@q<4.2>")
X at define(exx=example,above 2,below 1)
X at Chapter<UNIX KERMIT>
X
X at Begin<Description,Leftmargin +12,Indent -12,spread 0>
X at i(Program:)@\Frank da Cruz, Bill Catchings, Jeff Damens, Columbia
XUniversity; Herm Fischer, Litton Data Systems, Van Nuys CA; contributions by
Xmany others.
X
X at i(Language:)@\C
X
X at i(Documentation:)@\Frank da Cruz, Columbia University; Herm
XFischer, Litton Data Systems, Van Nuys CA.
X
X at i(Version:)@\@value(-ckversion)
X
X at i(Date: )@\March 1985
X at end<Description>
X at Center(D R A F T)
X
X at begin(quotation)
XNOTE -- This source for this
Xdocumentation is written as input for the Scribe text formatter.
XIt needs to become input for two text formatters - Scribe and Nroff, the
Xformer for inclusion in the Kermit User Guide, and the latter for
XUnix man pages.  This might be done by defining formatting macros
Xin M4, which generate the appropriate Scribe and Nroff commands for
Xsectioning, itemization, description, etc.  (Volunteers?)
X at end(quotation)
X
XC-Kermit is a completely new implementation of Kermit, written modularly and
Xtransportably in C.  The protocol state transition table is written in
X at i'wart', a (not proprietary) lex-like preprocessor for C.  System-dependent
Xprimitive functions are isolated into separately compiled modules so that the
Xprogram should be easily portable among Unix systems and also to non-Unix
Xsystems that have C compilers.
X
X at subheading<Unix Kermit Capabilities At A Glance:>
X at begin<format,leftmargin +2,above 1,below 1>
X at tabclear()@tabset(3.5inches,4.0inches)
XLocal operation:@\Yes
XLocal operation:@\Yes
XRemote operation:@\Yes
XLogin scripts:@\Yes
XTransfer text files:@\Yes
XTransfer binary files:@\Yes
XWildcard send:@\Yes
XFile transfer interruption:@\Yes
XFilename collision avoidance:@\Yes
XCan time out:@\Yes
X8th-bit prefixing:@\Yes
XRepeat count prefixing:@\Yes
XAlternate block checks:@\Yes
XTerminal emulation:@\Yes
XCommunication settings:@\Yes
XTransmit BREAK:@\Yes
XSupport for dialout modems:@\Yes
XIBM mainframe communication:@\Yes
XTransaction logging:@\Yes
XSession logging:@\Yes
XDebug logging:@\Yes
XPacket logging:@\Yes
XAct as server:@\Yes
XTalk to server:@\Yes
XAdvanced server functions:@\Yes
XLocal file management:@\Yes
XCommand/Init files:@\Yes
XUUCP and multiuser line locking:@\Yes
XFile attributes:@\No
XCommand macros:@\No
XRaw file transmit:@\No
X at end<format>
X
X at index(C-Kermit)@index(Unix Kermit)
XC-Kermit provides traditional Unix command line operation as well as
Xinteractive command prompting and execution.  The command line options
Xprovide access to a minimal subset of C-Kermit's capabilities; the
Xinteractive command set is far richer.
X
XOn systems with dialout modems, C-Kermit can use command files and login
Xscripts to essentially duplicate the file transfer functionality of uucp among
Xheterogeneous operating systems, including by the use of scheduled (e.g. late
Xnight) unattended operation.
X
X at section(The Unix File System)
X
XConsult your Unix manual for details about the file system under your
Xversion of Unix.  For the purposes of Kermit, several things are worth
Xbriefly noting.  Unix files generally have lowercase names.  Unix
Xdirectories are tree-@|structured.  Directory levels are separated by
X"@q(/)" characters.  For example,
X at example(/usr/foo/bar)
Xdenotes the file @q(bar) in the directory @q(/usr/foo).  Wildcard or
X"meta" characters allow groups of files to be specified.  "@q(*)"
Xmatches any string; "@q(?)" matches any single character.
X
XWhen C-Kermit is invoked with files specified on the Unix command line,
Xthe Unix shell (Bourne Shell, C-Shell, etc) expands meta characters, and
Xin this case, a wider variety is available.  For example,
X at example(kermit -s ~/ck[x-z]*.[ch])
Xis expanded by the Berkeley C-Shell into a list of all the files in the
Xuser's home directory (@q[~/]) that start with the characters "@q(ck)",
Xfollowed by a single character @q(x), @q(y), or @q(z), followed by zero
Xor more characters, followed by a dot, followed by one of the characters
X at q(c) or @q(h).  Internally, the C-Kermit program itself expands only
Xthe @q("*") and @q("?") meta characters.
X
XUnix files are linear streams of 8-bit bytes.  Text files consist of
X7-bit ASCII characters, with the high bit off (0), and lines separated by
Xthe Unix newline character, which is linefeed (LF, ASCII 10).  This
Xdistinguishes Unix text files from those on most other ASCII systems, in
Xwhich lines are separated by a carriage-@|return linefeed sequence
X(CRLF, ASCII 13 followed by ASCII 10).  Binary files are likely to contain
Xdata in the high bits of the file bytes, and are not treated in terms of
Xlines.
X
XWhen transferring files, C-Kermit will convert between upper and lower
Xcase filenames and between LF and CRLF line terminators automatically,
Xunless told to do otherwise.  When binary files must be transferred, the
Xprogram must be instructed not to perform LF/CRLF conversion (@q[-i] on the
Xcommand line or "set file type" interactively; see below).
X
X at section(Command Line Operation)
X
XThe C-Kermit command line syntax has been changed from that of earlier
Xreleases of Unix Kermit to conform to the "Proposed Syntax Standards for
XUnix System Commands" put forth by Kathy Hemenway and Helene Armitage of
XAT&T Bell Laboratories in @ux(Unix/World), Vol.1, No.3, 1984.  The rules that
Xapply are:
X
X at begin(itemize,spread 0)
XCommand names must be between 2 and 9 characters ("kermit" is 6).
X
XCommand names must include lower case letters and digits only.
X
XAn option name is a single character.
X
XOptions are delimited by '@q(-)'.
X
XOptions with no arguments may be grouped (bundled) behind one delimiter.
X
XOption-arguments cannot be optional.
X
XArguments immediately follow options, separated by whitespace.
X
XThe order of options does not matter.
X
X'@q(-)' preceded and followed by whitespace means standard input.
X at end(itemize)
XA group of bundled options may end with an option that has an argument.
X
XThe following notation is used in command descriptions:
X at begin(description,leftmargin +8,indent -8)
X at i(fn)@\A Unix file specification, possibly containing the "wildcard"
Xcharacters '@q[*]' or '@q[?]' ('@q[*]' matches all character strings, '@q[?]'
Xmatches any single character).
X
X at i(fn1)@\A Unix file specification which may not contain '@q[*]' or '@q[?]'.
X
X at i(rfn)@\A remote file specification in the remote system's own syntax, which
Xmay denote a single file or a group of files.
X
X at i(rfn1)@\A remote file specification which should denote only a single file.
X
X at i(n)@\A decimal number between 0 and 94.
X
X at i(c)@\A decimal number between 0 and 127 representing the value of an
XASCII character.
X
X at i(cc)@\A decimal number between 0 and 31, or else exactly 127,
Xrepresenting the value of an ASCII control character.
X
X at q([ ])@\Any field in square braces is optional.
X
X at q({x,y,z})@\Alternatives are listed in curly braces.
X at end(description)
X
XC-Kermit command line options may specify either actions or settings.  If
XC-Kermit is invoked with a command line that specifies no actions, then it
Xwill issue a prompt and begin interactive dialog.
XAction options specify either protocol transactions or terminal connection.
X
X at begin<description,leftmargin +8,indent -8>
X at q(-s )@i(fn)@\Send the specified file or files.  If @i(fn) contains
Xwildcard (meta) characters, the Unix shell expands it into a list.  If @i(fn)
Xis '@q[-]' then kermit sends from standard input, which must
Xcome from a file:
X at example(kermit -s - < foo.bar)
Xor a parallel process:
X at example(ls -l | kermit -s -)
XYou cannot use this mechanism to send
Xterminal typein.  If you want to send a file whose name is "-"
Xyou can precede it with a path name, as in
X at example(kermit -s ./-)
X
X at q(-r)@\Receive a file or files.  Wait passively for files to arrive.
X
X at q(-k)@\Receive (passively) a file or files, sending them to standard
Xoutput.  This option can be used in several ways:
X at begin(description,leftmargin +4,indent -4)
X at q(kermit -k)@\Displays the incoming files on your screen; to be used only
Xin "local mode" (see below).
X
X at q(kermit -k > )@i(fn1)@\Sends the incoming file or files to the named file,
X at i(fn1).  If more than one file arrives, all are concatenated together
Xinto the single file @i(fn1).
X
X at q(kermit -k | command)@\Pipes the incoming data (single or multiple
Xfiles) to the indicated command, as in
X at example'kermit -k | sort > sorted.stuff'
X at end(description)
X
X at q(-a )@i(fn1)@\If you have specified a file transfer option, you may specify
Xan alternate name for a single file with the @q(-a) option.  For example,
X at example'kermit -s foo -a bar'
Xsends the file @q(foo) telling the receiver that its name is @q(bar).
XIf more than one file arrives or is sent, only the first file is
Xaffected by the @q(-a) option:
X at example'kermit -ra baz'
Xstores the first incoming file under the name @q(baz).
X
X at q(-x)@\Begin server operation.  May be used in either local or remote mode.
X at end(description)
X
XBefore proceeding, a few words about remote and local operation are
Xnecessary.  C-Kermit is "local" if it is running on PC or workstation that
Xyou are using directly, or if it is running on a multiuser system and
Xtransferring files over an external communication line -- not your job's
Xcontrolling terminal or console.  C-Kermit is remote if it is running on a
Xmultiuser system and transferring files over its own controlling terminal's
Xcommunication line, connected to your PC or workstation.
X
XIf you are running C-Kermit on a PC, it is in local mode by default,
Xwith the "back port" designated for file transfer and terminal connection.
XIf you are running C-Kermit on a multiuser (timesharing) system, it is
Xin remote mode unless you explicitly point it at an external line for
Xfile transfer or terminal connection.  The following command sets
XC-Kermit's "mode":
X
X at begin(description,leftmargin +8,indent -8)
X at q(-l )@i(dev)@\Line  -- Specify a terminal line to use for file
Xtransfer and terminal connection, as in
X at example'kermit -l /dev/ttyi5'
X at end(description)
X
XWhen an external line is being used, you might also need some additional
Xoptions for successful communication with the remote system:
X
X at begin(description,leftmargin +8,indent -8)
X at q(-b )@i(n)@\Baud  -- Specify the baud rate for the line given in the
X at q(-l) option, as in
X at example'kermit -l /dev/ttyi5 -b 9600'
XThis option should always be included with the @q(-l) option, since the
Xspeed of an external line is not necessarily what you expect.
X
X at q(-p )@i(x)@\Parity -- e,o,m,s,n (even, odd, mark, space, or none).  If parity
Xis other than none, then the 8th-bit prefixing mechanism will be
Xused for transferring 8-bit binary data, provided the opposite
XKermit agrees.  The default parity is none.
X
X at q(-t)@\Specifies half duplex, line turnaround with XON as the handshake
Xcharacter.
X at end(description)
X
XThe following commands may be used only with a C-Kermit which is local --
Xeither by default or else because the -l option has been specified.
X
X at begin(description,leftmargin +8,indent -8)
X at q(-g )@i(rfn)@\Actively request a remote server to send the named file
Xor files; @i(rfn) is a file specification in the remote host's own syntax.  If
X at i(fn) happens to contain any special shell characters, like '@q(*)',
Xthese must be quoted, as in
X at example'kermit -g x\*.\?'
X
X at q(-f)@\Send a 'finish' command to a remote server.
X
X at q(-c)@\Establish a terminal connection over the specified or default
Xcommunication line, before any protocol transaction takes place.
XGet back to the local system by typing the escape character
X(normally Control-Backslash) followed by the letter 'c'.
X
X at q(-n)@\Like @q(-c), but after a protocol transaction takes place;
X at q(-c) and @q(-n) may both be used in the same command.  The use of @q(-n)
Xand @q(-c) is illustrated below.
X at end(description)
XOn a timesharing system, the @q(-l) and @q(-b) options will also have to
Xbe included with the @q(-r), @q(-k), or @q(-s) options if the other
XKermit is on a remote system.
X
XIf C-Kermit is in local mode, the screen (stdout) is continously updated to
Xshow the progress of the file transer.  A dot is printed for every four data
Xpackets, other packets are shown by type (e.g. '@q(S)' for Send-Init),
X'@q(T)' is printed when there's a timeout, and '@q(%)' for each
Xretransmission.  In addition, you may type (to stdin) certain "interrupt"
Xcommands during file transfer:
X at begin(description,leftmargin +16,indent -12,spread 0)
XControl-F:@\Interrupt the current File, and go on to the next (if any).
X
XControl-B:@\Interrupt the entire Batch of files, terminate the transaction.
X
XControl-R:@\Resend the current packet
X
XControl-A:@\Display a status report for the current transaction.
X at end(description)
XThese interrupt characters differ from the ones used in other Kermit
Ximplementations to avoid conflict with Unix shell interrupt characters.
XWith System III and System V implementations of Unix, interrupt commands
Xmust be preceeded by the escape character (e.g. control- at q[\]).
X
XSeveral other command-line options are provided:
X
X at begin(description,leftmargin +8,indent -8)
X at q(-i)@\Specifies that files should be sent or received exactly "as is"
Xwith no conversions.  This option is necessary for transmitting
Xbinary files.  It may also be used to slightly boost efficiency
Xin Unix-to-Unix transfers of text files by eliminating CRLF/newline
Xconversion.
X
X at q(-w)@\Write-Protect -- Avoid filename collisions for incoming files.
X
X at q(-q)@\Quiet -- Suppress screen update during file transfer, for instance
Xto allow a file transfer to proceed in the background.
X
X at q(-d)@\Debug -- Record debugging information in the file @q(debug.log) in 
Xthe current directory.  Use this option if you believe the program
Xis misbehaving, and show the resulting log to your local
Xkermit maintainer.
X
X at q(-h)@\Help -- Display a brief synopsis of the command line options.
X at end(description)
XThe command line may contain no more than one protocol action option.
X
XFiles are sent with their own names, except that lowercase letters are
Xraised to upper, pathnames are stripped off, tilde ('@q[~]') characters
Xchanged to '@q(X)', and if the file name begins with a period, an
X'@q(X)' is inserted before it.  Incoming files are stored under their
Xown names except that uppercase letters are lowered, and, if @q(-w) was
Xspecified, a "generation number" is appended to the name if it has the
Xsame name as an existing file which would otherwise be overwritten.  If
Xthe @q(-a) option is included, then the same rules apply to its
Xargument.  The file transfer display shows any transformations performed
Xupon filenames.
X
XDuring transmission, files are encoded as follows:
X at begin(itemize)
XControl characters are converted to prefixed printables.
X
XSequences of repeated characters are collapsed via repeat counts, if
Xthe other Kermit is also capable of repeated-character compression.
X
XIf parity is being used on the communication line, data characters with 
Xthe 8th (parity) bit on are specially prefixed, provided the other Kermit
Xis capable of 8th-bit prefixing (if not, 8-bit binary files cannot be
Xsuccessfully transferred).
X
XConversion is done between Unix newlines and carriage-return-linefeed 
Xsequences unless the @q(-i) option was specified.
X at end(itemize)
X
X at subheading(Command Line Examples:)
X
X at example(kermit -l /dev/ttyi5 -b 1200 -cn -r)
XThis command connects you to the system on the other end of ttyi5 at
X1200 baud, where you presumably log in and run Kermit with a 'send'
Xcommand.  After you escape back, C-Kermit waits for a file (or files) to
Xarrive.  When the file transfer is completed, you are again connected to
Xthe remote system so that you can logout.
X
X at example(kermit -l /dev/ttyi4 -b 1800 -cntp m -r -a foo)
XThis command is like the preceding one, except the remote system in this
Xcase uses half duplex communication with mark parity.  The first file
Xthat arrives is stored under the name @q(foo).
X
X at exx(kermit -l /dev/ttyi6 -b 9600 -c | tek)
XThis example uses Kermit to connect your terminal to the system at the
Xother end of ttyi6.  The C-Kermit terminal connection does not
Xprovide any particular terminal emulation, so C-Kermit's standard i/o is
Xpiped through a (hypothetical) program called tek, which performs (say)
XTektronix emulation.
X
X at exx(kermit -l /dev/ttyi6 -b 9600 -nf)
XThis command would be used to shut down a remote server and then connect
Xto the remote system, in order to log out or to make further use of it.
XThe @q(-n) option is invoked @i(after) @q(-f) (@q[-c] would have been invoked
Xbefore).
X
X at exx(kermit -l /dev/ttyi6 -b 9600 -qg foo.\* &)
XThis command causes C-Kermit to be invoked in the background, getting a group
Xof files from a remote server (note the quoting of the '@q[*]' character).  No
Xdisplay occurs on the screen, and the keyboard is not sampled for
Xinterruption commands.  This allows other work to be done while file
Xtransfers proceed in the background.
X
X at exx(kermit -l /dev/ttyi6 -b 9600 -g foo.\* > foo.log < /dev/null &)
XThis command is like the previous one, except the file transfer display has
Xbeen redirected to the file @q(foo.log).  Standard input is also redirected, to
Xprevent C-Kermit from sampling it for interruption commands.
X
X at exx(kermit -iwx)
XThis command starts up C-Kermit as a server.  Files are transmitted with
Xno newline/@|carriage-@|return-@|linefeed conversion; the @q(-i) option is
Xnecessary for binary file transfer and useful for Unix-@|to-@|Unix transfers.
XIncoming files that have the same names as existing files are given new, unique
Xnames.
X
X at exx(kermit -l /dev/ttyi6 -b 9600)
XThis command sets the communication line and speed.  Since no action is
Xspecified, C-Kermit issues a prompt and enters an interactive dialog with
Xyou.  Any settings given on the command line remain in force during the
Xdialog, unless explicitly changed.
X
X at exx(kermit)
XThis command starts up Kermit interactively with all default settings.
X
XA final example shows how Unix Kermit might be used to send an entire directory
Xtree from one Unix system to another, using the tar program as Kermit's
Xstandard input and output.  On the orginating system, in this case the remote,
Xtype (for instance):@label(-uxtar)
X
X at exx(tar cf - /usr/fdc | kermit -is -)
XThis causes tar to send the directory @q(/usr/fdc) (and all its files and all
Xits subdirectories and all their files...) to standard output instead of to a
Xtape; kermit receives this as standard input and sends it as a binary file.
XOn the receiving system, in this case the local one, type (for instance):
X
X at exx(kermit -il /dev/ttyi5 -b 9600 -k | tar xf -)
XKermit receives the tar archive, and sends it via standard output to its own
Xcopy of tar, which extracts from it a replica of the original directory tree.
X
X at subheading(Exit Status Codes:)
X
XKermit returns an exit status of zero, except when a fatal error is
Xencountered, where the exit status is set to one.  With background
Xoperation (e.g., '@q(&)' on invoking command line), driven by scripted
Xinteractive commands (redirected standard input and/or take files),
Xany failed interactive command (such as failed dial or script attempt)
Xcauses the fatal error exit.
X
X
X at section(Interactive Operation)
X
XC-Kermit's interactive command prompt is "@q(C-Kermit>)".  In response to this
Xprompt, you may type any valid command.  C-Kermit executes the command and
Xthen prompts you for another command.  The process continues until you
Xinstruct the program to terminate.
X
XCommands begin with a keyword, normally an English verb, such as "send".
XYou may omit trailing characters from any keyword, so long as you specify
Xsufficient characters to distinguish it from any other keyword valid in that
Xfield.  Certain commonly-used keywords (such as "send", "receive", "connect")
Xhave special non-unique abbreviations ("s" for "send", "r" for "receive",
X"c" for "connect").
X
XCertain characters have special functions in interactive commands:
X at Begin(Description,leftmargin +8,indent -4)
X at q(?)@\Question mark, typed at any point in a command, will produce a
Xmessage explaining what is possible or expected at that point.  Depending on
Xthe context, the message may be a brief phrase, a menu of keywords, or a list
Xof files.
X
X at q(ESC)@\(The Escape or Altmode key) -- Request completion of the current
Xkeyword or filename, or insertion of a default value.  The result will be a
Xbeep if the requested operation fails.
X
X at q(DEL)@\(The Delete or Rubout key) -- Delete the previous character from the
Xcommand.  You may also use BS (Backspace, Control-H) for this function.
X
X at q(^W)@\(Control-W) -- Erase the rightmost word from the command line.
X
X at q(^U)@\(Control-U) -- Erase the entire command.
X
X at q(^R)@\(Control-R) -- Redisplay the current command.
X
X at q(SP)@\(Space) -- Delimits fields (keywords, filenames, numbers) within
Xa command.  HT (Horizontal Tab) may also be used for this purpose.
X
X at q(CR)@\(Carriage Return) -- Enters the command for execution.  LF (Linefeed)
Xor FF (formfeed) may also be used for this purpose.
X
X at q(\)@\(Backslash) -- Enter any of the above characters into the command,
Xliterally.  To enter a backslash, type two backslashes in a row (@q[\\]).
X at End(Description)
XYou may type the editing characters (@q[DEL], @q[^W], etc) repeatedly, to
Xdelete all the way back to the prompt.  No action will be performed until the
Xcommand is entered by typing carriage return, linefeed, or formfeed.  If you
Xmake any mistakes, you will receive an informative error message and a new
Xprompt -- make liberal use of '@q[?]' and ESC to feel your way through the
Xcommands.  One important command is "help" -- you should use it the first time
Xyou run C-Kermit.
X
XInteractive C-Kermit accepts commands from files as well as from the
Xkeyboard.  When you enter interactive mode, C-Kermit looks for the file
X at q(.kermrc) in your home or current directory (first it looks in the home
Xdirectory, then in the current one) and executes any commands it finds there.
XThese commands must be in interactive format, not Unix command-line format.
XA "take" command is also provided for use at any time during an interactive
Xsession.  Command files may be nested to any reasonable depth.
X
XHere is a brief list of C-Kermit interactive commands:
X at begin(format,spread 0)
X at tabclear()@tabset(1.5inches,2.0inches,2.5inches)
X@>!@\  Execute a Unix shell command.
X@>bye@\  Terminate and log out a remote Kermit server.
X@>close@\  Close a log file.
X@>connect@\  Establish a terminal connection to a remote system.
X@>cwd@\  Change Working Directory.
X@>dial@\  Dial a telephone number.
X@>directory@\  Display a directory listing.
X@>echo@\  Display arguments literally.
X@>exit@\  Exit from the program, closing any open logs.
X@>finish@\  Instruct a remote Kermit server to exit, but not log out.
X@>get@\  Get files from a remote Kermit server.
X@>help@\  Display a help message for a given command.
X@>log@\  Open a log file -- debugging, packet, session, transaction.
X@>quit@\  Same as 'exit'.
X@>receive@\  Passively wait for files to arrive.
X@>remote@\  Issue file management commands to a remote Kermit server.
X@>script@\  Execute a login script with a remote system.
X@>send@\  Send files.
X@>server@\  Begin server operation.
X@>set@\  Set various parameters.
X@>show@\  Display values of 'set' parameters.
X@>space@\  Display current disk space usage.
X@>statistics@\  Display statistics about most recent transaction.
X@>take@\  Execute commands from a file.
X at end(format)
X
XThe 'set' parameters are:
X at begin(format,spread 0)
X at tabclear()@tabset(1.5inches,2.0inches,2.5inches)
X@>block-check@\  Level of packet error detection.
X@>delay@\  How long to wait before sending first packet.
X@>duplex@\  Specify which side echoes during 'connect'.
X@>end-of-packet@\  Terminator for outbound packets.
X@>escape-character@\  Character to prefix "escape commands" during 'connect'.
X@>file@\  Set various file parameters.
X@>flow-control@\  Communication line full-duplex flow control.
X@>handshake@\  Communication line half-duplex turnaround character.
X@>line@\  Communication line device name.
X@>modem-dialer@\  Type of modem-dialer on communication line.
X@>packet-length@\  Maximum length for packets.
X@>pad-character@\  Character to use for inter-packet padding.
X@>padding@\  How much inter-packet padding to use.
X@>parity@\  Communication line character parity.
X@>prompt@\  Change the C-Kermit program's prompt.
X@>speed@\  Communication line speed.
X@>start-of-packet@\  Control character to mark beginning of packets.
X@>timeout@\  Timer interval to detect lost packets.
X at end(format)
X
XThe 'remote' commands are:
X at begin(format,spread 0)
X at tabclear()@tabset(1.5inches,2.0inches,2.5inches)
X@>cwd@\  Change remote working directory.
X@>delete@\  Delete remote files.
X@>directory@\  Display a listing of remote file names.
X@>help@\  Request help from a remote server.
X@>host@\  Issue a command to the remote host in its own command language.
X@>space@\  Display current disk space usage on remote system.
X@>type@\  Display a remote file on your screen.
X@>who@\  Display who's logged in, or get information about a user.
X at end(format)
X
XMost of these commands are described adequately in the Kermit User Guide.
XSpecial aspects of certain Unix Kermit commands are described below.
X
X at heading<The 'send' command>
X
XSyntax:  @q<send >@i(fn)@q<@ @ - >@i<or>@q< -@ @ >@q<send >@i(fn1)@q< >@i<rfn1>
X
XSend the file or files denoted by fn to the other Kermit, which should be
Xrunning as a server, or which should be given the 'receive' command.  Each
Xfile is sent under its own name (as described above, or as
Xspecified by the 'set file names' command).  If the second form is used,
Xi.e. with @i(fn1) denoting a single Unix file, @i(rfn1) may be specified as a
Xname to send it under.  The 'send' command may be abbreviated to 's', even
Xthough 's' is not a unique abbreviation for a top-level C-Kermit command.
X
XThe wildcard (meta) characters '@q[*]' and '@q[?]' are accepted in @i(fn).  If
X'@q[?]' is to be included, it must be prefixed by '@q[\]' to override its
Xnormal function of providing help.  '@q[*]' matches any string, '@q[?]' matches
Xany single character.  Other notations for file groups, like '@q([a-z]og)', are
Xnot available in interactive commands (though of course they are available on
Xthe command line).  When @i(fn) contains '@q[*]' or '@q[?]' characters, there
Xis a limit to the number of files that can be matched, which varies from system
Xto system.  If you get the message "Too many files match" then you'll have to
Xmake a more judicious selection.  If @i(fn) was of the form
X at example(usr/longname/anotherlongname/*)
Xthen C-Kermit's string space will fill up rapidly -- try doing a cwd (see
Xbelow) to the path in question and reissuing the command.
X
X at i<Note> -- C-Kermit sends only from the current or specified directory.
XIt does not traverse directory trees.  If the source directory contains
Xsubdirectories, they will be skipped.  Conversely, C-Kermit does not create
Xdirectories when receiving files.  If you have a need to do this, you can
Xpipe tar through C-Kermit, as shown in the example on page @pageref(-uxtar),
Xor under System III/V Unix you can use cpio.
X
X at i<Another Note> -- C-Kermit does not skip over "invisible" files that match
Xthe file specification; Unix systems usually treat files whose names start
Xwith a dot (like @q(.login), @q(.cshrc), and @q(.kermrc)) as invisible.
X
X at heading<The 'receive' command>
X
XSyntax:  @q<receive@ @ - >@i<or>@q< -@ @ receive >@i<fn1>
X
XPassively wait for files to arrive from the other Kermit, which must be given
Xthe 'send' command -- the 'receive' command does not work in conjunction with a
Xserver (use 'get' for that).  If @i(fn1) is specified, store the first incoming
Xfile under that name.  The 'receive' command may be abbreviated to 'r'.
X
X
X at heading<The 'get' command:>
X
XSyntax:@q<  get >@i<rfn>
X at begin(example)
X    @i<or>: get
X            @i(rfn)
X            @i(fn1)
X at end(example)
XRequest a remote Kermit server to send the named file or files.  Since a
Xremote file specification (or list) might contain spaces, which normally
Xdelimit fields of a C-Kermit command, an alternate form of the command is
Xprovided to allow the inbound file to be given a new name: type 'get' alone
Xon a line, and you will be prompted separately for the remote and local
Xfile specifications, for example
X at Begin(Example)
XC-Kermit>@ux(get)
X Remote file specification: @ux(foo)
X Local name to store it under: @ux(bar)
X at End(Example)
XAs with 'receive', if more than one file arrives as a result of the 'get'
Xcommand, only the first will be stored under the alternate name given by
X at i(fn1); the remaining files will be stored under their own names if possible.
XIf a '@q[?]' is to be included in the remote file specification, you must
Xprefix it with '@q[\]' to suppress its normal function of providing help.
X
X at heading(The 'server' command:)
X
XThe 'server' command places C-Kermit in "server mode" on the currently selected
Xcommunication line.  All further commands must arrive as valid Kermit packets
Xfrom the Kermit on the other end of the line.  The Unix Kermit server can
Xrespond to the following commands:
X at begin(format,spread 0,above 1,below 1)
X at tabclear()@tabset(2.25inches)
X at u<Command>@\@ux<Server Response>
X  get@\  Sends files
X  send@\  Receives files
X  bye@\  Attempts to log itself out
X  finish@\  Exits to level from which it was invoked
X  remote directory@\  Sends directory lising
X  remote delete@\  Removes files
X  remote cwd@\  Changes working directory
X  remote type@\  Sends files to your screen
X  remote space@\  Reports about its disk usage
X  remote who@\  Shows who's logged in
X  remote host@\  Executes a Unix shell command
X  remote help@\  Lists these capabilities
X at end(format)
XNote that the Unix Kermit server cannot always respond to a BYE command.
XIt will attempt to do so using "@q<kill(0,9)>", but this will not work
Xon all systems or under all conditions.  For instance, the C-Shell
Xchanges your process group, so that the process id of 0 does not refer
Xto what you might expect.
X
XIf the Kermit server is directed at an external line (i.e. it is in
X"local mode") then the console may be used for other work if you have
X'set file display off'; normally the program expects the
Xconsole to be used to observe file transfers and enter status queries or
Xinterruption commands.  The way to get C-Kermit into background operation from
Xinteractive command level varies from system to system (e.g. on Berkeley Unix
Xyou would halt the program with @q(^Z) and then use the C-Shell 'bg' command to
Xcontinue it in the background).  The more common method
Xis to invoke the program with the desired command line arguments, including
X"@q(-q)", and with a terminating "@q(&)".
X
XWhen the Unix Kermit server is given a 'remote host' command, it executes it
Xusing the shell invoked upon login to the remote system, e.g. the Bourne shell
Xor the Berkeley C-Shell.  (Note -- this is in distinction to the local "@q<!>"
Xshell escape, which always uses the Bourne shell; see below).
X
X at Heading(The 'remote', 'bye', and 'finish' commands:)
X
XC-Kermit may itself request services from a remote Kermit server.  In
Xaddition to the 'send' and 'get' commands, the following may also be used:
X
X at begin(description,leftmargin +8,indent -4)
Xremote cwd [@i(directory)]@\If the optional remote directory specification is
Xincluded, you will be prompted on a separate line for a password, which will
Xnot echo as you type it.
X at end(description)
X at begin(description,leftmargin +28, indent -24,spread 0,above 1)
Xremote delete rfn@\delete remote file or files.
X
Xremote directory [@i(rfn)]@\directory listing of remote files.
X
Xremote host @i(command)@\command in remote host's own command language.
X
Xremote space@\disk usage report from remote host.
X
Xremote type [@i(rfn)]@\display remote file or files on the screen.
X
Xremote who [@i(user)]@\display information about who's logged in.
X
Xremote help@\display remote server's capabilities.
X at end(description)
X at begin(description,leftmargin +8,indent -4)
Xbye @i(and) finish:@\When connected to a remote Kermit server, these commands
Xcause the remote server to terminate; 'finish' returns it to Kermit or system
Xcommand level (depending on the implementation or how the program was invoked);
X'bye' also requests it to log itself out.
X at end(description)
X at heading(The 'log' and 'close' commands:)
X
XSyntax: @q<log {debugging, packets, session, transactions} >[ @i(fn1) ]
X
XC-Kermit's progress may be logged in various ways.  The 'log' command
Xopens a log, the 'close' command closes it.  In addition, all open logs
Xare closed by the 'exit' and 'quit' commands.  A name may be specified for
Xa log file; if the name is omitted, the file is created with a default
Xname as shown below.
X
X at begin(description,leftmargin +4,indent -4)
Xlog debugging@\This produces a voluminous log of the internal workings of
XC-Kermit, of use to Kermit developers or maintainers in tracking down suspected
Xbugs in the C-Kermit program.  Use of this feature dramatically slows down the
XKermit protocol.  Default name: @q(debug.log).
X
Xlog packets@\This produces a record of all the packets that go in and out of
Xthe communication port.  This log is of use to Kermit maintainers who are
Xtracking down protocol problems in either C-Kermit or any Kermit that
XC-Kermit is connected to.  Default name:  @q(packet.log).
X
Xlog session@\This log will contain a copy of everything you see on your screen
Xduring the 'connect' command, except for local messages or interaction with
Xlocal escape commands.  Default name:  @q(session.log).
X
Xlog transactions@\The transaction log is a record of all the files that were
Xsent or received while transaction logging was in effect.  It includes time
Xstamps and statistics, filename transformations, and records of any
Xerrors that may have occurred.  The transaction log allows you to have
Xlong unattended file transfer sessions without fear of missing some
Xvital screen message.  Default name:  @q(transaction.log).
X at end(description)
XThe 'close' command explicitly closes a log, e.g. 'close debug'.
X
X at Heading(Local File Management Commands:)
X
XUnix Kermit allows some degree of local file management from interactive
Xcommand level:
X at begin(description,leftmargin +4,indent -4)
Xdirectory [@i(fn)]@\
XDisplays a listing of the names, modes, sizes, and dates of files
Xmatching @i(fn) (which defaults to '@q[*]').  Equivalent to '@q(ls -l)'.
X
Xcwd [directory-name]@\
XChanges Kermit's working directory to the one given, or to the your
Xdefault directory if the directory name is omitted.  Equivalent to 'cd'.
X
Xspace@\
XDisplay information about disk space and/or quota in the current
Xdirectory and device.
X
X at q(! )@i(command)@\
XThe command is executed by the Unix shell.  Use this for all other
Xfile management commands.  This command has certain peculiarities:
X at begin(itemize,spread 0)	
XThe Bourne shell is used.
X
XAt least one space must separate the '!' from the shell command.
X
XA 'cd' command executed in this manner will have no effect -- use the
XC-Kermit 'cwd' command instead. 
X at end(itemize)
X at end(description)
X
X at heading(The 'set' and 'show' Commands:)
X
XSince Kermit is designed to allow diverse systems to communicate, it is
Xoften necessary to issue special instructions to allow the program to adapt
Xto peculiarities of the another system or the communication path.  These
Xinstructions are accomplished by the 'set' command.  The 'show' command may
Xbe used to display current settings.  Here is a brief synopsis of settings
Xavailable in the current release of C-Kermit:
X
X at begin(description,leftmargin +4,indent -4)
Xblock-check {1, 2, 3}@\ Determines the level of per-packet error detection.
X"1" is a single-@|character 6-bit checksum, folded to include the values of all
Xbits from each character.  "2" is a 2-character, 12-bit checksum.  "3" is a
X3-character, 16-bit cyclic redundancy check (CRC).  The higher the block check,
Xthe better the error detection and correction and the higher the resulting
Xoverhead.  Type 1 is most commonly used; it is supported by all Kermit
Ximplementations, and it has proven adequate in most circumstances.  Types 2 or
X3 would be used to advantage when transferring 8-bit binary files over noisy
Xlines.
X
Xdelay @i(n)@\How many seconds to wait before sending the first packet after a
X'send' command.  Used in remote mode to give you time to escape back to your
!FUNKY!STUFF!



More information about the Comp.sources.unix mailing list