-
Notifications
You must be signed in to change notification settings - Fork 4
/
ckuker.doc
2052 lines (1596 loc) · 93.9 KB
/
ckuker.doc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
μC-KERMIT
Derived from C-Kermit 4
by C. Gianone, Frank da Cruz,
and many others...
SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2021, 2022, 2023
Jeffrey H. Johnson <[email protected]>
Copyright (c) 1984,
Jeff Damens, Columbia University Center for Computing Activites
Copyright (c) 1985,
Herman Fischer, Encino CA
Copyright (c) 1981-2011,
Trustees of Columbia University in the City of New York.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Columbia University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1. μCKERMIT
μCKermit is an implementation of Kermit, written modularly and transportably in
C. The protocol state transition table is written in wart, a (non-proprietary)
lex-like preprocessor for C. System-dependent primitive functions are isolated
into separately compiled modules so that the program should be easily portable.
The Kermit file transfer protocol was developed at the Columbia University
Center for Computing Activities (CUCCA). It is named after Kermit the Frog,
star of the television series THE MUPPET SHOW; the name is used by permission
of Henson Associates, Inc. "Kermit" is also Celtic for "free".
μCKermit Capabilities At A Glance:
Local operation: Yes
Remote operation: Yes
Login scripts: Yes
Transfer text files: Yes
Transfer binary files: Yes
Wildcard send: Yes
File transfer interruption: Yes
Filename collision avoidance: Yes
Can time out: Yes
8th-bit prefixing: Yes
Repeat count prefixing: Yes
Alternate block checks: Yes
Terminal emulation: Yes
Communication settings: Yes
Transmit BREAK: Yes
Support for dialout modems: Yes
IBM mainframe communication: Yes
Transaction logging: Yes
Session logging (raw download): Yes
Debug logging: Yes
Packet logging: Yes
Act as Kermit server: Yes
Talk to Kermit server: Yes
Advanced Kermit server functions: Yes
Local file management: Yes
Command/Init files: Yes
UUCP and multiuser line locking: Yes
Long packets: Yes
Sliding Windows: No
File attributes packets: Yes
Command macros: No
Raw file transmit: Yes
All numbers in the μCKermit documentation are decimal unless noted otherwise.
μCKermit provides traditional UNIX command line operation as well as inter-
active command prompting and execution. The command line options provide ac-
cess to a basic subset of μCKermit's capabilities; the interactive command set
is far richer.
On systems with dialout modems, μCKermit's command file, DIAL command, and
login script facilities provide a counterpart to UUCP (UNIX-to-UNIX Copy
Program) for file transfer with including the use of scheduled (e.g. late
night) unattended operation. UUCP can only be used between computers that sup-
port UUCP, but μCKermit can be used to transfer files with the much larger
variety of computers that have Kermit (or even with computers that don't have
Kermit, if you use μCKermit's "raw" uploading and downloading features).
1.1. The UNIX File System
Consult your UNIX manual for details about the file system under your version
of UNIX. In general, UNIX files have lowercase names, possibly containing one
or more dots or other special characters. UNIX directories are tree-struc-
tured. Directory levels are separated by slash ("/") characters. For example,
/usr/cmg/bar
denotes the file bar in the directory /usr/cmg. Alphabetic case is significant
in UNIX file and directory names, i.e. "a" is a different file (or directory)
from "A". Wildcard or "meta" characters allow groups of files to be specified.
"*" matches any string; "?" matches any single character; tilde "~" at the
beginning of a file specification matches the user's home directory,
or followed immediately by another username, that user's home directory.
When μCKermit is invoked with file arguments specified on the UNIX command
line, the UNIX shell (Bourne Shell, C-Shell, Korn Shell, etc) expands the meta
characters itself, and in this case a wider variety may be available. For ex-
ample,
uckermit -s ~/ck[uvm]*.{upd,bwr}]
is expanded (by the Berkeley C-Shell) into a list of all the files in the user
home directory (~/) that start with the characters "ck", followed by a single
character "u", "v", or "m", followed by zero or more characters, followed by a
dot, followed by one of the strings "upd" or "bwr". Internally, the μCKermit
program itself expands only the "~", "*", and "?" meta characters.
UNIX files are linear (sequential) streams of 8-bit bytes. Text files consist
streams of ASCII characters (or characters in other codes) with lines separated
by the UNIX newline character, which is linefeed (LF, ASCII 10). This distin-
guishes UNIX text files from those on most other ASCII systems, in which lines
are separated by a carriage-return linefeed sequence (CRLF, ASCII 13 followed
by ASCII 10). Binary files are likely to contain data in the high bits
of the file bytes, and have no particular line or record structure.
When transferring files, μCKermit can convert between upper and lower case
filenames as well as LF and CR-LF line endings completely automatically. When
text files are to transferred between differing systems, the program should be
instructed perform LF/CR-LF conversion by adding '-i' on the command line
or issuing the "set file type text" command in interactive mode.
1.2. File Transfer
If μCKermit is in local mode, the screen (stdout) is continously updated to
show the progress of the file transer. A dot is printed for every four data
packets, other packets are shown by type:
I Exchange Parameter Information
R Receive Initiate
S Send Initiate
A Attribute packet
F File Header
G Generic Server Command
C Remote Host Command
N Negative Acknowledgement (NAK)
E Fatal Error
T Indicates a timeout occurred
Q Indicates a damaged, undesired, or illegal packet was received
% Indicates a packet was retransmitted
You may type the following "interrupt" commands during file transfer:
Control-F: Interrupt the current File, and go on to the next (if any).
Control-B: Interrupt the entire Batch of files, terminate the transaction.
Control-R: Resend the current packet
Control-A: Display a status report for the current transaction.
These interrupt characters differ from the ones used in other Kermit implemen-
tations to avoid conflict with commonly used UNIX shell interrupt characters.
With UNIX V7, UNIX System III, and UNIX System V systems, interrupt commands
must be preceeded by the 'connect' escape character (e.g. normally Ctrl-\).
Ctrl-F and Ctrl-B are effective only during the transfer of data (D) packets,
and cannot be used to interrupt a transfer that has not yet reached that stage.
CAUTION: If Control-F or Control-B is used to cancel an incoming file,
and a file of the same name previously existed, and the "file
rename" feature is enabled, then the previous copy of the file will
disappear.
EMERGENCY EXIT: When running μCKermit in remote mode, if you have started a
protocol operation (sending or receiving a file, server command wait, etc), you
will not be able to communicate with the terminal in the normal way. In par-
ticular, you cannot stop the protocol by typing the normal UNIX interrupt
characters, since the terminal has been put in "raw mode". If you need to
regain control quickly -- for instance, because the protocol is stuck -- you
can type two Control-C's directly to the μCKermit program ("connect" first
if necessary):
Control-C Control-C
This will cause the program to display,
^C^C...
exit, and restore the terminal to normal.
1.3. Command Line Operation
The μCKermit command line syntax conforms to the "Proposed Syntax Standards for
UNIX System Commands" put forth by Kathy Hemenway and Helene Armitage of AT&T
Bell Laboratories in "UNIX/World", Vol.1, No.3, 1984. The rules that apply are:
- Command names must be between 2 and 9 characters ("kermit" is 6).
- Command names must include lower case letters and digits only.
- An option name is a single character.
- Options are delimited by '-'.
- Options with no arguments may be grouped (bundled) behind one
delimiter.
- Option-arguments cannot be optional.
- Arguments immediately follow options, separated by whitespace.
- The order of options does not matter.
- '-' preceded and followed by whitespace means standard input.
A group of bundled options may end with an option that has an argument.
The following notation is used in command descriptions:
fn A UNIX file specification, possibly containing the "wildcard" charac-
ters `*' or `?' (`*' matches all character strings, `?' matches any
single character).
fn1 A UNIX file specification which may not contain `*' or `?'.
rfn A remote file specification in the remote system's own syntax, which
may denote a single file or a group of files.
rfn1 A remote file specification which should denote only a single file.
n A decimal number between 0 and 94.
c A decimal number between 0 and 127 representing the value of an ASCII
character.
cc A decimal number between 0 and 31, or else exactly 127, representing
the value of an ASCII control character.
[ ] Any field in square braces is optional.
{x,y,z} Alternatives are listed in curly braces.
μCKermit command line options may specify any combination of actions and set-
tings. If μCKermit is invoked with a command line that specifies no actions,
then it will issue a prompt and begin interactive dialog. Action options
specify either protocol transactions or terminal connection.
An implicit 'take' command is executed upon your .uckermrc file when μCKermit
starts up, upon either interactive or command-line invocation. This file may
contain μCKermit interactive-mode commands, which are explained later.
-s fn Send the specified file or files. If fn contains wildcard (meta)
characters, the UNIX shell expands it into a list. fn may also be a
list of files, as in:
uckermit -s ckcmai.c ckuker.h mail.txt
If fn is '-' then kermit sends from standard input, which may come from
a file:
uckermit -s - < foo.bar
or a parallel process:
ls -l | grep cmg | uckermit -s -
You cannot use this mechanism to send terminal typein. If you want to
send a file whose actual name is "-" you can precede it with a path
name, as in
kermit -s ./-
-r Receive a file or files. Wait passively for files to arrive.
-k Receive (passively) a file or files, sending them to standard output.
This option can be used in several ways:
uckermit -k
Displays the incoming files on your screen; to be used only in
"local mode" (see below).
uckermit -k > fn1
Sends the incoming file or files to the named file, fn1. If more
than one file arrives, all are concatenated together into the
single file fn1.
uckermit -k | command
Pipes the incoming data (single or multiple files) to the indicated
command, as in
uckermit -k | sort > sorted.stuff
-a fn1 If you have specified a file transfer option, you may give an alternate
name for a single file with the '-a' ("as") option. For example,
uckermit -s foo -a bar
sends the file foo telling the receiver that its name is bar. If more
than one file arrives or is sent, only the first file is affected by
the -a option:
uckermit -ra baz
stores the first incoming file under the name baz.
-x Kermit server operation. May be used in either local or remote mode.
Before proceeding, a few words about remote and local operation are necessary.
μCKermit is "local" if it is running on PC or workstation that you are using
directly, or if it is running on a multiuser system and transferring files over
an external communication line -- not your job's controlling terminal or con-
sole. μCKermit is remote if it is running on a multiuser system and transfer-
ring files over its own controlling terminal's communication line (normally
/dev/tty), connected to your PC or workstation.
If you are running μCKermit on a PC, it is normally used in local mode, with
the "back port" designated for file transfer and terminal connection, and the
keyboard and screen available to control or interrupt the file transfer and to
display its status. If you are running μCKermit on a multiuser (timesharing)
system, it is in remote mode unless you explicitly point it at an external line
for file transfer or terminal connection. The following command determines
whether μCKermit is in local or remote mode:
-l dev Line -- Specify a terminal line to use for file transfer and terminal
connection, as in
kermit -l /dev/ttyS5
When an external line is being used, you will also need some additional options
for successful communication with the remote system:
-b n Baud -- Specify the transmission speed in bits per second ("baud rate")
for the line given in the -l option, as in:
kermit -l /dev/ttyS5 -b 38400
This option should always be included with the -l option, since the
speed of an external line is not necessarily what you expect.
-p x Parity -- e,o,m,s,n (even, odd, mark, space, or none). If parity is
other than none, then Kermit's 8th bit prefixing mechanism will be used
for transferring 8-bit binary data, provided the opposite Kermit
agrees. The default parity is none.
-t Specifies half duplex, line turnaround with XON as the handshake
character.
The following commands may be used only with a μCKermit which is in local mode.
-g rfn Actively request a remote server to send the named file or files; rfn
is a file specification in the remote host's own syntax. If fn happens
to contain any special shell characters, like space, '*', '[', '~',
etc, these must be quoted, as in:
kermit -g x\*.\?
or:
kermit -g "profile exec"
-f Send a 'FINISH' command to a remote server.
-c Establish a terminal connection over the specified or default com-
munication line, before any protocol transaction takes place. Get back
to the local system by typing the escape character (normally
Control-Backslash) followed by the letter 'c'.
-n Like -c, but after a protocol transaction takes place; -c and -n may
both be used in the same command. The use of -n and -c is illustrated
below.
If the other Kermit is on a remote system, the -l and -b options should also be
included with the -r, -k, or -s options.
Several other command-line options are provided:
-i Specifies that files be treated as text and subject to conversion.
-w Allow overwrite -- Local files will be replaced by incoming files.
-e n Extended packet length -- Specify that μCKermit is allowed to receive
packets up to length n, where n may be between 10 and some large num-
ber, like 1000 or 2000, depending on the system. The default maximum
length for received packets is 90. Packets longer than 94 will be used
only if the other Kermit supports, and agrees to use, the "long packet"
protocol extension.
-q Quiet -- Suppress screen update during file transfer, for instance to
allow a file transfer to proceed in the background.
-d Debug -- Record debugging information in the file debug.log in the cur-
rent directory. Use this option if you believe the program is mis-
behaving, and show the resulting log to your local Kermit maintainer.
-h Help -- Display a brief synopsis of the command line options.
The command line may contain no more than one protocol action option.
Files are sent with their own names, except that lowercase letters are raised
to upper, pathnames are stripped off, certain special characters like (`~') and
(`#') are changed to `X', and if the file name begins with a period, an `X' is
inserted before it. Incoming files are stored under their own names except
that uppercase letters are lowered, and, if -w was specified, a "generation
number" is appended to the name if it has the same name as an existing file
which would otherwise be overwritten. If the -a option is included, then the
same rules apply to its argument. The file transfer display shows any trans-
formations performed upon filenames.
During transmission, files are encoded as follows:
- Control characters are converted to prefixed printables.
- Sequences of repeated characters are collapsed via repeat counts, if
the other Kermit is also capable of repeated-character compression.
- If parity is being used on the communication line, data characters
with the 8th (parity) bit on are specially prefixed, provided the
other Kermit is capable of 8th-bit prefixing; if not, 8-bit binary
files cannot be successfully transferred.
- Conversion is done between UNIX newlines and carriage-return-linefeed
sequences unless the -i option was specified.
Command Line Examples:
uckermit -l /dev/ttyS5 -b 1200 -cn -r
This command connects you to the system on the other end of ttyi5 at 1200 baud,
where you presumably log in and run Kermit with a 'send' command. After you
escape back, μCKermit waits for a file (or files) to arrive. When the file
transfer is completed, you are reconnected to the remote system so that you can
logout.
uckermit -l /dev/ttyS4 -b 1800 -cntp m -r -a foo
This command is like the preceding one, except the remote system in this case
uses half duplex communication with mark parity. The first file that arrives
is stored under the name foo.
uckermit -l /dev/ttyS6 -b 9600 -c | tek
This example uses Kermit to connect your terminal to the system at the other
end of ttyi6. The μCKermit terminal connection does not provide any particular
terminal emulation, so μCKermit's standard i/o is piped through a
(hypothetical) program called tek, which performs (say) Tektronix emulation.
uckermit -l /dev/ttyS6 -b 9600 -nf
This command would be used to shut down a remote server and then connect to the
remote system, in order to log out or to make further use of it. The
'-n' option is invoked after '-f' ('-c' would have been invoked before).
uckermit -l /dev/ttyS6 -b 9600 -qg foo.\* &
This command causes μCKermit to be invoked in the background, getting a group
of files from a remote server (note the quoting of the `*' character). No dis-
play occurs on the screen, and the keyboard is not sampled for interruption
commands. This allows other work to be done while file transfers proceed in
the background.
uckermit -l /dev/ttyS6 -b 9600 -g foo.\* > foo.log < /dev/null &
This command is like the previous one, except the file transfer display has
been redirected to the file foo.log. Standard input is also redirected,
to prevent μCKermit from sampling it for interruption commands.
uckermit -iwx
This command starts up μCKermit as a server. Files are transmitted with no
newline/carriage-return-linefeed conversion; the -i option is necessary for bi-
nary file transfer and recommended for UNIX-to-UNIX transfers. Incoming files
that have the same names as existing files are given new, unique names.
uckermit -l /dev/ttyS6 -b 9600
This command sets the communication line and speed. Since no action is
specified, μCKermit issues a prompt and enters an interactive dialog with you.
Any settings given on the command line remain in force during the dialog,
unless explicitly changed.
uckermit
This command starts up Kermit interactively with all default settings.
The next example shows how μCKermit might be used to send an entire direc-
tory tree from one UNIX system to another, using the tar program as Kermit's
standard input and output. On the orginating system, in this case the remote,
type (for instance):
tar cf - /usr/home/fdc | uckermit -is -
This causes tar to send the directory /usr/home/fdc (and all its files and
all its subdirectories and all their files...) to standard output instead of
to a tape; kermit receives this as standard input and sends it as a binary
file. On the receiving system, in this case the local one, type (for instance):
uckermit -il /dev/ttyS5 -b 9600 -k | tar xf -
Kermit receives the tar archive, and sends it via standard output to its own
copy of tar, which extracts from it a replica of the original directory tree.
A final example shows how a UNIX compression utility might be used to speed up
Kermit file transfers:
compress file | uckermit -is - (sender)
uckermit -ik | uncompress (receiver)
Exit Status Codes:
μCKermit returns an exit status of zero, except when a fatal error is en-
countered, where the exit status is set to one. With background operation
(e.g., `&' at end of invoking command line) driven by scripted interactive com-
mands (redirected standard input and/or take files), any failed interactive
command (such as failed dial or script attempt) causes the fatal error exit.
1.4. Interactive Operation
μCKermit's interactive command prompt is "uCKermit>". In response to this
prompt, you may type any valid interactive μCKermit command. μCKermit executes
the command and then prompts you for another command. The process continues
until you instruct the program to terminate.
Commands begin with a keyword, normally an English verb, such as "send". You
may omit trailing characters from any keyword, so long as you specify suf-
ficient characters to distinguish it from any other keyword valid in that
field. Certain commonly-used keywords (such as "send", "receive", "connect")
also have special non-unique abbreviations ("s" for "send", "r" for "receive",
"c" for "connect").
Certain characters have special functions during typein of interactive com-
mands:
? Question mark, typed at any point in a command, will produce a message
explaining what is possible or expected at that point. Depending on
the context, the message may be a brief phrase, a menu of keywords, or
a list of files.
ESC (The Escape or Altmode key) -- Request completion of the current
keyword or filename, or insertion of a default value. The result will
be a beep if the requested operation fails.
TAB (The horizontal Tab key) -- Same as ESC.
DEL (The Delete or Rubout key) -- Delete the previous character from the
command. You may also use BS (Backspace, Control-H) for this function.
^W (Control-W) -- Erase the rightmost word from the command line.
^U (Control-U) -- Erase the entire command.
^R (Control-R) -- Redisplay the current command.
SP (Space) -- Delimits fields (keywords, filenames, numbers) within a com-
mand.
CR (Carriage Return) -- Enters the command for execution. LF (Linefeed)
or FF (formfeed) may also be used for this purpose.
\ (Backslash) -- Enter any of the above characters into the command,
literally. To enter a backslash, type two backslashes in a row (\\).
A backslash at the end of a command line causes the next line to be
treated as a continuation line; this is useful for readability in com-
mand files, especially in the 'script' command.
^Z (Control-Z) -- On systems (like BSD or Linux) with job control,
suspend uCKermit, i.e. put it into the background in such a way
that it can be brought back into the foreground (e.g. with an 'fg'
shell command) with all its settings intact.
You may type the editing characters (DEL, ^W, etc) repeatedly, to delete all
the way back to the prompt. No action will be performed until the command is
entered by typing carriage return, linefeed, or formfeed. If you make any mis-
takes, you will receive an informative error message and a new prompt -- make
liberal use of `?' and ESC to feel your way through the commands. One impor-
tant command is "help" -- you should use it the first time you run μCKermit.
A command line beginning with a percent sign "%" is ignored. Such lines may be
used to include illustrative commentary in Kermit command dialogs.
Interactive μCKermit accepts commands from files as well as from the keyboard.
When you start μCKermit, the program looks for the file .uckermrc in your home
or current directory (first it looks in the home directory, then in the current
one) and executes any commands it finds there. These commands must be in in-
teractive format, not UNIX command-line format. A "take" command is also
provided for use at any time during an interactive session, to allow
interactive-format commands to be executed from a file; command files may be
nested to any reasonable depth.
Here is a brief list of μCKermit interactive commands:
% Comment
! Execute a UNIX shell command, or start a shell.
bye Terminate and log out a remote Kermit server.
close Close a log file.
connect Establish a terminal connection to a remote system.
cwd Change Working Directory (also, cd).
dial Dial a telephone number.
directory Display a directory listing.
echo Display arguments literally.
exit Exit from the program, closing any open files.
finish Instruct a remote Kermit server to exit, but not log out.
get Get files from a remote Kermit server.
hangup Hang up the phone (for use in local mode).
help Display a help message for a given command.
log Open a log file -- debugging, packet, session, transaction.
quit Same as 'exit'.
receive Passively wait for files to arrive.
remote Issue file management commands to a remote Kermit server.
script Execute a login script with a remote system.
send Send files.
server Begin server operation.
set Set various parameters.
show Display values of 'set' parameters.
space Display current disk space usage.
statistics Display statistics about most recent transaction.
take Execute commands from a file.
transmit Upload a file with no error checking.
The 'set' parameters are:
attributes Turn Attribute packet processing on or off.
block-check Level of packet error detection.
delay How long to wait before sending first packet.
duplex Specify which side echoes during 'connect'.
escape-character Prefix for "escape commands" during 'connect'.
file Set various file parameters.
flow-control Communication line full-duplex flow control.
handshake Communication line half-duplex turnaround character.
incomplete Disposition for incompletely received files.
line Communication line device name.
modem-dialer Type of modem-dialer on communication line.
parity Communication line character parity.
prompt The μCKermit program's interactive command prompt.
receive Parameters for inbound packets.
retry Packet retransmission limit.
server Parameters for server operation.
send Parameters for outbound packets.
speed Communication line speed.
terminal Terminal parameters.
The 'remote' commands are:
cwd (or cd) Change remote working directory.
delete Delete remote files.
directory Display a listing of remote file names.
help Request help from a remote server.
host A command to the remote host in its own command language.
space Display current disk space usage on remote system.
type Display a remote file on your screen.
who Display who's logged in, or get information about a user.
Most of these commands are described adequately in the Kermit User Guide or the
Kermit book. Special aspects of certain UNIX Kermit commands are described
below.
THE 'SEND' COMMAND
Syntax: send fn - or - send fn1 rfn1
Send the file or files denoted by fn to the other Kermit, which should be run-
ning as a server, or which should be given the 'receive' command. Each file is
sent under its own name (as described above, or as specified by the
'set file names' command). If the second form of the 'send' command is used,
i.e. with fn1 denoting a single UNIX file, rfn1 may be specified as a
name to send it under. For example:
send sows.ear silk.purse
sends the file sows.ear but tells the other Kermit that its name is silk.purse.
The wildcard (meta) characters `~', `*', and `?' are accepted in fn. If `?' is
to be included, it must be prefixed by `\' to override its normal function of
providing help. `~' is treated as a meta character only if it is the first
character in the file specification. If it is followed immediately by a slash,
a space, or end of line, then your login directory name is substituted. If it
is followed immediately by a username, then that user's login directory name is
substituted. The `*' character matches any string, and `?' matches any single
character. Other notations for file groups, like `[a-z]og', are not available
in interactive commands (though of course they are available on the command
line). When fn contains `*' or `?' characters, there is a limit to the number
of files that can be matched, which varies from system to system. If you get
the message "Too many files match" then you'll have to make a more judicious
selection. If fn was of the form:
usr/longname/anotherlongname/*
then μCKermit's string space will fill up rapidly -- try using 'cd' to change
your directory to the path in question and reissuing the command.
When μCKermit sends each file, it also sends certain information about the file
in an "attribute packet", provided the other Kermit agrees to accept attribute
packets. This information includes the size, type (text or binary, determined
from the "-i" command-line option or the "set file type" command), creation
date, and a code to let the other Kermit know that the file is being sent from
a UNIX system. The other Kermit may accept or refuse the file based upon these
attributes, for example, if it doesn't have enough disk space to store a file
of the specified size.
The file type attribute allows μCKermit, when sending a file, to tell the
receiving whether it should be in text or binary mode. Therefore, if the
receiving Kermit has this feature, it is not necessay to give it a "set file
type" command to "match modes" with μCKermit.
Note -- μCKermit sends only from the current or specified directory. It does
not traverse directory trees. If the source directory contains subdirectories,
they will be skipped. By the same token, μCKermit does not create directories
when receiving files. If you have a need to do this, you can pipe tar through
μCKermit, as shown in the example on page 3, or under System III/V UNIX you can
use cpio.
Another Note -- The 'send' command does not skip over "invisible" files that
match the file specification; UNIX systems usually treat files whose names
start with a dot (like .login, .bashrc, and .uckermrc) as "invisible".
THE 'RECEIVE' COMMAND
Syntax: receive - or - receive fn1
Passively wait for files to arrive from the other Kermit, which must be given
the 'send' command -- the 'receive' command does not work in conjunction with a
server (use 'get' for that). If fn1 is specified, store the first incoming
file under that name.
Incoming file data is normally decoded and stored according to whether μCKermit
is in text or binary mode. But if the other Kermit sends the file-type at-
tribute, this will override μCKermit's file-type setting on a per-file basis.
Therefore, it is possible for another Kermit program to send μCKermit a mixture
of text and binary files, so long as the type of each file is indicated in the
Attribute packet.
THE 'GET' COMMAND:
Syntax: get rfn
or: get
rfn
fn1
Request a remote Kermit server to send the named file or files. Since a remote
file specification (or list) might contain spaces, which normally delimit
fields of a μCKermit command, an alternate form of the command is provided to
allow the inbound file to be given a new name: type 'get' alone on a line, and
you will be prompted separately for the remote and local file specifications,
for example:
uCKermit>get
Remote file specification: profile exec
Local name to store it under: profile.exec
If a `?' is to be included in the remote file specification, you must prefix it
with `\' to suppress its normal function of providing help.
If you have started a multiline 'get' command, you may escape from its lower-
level prompts by typing a carriage return in response to the prompt, e.g.
uCKermit>get
Remote file specification: foo
Local name to store it under: (Type a carriage return here)
(cancelled)
uCKermit>
After the 'get' command has been entered, the file transfer proceeds exactly as
if you had given a 'send' command to the other Kermit and a 'receive' command
to this one.
THE 'SERVER' COMMAND:
The 'server' command places μCKermit in "server mode" on the currently selected
communication line. All further commands must arrive as valid Kermit packets
from the Kermit on the other end of the line. The μCKermit server can
respond to the following commands:
Client Command Server Response
get Sends files
send Receives files
mail Sends incoming files as e-mail to specified address
bye Attempts to log itself out
finish Exits to level from which it was invoked
remote directory Sends directory lising
remote delete Removes files
remote cwd Changes working directory (also, remote cd)
remote type Sends files to your screen
remote print Receives a file and prints it
remote space Reports about its disk usage
remote who Shows who's logged in
remote host Executes a UNIX shell command
remote help Lists these capabilities
The μCKermit server cannot always respond properly to a BYE command. It
will attempt to do so using "kill()", but this will not work on all systems or
under all conditions because of the complicated process structures that can be
set up under UNIX.
If the Kermit server is directed at an external line (i.e. it is in "local
mode") then the console may be used for other work if you have 'set file dis-
play off'; normally the program expects the console to be used to observe file
transfers and enter status queries or interruption commands. The way to get
μCKermit into background operation from interactive command level varies from
system to system (e.g. on Berkeley UNIX you would halt the program with ^Z and
then use the C-Shell 'bg' command to continue it in the background). The more
common method is to invoke the program with the desired command line arguments,
including "-q", and with a terminating "&".
When the UNIX Kermit server is given a 'remote host' command, it executes it
using the shell invoked upon login, e.g. the Bourne shell, the K-Shell, or the
Berkeley C-Shell.
THE 'REMOTE', 'BYE', AND 'FINISH' COMMANDS:
μCKermit may itself request services from a remote Kermit server. In addition
to 'send' and 'get', the following commands may also be sent from μCKermit to a
Kermit server:
remote cwd [directory]
If the optional remote directory specification is included, you will be
prompted on a separate line for a password, which will not echo as you
type it. If the remote system does not require a password for this
operation, just type a carriage return. 'remote cd' is a synomym for
this command.
remote delete rfn delete remote file or files.
remote directory [rfn] directory listing of remote files.
remote host command command in remote host's own command language.
remote space disk usage report from remote host.
remote type [rfn] display remote file or files on the screen.
remote who [user] display information about who's logged in.
remote help display remote server's capabilities.
bye and finish:
When connected to a remote Kermit server, these commands cause the
remote server to terminate; 'finish' returns it to Kermit or system
command level (depending on the implementation or how the program was
invoked); 'bye' also requests it to log itself out.
THE 'LOG' AND 'CLOSE' COMMANDS:
Syntax: log {debugging, packets, session, transactions} [ fn1 ]
μCKermit's progress may be logged in various ways. The 'log' command opens a
log, the 'close' command closes it. In addition, all open logs are closed by
the 'exit' and 'quit' commands. A name may be specified for a log file; if the
name is omitted, the file is created with a default name as shown below.
log debugging
This produces a voluminous log of the internal workings of μCKermit, of use
to Kermit developers or maintainers in tracking down suspected bugs in the
μCKermit program. Use of this feature dramatically slows down the Kermit
protocol. Default name: debug.log.
log packets
This produces a record of all the packets that go in and out of the com-
munication port. This log is of use to Kermit maintainers who are tracking
down protocol problems in either μCKermit or any Kermit that μCKermit is
connected to. Default name: packet.log.
log session
This log will contain a copy of everything you see on your screen during
the 'connect' command, except for local messages or interaction with local
escape commands. Default name: session.log.
log transactions
The transaction log is a record of all the files that were sent or received
while transaction logging was in effect. It includes time stamps and
statistics, filename transformations, and records of any errors that may
have occurred. The transaction log allows you to have long unattended file
transfer sessions without fear of missing some vital screen message.
Default name: transact.log.
The 'close' command explicitly closes a log, e.g. 'close debug'.
Note: Debug and Transaction logs are a compile-time option; μCKermit may be
compiled without these logs, in which case it will run faster, it will take up
less space on the disk, but the commands relating to them will not be present.
LOCAL FILE MANAGEMENT COMMANDS:
μCKermit allows some degree of local file management from interactive com-
mand level:
directory [fn]
Displays a listing of the names, modes, sizes, and dates of files matching
fn (which defaults to `*'). Equivalent to `ls -l'.
cwd [directory-name]
Changes Kermit's working directory to the one given, or to the default
directory if the directory name is omitted. This command affects only the
Kermit process and any processes it may subsequently create. You may also
type "cd" instead of "cwd".
space
Display information about disk space and/or quota in the current directory
and device.
! [command]
The command is executed by the UNIX shell. If no command is specified,
then an interactive shell is started; exiting from the shell, e.g. by
typing Control-D or 'exit', will return you to μCKermit command level. Use
the `!' command to provide file management or other functions not ex-
plicitly provided by μCKermit commands. The `!' command has certain
peculiarities:
- μCKermit attempts to use your preferred, customary (login) shell.
- At least one space must separate the '!' from the shell command.
- A 'cd' (change directory) command executed in this manner will
have no effect -- use the μCKermit 'cwd' command instead.
THE 'SET' AND 'SHOW' COMMANDS:
Since Kermit is designed to allow diverse systems to communicate, it is often
necessary to issue special instructions to allow the program to adapt to
peculiarities of another system or the communication path. These instructions
are accomplished by the 'set' command. The 'show' command may be used to dis-
play current settings. Here is a brief synopsis of settings available in the
current release of μCKermit:
attributes {on, off}
Tells μCKermit whether to exchange file attribute (A) packets. Normally it
will do this if the other Kermit supports this option. However, to prevent
any misunderstandings that may arise (e.g. the other Kermit is refusing a
file because it thinks there's not enough disk space, but there really is
enough disk space), you may 'set attributes off' to inhibit this behavior.
μCKermit currently sends system ID, file type, file size, file creation
date, and encoding attributes. It honors acceptance and refusal of files.
block-check {1, 2, 3}
Determines the level of per-packet error detection. "1" is a single-
character 6-bit checksum, folded to include the values of all bits from
each character. "2" is a 2-character, 12-bit checksum. "3" is a
3-character, 16-bit cyclic redundancy check (CRC). The higher the block
check, the better the error detection and correction and the higher the
resulting overhead. Type 1 is most commonly used; it is supported by all
Kermit implementations, and it has proven adequate in most circumstances.
Types 2 or 3 should be used when transferring 8-bit binary files over noisy
lines, or when using long packets.
delay n
How many seconds to wait before sending the first packet after a 'send'
command. Used in remote mode to give you time to escape back to your local
Kermit and issue a 'receive' command before the first Kermit packet ap-
pears. Normally 5 seconds.
duplex {full, half}
For use during 'connect'. Specifies which side is doing the echoing;
'full' means the other side, 'half' means μCKermit must echo your
keystrokes itself. Normally full. Use half when communicating with IBM
mainframes over linemode connections, and on similar half-duplex connec-
tions.
escape-character cc
For use during 'connect' to get μCKermit's attention. The escape character
acts as a prefix to an 'escape command', for instance to close the connec-
tion and return to μCKermit or UNIX command level. The normal escape
character is Control-Backslash (ASCII 28). The escape character is also
used in System III/V implementations to prefix interrupt commands during
file transfers.
file {display, names, type, rename}
Establish various file-related parameters: