home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / old / ckermit5a190 / ckuker.cpp < prev    next >
C/C++ Source or Header  |  2020-01-01  |  36KB  |  930 lines

  1. .\" @(#) kermit.1 5A(190) 94/10/04 Columbia University
  2. #ifdef COMMENT
  3. This man page must be run through the C-Kermit makefile before it can
  4. be used.  Or you can do the following:
  5.   cc -E ckuker.cpp | grep -v ^$ | grep -v ^\# > ckuker.nr
  6. to produce the nroff source file.  THIS FILE MUST NOT CONTAIN ANY BLANK LINES!
  7. Use .sp or similar commands to produce blank lines in the nroff output.
  8. #endif /* COMMENT */
  9. #ifdef SUNOS4
  10. #define SUNOS
  11. #else
  12. #ifdef SUNOS41
  13. #define SUNOS
  14. #else
  15. #ifdef SOLARIS
  16. #define SUNOS
  17. #endif
  18. #endif
  19. #endif
  20. #ifdef HPUX10
  21. .TH KERMIT 1 "4 Oct 94" "HP-UX C-Kermit"
  22. #define DIALOUT /dev/cul0p0
  23. #define HARDWIRE /dev/tty0p0
  24. #else
  25. .TH KERMIT 1C "4 Oct 94" "UNIX C-Kermit"
  26. #define DIALOUT /dev/cua
  27. #define HARDWIRE /dev/tty01
  28. #endif
  29. .SH NAME
  30. kermit \- C-Kermit 5A(190) communications software for serial and network
  31. connections: modem dialing, file transfer and management, terminal connection,
  32. character-set translation, and script programming.
  33. .SH SYNOPSIS
  34. .B kermit
  35. [ command-file ] [ options ... ]
  36. .SH DESCRIPTION
  37. .I Kermit
  38. is a family of file transfer, management, and communication software programs
  39. from Columbia University available for most computers and operating systems.
  40. #ifdef HPUX10
  41. The version of Kermit for Hewlett-Packard HP-UX, called
  42. #else
  43. #ifdef SUNOS
  44. The version of Kermit for SunOS and Solaris, called
  45. #else
  46. The UNIX version of Kermit, called
  47. #endif
  48. #endif
  49. .IR "C-Kermit",
  50. #ifdef HPUX10
  51. supports both serial connections (direct or dialed) and TCP/IP connections.
  52. #else
  53. #ifdef SUNOS
  54. supports serial connections (direct or dialed),
  55. TCP/IP connections, and on systems equipped with
  56. SunLink X.25, C-Kermit can also make X.25 connections.
  57. #else
  58. supports serial connections (direct or dialed) and, in most UNIX
  59. implementations, also TCP/IP connections.  On SunOS systems equipped with
  60. SunLink X.25, C-Kermit can also make X.25 connections.
  61. #endif
  62. #endif
  63. C-Kermit can be thought of as a user-friendly and powerful alternative to cu,
  64. tip, uucp, ftp, and telnet; a single package for both network and serial
  65. communications, offering automation, convenience, and language features not
  66. found in the other packages, and having a great deal in common with its
  67. cousins, C-Kermit on other UNIX platforms, MS-DOS Kermit for PCs with DOS and
  68. Windows, and IBM Mainframe Kermit-370 for VM/CMS, MVS/TSO, and CICS.  C-Kermit
  69. itself also runs on OS/2, Digital VMS, Data General AOS/VS, Stratus VOS, OS-9,
  70. Apollo Aegis, the Apple Macintosh, Commodore Amiga, and the Atari ST.
  71. Together, C-Kermit, MS-DOS Kermit, and IBM Mainframe Kermit offer a consistent
  72. and nearly universal approach to inter-computer communications.
  73. .PP
  74. C-Kermit 5A(190) is Copyright (C) 1985, 1994 by the Trustees of Columbia
  75. University in the City of New York.  The C-Kermit software may not be, in
  76. whole or in part, licensed or sold for profit as a software product itself,
  77. nor may it be included in or distributed with commercial products or otherwise
  78. distributed by commercial concerns to their clients or customers without
  79. written permission of the Office of Kermit Development and Distribution,
  80. Columbia University.  This copyright notice must not be removed, altered, or
  81. obscured.
  82. .PP
  83. #ifdef HPUX10
  84. C-Kermit 5A(190) is included with HP-UX 10.0 by Hewlett-Packard in partnership
  85. with the Office of Kermit Development and Distribution, Columbia University.
  86. #endif
  87. .PP
  88. C-Kermit is thoroughly documented in the book
  89. .IR "Using C-Kermit"
  90. by Frank da Cruz and Christine M. Gianone, Digital Press, 1993; see REFERENCES
  91. at the end of this manual page.  New features added since the book was
  92. published are documented in the online file
  93. .IR "ckcker.upd".
  94. Hints, tips, limitations, restrictions are listed in
  95. .IR "ckcker.bwr"
  96. (general C-Kermit) and
  97. .IR "ckuker.bwr"
  98. (UNIX-specific); see FILES below.  Please consult all of these references
  99. before reporting problems or asking for technical support.
  100. .PP
  101. Kermit software is available for hundreds of different computers and operating
  102. systems from Columbia University.  For best file-transfer results, please use
  103. C-Kermit in conjunction with real Columbia University Kermit software on other
  104. computers, such as MS-DOS Kermit for DOS or Windows.  See CONTACTS below.
  105. .SH "MODES OF OPERATION"
  106. C-Kermit can be used in two "modes": remote and local.  In
  107. .IR "remote mode",
  108. you connect to the UNIX system from a desktop PC, Macintosh, or workstation
  109. and transfer files between your desktop computer and UNIX C-Kermit.  In that
  110. case, connection establishment (dialing, TELNET connection, etc) is handled
  111. by the Kermit program on your desktop computer.
  112. .PP
  113. In
  114. .IR "local mode",
  115. C-Kermit establishes a connection to another computer
  116. by direct serial connection, by dialing a modem, or by making a network
  117. connection.  When used in local mode, C-Kermit gives you a terminal connection
  118. to the remote computer, using your actual terminal, emulator, or UNIX
  119. workstation terminal window or console driver for specific terminal emulation.
  120. .PP
  121. C-Kermit also has two types of commands: the familiar UNIX-style command-line
  122. options, and an interactive dialog with a prompt.
  123. .IR "Command-line options"
  124. give
  125. you access to a small but useful subset of C-Kermit's features for terminal
  126. connection and file transfer, plus the ability to pipe files into or out of
  127. Kermit for transfer.
  128. .PP
  129. .IR "Interactive commands"
  130. give you access to dialing, script programming,
  131. character-set translation, and, in general, detailed control and display of all
  132. C-Kermit's features.  Interactive commands can also be collected into command
  133. files or macros.
  134. .PP
  135. .SH "STARTING C-KERMIT"
  136. .PP
  137. #ifdef HPUX10
  138. You can start C-Kermit by typing "/usr/bin/kermit", or just "kermit" if your
  139. PATH includes "/usr/bin", possibly followed by command-line options.
  140. #else
  141. C-Kermit should be available as "kermit" somewhere in your PATH, perhaps as
  142. /usr/local/bin/kermit, in which case you can
  143. start C-Kermit just by typing "kermit", possibly followed by command-line
  144. options.
  145. #endif
  146. If there are no "action options" on the command line (explained
  147. below), C-Kermit starts in interactive command mode; you will see a greeting
  148. message and then the "C-Kermit>" prompt.  If you do include action options on
  149. the command line, C-Kermit takes the indicated actions and then exits directly
  150. back to UNIX.  Either way, C-Kermit executes the commands in its
  151. initialization file,
  152. #ifdef HPUX10
  153. .IR "/usr/share/lib/kermit/ckermit.ini" ,
  154. #else
  155. .IR ".kermrc" ,
  156. in your home directory (or a system-wide directory if C-Kermit was built to
  157. do this)
  158. #endif
  159. before it executes any other commands, unless you have
  160. included the `\|\c
  161. .B \-Y\c
  162. \&\|' (uppercase) command-line option, which means to skip the
  163. initialization file, or you have included the `\|\c
  164. .B -y \c
  165. \&\|
  166. .IR "filename" \c
  167. \&\|'
  168. option to specify an alternative initialization file.
  169. .PP
  170. .SH "FILE TRANSFER"
  171. .PP
  172. Here is the most common scenario for Kermit file transfer.  Many other
  173. methods are possible, most of them more convenient, but this basic method
  174. should work in all cases.
  175. .PP
  176. .in +0.5i
  177. .ll -0.5i
  178. .ta +0.2i
  179. .ti -0.2i
  180. \(bu    Start Kermit on your local computer and establish a connection to the
  181. remote computer.  If C-Kermit is on your local
  182. computer, use the sequence SET MODEM
  183. .IR "modem-name" \c
  184. \&\|, SET LINE
  185. .IR "device-name" \c
  186. \&\|, SET SPEED
  187. .IR "bits-per-second" \c
  188. \&\|, and DIAL
  189. .IR "phone-number"
  190. if you are dialing; SET LINE and SPEED for direct connections;
  191. SET NETWORK
  192. .IR "network-type"
  193. and SET HOST
  194. .IR "host-name-or-address"
  195. for network connections.
  196. .sp
  197. .ti -0.2i
  198. \(bu    SET any other necessary communication parameters, such as PARITY,
  199. DUPLEX, and FLOW-CONTROL.
  200. .sp
  201. .ti -0.2i
  202. \(bu    Give the CONNECT command.
  203. .sp
  204. .ti -0.2i
  205. \(bu    Log in to the remote computer.
  206. .sp
  207. .ti -0.2i
  208. \(bu    Start Kermit on the remote computer, give it any desired SET commands
  209. for file-, communication-, or protocol-related parameters.  If you will be
  210. transferring binary files, give the command SET FILE TYPE BINARY to the
  211. remote Kermit program.
  212. .sp
  213. .ti -0.2i
  214. \(bu    To
  215. .IR download
  216. a file or file group, give the remote Kermit a SEND command, following by
  217. a filename or "wildcard" file specification, for example:
  218. .nf
  219. .sp
  220.   send oofa.txt            (send one file)
  221. .sp
  222. .fi
  223. or:
  224. .nf
  225. .sp
  226.   send oofa.*              (send a group of files)
  227. .sp
  228. .fi
  229. To
  230. .IR upload
  231. a file or files, give the remote Kermit a RECEIVE command.  The sending Kermit
  232. will tell the receiving Kermit the name (and other attributes) of each file.
  233. .sp
  234. .ti -0.2i
  235. \(bu    Escape back to the Kermit program on your local (desktop) computer.  If
  236. your local computer is running C-Kermit, type Ctrl-\\ c (Control-backslash
  237. followed by the letter 'c') (on NeXT workstations, use Ctrl-] c).  If MS-DOS
  238. or OS/2 Kermit, use Alt-x (hold down the Alt key, press 'x').  Now you should
  239. see your local Kermit program's prompt.
  240. .sp
  241. .ti -0.2i
  242. \(bu    If you will be transferring binary files, give the command SET FILE
  243. TYPE BINARY to your local Kermit program.
  244. .sp
  245. .ti -0.2i
  246. \(bu    If you are
  247. .IR downloading
  248. files, tell the local Kermit program to RECEIVE.  If you are
  249. .IR "uploading",
  250. give your local Kermit program a SEND command, specifying a filename
  251. or wildcard file specification.  In other words, tell the
  252. .IR remote
  253. Kermit program what to do first, SEND or RECEIVE, then escape back to
  254. the
  255. .IR local
  256. Kermit and give it the opposite command, RECEIVE or SEND.
  257. .sp
  258. .ti -0.2i
  259. \(bu When you finish transferring files, give a CONNECT command.  Now you are
  260. talking to Kermit on the remote computer again.  Type EXIT to get back to the
  261. command prompt on the remote computer.  When you are finished using the remote
  262. computer, log out and then (if necessary) escape back to Kermit on your local
  263. computer.  Then you can make another connection or EXIT from the local Kermit
  264. program.
  265. .ll +0.5i
  266. .in -0.5i
  267. .fi
  268. .PP
  269. C-Kermit's file transfer protocol defaults are deliberately conservative,
  270. resulting in file transfer that almost always works, but might be somewhat
  271. slow.  To increase file transfer performance on computers and connections that
  272. permit it, use SET RECEIVE PACKET-LENGTH to increase the packet length, SET
  273. WINDOW to increase the window size, and use SET CONTROL UNPREFIX to reduce the
  274. overhead of control-character prefixing.  On serial connections, use hardware
  275. flow control (SET FLOW RTS/CTS) if available, rather than software (XON/XOFF)
  276. flow control.  On TCP/IP connections, SET FLOW NONE.  For details, read
  277. Chapter 8 of
  278. .IR "Using C-Kermit"
  279. and see the section on control-character unprefixing in the
  280. .IR "ckcker.upd"
  281. file.
  282. .SH OTHER FEATURES
  283. C-Kermit includes features too numerous to be explained in a man page.  For
  284. further information about connection establishment, modem dialing, networks,
  285. terminal connection, key mapping, logging, file transfer options and features,
  286. troubleshooting, client/server operation, character-set translation during
  287. terminal connection and file transfer, "raw" up- and downloading of files,
  288. macro construction, script programming, convenience features, and shortcuts,
  289. plus a command reference, numerous tables, examples, and illustrations, please
  290. consult
  291. .IR "Using C-Kermit".
  292. .SH HELP
  293. .PP
  294. C-Kermit has extensive built-in help.  You can find out what commands exist by
  295. typing ? at the C-Kermit> prompt.  You can type HELP at the C-Kermit> prompt
  296. for "getting-started" message, or HELP followed by the name
  297. of a particular command for information about that command, for example:
  298. .nf
  299. .sp
  300.   help send
  301. .sp
  302. .fi
  303. or:
  304. .nf
  305. .sp
  306.   help set file
  307. .sp
  308. .fi
  309. You can type ? anywhere within a command to get brief help about the
  310. current command field.  You can also type the INTRO command to get a brief
  311. introduction to C-Kermit, and the NEWS command to find out what's new in
  312. your version.  Finally, you can use the BUG command to learn how to report
  313. bugs.
  314. .sp
  315. .SH "ENTERING COMMANDS"
  316. .sp
  317. You can use upper or lower case for interactive-mode commands, but remember
  318. that UNIX filenames are case-sensitive.  You can abbreviate commands as long
  319. as the abbreviation matches only one possibility.  While typing a command, you
  320. can use the following editing characters:
  321. .nf
  322. .sp
  323.   Delete, Backspace, or Rubout erases the rightmost character.
  324.   Ctrl-W erases the rightmost "word".
  325.   Ctrl-U erases the current command line.
  326.   Ctrl-R redisplays the current command.
  327.   Ctrl-P recalls a previous command (scrolls back in command buffer).
  328.   Ctrl-N scrolls forward in a scrolled-back command buffer.
  329.   Ctrl-C cancels the current command.
  330.   Tab, Esc, or Ctrl-I tries to complete the current keyword or filename.
  331.   ? gives help about the current field.
  332. .sp
  333. .fi
  334. To enter the command and make it execute, press the Return or Enter key.
  335. .sp
  336. .SH BACKSLASH NOTATION
  337. Within an interactive command, the "\\" character (backslash) is a prefix used
  338. to enter special quantities, including ordinary characters that would
  339. otherwise be illegal.  At the end of a line, \\ or - (dash) makes the next
  340. line a continuation of the current line.  Other than that, the character
  341. following the \\ identifies what the special quantity is:
  342. .nf
  343. .sp
  344.   % A user-defined simple (scalar) variable such as \\%a or \\%1
  345.   & an array reference such as \\&a[3]
  346.   $ an environment variable such as \\$(TERM)
  347.   v (or V) a built-in variable such as \\v(time)
  348.   f (or F) a function such as \\Fsubstring(\\%a,3,2)
  349.   d (or D) a decimal (base 10) number (1 to 3 digits, 0..255) such as \\d27
  350.   o (or O) an octal (base 8) number (1 to 3 digits, 0..377) such as \\o33
  351.   x (or X) a hexadecimal (base 16) number (2 digits, 00..ff) like \\x1b
  352.   \\ the backslash character itself
  353.   b (or B) the BREAK signal (OUTPUT command only)
  354.   l (or L) a Long BREAK signal (OUTPUT only)
  355.   a decimal digit (a 1-3 digit decimal number) such as \\27
  356.   {} used for grouping, e.g. \\{27}123
  357.   anything else: following character taken literally.
  358. .sp
  359. .fi
  360. Note that numbers turn into the character with that binary code (0-255), so
  361. you can use \\7 for a bell, \\13 for carriage return, \\10 for linefeed.
  362. For example, to have C-Kermit send a BELL to your screen, type:
  363. .nf
  364. .sp
  365.   echo \\7
  366. .sp
  367. .fi
  368. .SH "COMMAND LIST"
  369. .PP
  370. The commands most commonly used, and important for beginners to
  371. know, are marked with "*":
  372. .nf
  373. .in 0
  374. .ll 80
  375. .ta 16
  376. .sp
  377. Program Management:
  378.   BUG    Learn how to report bugs.
  379.   CHECK    See if a particular feature is configured.
  380.   CLOSE    Close a log or other local file.
  381.   COMMENT    Introduce a full-line comment.
  382. * EXIT    Leave the program, return to UNIX.
  383. * HELP    Display a help message for a given command.
  384. * INTRO    Print a brief introduction to C-Kermit.
  385.   LOG    Open a log file -- debugging, packet, session, transaction.
  386.   PUSH    Invoke local system's interactive command interpreter.
  387.   QUIT    Synonym for EXIT.
  388.   REDIRECT    Redirect standard i/o of command to communication device.
  389.   RUN    Run a program or system command.
  390.   SET COMMAND    Command-related parameters: bytesize, recall buffer size.
  391.   SET DEBUG    Log or display debugging information.
  392.   SET EXIT    Items related to C-Kermit's action upon exit.
  393.   SET PROMPT    The C-Kermit program's interactive command prompt.
  394.   SHOW EXIT    Display SET EXIT parameters.
  395.   SHOW FEATURES    Show features that C-Kermit was built with.
  396.   SHOW VERSIONS    Show version numbers of each source module.
  397.   SUSPEND    Suspend Kermit (use only if shell supports job control!).
  398. * SHOW    Display values of SET parameters.
  399. * TAKE    Execute commands from a file.
  400.   VERSION    Display the C-Kermit program version number.
  401.   Z    Synonym for SUSPEND.
  402.   Ctrl-C    Interrupt a C-Kermit command in progress.
  403.   Ctrl-Z    Synonym for SUSPEND.
  404.   ; or #    Introduce a full-line or trailing comment.
  405.   ! or @    Synonym for RUN.
  406.   <    Synonym for REDIRECT.
  407. .sp
  408. Connection Establishment and Release:
  409. * DIAL    Dial a telephone number.
  410. * HANGUP    Hang up the phone or network connection.
  411.   PAD    Command for X.25 PAD.
  412.   PING    Check status of remote TCP/IP host.
  413.   REDIAL    The the most recently DIALed number again.
  414.   SET CARRIER    Treatment of carrier on terminal connections.
  415. * SET DIAL    Parameters related to modem dialing.
  416. * SET FLOW    Communication line flow control: RTS/CTS, XON/XOFF, etc.
  417. * SET HOST    Specify remote network host name or address.
  418. #ifdef HPUX10
  419. * SET LINE    Specify serial communication device name, like /dev/cul0p0.
  420. #else
  421. * SET LINE    Specify serial communication device name, like /dev/cua.
  422. #endif
  423. * SET MODEM    Specify type of modem on SET LINE device, like HAYES.
  424. * SET NETWORK    Network type, TCP/IP or X.25.
  425.   SET PAD    X.25 X.3 PAD parameters.
  426. * SET PARITY    Character parity (none, even, etc) for communications.
  427. * SET SPEED    Serial communication device speed, e.g. 2400, 9600, 57600.
  428.   SET X.25    Specify X.25 connection parameters.
  429.   SHOW COMM    Display all communications settings.
  430.   SHOW DIAL    Display SET DIAL values.
  431.   SHOW MODEM    Display modem type, signals, etc.
  432.   SHOW NETWORK    Display network-related items.
  433. * TELNET    = SET NETWORK TCP/IP, SET HOST ..., CONNECT.
  434. .sp
  435. Terminal Connection:
  436. * C    Special abbreviation for CONNECT.
  437. * CONNECT    Establish a terminal connection to a remote computer.
  438.   SET COMMAND    Bytesize between C-Kermit and your keyboard and screen.
  439. * SET DUPLEX    Specify which side echoes during CONNECT.
  440.   SET ESCAPE    Prefix for "escape commands" during CONNECT.
  441.   SET KEY    Key mapping and macros for use in CONNECT mode.
  442.   SET TERMINAL    Terminal connection items: bytesize, character-set, echo, etc.
  443.   SHOW ESCAPE    Display current CONNECT-mode escape character.
  444.   SHOW KEY    Display keycode and assigned value or macro.
  445.   SHOW TERMINAL    Display SET TERMINAL items.
  446. * Ctrl-\\    CONNECT-mode escape character, follow by another character:
  447.       C to return to C-Kermit> prompt.
  448.       B to send BREAK signal.
  449.       ? to see other options.
  450. .sp
  451. File Transfer:
  452.   LOG SESSION   Download a file with no error checking.
  453.   MSEND    Multiple SEND - accepts a list of files, separated by spaces.
  454. * RECEIVE    Passively wait for files to arrive from other Kermit.
  455. * R    Special abbreviation for RECEIVE.
  456. * SEND    Send files.
  457. * S    Special abbreviation for SEND.
  458.   RESEND    Continue a incomplete transmission.
  459.   PSEND    Send part of a file.
  460.   SET ATTRIB    Control transmission of file attributes.
  461. * SET BLOCK    Choose error-checking level, 1, 2, or 3.
  462.   SET BUFFERS    Size of send and receive packet buffers.
  463.   SET CONTROL    Which control characters to "unprefix" during file transfer.
  464.   SET DELAY    How long to wait before sending first packet.
  465. * SET FILE    Transfer mode (type), character-set, collision action, etc.
  466. * SET RECEIVE    Parameters for inbound packets: packet-length, etc.
  467.   SET REPEAT    Repeat-count compression parameters.
  468.   SET RETRY    Packet retransmission limit.
  469.   SET SEND    Parameters for outbound packets: length, etc.
  470.   SET HANDSHAKE    Communication line half-duplex packet turnaround character.
  471.   SET LANGUAGE    Enable language-specific character-set translations.
  472.   SET SESSION-LOG    File type for session log, text or binary.
  473.   SET TRANSFER    File transfer parameters: character-set, etc.
  474.   SET TRANSMIT    Control aspects of TRANSMIT command execution.
  475.   SET UNKNOWN    Specify handling of unknown character sets.
  476. * SET WINDOW    File transfer packet window size, 1-31.
  477.   SHOW ATTRIB    Display SET ATTRIBUTE values.
  478.   SHOW CONTROL    Display control-character prefixing map.
  479. * SHOW FILE    Display file-related settings.
  480.   SHOW PROTOCOL    Display protocol-related settings.
  481.   SHOW LANGUAGE    Display language-related settings.
  482.   SHOW TRANSMIT    Display SET TRANSMIT values.
  483. * STATISTICS    Display statistics about most recent file transfer.
  484.   TRANSMIT    Upload a file with no error checking.
  485.   XMIT    Synonym for TRANSMIT.
  486. .sp
  487. File Management:
  488. * CD    Change Working Directory (also, CWD).
  489. * DELETE    Delete a file or files.
  490. * DIRECTORY    Display a directory listing.
  491.   MAIL    Send a file to other Kermit, to be delivered as e-mail.
  492.   PRINT    Print a local file on a local printer.
  493. * PWD    Display current working directory.
  494.   RENAME    Change the name of a local file.
  495.   SPACE    Display current disk space usage.
  496.   SHOW CHARACTER-SETS    Display character-set translation info.
  497.   TRANSLATE    Translate a local file's character set.
  498.   TYPE    Display a file on the screen.
  499.   XLATE    Synonym for TRANSLATE.
  500. .sp
  501. Client/Server operation:
  502.   BYE    Terminate a remote Kermit server and log out its job.
  503.   DISABLE    Disallow access to selected features during server operation:
  504.   E-PACKET    Send an Error packet.
  505.   ENABLE    Allow access to selected features during server operation.
  506.   FINISH    Instruct a remote Kermit server to exit, but not log out.
  507.   G    Special abbreviation for GET.
  508.   GET    Get files from a remote Kermit server.
  509.   REMOTE CD    Tell remote Kermit server to change its directory.
  510.   REMOTE DELETE    Tell server to delete a file.
  511.   REMOTE DIRECTORY    Ask server for a directory listing.
  512.   REMOTE HELP    Ask server to send a help message.
  513.   REMOTE HOST    Ask server to ask its host to execute a command.
  514.   REMOTE KERMIT    Send an interactive Kermit command to the server.
  515.   REMOTE LOGIN    Authenticate yourself to a remote Kermit server.
  516.   REMOTE LOGOUT    Log out from a Kermit server previously LOGIN'd to.
  517.   REMOTE PRINT    Print a local file on the server's printer.
  518.   REMOTE SET    Send a SET command to a remote server.
  519.   REMOTE SPACE    Ask server how much disk space it has left.
  520.   REMOTE TYPE    Ask server to display a file on your screen.
  521.   REMOTE WHO    Ask server for a "who" or "finger" listing.
  522.   SERVER    Be a Kermit server.
  523.   SET SERVER    Parameters for server operation.
  524.   SHOW SERVER    Show SET SERVER, ENABLE/DISABLE items.
  525. .sp
  526. Script programming:
  527.   ASK    Prompt the user, store user's reply in a variable.
  528.   ASKQ    Like ASK, but, but doesn't echo (useful for passwords).
  529.   ASSIGN    Assign an evaluated string to a variable or macro.
  530.   CLEAR    Clear communication device input buffer.
  531.   CLOSE    Close a log or other local file.
  532.   DECLARE    Declare an array.
  533.   DECREMENT    Subtract one (or other number) from a variable.
  534.   DEFINE    Define a variable or macro.
  535.   DO    Execute a macro ("DO" can be omitted).
  536.   ECHO    Display text on the screen.
  537.   ELSE    Used with IF.
  538.   END    A command file or macro.
  539.   FOR    Execute commands repeatedly in a counted loop.
  540.   GETC    Issue a prompt, get one character from keyboard.
  541.   GETOK    Ask question, get Yes or No answer, set SUCCESS or FAILURE.
  542.   GOTO    Go to a labeled command in a command file or macro.
  543.   IF    Conditionally execute the following command.
  544.   INCREMENT    Add one (or other number) to a variable.
  545.   INPUT    Match characters from another computer against a given text.
  546.   MINPUT    Like INPUT, but allows several match strings.
  547.   MSLEEP    Sleep for given number of milliseconds.
  548.   OPEN    Open a local file for reading or writing.
  549.   O    Special abbreviation for OUTPUT.
  550.   OUTPUT    Send text to another computer.
  551.   PAUSE    Do nothing for a given number of seconds.
  552.   READ    Read a line from a local file into a variable.
  553.   REINPUT    Reexamine text previously received from another computer.
  554.   RETURN    Return from a user-defined function.
  555.   SCRIPT    Execute a UUCP-style login script.
  556.   SET CASE    Treatment of alphabetic case in string comparisons.
  557.   SET COUNT    For counted loops.
  558.   SET INPUT    Control behavior of INPUT command.
  559.   SET MACRO    Control aspects of macro execution.
  560.   SET TAKE    Control aspects of TAKE file execution.
  561.   SHOW ARGUMENTS    Display arguments to current macro.
  562.   SHOW ARRAYS    Display information about active arrays.
  563.   SHOW COUNT    Display current COUNT value.
  564.   SHOW FUNCTIONS    List names of available \\f() functions.
  565.   SHOW GLOBALS    List defined global variables \\%a..\\%z.
  566.   SHOW MACROS    List one or more macro definitions.
  567.   SHOW SCRIPTS    Show script-related settings.
  568.   SHOW VARIABLES    Display values all \\v() variables.
  569.   SLEEP    Sleep for given number of seconds.
  570.   STOP    Stop executing macro or command file, return to prompt.
  571.   WAIT    Wait for the specified modem signals.
  572.   WHILE    Execute commands repeatedly while a condition is true.
  573.   WRITE    Write material to a local file.
  574.   WRITE-LINE    Write a line (record) to a local file.
  575.   WRITELN    Synonym for WRITE-LINE.
  576.   XIF    Extended IF command.
  577. .ll
  578. .in
  579. .fi
  580. .SH "BUILT-IN VARIABLES"
  581. Built-in variables are referred to by \\v(name), can be used in any command,
  582. usually used in script programming.  They cannot be changed.  Type SHOW
  583. VARIABLES for a current list.
  584. .nf
  585. .sp
  586.   \\v(argc)      number of arguments in current macro
  587.   \\v(args)      number of program command-line arguments
  588.   \\v(cmdfile)   name of current command file, if any
  589.   \\v(cmdlevel)  current command level
  590.   \\v(cmdsource) where command are currently coming from, macro, file, etc.
  591.   \\v(connection)connection type: serial, tcp/ip, etc.
  592.   \\v(count)     current COUNT value
  593.   \\v(cps)       speed of most recent file transfer in chars per second
  594.   \\v(cpu)       CPU type C-Kermit was built for
  595.   \\v(date)      date as 8 Feb 1993
  596.   \\v(day)       day of week
  597.   \\v(directory) current/default directory
  598.   \\v(dialstatus)return code from DIAL command (0 = OK, 22 = BUSY, etc)
  599.   \\v(exitstatus)current EXIT status (0 = good, nonzero = something failed)
  600.   \\v(filespec)  filespec given in most recent SEND/RECEIVE/GET command
  601.   \\v(fsize)     size of file most recently transferred
  602.   \\v(home)      home directory
  603.   \\v(host)      computer host name
  604.   \\v(input)     current INPUT buffer contents
  605.   \\v(inchar)    character most recently INPUT
  606.   \\v(incount)   how many characters arrived during last INPUT
  607.   \\v(line)      current communications device, set by LINE or HOST
  608.   \\v(local)     0 if in remote mode, 1 if in local mode
  609.   \\v(macro)     name of currently executing macro, if any
  610.   \\v(ndate)     Current date as 19930208 (yyyymmdd)
  611.   \\v(nday)      Numeric day of week (0 = Sunday)
  612.   \\v(newline)   System-independent newline character or sequence
  613.   \\v(ntime)     Current local time in seconds since midnight (noon = 43200)
  614.   \\v(parity)    Current parity setting
  615.   \\v(platform)  Specific machine and/or operating system
  616.   \\v(program)   Name of this program ("C-Kermit")
  617.   \\v(return)    Most recent RETURN value
  618.   \\v(speed)     Current speed, if known, or "unknown"
  619.   \\v(status)    0 or 1 (SUCCESS or FAILURE of previous command)
  620.   \\v(system)    UNIX
  621.   \\v(terminal)  terminal type
  622.   \\v(tfsize)    total size of file group most recently transferred
  623.   \\v(time)      time as 13:45:23 (hh:mm:ss)
  624.   \\v(ttyfd)     file descriptor of current communication device
  625.   \\v(version)   numeric version of Kermit, e.g. 501190.
  626. .fi
  627. .SH "BUILT-IN FUNCTIONS"
  628. Builtin functions are invoked as \\Fname(args), can be used in any command,
  629. and are usually used in script programs.  Type SHOW FUNCTIONS for a current
  630. list.
  631. .nf
  632. .sp
  633.    \\Fcharacter(arg)    convert numeric arg to character
  634.    \\Fcode(char)        numeric code for character
  635.    \\Fcontents(v)       return current definition of variable
  636.    \\Fdate(filename)    return file's modification date/time
  637.    \\Fdefinition(m)     return current definition of macro
  638.    \\Feval(expr)        evaluate arithmetic expression
  639.    \\Fexecute(m a)      execute macro "m" with parameters "a"
  640.    \\Ffiles(f)          number of files matching file spec
  641.    \\Findex(a1,a2,a3)   position of string a2 in a1, starting at pos a3
  642.    \\Flength(arg)       length of the string "arg"
  643.    \\Fliteral(arg)      copy argument literally, no evaluation
  644.    \\Flower(arg)        convert to lower case
  645.    \\Flpad(text,n,c)    left pad text to length n with char c
  646.    \\Fmax(a1,a2)        max of two numbers
  647.    \\Fmin(a1,a2)        min of two numbers
  648.    \\Fnextfile()        next file name from list in last \\Ffiles
  649.    \\Frepeat(a1,a2)     repeat a1 a2 times
  650.    \\Freplace(a1,a2,a3) replace a2 by a3 in a1
  651.    \\Freverse(arg)      reverse characters in arg
  652.    \\Fright(a1,a2)      rightmost a2 characters of string a1
  653.    \\Frpad(text,n,c)    right pad text to length n with char c
  654.    \\Fsize(filename)    return file's length in bytes
  655.    \\Fsubstr(a1,a2,a3)  substring of a1, starts at a2, length a3
  656.    \\Fupper(arg)        convert to upper case
  657. .sp
  658. .fi
  659. \\Feval() allows the following operators in the expression.  The expression
  660. can contain variables.  Only integer arithmetic is supported.
  661. Precedences are shown as numbers, 1 is highest
  662. precedence, 6 is lowest.
  663. .in +.2i
  664. .nf
  665. .ta \w'n @ n  'u +\w'5   'u
  666. .sp
  667. ( )    1    parentheses
  668. n !    2    factorial
  669. ~ n    3    logical NOT
  670. - n    4    negative
  671. n ^ n    4    power
  672. n * n    5    multiplication
  673. n / n    5    division
  674. n % n    5    modulus
  675. n & n    5    logical AND
  676. n + n    6    plus
  677. n - n    6    minus
  678. n | n    6    logical OR
  679. n # n    6    exclusive OR
  680. n @ n    6    greatest common divisor
  681. .sp
  682. .fi
  683. .SH "COMMAND LINE OPTIONS"
  684. .PP
  685. C-Kermit accepts commands (or "options") on the command line, in the
  686. time-honored UNIX style.  Alphabetic case is significant.  All options
  687. are optional.  If one or more action options are included, Kermit exits
  688. immediately after executing the command-line options, otherwise it enters
  689. interactive command mode.
  690. .nf
  691. .ll 80
  692. .sp
  693.   kermit [filename] [-x arg [-x arg]...[-yyy]..]]
  694. .sp
  695. where:
  696. .sp
  697.   filename is the name of a command file to execute,
  698.   -x is an option requiring an argument,
  699.   -y an option with no argument.
  700. .ta 15
  701. .sp
  702. Actions:
  703.   -s files    send files
  704.   -s -    send files from stdin
  705.   -r    receive files
  706.   -k    receive files to stdout
  707.   -x    enter server mode
  708.   -f    finish remote server
  709.   -g files    get remote files from server (quote wildcards)
  710.   -a name    alternate file name, used with -s, -r, -g
  711.   -c    connect (before file transfer), used with -l or -j
  712.   -n    connect (after file transfer), used with -l or -j
  713. .sp
  714. Settings:
  715.   -l line    communication line device (to make a serial connection)
  716.   -l n    open file descriptor of communication device
  717.   -j host    TCP/IP network host name (to make a network connection)
  718.   -l n    open file descriptor of TCP/IP connection
  719.   -X    X.25 network address
  720.   -Z    open file descriptor of X.25 connection
  721.   -o n    X.25 closed user group call info
  722.   -u    X.25 reverse-charge call
  723.   -q    quiet during file transfer
  724.   -i    transfer files in binary mode
  725.   -b bps    serial line speed, e.g. 1200
  726.   -m name    modem type, e.g. hayes
  727.   -p x    parity, x = e,o,m,s, or n
  728.   -t    half duplex, xon handshake
  729.   -e n    receive packet-length
  730.   -v n    window size
  731.   -w    write over files of same name, don't backup old file
  732.   -D n    delay n seconds before sending a file
  733. .sp
  734. Other:
  735.   -y name    alternate init file name
  736.   -Y    Skip init file
  737.   -R    Advise C-Kermit it will be used only in remote mode
  738.   -d    log debug info to file debug.log
  739.   -S    Stay, don't exit, after action command
  740.   -C "cmds"    Interactive-mode commands, comma-separated
  741.   -z    Force foreground operation
  742.   -h    print command-line option help screen
  743.   =    Ignore all text that follows
  744. .sp
  745. Remote-mode example (C-Kermit is on the far end):
  746. .nf
  747. .sp
  748.   kermit -v 4 -i -s oofa.bin
  749. .sp
  750. .fi
  751. sends file oofa.bin in binary mode (-i) using a window size of 4 (-v 4).
  752. .sp
  753. Local-mode example (C-Kermit makes the connection):
  754. .nf
  755. .sp
  756.   kermit -l HARDWIRE -b 19200 -c -r -n
  757. .sp
  758. .fi
  759. makes a 19200-bps direct connection out through HARDWIRE, CONNECTs (-c) so you
  760. can log in and, presumably start a remote Kermit program and tell it to send a
  761. file, then it RECEIVEs the file (-r), then it CONNECTs back (-n) so you can
  762. finish up and log out.
  763. .sp
  764. For dialing out, you must specify a modem type, and you might have to use a
  765. different device name:
  766. .nf
  767. .sp
  768.   kermit -m hayes -l DIALOUT -b 2400 -c -r -n
  769. .ll
  770. .in
  771. .fi
  772. .SH FILES
  773. .nf
  774. .ta 16
  775. #ifndef HPUX10
  776. $HOME/.kermrc    Standard C-Kermit initialization commands.
  777. #endif /* HPUX10 */
  778. $HOME/.mykermrc    Your personal C-Kermit customization file.
  779. $HOME/.kdd    Your personal dialing directory.
  780. $HOME/.ksd    Your personal services directory.
  781. #ifdef HPUX10
  782. .sp
  783. /usr/share/lib/kermit/READ.ME      Overview of HP-UX C-Kermit, please read
  784. /usr/share/lib/kermit/ckermit.ini  System-wide initialization file
  785. /usr/share/lib/kermit/ckermod.ini  Sample customization file
  786. /usr/share/lib/kermit/ckermit.kdd  Sample dialing directory
  787. /usr/share/lib/kermit/ckermit.ksd  Sample services directory
  788. /usr/share/lib/kermit/ckcker.upd   Supplement to "Using C-Kermit"
  789. /usr/share/lib/kermit/ckcker.bwr   C-Kermit "beware" file - hints & tips
  790. /usr/share/lib/kermit/ckuker.bwr   UNIX-specific beware file
  791. /usr/share/lib/kermit/ckedemo.ini  Macros from "Using C-Kermit"
  792. /usr/share/lib/kermit/ckevt.ini    Ditto
  793. /usr/share/lib/kermit/cketest.ini  Ditto
  794. /var/spool/locks/LCK..*            UUCP lockfiles
  795. #else
  796. .fi
  797. .PP
  798. The following should be in a publicly accessible plain-text documentation area,
  799. such as usr/local/lib/kermit, /usr/local/doc, or /usr/share/lib/kermit, or
  800. available via an information server such as gopher:
  801. .nf
  802. .ta 16
  803. .sp
  804. ckaaaa.hlp      Explanation of C-Kermit files.
  805. ckermit.ini     Standard initialization file.
  806. ckermod.ini    Sample C-Kermit customization file.
  807. ckermit.kdd    Sample dialing directory.
  808. ckermit.ksd    Sample services directory.
  809. ckcker.upd    Supplement to "Using C-Kermit".
  810. ckcker.bwr    C-Kermit "beware" file - hints & tips.
  811. ckuker.bwr    UNIX-specific beware file.
  812. ckedemo.ini     Demonstration macros from "Using C-Kermit".
  813. ckevt.ini       Ditto.
  814. cketest.ini     Ditto.
  815. #endif
  816. .fi
  817. .PP
  818. #ifndef HPUX10
  819. If C-Kermit has not been installed on your system with the system-wide
  820. initialization file feature, then the ckermit.ini file should be copied to
  821. your home (login) directory and renamed to 
  822. .IR ".kermrc" .
  823. You should not modify
  824. this file.
  825. .sp
  826. #endif
  827. To make
  828. .IR "personalized customizations" ,
  829. copy the file
  830. #ifdef HPUX10
  831. /usr/share/lib/kermit/ckermod.ini
  832. #else
  833. ckermod.ini
  834. #endif
  835. file to your home directory, make any desired changes, and rename it to
  836. .IR ".mykermrc" .
  837. .sp
  838. You may also create a personalized
  839. .IR "dialing directory"
  840. like the sample one in
  841. #ifdef HPUX10
  842. /usr/share/lib/kermit/ckermit.kdd.
  843. #else
  844. ckermit.kdd.
  845. #endif
  846. Your personalized dialing directory
  847. should be stored in your home directory as
  848. .IR ".kdd" .
  849. See Chapter 3 of
  850. .IR "Using C-Kermit"
  851. for details.
  852. .sp
  853. And you may also create a personalized
  854. .IR "services directory"
  855. like the sample one in
  856. #ifdef HPUX10
  857. /usr/share/lib/kermit/ckermit.ksd.
  858. #else
  859. ckermit.ksd.
  860. #endif
  861. Your personalized services directory should be stored in your home directory as
  862. .IR ".ksd" .
  863. See Chapter 13 of
  864. .I "Using C-Kermit"
  865. for instructions.
  866. .sp
  867. The demonstration files illustrate C-Kermit's script programming constructs;
  868. they are discussed in chapters 11-13 of the book.  You can run them by typing
  869. the appropriate TAKE command at the C-Kermit> prompt, for example:
  870. "take /usr/share/lib/kermit/cketest.ini".
  871. .PD
  872. .SH AUTHORS
  873. Frank da Cruz, Columbia University, with contributions from hundreds of
  874. other volunteer programmers all over the world.  See Acknowledgements in
  875. .IR "Using C-Kermit".
  876. .SH REFERENCES
  877. .TP
  878. Frank da Cruz and Christine M. Gianone,
  879. .IR "Using C-Kermit",
  880. Digital Press / Butterworth-Heinemann, 225 Wildwood Street,
  881. Woburn, MA 01801, USA (1993).
  882. ISBN 1-55558-108-0.  (In the USA, call +1 800 366-2665 to order Digital Press
  883. books.)  Also available in a German edition from Verlag Heinze Heise,
  884. Hannover.
  885. .sp
  886. .TP
  887. Frank da Cruz,
  888. .IR "Kermit, A File Transfer Protocol",
  889. Digital Press / Butterworth-Heinemann, Woburn, MA, USA (1987).
  890. ISBN 0-932376-88-6.  The Kermit file transfer protocol specification.
  891. .TP
  892. Christine M. Gianone,
  893. .IR "Using MS-DOS Kermit",
  894. Digital Press / Butterworth-Heinemann, Woburn, MA, USA (1992).
  895. ISBN 1-5558-082-3.  Also available in a German edition from Heise, and a
  896. French edition from Heinz Schiefer & Cie, Versailles.
  897. .TP
  898. .IR "Kermit News",
  899. Issues 4 (1990) and 5 (1993), Columbia University,
  900. for detailed discussions of Kermit file transfer performance.
  901. .SH DIAGNOSTICS
  902. The diagnostics produced by
  903. .I C-Kermit
  904. itself are intended to be self-explanatory.  In addition, every command
  905. returns a SUCCESS or FAILURE status that can be tested by IF FAILURE or
  906. IF SUCCESS.  In addition, the program itself returns an exit status code of
  907. 0 upon successful operation or nonzero if any of various operations failed.
  908. .SH BUGS
  909. See recent issues of the Info-Kermit digest (on BITNET/EARN and the Internet),
  910. or the comp.protocols.kermit.* newsgroups on Usenet for discussion, or the 
  911. files  ckcker.bwr and ckuker.bwr, for a list of bugs, hints, tips. etc.  Report
  912. bugs via e-mail to kermit@columbia.edu.
  913. Subscribe to Info-Kermit by sending e-mail to LISTSERV@CUVMA.BITNET or
  914. LISTSERV@CUVMA.CC.COLUMBIA.EDU containing the text "subscribe i$kermit"
  915. followed by your name.
  916. .SH CONTACTS
  917. For more information about Kermit software and documentation, write to:
  918. .nf
  919. .sp
  920.   Kermit Development and Distribution
  921.   Columbia University
  922.   612 West 115th Street
  923.   New York, NY  10025-7221
  924.   USA
  925. .sp
  926. .fi
  927. Or send e-mail to kermit@columbia.edu.
  928. Or call +1 212 854-3703.  Or fax +1 212 663-8202.
  929. .br
  930.