February 1985 ... __________________________________________________

advertisement
February 1985
- i -
Kermit-CR
__________________________________________________
Copyright, 1984, The Regents of the University
of California.
This document was produced
under a U.S. Government contract (W-7405-ENG36) by the Los Alamos National Laboratory,
which is operated by the
University
of
California for the U.S. Department of Energy.
The U.S. Government is licensed to
use,
reproduce,
and
distribute this document.
Permission is granted to the public to copy
and use this document without charge, provided
that this notice and
any
statement
of
authorship
are reproduced on all copies.
Neither the Government nor the University
makes any warranty, express or implied, or
assumes any liability or responsibility for
the use of this document.
__________________________________________________
Kermit for the Cray
February 1985
- 1 -
Kermit-CR
KERMIT-CR KERMIT FOR THE CRAY
_________________________________________________________________
1. INTRODUCTION
Kermit-CR is an implementation of the Kermit protocol on the
Cray-1 and Cray X-MP computers. It is written in CFT, the Cray
version of Fortran-77, and runs under the Cray Time-Sharing System (CTSS) operating system. Kermit-CR is an advanced Kermit,
including all required features plus server mode, timeout capability, data compression, and 8th bit quoting.
Specific features of Kermit-CR are described in section 2. The
Kermit-CR commands are described in section 3. Section 4 provides help for installing Kermit-CR.
2. SPECIFIC FEATURES OF KERMIT-CR
2.1 Host Versus Local Kermits
Kermit-CR is a host Kermit intended for shipping files between a
Cray and a local workstation. The local Kermit controls the
screen during file transmission.
2.2 Non-Server Mode
Non-server mode is the default Kermit mode. You CONNECT from
local to host Kermit, enter host Kermit command (e.g., send a
file), and escape back to the local Kermit to give it the
corresponding command (e.g., receive). Some local Kermits lack
the commands for talking to a server and can only communicate
with Kermit-CR in this mode.
2.3 Server Mode
Server mode makes file transfer more automatic. After entering
the Kermit-CR command "server," you escape back to local Kermit
and control subsequent file transfers exclusively from the local
side. Note that Kermit-CR lacks the ability to log itself out.
The local Kermit's server commands FINISH, BYE, or LOGOUT cause
Kermit for the Cray
Kermit-CR
- 2 -
February 1985
termination of Kermit-CR and return to CTSS level on the host
machine.
2.4 File Name Considerations
If an incoming file arrives correctly, it replaces any file of
the same name in your Cray filespace. If errors are detected
during transmission, the incoming file is discarded; your original file remains intact. Uppercase letters in incoming filenames
are converted to lowercase.
2.5 Interrupting Transfers
Kermit-CR understands transfer-interrupt messages from any local
Kermit which also has this capability (e.g., Kermit-MS on the IBM
PC). Type CTRL-X during transmission to cancel shipment of the
current file, or CTRL-Z to cancel a group of files.
2.6 Wildcard Characters
Kermit-CR cannot do wildcard sends. In non-server mode, KermitCR can send multiple files with a single command via the command
"send <file1> .. <filen>". Such files are considered a group
with respect to the interrupt capability described previously.
2.7 CTSS Text Files
In default mode, Kermit-CR converts all CTSS end-of-line characters (Ascii US) to CR, LF sequences on outgoing files and vice
versa for incoming files. The CTSS end-of-file character (Ascii
FS) is treated as file terminator and is stripped from outgoing
files and appended to incoming files. This is intended to ensure
compatibility of the received file with other standard utilities.
2.8 Binary Files
In a Cray network under CTSS, the line concentrator typically
uses the 8th bit of each byte/character to represent parity.
Kermit for the Cray
February 1985
- 3 -
Kermit-CR
Kermit-CR can exchange binary files with any local Kermit having
the optional 8th bit quoting feature of the protocol (e.g.,
Kermit-MS). To ship a binary file, or to ship any file without
the conversions described above, you must first give the
Kermit-CR command "set native off". If your local Kermit lacks
8th bit quoting, binary file transmission will fail after a few
packets, because the packet checksum will not match the checksum
that is calculated upon arrival. Note that a binary file shipped
to Kermit-CR and later down-loaded to a workstation may appear to
have gained a few bytes. This is because Kermit-CR has padded
out its last word with nulls.
2.9 Variant CTSS Text Files
Before being written onto mass storage, CTSS text files are frequently converted to a packed form via the STEXT utility. In
this form, escape sequences represent blank strings. The NTEXT
utility is used to reverse this transformation. However, if
standard defaults are used, NTEXT does not expand the compressed
blanks. These escape sequences are understood by most CTSS utilities, and may be inserted directly into the text by some editors
(see below). If you want to export such files to a workstation,
you should expand blank compression sequences first.
2.9.1 STEXT Files
Text
tion
list
file
files in STEXT format can be sent unconverted to a workstawith the Kermit-CR native option set off. If you want to
or edit the file on the workstation, you should convert the
to CTSS format before shipping, by using the command:
ntext
filename1
[filename2]
The -noc parameter is required.
Kermit-CR native option on.
-noc
The file should be sent with the
2.9.2 TRIXGL Files
Use the Ascii standard option CFA(file), instead of the compression option CFS(file), to close text files created with the
TRIXGL editor, if you want to edit or list the files on a workstation. Files closed with the compression option can be converted to standard Ascii by opening them and then closing them
using CFA. The file can then be shipped with the Kermit-CR
Kermit for the Cray
Kermit-CR
- 4 -
February 1985
native option on. The TRIXGL trailer, which follows the CTSS
end-of-file character and extends to the physical end of file,
will be stripped from outgoing files.
2.10 Screen Editor and Document Preparation Output
Some screen editors allow the user to insert escape sequences
into a text file, and many document preparation packages insert
formatting characters or sequences. The Kermit protocol guarantees the integrity of files during transmission. If you intend
to apply a software utility to such a file on the receiving side,
you should make sure that such characters or sequences are understood by the utility.
2.11 Data Compression
Kermit-CR automatically performs data compression when talking to
a local Kermit that also has this optional capability (e.g.,
Kermit-MS, but not Kermit-86). Otherwise, Kermit-CR omits data
compression.
2.12 Automatic Logging
For each Kermit-CR session, a logfile named "kmtlog" is created.
All user commands, status information for each transfer, and
error conditions are logged.
2.13 Error Reporting
All detected errors are reported in two ways: 1. An error packet
with a descriptive message is sent to the local Kermit for screen
display, and 2. The same message is written onto the Kermit-CR
logfile. If the error is minor (e.g., you tried to send a file
not in your filespace), Kermit-CR will reissue its prompt. If
the error is unrecoverable under CTSS, it will be necessary to
restart the resulting CTSS dropfile to allow Kermit-CR to log the
message, close the logfile, and abort.
Kermit for the Cray
February 1985
- 5 -
Kermit-CR
2.14 Establishing Transmission Parameters
Under CTSS, Cray machines normally accept input from lineconcentrator hardware that echoes back local messages. Usually,
echoback can be disabled by prefixing packets with the appropriate pad character. However, transmission parameters must be set
by the local Kermit at the start of a session with Kermit-CR, in
order to ensure that the first packet gets through.
Kermit-MS as supported at LANL, includes a short initialization
file, MSKERMIT.INI, containing a macro definition for Cray communication. To invoke it, type:
Kermit-MS>do cray
For other local Kermits, the following parameter settings must be
used:
npad
pad
end
1
26
23
(CTRL-Z = Ascii SUB)
(CTRL-W = Ascii ETB)
These settings are used to disable echoback from network line
concentrators.
Long-distance dialup users should type the local Kermit CONNECT
command, log on to a Cray, start Kermit-CR, and escape back to
their local Kermits to set these parameters or invoke the macro.
3. KERMIT-CR COMMANDS
Kermit-CR follows standard CUCCA Kermit syntax with this single
exception: in non-server mode, more than one file may be sent by
a single SEND command. This facility substitutes for the use of
wildcard character file designators on sends. Although Kermit-CR
Release 2 does not provide full interactive help facilities, it
does display "helpful" error messages before returning to command
level. For example, the user can type a question mark in place
of the value for a SET option to force a display of the valid
range for that value.
Kermit-CR recognizes abbreviated command words where there is no
ambiguity. The square-bracketed portions of the commands may be
omitted.
Kermit for the Cray
Kermit-CR
- 6 -
February 1985
s[end]
<list of 1-10 filenames delimited by spaces>
send the listed files to a local Kermit.
r[eceive]
get a file from a local Kermit (both Kermits
in non-server mode).
server
enter server mode. All transfer information
will come from the local Kermit, in packets.
Command FINISH to the local Kermit terminates
this mode and causes exit from Kermit-CR to
CTSS.
e[xit]
Exit from Kermit-CR (non-server mode) to
CTSS.
set <option> <value>
Set the value of a Kermit-CR parameter for
the current session. The SET options are:
time <n>
Set the timeout interval, in
seconds. Use 0 <= n <= 99.
This value is automatically
doubled while the initial
connection to the local Kermit is being made. Default
is 5.
retry <n>
Set the number of times
Kermit-CR will try to send
the same packet. After the
nth unsuccessful try,
Kermit-CR logs an error message in the session log,
closes any open data file,
aborts the transfer and
issues its prompt. Default
is 5.
debug <on | off> Determine the extent of logging. Default is OFF: all
user commands, their status
at termination, any error
conditions and CTSS times
used are logged. With debug
ON, all packet traffic is
also logged.
Kermit for the Cray
February 1985
- 7 -
bufsize <n>
Kermit-CR
Set the maximum packet size
for the other Kermit to use
when sending to the Cray.
This value does not include
any prefixed pad characters
or appended end-of-line
character. Default is 82.
This value is site dependent. It may be constrained
to be less than the maximum
of 96 due to limitations on
physical or virtual buffer
lengths in front-end line
concentrator devices. If
such constraints apply and
too large a value is used,
packet tails may be lost.
Arriving packets will then
appear to have had checksums. If echoback is being
disabled by using special
PAD and END-OF-LINE characters, this may be disrupted
by truncation of the packet
portion containing the ENDOF-LINE character.
native <on | off> Default value ON tells
Kermit-CR to convert all
CTSS end-of-line characters
(Ascii US) to CR,LF
sequences on outgoing files,
and vice-versa for incoming
files. When sending,
Kermit-CR treats the first
occurrence of Ascii FS, the
CTSS end-of-file character,
as file terminator and
strips it. This character
is appended to incoming
files. Set this option OFF
to transfer binary files.
st[atus]
Display the current values of parameters that
can be modified by the SET command.
h[elp]
Display short menu of Kermit-CR commands.
Kermit for the Cray
Kermit-CR
- 8 -
February 1985
4. KERMIT-CR INSTALLATION
Kermit-CR consists of the following 8 source modules:
cr.kermain
- main Kermit-CR program and local functions.
cr.kutcmds - SERVER, SET, STATUS, and HELP command interpreters.
cr.send
- SEND command interpreter.
cr.receive
- RECEIVE command interpreter.
cr.filing
- virtual file I/O.
cr.pktio
- virtual and physical packet I/O
cr.stdutils - portable utility functions.
cr.kfutil
- physical file and display I/O: procedures invoking CTSS functions.
Kermit-CR runs on both the Cray-1 and Cray X-MP. Executable code
produced on a Cray X-MP will run on the Cray-1, but not vice
versa. Kermit-CR does not exploit the vectorization or parallel
execution potential of its hosts, as maximum transfer speed is
limited by the baud rate available for packet communication and
the timesharing load on the host Cray.
Disabling echoback is the major potential source of difficulty in
installing Kermit-CR. Under CTSS, Cray-1 and Cray X-MP expect
line input from terminals. Line input is provided by line concentrator hardware, which constitutes a normally transparent
intermediate node between a terminal or PC and a Cray machine.
This hardware echoes back terminal input. When the terminal is a
PC running Kermit, this echoback must be selectively disabled so
that the packet being sent to Kermit-CR does not appear in the
local Kermit's input buffer.
Kermit-CR disables packet echoback by asking the local Kermit to
bracket each packet between a single CTRL-Z pad character and a
single CTRL-W end-of-line character. The appropriate values may
be site dependent. The effect of the pad character is also site
dependent. It may function as a disable echoback signal or act
as a toggle switch for turning echoback on and off. The pad and
end-of-line characters themselves may echoback into the local
Kermit's serial input buffer. Normally, this echoback is harmless. However, there are local Kermits that do not throw away
characters preceding the SOH. Consequently, transmission may
Kermit for the Cray
February 1985
- 9 -
Kermit-CR
fail if the two echoed-back characters plus the incoming packet
overflow an internal buffer. For this reason, Kermit-CR chooses
safety over efficiency and uses a send packet length two less
than requested by the local Kermit.
Kermit-CR requests the pad and end-of-line character values in
its initial "S" packet. However, if the local Kermit sends the
first packet for a particular transaction, there may be difficulty establishing communication. In order to assure getting the
first packet through, it is necessary to set the NPAD, PAD, and
END-OF-LINE parameters (to be used in sending) on the local Kermit side.
The bracketing technique is not without risk: if one or both of
the bracketing characters is lost, echoback may reoccur inappropriately. The local Kermit will fail immediately, giving an
"unexpected packet type" error or giving no error description.
Some recent workstation Kermits (e.g., MSKERMIT v2.27) check for
echoback by comparing incoming packet type to the type of the
last packet sent. In this case, the user should be able to
ignore echoback and use the workstation Kermit's default NPAD,
PAD, and EOL parameters. However, some line concentrators get
swamped by the data rate of a local Kermit that is sending files,
if echoback is not disabled. Therefore, Kermit-CR still requests
the NPAD, PAD, and EOL parameters, described above, in its initial "S" packet.
If Kermit-CR will be used only with echoback-detecting local Kermits, the installer can recompile the logical function, KINIT,
omitting the line of code marked as a site dependency. Kermit-CR
will then request standard parameters. A symptom of lineconcentrator overload is truncated packets on upward sends.
Kermit for the Cray
February 1985
- iii -
CONTENTS
CONTENTS
_________________________________________________________________
1. Introduction ......................................
2. Specific Features of Kermit-CR ....................
2.1 Host Versus Local Kermits .......................
2.2 Non-Server Mode .................................
2.3 Server Mode .....................................
2.4 File Name Considerations ........................
2.5 Interrupting Transfers ..........................
2.6 Wildcard Characters .............................
2.7 CTSS Text Files .................................
2.8 Binary Files ....................................
2.9 Variant CTSS Text Files .........................
2.9.1 STEXT Files ..................................
2.9.2 TRIXGL Files .................................
2.10 Screen Editor and Document Preparation Output...
2.11 Data Compression ...............................
2.12 Automatic Logging ..............................
2.13 Error Reporting ................................
2.14 Establishing Transmission Parameters ...........
3. Kermit-CR Commands ................................
4. Kermit-CR Installation ............................
1
1
1
1
1
2
2
2
2
2
3
3
3
4
4
4
4
5
5
8
Kermit for the Cray
Download