-
Notifications
You must be signed in to change notification settings - Fork 0
/
ckermit70.txt
17036 lines (13417 loc) · 711 KB
/
ckermit70.txt
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
The Kermit Project
Columbia University
612 West 115th Street
New York NY 10025 USA
kermit@columbia.edu
...since 1981
Supplement to Using C-Kermit, 2nd Edition
For C-Kermit 7.0
As of C-Kermit version: 7.0.196
This file created: 8 February 2000
This file last updated:
Mon Aug 8 10:39:18 2011
Authors: Frank da Cruz and Christine M. Gianone
Address: The Kermit Project
Columbia University
612 West 115th Street
New York NY 10025-7799
USA
Fax: +1 (212) 662-6442
E-Mail: kermit-support@columbia.edu
Web: http://www.columbia.edu/kermit/
Or: http://www.kermit-project.org/
Or: http://www.columbia.nyc.ny.us/kermit/
NOTICES
This document:
Copyright © 1997, 2000, Frank da Cruz and Christine M. Gianone.
All rights reserved.
Kermit 95:
Copyright © 1995, 2000, Trustees of Columbia University in the
City of New York. All rights reserved.
C-Kermit:
Copyright © 1985, 2000,
Trustees of Columbia University in the City of New York. All
rights reserved. See the C-KermitCOPYING.TXT file or the
copyright text in theckcmai.c module for disclaimer and
permissions.
When Kerberos(TM) and/or SRP(TM) (Secure Remote Password) and/or SSL
protocol are included:
Portions Copyright © 1990, Massachusetts Institute of
Technology.
Portions Copyright © 1991, 1993 Regents of the University of
California.
Portions Copyright © 1991, 1992, 1993, 1994, 1995 by AT&T.
Portions Copyright © 1997, Stanford University.
Portions Copyright © 1995-1997, Eric Young <eay@cryptosoft.com>.
For the full text of the third-party copyright notices, see
Appendix V.
WHAT IS IN THIS FILE
This file lists changes made to C-Kermit since the second edition of
the bookUsing C-Kermit was published and C-Kermit 6.0 was released
in November 1996. Use this file as a supplement to the second edition
of Using C-Kermit until the third edition is published some time in
2000. If the "most recent update" shown above is long ago, contact
Columbia University to see if there is a newer release.
For further information, also see theCKCBWR.TXT ("C-Kermit
beware") file for hints, tips, tricks, restrictions, frequently asked
questions, etc, plus the system-specific "beware file", e.g.
CKUBWR.TXT for UNIX,CKVBWR.TXT for VMS, etc, and also any
system-specific update files such as KERMIT95.HTM for Kermit 95 (in the
DOCS\MANUAL\ subdirectory of your K95 directory).
This Web-based copy of the C-Kermit 7.0 update notes supersedes the
plain-text CKERMIT2.TXT file. All changes after 19 January 2000
appear only here in the Web version. If you need an up-to-date
plain-text copy, use your Web browser to save this page as plain
text.
ABOUT FILENAMES
In this document, filenames are generally shown in uppercase, but on
file systems with case-sensitive names such as UNIX, OS-9, and AOS/VS,
lowercase names are used:ckubwr.txt,ckermit70.txt, etc.
ADDITIONAL FILES
Several other files accompany this new Kermit release:
SECURITY.TXT
Discussion of Kermit's new authentication and encryption
features:
+Plain-text version
+HTML (hypertext) version
IKSD.TXT
How to install and manage an Internet Kermit Service Daemon.
+Plain-text version
+HTML (hypertext) version
Also seecuiksd.htm for instructions for use.
TELNET.TXT
A thorough presentation of Kermit's new advanced Telnet features
and controls.
+Plain-text version
+HTML (hypertext) version
THE NEW C-KERMIT LICENSE
The C-Kermit license was rewritten for version 7.0 to grant automatic
permission to packagers of free operating-system distributions to
include C-Kermit 7.0. Examples include Linux (GNU/Linux), FreeBSD,
NetBSD, etc. The new license is in theCOPYING.TXT file, and is
also displayed by C-Kermit itself when you give the VERSION or
COPYRIGHT command. The new C-Kermit license does not apply to
Kermit 95.
ACKNOWLEDGMENTS
Thanks to Jeff Altman, who joined the Kermit Project in 1995, for much
of what you see in C-Kermit 7.0, especially in the networking and
security areas, and his key role in designing and implementing the
Internet Kermit Service Daemon. And special thanks to Lucas Hart for
lots of help with the VMS version; to Peter Eichhorn for continuous
testing on the full range of HP-UX versions and for a consolidated set
of HP-UX makefile targets; and to Colin Allen, Mark Allen, Roger Allen,
Ric Anderson, William Bader, Mitch Baker, Mitchell Bass, Nelson Beebe,
Gerry Belanger, Jeff Bernsten, Mark Berryman, John Bigg, Volker
Borchert, Jonathan Boswell, Tim Boyer, Frederick Bruckman, Kenneth
Cochran, Jared Crapo, Bill Delaney, Igor Sobrado Delgado, Clarence
Dold, Joe Doupnik, John Dunlap, Max Evarts, Patrick French, Carl
Friedberg, Carl Friend, Hirofumi Fujii, Andrew Gabriel, Gabe Garza,
Boyd Gerber, David Gerber, George Gilmer, Hunter Goatley, DJ Hagberg,
Kevin Handy, Andy Harper, Randolph Herber, Sven Holström, Michal
Jaegermann, Graham Jenkins, Dick Jones, Terry Kennedy, Robert D Keys,
Nick Kisseberth, Igor Kovalenko, David Lane, Adam Laurie, Jeff
Liebermann, Eric Lonvick, Hoi Wan Louis, Arthur Marsh, Gregorie Martin,
Peter Mauzey, Dragan Milicic, Todd Miller, Christian Mondrup, Daniel
Morato, Dat Nguyen, Herb Peyerl, Jean-Pierre Radley, Steve Rance,
Stephen Riehm, Nigel Roles, Larry Rosenman, Jay S Rouman, David
Sanderson, John Santos, Michael Schmitz, Steven Schultz, Bob Shair,
Richard Shuford, Fred Smith, Michael Sokolov, Jim Spath, Peter Szell,
Ted T'so, Brian Tillman, Linus Torvalds, Patrick Volkerding, Martin
Vorländer, Steve Walton, Ken Weaverling, John Weekley, Martin Whitaker,
Jim Whitby, Matt Willman, Joellen Windsor, Farrell Woods, and many
others for binaries, hosting, reviews, suggestions, advice, bug
reports, and all the rest over the 3+ year C-Kermit 7.0 development
cycle. Thanks to Russ Nelson and the board of the Open Software
Initiative (http://www.opensource.org) for their cooperation in
developing the new C-Kermit license and to the proprietors of those
free UNIX distributions that have incorporated C-Kermit 7.0 for their
cooperation and support, especially FreeBSD's Jörg Wunsch.
NOTE TO KERMIT 95 USERS
Kermit 95 and C-Kermit share the same command and scripting language,
the same Kermit file-transfer protocol implementation, and much else
besides.
Like the bookUsing C-Kermit, this file concentrates on the aspects
of C-Kermit that are common to all versions: UNIX, VMS, Windows, OS/2,
VOS, AOS/VS, etc. Please refer to your Kermit 95 documentation for
information that is specific to Kermit 95.
C-Kermit 7.0 corresponds to Kermit 95 1.1.19.
C-KERMIT VERSIONS AND VERSION NUMBERS
"C-Kermit" refers to all the many programs that are compiled in whole
or in part from common C-language source code, comprising:
* A Kermit file transfer protocol module
* A command parser and script execution module
* A modem-dialing module
* A network support module
* A character-set translation module.
and several others. These "system-independent" modules are combined
with system-dependent modules for each platform to provide the required
input/output functions, and also in some cases overlaid with an
alternative user interface, such as Macintosh Kermit's point-and-click
interface, and in some cases also a terminal emulator, as Kermit 95.
The C-Kermit version number started as 1.0, ... 3.0, 4.0, 4.1 and then
(because of confusion at the time with Berkeley UNIX 4.2), 4B, 4C, and
so on, with the specific edit number in parentheses, for example
4E(072) or 5A(188). This scheme was used through 5A(191), but now we
have gone back to the traditional numbering scheme with decimal points:
major.minor.edit; for example 7.0.196. Internal version numbers (the
\v(version) variable), however, are compatible in C-Kermit 5A upwards.
Meanwhile, C-Kermit derivatives for some platforms (Windows, Macintosh)
might go through several releases while C-Kermit itself remains the
same. These versions have their own platform-specific version numbers,
such as Kermit 95 1.1.1, 1.1.2, and so on.
C-Kermit Version History:
1.0 1981-1982 Command-line only, 4.2 BSD UNIX only
2.0 (*) (who remembers...)
3.0 May 1984 Command-line only, supports several platforms
4.0-4.1 Feb-Apr 1985 (*) First interactive and modular version
4C(050) May 1985
4D(060) April 1986
4E(066) August 1987 Long packets
4E(068) January 1988
4E(072) January 1989
4F(095) August 1989 (*) Attribute packets
5A(188) November 1992 Scripting, TCP/IP, sliding windows (1)
5A(189) September 1993 Control-char unprefixing
5A(190) October 1994 Recovery
5A(191) April 1995 OS/2 only
6.0.192 September 1996 Intelligent dialing, autodownload, lots more (2)
6.1.193 1997-98 (*) Development only
6.1.194 June 1998 K95 only - switches, directory recursion, more
7.0.195 August 1999 IKSD + more (CU only as K95 1.1.18-CU)
7.0.196 1 January 2000 Unicode, lots more
(*) Never formally released (4.0 was a total rewrite)
(1) Using C-Kermit, 1st Edition
(2) Using C-Kermit, 2nd Edition
CONTENTS
I. C-KERMIT DOCUMENTATION
II. NEW FEATURES
(0) INCOMPATIBILITIES WITH PREVIOUS RELEASES
(1) PROGRAM AND FILE MANAGEMENT AND COMMANDS
1.0. Bug fixes
1.1. Command Continuation
1.2. Editor Interface
1.3. Web Browser and FTP Interface
1.4. Command Editing
1.5. Command Switches
1.5.1. General Switch Syntax
1.5.2. Order and Effect of Switches
1.5.3. Distinguishing Switches from Other Fields
1.5.4. Standard File Selection Switches
1.5.5. Setting Preferences for Different Commands
1.6. Dates and Times
1.7. Partial Completion of Keywords
1.8. Command Recall
1.9. EXIT Messages
1.10. Managing Keyboard Interruptions
1.11. Taming the Wild Backslash -- Part Deux
1.11.1. Background
1.11.2. Kermit's Quoting Rules
1.11.3. Passing DOS Filenames from Kermit to Shell Commands
1.11.4. Using Variables to Hold DOS Filenames
1.11.5. Passing DOS Filenames as Parameters to Macros
1.11.6. Passing DOS File Names from Macro Parameters to
the DOS Shell
1.11.7. Passing DOS Filenames to Kermit from the Shell
1.12. Debugging
1.13. Logs
1.14. Automatic File-Transfer Packet Recognition at
the Command Prompt
1.15. The TYPE Command
1.16. The RESET Command
1.17. The COPY and RENAME Commands
1.18. The MANUAL Command
1.19. String and Filename Matching Patterns
1.20. Multiple Commands on One Line
1.21. What Do I Have?
1.22. Generalized File Input and Output
1.22.1. Why Another I/O System?
1.22.2. The FILE Command
1.22.3. FILE Command Examples
1.22.4. Channel Numbers
1.22.5. FILE Command Error Codes
1.22.6. File I/O Variables
1.22.7. File I/O Functions
1.22.8. File I/O Function Examples
1.23. The EXEC Command
1.24. Getting Keyword Lists with '?'
(2) MAKING AND USING CONNECTIONS
2.0. SET LINE and SET HOST Command Switches
2.1. Dialing
2.1.1. The Dial Result Message
2.1.2. Long-Distance Dialing Changes
2.1.3. Forcing Long-Distance Dialing
2.1.4. Exchange-Specific Dialing Decisions
2.1.5. Cautions about Cheapest-First Dialing
2.1.6. Blind Dialing (Dialing with No Dialtone)
2.1.7. Trimming the Dialing Dialog
2.1.8. Controlling the Dialing Speed
2.1.9. Pretesting Phone Number Conversions
2.1.10. Greater Control over Partial Dialing
2.1.11. New DIAL-related Variables and Functions
2.1.12. Increased Flexibility of PBX Dialing
2.1.13. The DIAL macro - Last-Minute Phone Number Conversions
2.1.14. Automatic Tone/Pulse Dialing Selection
2.1.15. Dial-Modifier Variables
2.1.16. Giving Multiple Numbers to the DIAL Command
2.2. Modems
2.2.1. New Modem Types
2.2.2. New Modem Controls
2.3.TELNET and RLOGIN
2.3.0. Bug Fixes
2.3.1. Telnet Binary Mode Bug Adjustments
2.3.2. VMS UCX Telnet Port Bug Adjustment
2.3.3. Telnet New Environment Option
2.3.4. Telnet Location Option
2.3.5. Connecting to Raw TCP Sockets
2.3.6. Incoming TCP Connections
2.4. The EIGHTBIT Command
2.5. The Services Directory
2.6. Closing Connections
2.7. Using C-Kermit with External Communication Programs
2.7.0. C-Kermit over tn3270 and tn5250
2.7.1. C-Kermit over Telnet
2.7.2. C-Kermit over Rlogin
2.7.3. C-Kermit over Serial Communication Programs
2.7.4. C-Kermit over Secure Network Clients
2.7.4.1. SSH
2.7.4.2. SSL
2.7.4.3. SRP
2.7.4.4. SOCKS
2.7.4.5. Kerberos and SRP
2.8. Scripting Local Programs
2.9. X.25 Networking
2.9.1. IBM AIXLink/X.25 Network Provider Interface for AIX
2.9.2. HP-UX X.25
2.10. Additional Serial Port Controls
2.11. Getting Access to the Dialout Device
2.12. The Connection Log
2.13. Automatic Connection-Specific Flow Control Selection
2.14. Trapping Connection Establishment and Loss
2.15. Contacting Web Servers with the HTTP Command
(3) TERMINAL CONNECTION
3.1. CONNECT Command Switches
3.2. Triggers
3.3. Transparent Printing
3.4. Binary and Text Session Logs
(4) FILE TRANSFER AND MANAGEMENT
4.0. Bug Fixes, Minor Changes, and Clarifications
4.1. File-Transfer Filename Templates
4.1.1. Templates in the As-Name
4.1.2. Templates on the Command Line
4.1.3. Post-Transfer Renaming
4.2. File-Transfer Pipes and Filters
4.2.1. Introduction
4.2.1.1. Terminology
4.2.1.2. Notation
4.2.1.3. Security
4.2.2. Commands for Transferring from and to Pipes
4.2.2.1. Sending from a Command
4.2.2.2. Receiving to a Command
4.2.3. Using File-Transfer Filters
4.2.3.1. The SEND Filter
4.2.3.2. The RECEIVE Filter
4.2.4. Implicit Use of Pipes
4.2.5. Success and Failure of Piped Commands
4.2.6. Cautions about Using Pipes to Transfer Directory Trees
4.2.7. Pipes and Encryption
4.2.8. Commands and Functions Related to Pipes
4.2.8.1. The OPEN !READ and OPEN !WRITE Commands
4.2.8.2. The REDIRECT Command
4.2.8.3. Receiving Mail and Print Jobs
4.2.8.4. Pipe-Related Functions
4.3. Automatic Per-File Text/Binary Mode Switching
4.3.1. Exceptions
4.3.2. Overview
4.3.3. Commands
4.3.4. Examples
4.4. File Permissions
4.4.1. When ATTRIBUTES PROTECTION is OFF
4.4.1.1. Unix
4.4.1.2. VMS
4.4.2. When ATTRIBUTES PROTECTION is ON
4.4.2.1. System-Specific Permissions
4.4.2.1.1. UNIX
4.4.2.1.2. VMS
4.4.2.2. System-Independent Permissions
4.5. File Management Commands
4.5.1. The DIRECTORY Command
4.5.2. The CD and BACK Commands
4.5.2.1. Parsing Improvements
4.5.2.2. The CDPATH
4.5.3. Creating and Removing Directories
4.5.4. The DELETE and PURGE Commands
4.6. Starting the Remote Kermit Server Automatically
4.7. File-Transfer Command Switches
4.7.1. SEND Command Switches
4.7.2. GET Command Switches
4.7.3. RECEIVE Command Switches
4.8. Minor Kermit Protocol Improvements
4.8.1. Multiple Attribute Packets
4.8.2. Very Short Packets
4.9. Wildcard / File Group Expansion
4.9.1. In UNIX C-Kermit
4.9.2. In Kermit 95
4.9.3. In VMS, AOS/VS, OS-9, VOS, etc.
4.10. Additional Pathname Controls
4.11. Recursive SEND and GET: Transferring Directory Trees
4.11.1. Command-Line Options
4.11.2. The SEND /RECURSIVE Command
4.11.3. The GET /RECURSIVE Command
4.11.4. New and Changed File Functions
4.11.5. Moving Directory Trees Between Like Systems
4.11.6. Moving Directory Trees Between Unlike Systems
4.12. Where Did My File Go?
4.13. File Output Buffer Control
4.14. Improved Responsiveness
4.15. Doubling and Ignoring Characters for Transparency
4.16. New File-Transfer Display Formats
4.17. New Transaction Log Formats
4.17.1. The BRIEF Format
4.17.2. The FTP Format
4.18. Unprefixing NUL
4.19. Clear-Channel Protocol
4.20. Streaming Protocol
4.20.1. Commands for Streaming
4.20.2. Examples of Streaming
4.20.2.1. Streaming on Socket-to-Socket Connections
4.20.2.2. Streaming on Telnet Connections
4.20.2.3. Streaming with Limited Packet Length
4.20.2.4. Streaming on Dialup Connections
4.20.2.5. Streaming on X.25 Connections
4.20.3. Streaming - Preliminary Conclusions
4.21. The TRANSMIT Command
4.22. Coping with Faulty Kermit Implementations
4.22.1. Failure to Accept Modern Negotiation Strings
4.22.2. Failure to Negotiate 8th-bit Prefixing
4.22.3. Corrupt Files
4.22.4. Spurious Cancellations
4.22.5. Spurious Refusals
4.22.6. Failures during the Data Transfer Phase
4.22.7. Fractured Filenames
4.22.8. Bad File Dates
4.23. File Transfer Recovery
4.24. FILE COLLISION UPDATE Clarification
4.25. Autodownload Improvements
(5) CLIENT / SERVER
5.0. Hints
5.1. New Command-Line Options
5.2. New Client Commands
5.3. New Server Capabilities
5.3.1. Creating and Removing Directories
5.3.2. Directory Listings
5.4. Syntax for Remote Filenames with Embedded Spaces
5.5. Automatic Orientation Messages upon Directory Change
5.6. New Server Controls
5.7. Timeouts during REMOTE HOST Command Execution
(6) INTERNATIONAL CHARACTER SETS
6.0. ISO 8859-15 Latin Alphabet 9
6.1. The HP-Roman8 Character Set
6.2. Greek Character Sets
6.3. Additional Latin-2 Character Sets
6.4. Additional Cyrillic Character Sets
6.5. Automatic Character-Set Switching
6.6. Unicode
6.6.1. Overview of Unicode
6.6.2. UCS Byte Order
6.6.2. UCS Transformation Formats
6.6.3. Conformance Levels
6.6.4. Relationship of Unicode with Kermit's Other Character Sets
6.6.5. Kermit's Unicode Features
6.6.5.1. File Transfer
6.6.5.2. The TRANSLATE Command
6.6.5.3. Terminal Connection
6.6.5.4. The TRANSMIT Command
6.6.5.5. Summary of Kermit Unicode Commands
6.7. Client / Server Character-Set Switching
(7) SCRIPT PROGRAMMING
7.0. Bug Fixes
7.1. The INPUT Command
7.1.1. INPUT Timeouts
7.1.2. New INPUT Controls
7.1.3. INPUT with Pattern Matching
7.1.4. The INPUT Match Result
7.2. New or Improved Built-In Variables
7.3. New or Improved Built-In Functions
7.4. New IF Conditions
7.5. Using More than Ten Macro Arguments
7.6. Clarification of Function Call Syntax
7.7. Autodownload during INPUT Command Execution
7.8. Built-in Help for Functions.
7.9. Variable Assignments
7.9.1. Assignment Operators
7.9.2. New Assignment Commands
7.10. Arrays
7.10.1. Array Initializers
7.10.2. Turning a String into an Array of Words
7.10.3. Arrays of Filenames
7.10.4. Automatic Arrays
7.10.5. Sorting Arrays
7.10.6. Displaying Arrays
7.10.7. Other Array Operations
7.10.8. Hints for Using Arrays
7.10.9. Do-It-Yourself Arrays
7.10.10. Associative Arrays
7.11. OUTPUT Command Improvements
7.12. Function and Variable Diagnostics
7.13. Return Value of Macros
7.14. The ASSERT, FAIL, and SUCCEED Commands.
7.15. Using Alarms
7.16. Passing Arguments to Command Files
7.17. Dialogs with Timed Responses
7.18. Increased Flexibility of SWITCH Case Labels
7.19. "Kerbang" Scripts
7.20. IF and XIF Statement Syntax
7.20.1. The IF/XIF Distinction
7.20.2. Boolean Expressions (The IF/WHILE Condition)
7.21. Screen Formatting and Cursor Control
7.22. Evaluating Arithmetic Expressions
7.23. Floating-Point Arithmetic
7.24. Tracing Script Execution
7.25. Compact Substring Notation
7.26. New WAIT Command Options
7.26.1. Waiting for Modem Signals
7.26.2. Waiting for File Events
7.27. Relaxed FOR and SWITCH Syntax
(8) USING OTHER FILE TRANSFER PROTOCOLS
(9) COMMAND-LINE OPTIONS
9.0. Extended-Format Command-Line Options
9.1. Command Line Personalities
9.2. Built-in Help for Command Line Options
9.3. New Command-Line Options
(10) C-KERMIT AND G-KERMIT
III. APPENDICES
III.1. Character Set Tables
III.1.1. The Hewlett Packard Roman8 Character Set
III.1.2. Greek Character Sets
III.1.2.1. The ISO 8859-7 Latin / Greek Alphabet
III.1.2.2. The ELOT 927 Character Set
III.1.2.3. PC Code Page 869
III.2. Updated Country Codes
IV. ERRATA & CORRIGENDA: Corrections to "Using C-Kermit" 2nd Edition.
V. ADDITIONAL COPYRIGHT NOTICES
I. C-KERMIT DOCUMENTATION
The user manual for C-Kermit is:
Frank da Cruz and Christine M. Gianone, Using C-Kermit, Second
Edition, Digital Press / Butterworth-Heinemann, Woburn, MA, 1997,
622 pages, ISBN 1-55558-164-1.
The present document is a supplement to Using C-Kermit 2nd Ed, not a
replacement for it.
US single-copy price: $52.95; quantity discounts available. Available
in bookstores or directly from Columbia University:
The Kermit Project
Columbia University
612 West 115th Street
New York NY 10025-7799
USA
Telephone: +1 (212) 854-3703
Fax: +1 (212) 662-6442
Domestic and overseas orders accepted. Price: US $44.95 (US, Canada,
and Mexico). Shipping: $4.00 within the USA; $15.00 to all other
countries. Orders may be paid by MasterCard or Visa, or prepaid by
check in US dollars. Add $65 bank fee for checks not drawn on a US
bank. Do not include sales tax. Inquire about quantity discounts.
You can also order by phone from the publisher, Digital Press /
Butterworth-Heinemann, with MasterCard, Visa, or American Express:
+1 800 366-2665 (Woburn, Massachusetts office for USA & Canada)
+44 1865 314627 (Oxford, England distribution centre for UK & Europe)
+61 03 9245 7111 (Melbourne, Vic, office for Australia & NZ)
+65 356-1968 (Singapore office for Asia)
+27 (31) 2683111 (Durban office for South Africa)
AGerman-language edition of the First Edition is also available:
Frank da Cruz and Christine M. Gianone, C-Kermit - Einführung und
Referenz, Verlag Heinz Heise, Hannover, Germany (1994). ISBN
3-88229-023-4. Deutsch von Gisbert W. Selke. Price: DM 88,00. Verlag
Heinz Heise GmbH & Co. KG, Helstorfer Strasse 7, D-30625 Hannover.
Tel. +49 (05 11) 53 52-0, Fax. +49 (05 11) 53 52-1 29.
TheKermit file transfer protocol is specified in:
Frank da Cruz, Kermit, A File Transfer Protocol, Digital Press,
Bedford, MA, 1987, 379 pages, ISBN 0-932376-88-6. US single-copy
price: $39.95. Availability as above.
News and articles about Kermit software and protocol are published
periodically in the journal,Kermit News. Subscriptions are free;
contact Columbia University at the address above.
Online news about Kermit is published in the
comp.protocols.kermit.announce andcomp.protocols.kermit.misc
newsgroups.
II. NEW FEATURES
Support for the Bell Labs Plan 9 operating system was added to version
6.0 too late to be mentioned in the book (although it does appear on
the cover).
Specific changes and additions are grouped together by major topic,
roughly corresponding to the chapters ofUsing C-Kermit.
0. INCOMPATIBILITIES WITH PREVIOUS RELEASES
1. C-Kermit 7.0 uses FAST Kermit protocol settings by default. This
includes "unprefixing" of certain control characters. Because of
this, file transfers that worked with previous releases might not
work in the new release (but it is more likely that they will work,
and much faster). If a transfer fails, you'll get a
context-sensitive hint suggesting possible causes and cures.
Usually SET PREFIXING ALL does the trick.
2. C-Kermit 7.0 transfers files in BINARY mode by default. To restore
the previous behavior, put SET FILE TYPE TEXT in your C-Kermit
initialization file.
3. No matter whether FILE TYPE is BINARY or TEXT by default, C-Kermit
7.0 now switches between text and binary mode automatically on a
per-file basis according to various criteria, including (a) which
kind of platform is on the other end of the connection (if known),
(b) the version of Kermit on the other end, and (c) the file's name
(see Section 4, especially 4.3). To disable this
automatic switching and restore the earlier behavior, put SET
TRANSFER MODE MANUAL in your C-Kermit initialization file. To
disable automatic switching for a particular transfer, include a
/TEXT or /BINARY switch with your SEND or GET command.
4. The RESEND and REGET commands automatically switch to binary mode;
previously if RESEND or REGET were attempted when FILE TYPE was
TEXT, these commands would fail immediately, with a message telling
you they work only when the FILE TYPE is BINARY. Now they simply do
this for you. See Section 4.23 for additional (important)
information.
5. SET PREFIXING CAUTIOUS and MINIMAL now both prefix linefeed (10 and
138) in case rlogin, ssh, or cu are "in the middle", since
otherwise <LF>~ might appear in Kermit packets, and this would
cause rlogin, ssh, or cu to disconnect, suspend, escape back, or
otherwise wreck the file transfer. Xon and Xoff are now always
prefixed too, even when Xon/Xoff flow control is not in effect,
since unprefixing them has proven dangerous on TCP/IP connections.
6. In UNIX, VMS, Windows, and OS/2, the DIRECTORY command is built
into C-Kermit itself rather than implemented by running an external
command or program. The built-in command might not behave the way
the platform-specific external one did, but many options are
available for customization. Of course the underlying
platform-specific command can still be accessed with "!", "@", or
"RUN" wherever the installation does not forbid. In UNIX, the "ls"
command can be accessed directly as "ls" in C-Kermit. See
Section 4.5.1 for details.
7. SEND ? prints a list of switches rather than a list of filenames.
If you want to see a list of filenames, use a (system-dependent)
construction such as SEND ./? (for UNIX, Windows, or OS/2), SEND
[]? (VMS), etc. See Sections 1.5 and4.7.1.
8. In UNIX, OS-9, and Kermit 95, the wildcard characters in previous
versions were * and ?. In C-Kermit 7.0 they are *, ?, [, ], {, and
}, with dash used inside []'s to denote ranges and comma used
inside {} to separate list elements. If you need to include any of
these characters literally in a filename, precede each one with
backslash (\). See Section 4.9.
9. SET QUIET { ON, OFF } is now on the command stack, just like SET
INPUT CASE, SET COUNT, SET MACRO ERROR, etc, as described on p.458
ofUsing C-Kermit, 2nd Edition. This allows any macro or
command file to SET QUIET ON or OFF without worrying about saving
and restoring the global QUIET value. For example, this lets you
write a script that tries SET LINE on lots of devices until it
finds one free without spewing out loads of error messages, and
also without disturbing the global QUIET setting, whatever it was.
10. Because of the new "." operator (which introduces assignments),
macros whose names begin with "." can not be invoked "by name".
However, they still can be invoked with DO.
11. The syntax of the EVALUATE command has changed. SeeSection
7.9.2. To restore the previous syntax, use SET EVALUATE OLD.
12. The \v(directory) variable now includes the trailing directory
separator; in previous releases it did not. This is to allow
constructions such as:
cd \v(dir)data.tmp
to work across platforms that might have different directory
notation, such as UNIX, Windows, and VMS.
13. Prior to C-Kermit 7.0, the FLOW-CONTROL setting was global and
sticky. In C-Kermit 7.0, there is an array of default flow-control
values for each kind of connection, that are applied automatically
at SET LINE/PORT/HOST time. Thus a SET FLOW command given before
SET LINE/PORT/HOST is likely to be undone. Therefore SET FLOW can
be guaranteed to have the desired effect only if given after the
SET LINE/PORT/HOST command.
14. Character-set translation works differently in the TRANSMIT command
when (a) the file character-set is not the same as the local end of
the terminal character-set, or (b) when the terminal character-set
is TRANSPARENT.
1. PROGRAM AND FILE MANAGEMENT AND COMMANDS
1.0. Bug Fixes
The following patches were issued to correct bugs in C-Kermit 6.0.
These are described in detail in the 6.0 PATCHES file. All of these
fixes have been incorporated in C-Kermit 6.1 (never released except as
K95 1.1.16-17) and 7.0.
0001 All UNIX C-Kermit mishandles timestamps on files before 1970
0002 Solaris 2.5++ Compilation error on Solaris 2.5 with Pro C
0003 All VMS CKERMIT.INI Fix for VMS
0004 VMS/VAX/UCX 2.0 C-Kermit 6.0 can't TELNET on VAX/VMS with UCX 2.0
0005 All C-Kermit Might Send Packets Outside Window
0006 All MOVE from SEND-LIST does not delete original files
0007 Solaris 2.5++ Higher serial speeds on Solaris 2.5
0008 All C-Kermit application file name can't contain spaces
0009 AT&T 7300 UNIXPC setuid and hardware flow-control problems
0010 Linux on Alpha Patch to make ckutio.c compile on Linux/Alpha
0011 OS-9/68000 2.4 Patch to make ck9con.c compile on OS-9/68000 2.4
0012 MW Coherent 4.2 Patches for successful build on Coherent 4.2
0013 SINIX-Y 5.43 "delay" variable conflicts with <sys/clock.h>
0014 VMS/VAX/CMU-IP Subject: Patches for VAX/VMS 5.x + CMU-IP
0015 All XECHO doesn't flush its output
0016 VMS CD and other directory operations might not work
0017 Linux 1.2.x++ Use standard POSIX interface for high serial speeds
0018 UNIX SET WILDCARD-EXPANSION SHELL dumps core
0019 All Hayes V.34 modem init string problem
0020 All READ command does not fail if file not open
0021 All Problems with long function arguments
0022 All Certain \function()s can misbehave
0023 All X MOD 0 crashes program
0024 All Internal bulletproofing for lower() function
0025 OpenBSD Real OpenBSD support for C-Kermit 6.0
0026 All Incorrect checks for macro/command-file nesting depth
0027 All ANSWER doesn't automatically CONNECT
0028 All Overzealous EXIT warning
0029 All OUTPUT doesn't echo when DUPLEX is HALF
0030 All Minor problems with REMOTE DIRECTORY/DELETE/etc
0031 All CHECK command broken
0032 All Problem with SET TRANSMIT ECHO
0033 UNIX, VMS, etc HELP SET SERVER says too much
0034 All READ and !READ too picky about line terminators
0035 All END from inside SWITCH doesn't work
0036 All Problem telnetting to multihomed hosts
0037 All Redirection failures in REMOTE xxx > file
REDIRECT was missing in many UNIX C-Kermit implementations; in version
7.0, it should be available in all of them.
1.1. Command Continuation
Comments that start with ";" or "#" can no longer be continued. In:
; this is a comment -
echo blah
the ECHO command will execute, rather than being taken as a
continuation of the preceding comment line. This allows easy
"commenting out" of commands from macro definitions.
However, the text of the COMMENT command can still be continued onto
subsequent lines:
comment this is a comment -
echo blah
As of version 6.0, backslash is no longer a valid continuation
character. Only hyphen should be used for command continuation. This is
to make it possible to issue commands like "cd a:\" on DOS-like
systems.
As of version 7.0:
* You can quote a final dash to prevent it from being a continuation
character:
echo foo\-
This prints "foo-". The command is not continued.
* You can enter commands such as:
echo foo - ; this is a comment
interactively and they are properly treated as continued commands.
Previously this worked only in command files.
1.2. Editor Interface
SET EDITOR name [ options ]
Lets you specify a text-editing program. The name can be a fully
specified pathname like /usr/local/bin/emacs19/emacs, or it can
be the name of any program in your PATH, e.g. "set editor
emacs". In VMS, it must be a DCL command like "edit",
"edit/tpu", "emacs", etc. If an environment variable EDITOR is
defined when Kermit starts, its value is the default editor. You
can also specify options to be included on the editor command
line. Returns to Kermit when the editor exits.
EDIT [ filename ]
If the EDIT command is given without a filename, then if a
previous filename had been given to an EDIT command, it is used;
if not, the editor is started without a file. If a filename is
given, the editor is started on that file, and the filename is
remembered for subsequent EDIT commands.
SHOW EDITOR
Displays the full pathname of your text editor, if any, along
with any command line options, and the file most recently edited
(and therefore the default filename for your next EDIT command).
Related variables: \v(editor), \v(editopts), \v(editfile).
1.3. Web Browser and FTP Interface
C-Kermit includes an FTP command, which simply runs the FTP program;
C-Kermit does not include any built-in support for Internet File
Transfer Protocol, nor any method for interacting directly with an FTP
server. In version 7.0, however, C-Kermit lets you specify your FTP
client:
SET FTP-CLIENT [ name [ options ] ]
The name is the name of the FTP executable. In UNIX, Windows, or
OS/2, it can be the filename of any executable program in your
PATH (e.g. "ftp.exe" in Windows, "ftp" in UNIX); elsewhere (or
if you do not have a PATH definition), it must be the fully
specified pathname of the FTP program. If the name contains any
spaces, enclose it braces. Include any options after the
filename; these depend the particular ftp client.
The Web browser interface is covered in the following subsections.
1.3.1. Invoking your Browser from C-Kermit
BROWSE [ url ]
Starts your preferred Web browser on the URL, if one is given,
otherwise on the most recently given URL, if any. Returns to
Kermit when the browser exits.
SET BROWSER [ name [ options ] ]
Use this command to specify the name of your Web browser
program, for example: "set browser lynx". The name must be in
your PATH, or else it must be a fully specified filename; in VMS
it must be a DCL command.
SHOW BROWSER
Displays the current browser, options, and most recent URL.
Related variables: \v(browser), \v(browsopts), \v(browsurl).
Also see Section 2.15: Contacting Web Servers with the HTTP
Command.
1.3.2. Invoking C-Kermit from your Browser
The method for doing this depends, of course, on your browser. Here are
some examples:
Netscape on UNIX (X-based)
In the Options->Applications section, set your Telnet
application to:
xterm -e /usr/local/bin/kermit/kermit -J %h %p
(replace "/usr/local/bin/kermit/kermit" by C-Kermit's actual
pathname). -J is C-Kermit's command-line option to "be like
Telnet"; %h and %p are Netscape placeholders for hostname and
port.
Lynx on UNIX
As far as we know, this can be done only at compile time. Add
the following line to the Lynx userdefs.h file before building
the Lynx binary:
#define TELNET_COMMAND "/opt/bin/kermit -J"
And then add lines like the following to the Lynx.cfg file:
DOWNLOADER:Kermit binary download:/opt/bin/kermit -i -V -s %s -a %s:TRUE
DOWNLOADER:Kermit text download:/opt/bin/kermit -s %s -a %s:TRUE
UPLOADER:Kermit binary upload:/opt/bin/kermit -i -r -a %s:TRUE
UPLOADER:Kermit text upload:/opt/bin/kermit -r -a %s:TRUE
UPLOADER:Kermit text get:/opt/bin/kermit -g %s:TRUE
UPLOADER:Kermit binary get:/opt/bin/kermit -ig %s:TRUE
But none of the above is necessary if you make C-Kermit your default
Telnet client, which you can do by making a symlink called 'telnet' to
the C-Kermit 7.0 binary. See Section 9.1 for details.
1.4. Command Editing
Ctrl-W ("Word delete") was changed in 7.0 to delete back to the
previous non-alphanumeric, rather than all the way back to the previous
space.
1.5. Command Switches
As of version 7.0, C-Kermit's command parser supports a new type of
field, called a "switch". This is an optional command modifier.
1.5.1. General Switch Syntax
A switch is a keyword beginning with a slash (/). If it takes a value,
then the value is appended to it (with no intervening spaces),
separated by a colon (:) or equal sign (=). Depending on the switch,
the value may be a number, a keyword, a filename, a date/time, etc.
Examples:
send oofa.txt ; No switches
send /binary oofa.zip ; A switch without a value
send /protocol:zmodem oofa.zip ; A switch with a value (:)
send /protocol=zmodem oofa.zip ; A switch with a value (=)
send /text /delete /as-name:x.x oofa.txt ; Several switches
Like other command fields, switches are separated from other fields,
and from each other, by whitespace, as shown in the examples just
above. You can not put them together like so:
send/text/delete/as-name:x.x oofa.txt
(as you might do in VMS or DOS, or as we might once have done in
TOPS-10 or TOPS0-20, or PIP). This is primarily due to ambiguity
between "/" as switch introducer versus "/" as UNIX directory
separator; e.g. in:
send /delete/as-name:foo/text oofa.txt
Does "foo/text" mean the filename is "foo" and the transfer is to be in
text mode, or does it mean the filename is "foo/text"? Therefore we
require whitespace between switches to resolve the ambiguity. (That's
only one of several possible ambiguities -- it is also conceivable that
a file called "text" exists in the path "/delete/as-name:foo/").
In general, if a switch can take a value, but you omit it, then either
a reasonable default value is supplied, or an error message is printed:
send /print:-Plaserwriter oofa.txt ; Value included = print options
send /print oofa.txt ; Value omitted, OK
send /mail:kermit@columbia.edu oofa.txt ; Value included = address
send /mail oofa.txt ; Not OK - address required
?Address required
Context-sensitive help (?) and completion (Esc or Tab) are available in
the normal manner:
C-Kermit> send /pr? Switch, one of the following:
/print /protocol
C-Kermit> send /pro<ESC>tocol:? File-transfer protocol,
one of the following:
kermit xmodem ymodem ymodem-g zmodem
C-Kermit> send /protocol:k<TAB>ermit
If a switch takes a value and you use completion on it, a colon (:) is
printed at the end of its name to indicate this. If it does not take a
value, a space is printed.
Also, if you type ? in a switch field, switches that take values are
shown with a trailing colon; those that don't take values are shown
without one.
1.5.2. Order and Effect of Switches
The order of switches should not matter, except that they are evaluated
from left to right, so if you give two switches with opposite effects,
the rightmost one is used:
send /text /binary oofa.zip ; Sends oofa.zip in binary mode.
Like other command fields, switches have no effect whatsoever until the
command is entered (by pressing the Return or Enter key). Even then,
switches affect only the command with which they are included; they do
not have global effect or side effects.
1.5.3. Distinguishing Switches from Other Fields
All switches are optional. A command that uses switches lets you give
any number of them, including none at all. Example:
send /binary oofa.zip
send /bin /delete oofa.zip
send /bin /as-name:mupeen.zip oofa.zip
send oofa.zip
But how does Kermit know when the first "non-switch" is given? It has
been told to look for both a switch and for something else, the data
type of the next field (filename, number, etc). In most cases, this
works well. But conflicts are not impossible. Suppose, for example, in
UNIX there was a file named "text" in the top-level directory. The
command to send it would be:
send /text
But C-Kermit would think this was the "/text" switch. To resolve the
conflict, use braces:
send {/text}
or other circumlocutions such as "send //text", "send /./text", etc.
The opposite problem can occur if you give an illegal switch that
happens to match a directory name. For example:
send /f oofa.txt
There is no "/f" switch (there are several switches that begin with