1 LISP LIBRARY PACKAGES MANUAL 1 LISP LIBRARY PACKAGES MANUAL KERMIT AND MODEM 1 COMMUNICATIONS/NETWORK 1 KERMIT AND MODEM 6 Kermit and Modem are utilities meant primarily for transferring files between computers using ordinary RS232 and modem connections. The file KERMIT.DCOM contains both the Kermit and Modem protocols. Once loaded, it provides a means of transferring files between an Interlisp-D workstation and any other computer that supports either Kermit or Modem, and to which Interlisp-D is able to open a Chat connection. Of these two file transfer protocols, Kermit is preferred. Modem is much less flexible than Kermit, and cannot be used on RS232 connections requiring parity or flow control. Modem was developed primarily to support file transfers to and from microcomputers running the CP/M operating system. Modem implementations are available for Tops-20, VAX/Unix, and VAX/VMS. Kermit, on the other hand, was designed for file transfers between computers of many types, and there exist implementations of the Kermit protocol on machines ranging in size from eight-bit microcomputers to large IBM mainframes. 2 Using Kermit and Modem 1 The first step in using Kermit or Modem is to establish a Chat connection with a desired host. You may use any sort of Chat connection (e.g., NS-based, TCP-based, PUP-based, or RS232-based). If you are using an RS232 connection, and plan to transfer files with the Modem protocol, you must not establish a connection that requires parity to be used; you must establish the connection with eight bits per character and no parity (see the Lisp Library documentation for RS232). In addition, you should disable flow control (XOn/XOff) when using Modem. When you have established a Chat connection to a remote host, log in (if necessary), and start the remote host's Kermit or Modem program. The details of how to run these programs differ slightly between implementations; you should obtain documentation specific to your version of Kermit or Modem. Using Kermit 1 Most mainframe implementations of Kermit have a server mode. This mode causes the remote Kermit to listen for either send or receive requests without your having to type additional commands to the remote Kermit. If the version of Kermit you are using does support server mode, give the server mode command to place the program in this mode. In most implementations of Kermit, server mode is entered by your typing server to the Kermit prompt: Kermit> server If the remote Kermit does not support Kermit mode, you must issue individual send and receive requests for each file you transfer. To send a file to a remote Kermit, issue the receive command to the remote Kermit. To receive a file from a remote Kermit, issue the send command to the remote Kermit. In most cases, these commands are followed by the name of the file to be sent or received. For example: Kermit> receive file.txt or Kermit> send file.txt If you are transferring files between two Interlisp-D workstations connected by an RS232 connection, you should call (CHAT 'RS232) on each machine to establish the connection. Currently, Interlisp-D Kermit does not support a server mode, so you must issue a receive request on one machine, followed by a send request on the other (see below). After you have started the remote Kermit program, you need to start the local Interlisp-D Kermit program. Interlisp-D provides both functional and interactive interfaces for Kermit (and Modem). We describe here the functional interface; the interactive interface will be described later in this document. To start the local side of the Kermit file transfer, use the KERMIT.SEND or KERMIT.RECEIVE functions: (KERMIT.SEND LOCALFILE REMOTEFILE WINDOW TYPE) [Function] LOCALFILE is the name of the file being sent to the remote Kermit. REMOTEFILE is the name under which the file should be stored remotely; in most implementations of Kermit, this name overrides any name you specified in the remote receive command. WINDOW is a pointer to the Chat window over which the transfer will take place; if WINDOW is NIL, the value of CHATWINDOW (the first Chat window to be opened) will be used in its place. TYPE is the type of the file; it should be set to either TEXT or BINARY. (KERMIT.RECEIVE LOCALFILE REMOTEFILE WINDOW TYPE) [Function] LOCALFILE is the local name of the file to be received from the remote Kermit. REMOTEFILE is the name of the file on the remote machine. WINDOW is a pointer to the Chat window over which the transfer will take place; if WINDOW is NIL, the value of CHATWINDOW (the first Chat window to be opened) will be used in its place. TYPE is the type of the file; it should be set to either TEXT or BINARY. While the file transfer is in progress, the associated Chat window will be blank, and cumulative packet counts and other messages will be displayed in a one-line prompt window above the Chat window. Using Modem 1 To transfer files with the Modem protocol, you must run the Modem program on the remote machine. Modem does not support a server mode; typically, you run the program once per file transferred, with instructions in the command line to indicate whether the file is being sent or received. There are a number of versions of the Modem protocol. On some systems, you run the program called Modem; on other systems, the program is called UModem or XModem. On Unix, for instance, to send a text file to an Interlisp-D workstation, you would type: % xmodem -st file.txt On Tops-20, you would type: @modem sa file.txt You should transfer files between two Interlisp-D machines using the Kermit protocol. As with Kermit, after you have started the remote side of the file transfer, you must start the local (Interlisp-D) side. To do this, use either of the functions MODEM.SEND or MODEM.RECEIVE: (MODEM.SEND LOCALFILE WINDOW TYPE EOLCONVENTION) [Function] LOCALFILE is the name of the file to send to the remote Modem program. WINDOW is the Chat window over which the transfer will take place. TYPE is the file type, either TEXT or BINARY. EOLCONVENTION is the end-of-line convention used by the operating system on which the remote Modem program is running. EOLCONVENTION should be one of CR, LF, or CRLF. Typically, Unix and VMS require LF, Tops-20 requires CRLF, and other Interlisp-D machines require CR. (MODEM.RECEIVE LOCALFILE WINDOW TYPE EOLCONVENTION) [Function] LOCALFILE is the name of the file to receive from the remote Modem program. WINDOW is the Chat window over which the transfer will take place. TYPE is the file type, either TEXT or BINARY. EOLCONVENTION is the end-of-line convention used by the operating system on which the remote Modem program is running (see above). 2 Interactive File Transfers With Kermit or Modem 1 A more convenient user interface for Kermit and Modem is available via the package KERMITMENU.DCOM. KERMITMENU loads FREEMENU, and provides a menu-oriented interface for issuing Kermit or Modem commands. To obtain the menu interface, depress the middle mouse button in a live Chat window. The standard middle-button Chat menu will contain an entry labeled Kermit near its top. If you select this entry, a menu will appear at the top of the associated Chat window: ~L<0`0<6`0`<6`<z8m `<mmm`<m}g>6`<mag0 <n+ l 5  D>+ v HRULE.GETFNMODERN0 HRULE.GETFNMODERNL BMOBJ.GETFN3MODERN  =1C2dz