#-h- kermit.doc 363 ascii 06/11/84 .so manhdr.doc.tools .hd KERMIT (1) 6/7/84 reliable file transfer over terminal connection .sy kermit [ifd] 13:54:13 kermit r[ifd] kermit s[ifd] [file [-as remote_name]]... .## future: .## kermit g[ifd] [file]... .## .## ON ANYTHING OTHER THAN THE 3000, DOCUMENT THE 'x' OPTION: .## kermit [xfid] etc .## .ds Kermit provides reliable file transfer between machines. It has been implemented on many different computers, including many microprocessors (see below). The files transferred may be arbitrary ASCII data (full 7-bit characters) and may be of any length. This kermit implementation is capable of transmitting binary data as well (8-bit bytes), even over a 7-bit communication link. (To use this, the other kermit program must also have this capability.) Files are sent in small (96 character) checksummed packets. This version of kermit does not include terminal emulation. .## ifdef HP3000 (In fact, good terminal emulation is not possible from the HP 3000.) .## enddef Therefore, this kermit assumes it is running on the remote computer (ie. NOT the machine to which your terminal is attached). Standard input and output is used for all packet transmissions. Kermit has three modes: Send, Receive and Server. Kermit invoked without arguments comes up in server mode: it is ready to receive or send files on command from another kermit, i.e., the kermit running on the user's local machine. The 'r' flag places kermit in Receive mode which is a subset of Server mode; it is included only for compatability with older versions. The 's' flag places kermit in Send mode: this flag must be followed by the names of the file(s) to be sent to the other kermit. Each filename in a Send command may be followed by an optional flag '-as' which must then be followed by the filename which will be sent with the file to the other kermit. In Server or Receive modes, the 'f' flag suppresses conversion of incoming filenames as described below. In all states, .## ifnotdef HP3000 .## the 'x' flag specifies that THIS kermit is to wait for the XON .## character from the OTHER kermit before sending data out. .## .## enddef the 'i' flag ("image mode") specifies that all files are to be treated as binary files. When receiving files with the 'i' flag turned on, new files are created as fixed record binary files. When sending binary files (or when the 'i' flag is on), only the file contents will be sent; no indication of end-of-record is sent. Thus, information will be lost if variable-record binary files are sent. Adding 'd' flags (debug) makes Up to three d's may be used. The states kermit goes through traces of it's operation. For debugging a remote kermit, saved in a file by redirecting For instance, kermit progressively more verbose. are printed along with other this information may be the error output. .ti +5 kermit dd ?logfile will save the diagnostic output in the file 'logfile'. To view such log files (which may contain control characters), it is most informative to use show(1) or ed(1) with the 'l' command. The file transfer protocol uses small (96 character) checksummed packets, with ACK/NACK responses and timeouts. This Kermit uses a ten second timeout and five retries. When using kermit as a remote server, kermit may be exited by typing an interrupt .## ifdef HP3000 (^Y on the HP 3000) .## enddef or an end-of-file .## ifdef HP3000 (^D and return on the HP 3000). .## enddef The server 'finish' command (sent from the local kermit) has the same effect. When receiving files, kermit deletes any files which are not complete (due to some error or interruption of the transfer). .sp .ti -7 FILENAMES .br When receiving a file, kermit will first attempt to store the file with the same name that was used to send it. If that is not possible and the 'f' flag was .ul not given, Kermit makes whatever name translations are necessary to make this name legal. .## ifdef HP3000 (The HP3000 kermit must compress names into 8 alphanumeric characters with no extension.) .## enddef If a file by that name already exists, kermit simply overwrites it, and no error message is given. .## ifdef HP3000 (Kermit on the HP 3000 may be run with "-environ noclobber" at the end of the command line to avoid this. In this case, appending ":clob" to the filename overrides this protection.) .## enddef In Send mode, Kermit will change the name to the "normal form" for sending: directory specifications are stripped off, and a name of the form NAME.EXT is sent. The extension .EXT is optional, and both parts are contain only letters and digits and are capitalized. .## ifdef HP3000 (The HP3000 kermit does not send an extension.) .## enddef The "-as name" construction may be used to send files with names that are different from the names on the originating system; 'name' is NOT changed to normal form. .## ifdef HP3000 When sending files to the HP3000 kermit, it is possible to use the full Software Tools filename syntax. A few useful examples: .in +2 .nf name:fix80 .br name:dev=lp .br name:code=prog .br name:disc=8000 .in -2 .fi .## enddef .sp create an 80-char fixed record file print the file on the HP3000 lineprinter create an HP3000 program file (binary) create a large file (8000 => ~10 Mbyes) .ti -7 EXAMPLE .br For this example we will assume that we are calling the HP 3000 from a Unix system, i.e., a Unix system is our local system. (In many cases, a PC may be the local system.) Assume we are logged onto "Local" (the local machine), and want to communicate with "Remote" (the HP 3000). We first want to connect to "Remote". On "Local", we type: % kermit xlb /dev/tty4 9600 [Local] C-Kermit> c to set up the connection (using the Unix kermit's 'connect' mode for terminal emulation, and assuming that there is a 9600 baud connection on tty4 to the 3000). (Note that '%' is the Unix prompt, '[Local] C-Kermit' is the local Kermit's prompt.) "Local"s kermit answers: .nf [Local] C-Kermit: connected... type ^]c to return to Local .fi and we are talking to "Remote". We hit RETURN, get a login prompt from "Remote" and login. :hello user.tools (MPE login message...) Now we start the kermit server on the remote machine: Remember that we are talking to "Remote" right now. We type: .nf :run kermit.pub.tools [Remote] ST Kermit: Software Tools Kermit (HP 3000) [Remote] ST Kermit Server Mode .fi and there is now a Server kermit on "Remote" We type "^]c" to return to the Local Kermit and come back to the Local prompt. Kermit answers: [Local] C-Kermit: returned. Line is still open. We are now ready to send and receive files. To get files from the other side, we may type: [Local] [Local] [Local] [Local] C-Kermit> C-Kermit: C-Kermit: C-Kermit: g data.user.tools junk.pub.acct Saving DATA as data Saving JUNK as junk Done. We may send files with the send command: [Local] [Local] [Local] [Local] C-Kermit> C-Kermit: C-Kermit: C-Kermit: s data.dat file1 -as file.user Sending data.dat as DATA.DAT Sending file1 as FILE.USER Done. After each command, Kermit will type either "Send complete", or "Send failed", depending on the success of the transfer. After all the transfers were done, we should connect again, log off of Remote and leave the Local Kermit. Details on other implementations and on the protocol is given in the .ul Kermit Users Guide, and the .ul Kermit Protocol Manual. .sp .ti -7 FLOW CONTROL .br The KERMIT Protocol uses only printing ASCII characters (decimal 32-126) and Ctrl-A. The communications channel between kermits .ul must not change or swallow any of these characters. CR is used as the default line-terminator character, though that may be renegotiated by the protocol. Ctrl-S/Ctrl-Q (XOFF/XON) flow control can be used "underneath" the Kermit protocol if the operating system supports it. .## ifdef HP3000 The HP3000 kermit makes use of XON/XOFF handshaking by sending Ctrl-S at the appropriate times (after sending out a packet). The 3000 tty driver sends the Ctrl-Q when it is ready for more data. This will work if the other machine's operating system recognizes XOFF/XON. (This is the case for TOPS-20 and Unix System III and V.) If it does not, the local kermit should wait for the XON character before sending each packet. The Unix Kermit (the version distributed with the 3000 version) does this if the 'x' flag is given. Many micros' kermits recognize a 'SET IBM' or 'SET HANDSHAKE XON' command which accomplishes the same thing. The 3000 kermit should NOT be given the 'x' flag unless it is talking to another machine that sends out XONs, i.e., an IBM 370. If it is not possible for the other kermit to do this, packets sent to the 3000 kermit may be missed if they are sent before the 3000 is ready (and isssues the prompt character XON). This may occur when the 3000 loading is high; it is characterized by multiple packet timeouts, and possibly, a "Send failed" message from the local kermit. A partial solution is to have the 3000 kermit ask the local kermit to send 'padding' before sending a packet. This may be done by using the '-pad N' flag, where N may be from 0 to 94. If a packet is missed, a timeout occurs and the packet will be retransmitted, so file transfer should proceed, but if every packet needs to be transmitted more than once, file transfer will become exceedingly slow. Running the local kermit with debugging on will allow monitoring this situation. .## enddef .## ifdef HP3000 This kermit has timeouts, so the protocol is stable when communicating with "dumb" kermits (that don't have timeouts) as long as they can wait for XON. Even with non-XON kermits, it will usually be stable. .## enddef .sp .ti -7 OTHER IMPLEMENTATIONS .br Kermits have been written for TOPS-20, TOPS-10, IBM VM/CMS, Unix, VAX/VMS, RT-11, MS-DOS, CP/M, and Apple DOS. More information is given on page 45 of the .ul Kermit Users Guide. The Software Tools kermit runs on the Univac 1100 and the HP 3000, and should be portable to nearly any other system that supports the Software Tools package. .sp .ti -7 ENVIRONMENT VARIABLES .br The ST environment variable 'kermitheader' sets the prefix to kermit's message banner. It defaults to 'ST '. See env(3:HP3000) for more information on environment variables. .sp .ti -7 SEE ALSO .br .ul Kermit Users Guide, Fifth Edition (2 March 1984), Frank da Cruz, Columbia University Center for Computing Activities, New York, New York, 10027 .br (usemandf.kermit.tools on the HP 3000) .ul Kermit Protocol Manual, Fifth Edition (30 March 1984), Frank da Cruz, Columbia University Center for Computing Activities, New York, New York, 10027 .br (promandf.kermit.tools on the HP 3000) .au KERMIT kernel by Bill Catchings, Columbia University Center for Computing Activities KERMIT-Unix adaptation by Chris Maio and Bob Cattani, Columbia University Computer Science Dept. Translation from C into Software Tools Ratfor on the Univac 1100 by Kendall Tidwell and Allen Cole, University of Utah, Computer Center. Fixes, enhancements and port to the HP 3000 by Ken Poulton. .di Cant open filename .in +5 sent to the local kermit (as an error packet) when that condition occurs. .in -5 .bu .## ifdef HP3000 Use of terminal type 13 may (according to HP) crash a Series 33. If you have a Series 33, alter the TERMTYPE definition in kermitde.src to use terminal type 4 and recompile it using maknew.scripts. When receiving files of more than ~ 1 Mbyte, the sending kermit is likely to time out while the 3000 kermit extends the file. This may be gotten around by sending the file with a 'disc' specification appended to the name. For example, "file1:disc=8000" is good for ~10 Mbytes. .## enddef #-t- kermit.doc 363 ascii 06/11/84 13:54:13 #-h- manhdr.doc 163 ascii 06/11/84 13:54:16 .de ## # comment .en .## .de HD .hd $1 $2 $3 $4 $5 $6 $7 $8 $9 .en .de hd .bp 1 .in .rm .he '$1 $2'$3 $4 $5 $6 $7 $8'$1 $2' .fo ''-#-'' .fi .in 7 .ti -7 NAME .br $1 .en .## .de SY .sy .en .de sy .sp 1 .ti -7 SYNOPSIS .br .nf .en .## .de DE .ds .en .de ds .fi .sp .ti -7 DESCRIPTION .br .en .## .de fu .fi .sp 1 .ti -7 FUNCTION .br .en .## .de DIagnostics .di .en .de di .fi .sp .ti -7 DIAGNOSTICS .br .en .## .de REturns .re .en .de re .fi .sp .ti -7 RETURNS .br .en .## .de FIles .fl .en .de fl .fi .sp .ti -7 FILES .br .en .## .de ENvironment .fi .sp .ti -7 ENVIRONMENT .br .en .## .de EXamples .ex .en .de ex .fi .sp .ti -7 EXAMPLES .nf .br .en .de IMplementation .im .en .de im .fi .sp .ti -7 IMPLEMENTATION .br .en .## .de SEe also .sa .en .de sa .fi .sp .ti -7 SEE ALSO .br .en .## .de am .fi .sp .ti -7 ARGUMENTS MODIFIED .br .en .## .de ca .fi .sp .ti -7 CALLS .br .en .## .de BUgs .bu .en .de bu .fi .sp .ti -7 BUGS/DEFICIENCIES .br .en .## .de AUTHORS .au .en .de au .fi .sp .ti -7 AUTHORS .br .en .de comment .en #-t- manhdr.doc 163 ascii 06/11/84 13:54:16