dh_installchangelogs: adjust to use ckc301.txt. changelog: explain -O1 usage
[ckermit.git] / ckuins.txt
1
2    [1]The Columbia Crown The Kermit Project | Columbia University
3    612 West 115th Street, New York NY 10025 USA o [2]kermit@columbia.edu
4    ...since 1981
5    [3]Home [4]Kermit 95 [5]C-Kermit [6]Scripts [7]Current [8]New [9]FAQ
6    [10]Support
7
8 C-Kermit 9.0 Installation Instructions and Options for Unix
9
10    [ [11]Contents ] [ [12]C-Kermit ] [ [13]Kermit Home ]
11
12    Frank da Cruz
13    The Kermit Project
14    Columbia University
15
16       As of C-Kermit version: 9.0.300, 30 June 2011
17       This file last updated: Tue Jun 28 08:28:08 2011 (New York City
18    time)
19
20    IF YOU ARE READING A PLAIN-TEXT version of this document, it is a
21    plain-text copy of a Web page. You can visit the original (and possibly
22    more up-to-date) Web page here:
23
24 [14]http://www.columbia.edu/kermit/ckuins.html
25
26 CONTENTS
27
28    [15]OVERVIEW
29     1. [16]INTERNET QUICK START
30     2. [17]INSTALLING FROM PACKAGES
31     3. [18]INSTALLING PREBUILT BINARIES
32     4. [19]BUILDING FROM SOURCE CODE
33     5. [20]INSTALLING THE KERMIT FILES
34     6. [21]INSTALLING UNIX C-KERMIT FROM DOS-FORMAT DISKETTES
35     7. [22]CHECKING THE RESULTS
36     8. [23]REDUCING THE SIZE OF THE EXECUTABLE PROGRAM IMAGE
37     9. [24]UNIX VERSIONS
38    10. [25]DIALING OUT AND COORDINATING WITH UUCP
39    11. [26]RUNNING UNIX C-KERMIT SETUID OR SETGID
40    12. [27]CONFIGURING UNIX WORKSTATIONS
41    13. [28]BIZARRE BEHAVIOR AT RUNTIME
42    14. [29]CRASHES AND CORE DUMPS
43    15. [30]SYSLOGGING
44    16. [31]BUILDING SECURE VERSIONS OF C-KERMIT 9.0
45    17. [32]INSTALLING C-KERMIT AS AN SSH SERVER SUBSYSTEM
46
47 OVERVIEW
48
49    [ [33]Top ] [ [34]Contents ] [ [35]Next ]
50
51      WARNING: This document contains notes that have been accumulating
52      since the mid 1980s. Many of the products and Unix versions
53      mentioned here have not been heard of in a long while, but that does
54      not necessarily mean they are not still running in some obscure
55      nook.
56
57    This file contains Unix-specific information. A lot of it. Unlike most
58    other packages, C-Kermit tries very hard to be portable to every Unix
59    variety (and every release of each one) known to exist, including many
60    that are quite old, as well as to other platforms like VMS, AOS/VS,
61    VOS, OS-9, the BeBox, the Amiga, etc.
62
63    Since C-Kermit gets so deeply into the file system, i/o system, and
64    other areas that differ radically from one Unix platform to the next,
65    this means that a lot can go wrong when you try to install C-Kermit on
66    (for example) a new release of a particular variety of Unix, in which
67    certain things might have changed that C-Kermit depended upon.
68
69    This file concentrates on installation. For a description of general
70    configuration options for C-Kermit, please read the [36]Configurations
71    Options document. For troubleshooting after installation, see the
72    [37]General Hints and Tips and [38]Unix-Specific Hints and Tips
73    documents. The latter, in particular, contains lots of information on
74    lots of specific Unix platforms. If you want to work on the source
75    code, see the [39]C-Kermit Program Logic Manual
76
77    You may install C-Kermit:
78
79      * From an "[40]install package", if one is available.
80      * As a [41]prebuilt binary, if available, plus accompanying text
81        files.
82      * By building from [42]source code.
83
84 1. INTERNET QUICK START
85
86    [ [43]Top ] [ [44]Contents ] [ [45]Next ] [ [46]Previous ]
87
88    If your Unix computer is on the Internet and it has a C compiler,
89    here's how to download, build, and install C-Kermit directly from the
90    "tarballs" or Zip archives:
91
92     1. Make a fresh directory and cd to it.
93     2. Download the C-Kermit source code:
94        [47]ftp://www.columbia.edu/kermit/archives/cku211.tar.Z (compress
95        format) or [48]ftp://www.columbia.edu/kermit/archives/cku211.tar.gz
96        (gunzip format). If those links don't work, FTP transfers are being
97        blocked; try these HTTP links instead:
98        [49]http://kermit.columbia.edu/ftp/archives/cku211.tar.Z (compress
99        format) or
100        [50]http://kermit.columbia.edu/ftp/archives/cku211.tar.gz (gunzip
101        format).
102     3. Uncompress the compressed tar file with "uncompress" or "gunzip",
103        according to which type of compressed file you downloaded. (If you
104        don't understand this, you could download a (much larger)
105        uncompressed tar archive directly:
106        [51]ftp://www.columbia.edu/kermit/archives/cku211.tar or
107        [52]http://kermit.columbia.edu/ftp/archives/cku211.tar
108     4. Now type "tar xvf cku211.tar" to unpack the individual files from
109        the tar archive.
110     5. Type "rm cku211.tar" to get rid of the tar archive, which is no
111        longer needed.
112     6. Read the comments at the top of the makefile to find out which
113        target to use and then type the appropriate "make" command, such as
114        "make linux", "make solaris8", etc.
115     7. This produces a binary in your current directory called "wermit".
116        Start it by typing "./wermit" and [53]try it out to make sure it
117        works. Then read [54]Section 5 for how to install it, or simply
118        copy the wermit binary to the desired public directory, rename it
119        to kermit, and give it the needed permissions (and, if it is going
120        to be used to dial out, give it the same group and owner and
121        permissions as the cu, tip, or minicom program).
122
123    For secure installations, see [55]Sections 5 and [56]16.
124
125 2. INSTALLING FROM PACKAGES
126
127    [ [57]Top ] [ [58]Contents ] [ [59]Next ] [ [60]Previous ]
128
129    Various Unix varieties -- Linux, Solaris, AIX, etc -- now incorporate
130    the idea of "install packages", and many users expect to find all new
131    applications in this format. A selection of install packages might be
132    available for any given release of C-Kermit, but there is a tradeoff
133    between convenience and safety. Unix presents several notable problems
134    to the builder of install packages:
135
136     a. Since C-Kermit is portable to many non-Unix platforms (VMS, VOS,
137        AOS/VS, etc), some of the files in the C-Kermit distribution do not
138        fit into the Unix application model. In particular, C-Kermit
139        includes some plain text files (described in [61]Section 5) and
140        Unix has no standard place to put such files. Typical Unix package
141        managers do not allow for them. Where should they go, and how will
142        the user know where to find them?
143     b. Installation of any program that will be used to make modem calls
144        requires some important decisions from the installer regarding
145        security and privilege.
146
147    Item (b) is discussed at length in [62]Sections 10 and [63]11 of this
148    document, but the package-related aspects are also given here. The
149    basic problem is that Unix dialout devices and the UUCP "lock files"
150    that regulate contention for them (described in [64]Section 10) are
151    usually protected against "world". Therefore, the install procedure
152    must either run as root in order to give the Kermit binary the required
153    permissions, group, and/or owner, or else the dialout devices and
154    associated directories must be open for group or world reading and
155    writing. Otherwise, the Kermit program just installed WILL NOT WORK for
156    dialing out.
157
158    Thus, a well-crafted installation procedure should present the options
159    and allow the installer to choose the method, if any, for regulating
160    accesss to the dialout devices:
161
162     a. Check the permissions of the lockfile directory and the dialout
163        devices. If they do not allow group or world R/W accesss, then:
164     b. "Your UUCP lockfile directory and/or dialout devices require
165        privilege to accesss. You must either change their permissions or
166        install Kermit with privileges."
167     c. "If you wish to install Kermit with privileges, it will be given
168        the same owner, group, and permissions as the cu program so it can
169        use the dialout devices." (This is increasingly problematic as some
170        newer Unix systems like Mac OS X don't have a cu program, or even a
171        serial port!)
172     d. If they choose (c) but the user is not root, give a message that
173        the install procedure can be run only by root and then quit.
174
175    It should go without saying, of course, that any binaries that are to
176    be included in an install package should be built fresh on the exact
177    platform (e.g. Red Hat 8.0 on Intel) for which the package is targeted;
178    prebuilt binaries ([65]next section) from other sites are likely to
179    have library mismatches. [66]CLICK HERE for more about building
180    C-Kermit install packages.
181
182    The Kermit Project does not have the resources or the expertise to make
183    install packages for every platform. Most install packages, therefore,
184    are contributed by others, and they do not necessarily follow the
185    guidelines given above. Pay attention to what they do.
186
187    If you are an end user who has obtained a C-Kermit install package for
188    a particular platform, you should be aware that some additional steps
189    might needed if you want to use Kermit to dial out. Read [67]Section 10
190    for details.
191
192 3. INSTALLING PREBUILT BINARIES
193
194    [ [68]Top ] [ [69]Contents ] [ [70]Next ] [ [71]Previous ]
195
196    Hundreds of prebuilt C-Kermit binaries are available on the CDROM in
197    the BINARY tree [NOTE: The C-Kermit CDROM is still for version 7.0],
198    and at our ftp site in the [72]kermit/bin area (with names starting
199    with "ck"), also accesssible on the [73]C-Kermit website. To install a
200    prebuilt binary:
201
202     a. Rename the binary to "wermit".
203     b. Make sure it works; some tests are suggested in [74]Section 7.
204     c. Follow steps (b) through (e) in [75]Section 4.
205     d. Install related files as described in [76]Section 5.
206
207    But first... Please heed the following cautions:
208
209     a. If you pick the wrong binary, it won't work (or worse).
210     b. Even when you pick the appropriate binary, it still might not work
211        due to shared-library mismatches, etc. (see [77]Section 4.0).
212     c. Don't expect a binary built on or for version n of your OS to work
213        on version n - x (where x > 0). However, it is supposed to be safe
214        to run a binary built on (or for) an older OS release on a newer
215        one (but is [78]increasingly less so as time-honored principles of
216        stability and backwards compatibility go fading into obscurity).
217
218    Therefore, it is always better to build your own binary from source
219    code ([79]next section) if you can. But since it is increasingly common
220    for Unix systems (not to mention VMS and other OS's) to be delivered
221    without C compilers, it is sometimes not possible. In such cases, try
222    the most appropriate prebuilt binary or binaries, and if none of them
223    work, [80]contact us and we'll see what we can do to help.
224
225 4. BUILDING FROM SOURCE CODE
226
227    [ [81]Top ] [ [82]Contents ] [ [83]Next ] [ [84]Previous ]
228
229    Also see: [85]Section 8 and [86]Section 9.
230
231    C-Kermit is designed to be built and used on as many platforms as
232    possible: Unix and non-Unix, old and new (and ancient), ANSI C and K&R.
233    The Unix version does not use or depend on any external tools for
234    building except the "make" utility, the C compiler, the linker, and the
235    shell. It does not use any external automated configuration tools such
236    as configure, autoconf, automake, libtool, etc. Everything in C-Kermit
237    has been built by hand based on direct experience or reports or
238    contributions from users of each platform.
239
240    The [87]C-Kermit makefile contains the rules for building the program
241    for each of the hundreds of different kinds of Unix systems that
242    C-Kermit attempts to support. It covers all Unix variations since about
243    1980 -- pretty much everything after Unix V6. Separate makefiles are
244    used for [88]Plan 9 and [89]2.x BSD.
245
246    Prerequisites:
247
248      * The C compiler, linker, and make program must be installed.
249      * The C libraries and header files must be installed (*).
250      * The C-Kermit source code and makefile in your current directory.
251      * The C-Kermit text files ([90]Section 5) in your current directory.
252
253      * This is becoming problematic in this new age of "selective
254        installs" e.g. of Linux packages. C-Kermit builds will often fail
255        because replying "no" to some obscure Linux installation option
256        will result in missing libraries or header files. Ditto on
257        platforms like AIX and Solaris that don't come with C compilers,
258        and then later have gcc installed, but are still missing crucial
259        libraries, like libm (math).
260
261    Plus:
262
263      * For TCP/IP networking support, the sockets library and related
264        header files must be installed.
265      * The math library for floating-point arithmetic support (can be
266        deselected by adding -DNOFLOAT to CFLAGS and removing -lm from
267        LIBS).
268      * Many and varied security libraries for building a secure version
269        (Kerberos, SSL/TLS, SRP, Zlib,...) These are required only if you
270        select a secure target.
271      * For the curses-based fullscreen file-transfer display, the curses
272        or ncurses header file(s) and library, and probably also the
273        termcap and/or termlib library. Note that the names and locations
274        of these files and libraries are likely to change capriciously with
275        every new release of your Unix product. If you discover that the
276        C-Kermit build procedure fails because your curses and/or termxxx
277        headers or libraries are not named or located as expected, please
278        [91]let us know. In the meantime, work around by installing
279        symlinks.
280      * IMPORTANT: Modern Linux distributions might give you the choice
281        during installation of whether to install the "ncurses development
282        package" (perhaps called "ncurses-devel"). If you did not install
283        it, you won't be able to build C-Kermit with curses support
284        included. In this case, either go back and install ncurses, or else
285        choose (or create) a non-curses makefile target for your platform.
286        To install the ncurses developers tools in Red Hat Linux, do
287        "apt-get install ncurses-developer" or if you have the CD:
288
289 mount redhat cdrom
290 goto RedHat/RPMS
291 rpm -ivh ncurses-devel*.rpm
292 or to have the exact name ls ncurse* and load as
293 rpm -ivh filename
294 then leave the cdrom and unmount it.
295
296      * In AIX you might have to go back and install any or all of:
297
298 bos.adt.base
299 bos.adt.include
300 bos.adt.lib
301 bos.adt.libm
302 bos.adt.utils
303
304        from the first installation CD.
305
306    Depending on where you got it, the makefile might need to be renamed
307    from ckuker.mak to makefile. Directions:
308
309     a. Type "make xxx" where xxx is the name of the makefile target most
310        appropriate to your platform, e.g. "make linux", "make aix43", etc.
311        Read the [92]comments at the top of the makefile for a complete
312        list of available targets (it's a long list).
313     b. Test the resulting 'wermit' file (see [93]Section 7 for
314        suggestions). If it's OK, proceed; otherwise [94]notify us.
315
316      NOTE: steps (c) through (e) can be accomplished using the
317      [95]makefile 'install' target as described in [96]Section 5.4.
318     c. Rename the 'wermit' file to 'kermit', copy it to the desired binary
319        directory (such as /usr/local/bin or /opt/something), and if it is
320        to be used for dialing out, give it the same owner, group, and
321        permissions as the 'cu' program (IMPORTANT: read [97]Sections 10
322        and [98]11 for details).
323     d. Install the man page, ckuker.nr, with your other man pages.
324     e. Install the accompanying text files (see [99]Section 5).
325     f. If you want C-Kermit to also offer a Telnet command-line
326        personality, make a symbolic link as follows:
327
328 cd directory-where-kermit-binary-is
329 ln -s kermit telnet
330
331        If you want C-Kermit to be the default Telnet client, make sure the
332        directory in which you created the symlink is in the PATH ahead of
333        the where the regular Telnet client is.
334     g. If you want C-Kermit to also offer an FTP command-line personality,
335        make a symlink called "ftp" as in (f).
336     h. If you want C-Kermit to also offer an FTTP command-line
337        personality, make a symlink called "http" as in (f).
338     i. If you want to offer an Internet Kermit Service, follow the
339        directions in the [100]IKSD Administrator's Guide.
340
341 4.0. Special Considerations for C-Kermit 8.0-9.0
342
343    [ [101]Top ] [ [102]Contents ] [ [103]Next ]
344
345    Also see: [104]C-Kermit Configuration Options
346
347    SECTION CONTENTS
348
349 4.1. [105]The Unix Makefile
350 4.2. [106]The C-Kermit Initialization File
351 4.3. [107]The 2.x BSD Makefile
352 4.4. [108]The Plan 9 Makefile
353 4.5. [109]Makefile Failures
354
355    (Also see the [110]Configurations Options document, [111]Section 8).
356
357    Lots of new features have been added in versions 7.0 and 8.0 that
358    require accesss to new symbols, APIs, libraries, etc, and this will no
359    doubt cause problems in compiling, linking, or execution on platforms
360    where 6.0 and earlier built without incident. This section contains
361    what we know as of the date of this file.
362
363    The first category concerns the new Kermit Service Daemon (IKSD; see
364    the [112]IKSD Administrator's Guide for details):
365
366    The wtmp File
367           When C-Kermit is started as an IKSD (under inetd), it makes
368           syslog and wtmp entries, and also keeps its own ftpd-like log.
369           The code assumes the wtmp log is /var/log/wtmp on Linux and
370           /usr/adm/wtmp elsewhere. No doubt this assumption will need
371           adjustment. Use -DWTMPFILE=path to override at compile time
372           (there is also a runtime override). See [113]iksd.html for
373           details.
374
375    UTMP, utsname(), etc
376           C-Kermit 7.0 gets as much info as it can about its job -- mainly
377           for IKSD logging -- from utmp. But of course utmp formats and
378           fields differ, and for that matter, there can be two different
379           header files, <utmp.h> and <utmpx.h>. Look for HAVEUTMPX and
380           HAVEUTHOST in [114]ckufio.c and let me know of any needed
381           adjustments.
382
383    Password lookup
384           IKSD needs to authenticate incoming users against the password
385           list. In some cases, this requires the addition of -lcrypt (e.g.
386           in Unixware 2.x). In most others, the crypt functions are in the
387           regular C library. If you get "crypt" as an unresolved symbol at
388           link time, add -lcrypt to LIBS. If your site has local
389           replacement libraries for authentication, you might need a
390           special LIBS clause such as "LIBS=-L/usr/local/lib -lpwent".
391
392           These days most Unix systems take advantage of shadow password
393           files or Pluggable Authentication Modules (PAM). If your system
394           uses shadow passwords you must add -DCK_SHADOW to the CFLAGS
395           list. If your system requires PAM you must add -DCK_PAM to the
396           CFLAGS and -lpam -ldl to LIBS.
397
398    getusershell()
399           This is called by the IKSD at login time to see if a user has
400           been "turned off". But many Unix platforms lack this function.
401           In that case, you will get unresolved symbol reports at link
402           time for _getusershell, _endusershell; to work around, add
403           -DNOGETUSERSHELL.
404
405    initgroups()
406           This is called by IKSD after successful authentication. But some
407           platforms do not have this function, so obviously it can't be
408           called there, in which case add -DNOINITGROUPS.
409
410    setreuid(), setreuid(), setregid() not found or "deprecated"
411           Find out what your Unix variety wants you to use instead, and
412           make appropriate substitutions in routine zvpass(), module
413           [115]ckufio.c, and [116]let us know.
414
415    printf()
416           IKSD installs a printf() substitute to allow redirection of
417           printf-like output to the connection. However, this can conflict
418           with some curses libraries. In this case, separate binaries must
419           be built for IKSD and non-IKSD use.
420
421    If you encounter difficulties with any of the above, and you are not
422    interested in running C-Kermit as an IKSD, then simply add NOIKSD to
423    CFLAGS and rebuild. Example:
424
425 make sco286
426 (get lots of errors)
427 make clean
428 make sco286 "KFLAGS=-DNOIKSD"
429
430    Some non-IKSD things to watch out for:
431
432    Return type of main()
433           The main() routine is in [117]ckcmai.c. If you get complaints
434           about "main: return type is not blah", define MAINTYPE on the CC
435           command line, e.g.:
436
437 make xxx "KFLAGS=-DMAINTYPE=blah
438
439           (where blah is int, long, or whatever). If the complaint is
440           "Attempt to return a value from a function of type void" then
441           add -DMAINISVOID:
442
443 make xxx "KFLAGS=-DMAINISVOID=blah
444
445    DNS Service Records
446           This feature allows a remote host to redirect C-Kermit to the
447           appropriate socket for the requested service; e.g. if C-Kermit
448           requests service "telnet" and the host offers Telnet service on
449           port 999 rather than the customary port 23. If you get
450           compile-time complaints about not being able to find <resolv.h>,
451           <netdb.h>, or <arpa/nameser.h>, add -DNO_DNS_SRV to CFLAGS. If
452           you get link-time complaints about unresolved symbols res_search
453           or dn_expand, try adding -lresolve to LIBS.
454
455    \v(ipaddress)
456           If "echo \v(ipaddress)" shows an empty string rather than your
457           local IP address, add -DCKGHNLHOST to CFLAGS and rebuild.
458
459    <sys/wait.h>
460           If this file can't be found at compile time, add -DNOREDIRECT to
461           CFLAGS. This disables the REDIRECT and PIPE commands and
462           anything else that needs the wait() system service.
463
464    syslog()
465           C-Kermit can now write syslog records. Some older platforms
466           might not have the syslog facility. In that case, add
467           -DNOSYSLOG. Others might have it, but require addition of
468           -lsocket to LIBS (SCO OSR5 is an example). See [118]Section 15.
469
470    putenv()
471           If "_putenv" comes up as an undefined symbol, add -DNOPUTENV to
472           CFLAGS and rebuild.
473
474    "Passing arg1 of 'time' from incompatible pointer"
475           This is a mess. See the mass of #ifdefs in the appropriate
476           module, [119]ckutio.c or [120]ckufio.c.
477
478    gettimeofday()
479           Wrong number of arguments. On most platforms, gettimeofday()
480           takes two arguments, but on a handful of others (e.g. Motorola
481           System V/88 V4, SNI Reliant UNIX 5.43, etc) it takes one. If
482           your version of gettimeofday() is being called with two args but
483           wants one, add -DGTODONEARG.
484
485    "Assignment makes pointer from integer without a cast"
486           This warning might appear in [121]ckutio.c or [122]ckufio.c. (or
487           elsewhere), and usually can be traced to the use of a system or
488           library function that returns a pointer but that is not declared
489           in the system header files even though it should be. Several
490           functions are commonly associated with this error:
491
492           + getcwd(): Add -DDCLGETCWD to CFLAGS and rebuild.
493           + popen() : Add -DDCLPOPEN to CFLAGS and rebuild.
494           + fdopen(): Add -DDCLFDOPEN to CFLAGS and rebuild.
495
496    "Operands of = have incompatible types"
497    "Incompatible types in assignment"
498           If this comes from [123]ckcnet.c and comes from a statement
499           involving inet_addr(), try adding -DINADDRX to CFLAGS. If that
500           doesn't help, then try adding -DNOMHHOST.
501
502    Complaints about args to get/setsockopt(), getpeername(), getsockname()
503           These are all in [124]ckcnet.c. Different platforms and OS's and
504           versions of the same OS change this all the time: int, size_t,
505           unsigned long, etc. All the affected variables are declared
506           according to #ifdefs within ckcnet.c, so find the declarations
507           and adjust the #ifdefs accordingly.
508
509    size_t
510           In case of complaints about "unknown type size_t", add
511           -DSIZE_T=int (or other appropriate type) to CFLAGS.
512
513    'tz' undefined
514    Use of undefined enum/struct/union 'timezone'
515           Left of 'tv_sec' specifies undefined struct/union 'timeval' And
516           similar complaints in [125]ckutio.c: Add -DNOGFTIMER and/or
517           -DNOTIMEVAL.
518
519    Symlinks
520           The new built-in DIRECTORY command should show symlinks like "ls
521           -l" does. If it does not, check to see if your platform has the
522           lstat() and readlink() functions. If so, add -DUSE_LSTAT and
523           -DCKSYMLINK to CFLAGS and rebuild. On the other hand, if lstat()
524           is unresolved at link time, add -DNOLSTAT to CFLAGS. If
525           readlink() is also unresolved, add -DNOSYMLINK.
526
527    realpath()
528           Link-time complains about realpath() -- find the library in
529           which it resides and add it to LIBS (example for Unixware 7.1:
530           "-lcudk70") or add -DNOREALPATH to CFLAGS and rebuild. If built
531           with realpath() but debug log file is truncated or mangled,
532           ditto (some realpath() implementations behave differently from
533           others). If built with realpath() and seemingly random core
534           dumps occur during file path resolution, ditto.
535
536    Failure to locate header file <term.h>
537           Usually happens on Linux systems that have the C compiler
538           installed, but not the ncurses package (see comments about
539           selective installs above). Go back and install ncurses, or use
540           "make linuxnc" (Linux No Curses).
541
542    "Can't find shared library libc.so.2.1"
543    "Can't find shared library libncurses.so.3.0", etc...
544           You are trying to run a binary that was built on a computer that
545           has different library versions than your computer, and your
546           computer's loader is picky about library version numbers.
547           Rebuild from source on your computer.
548
549    Time (struct tm) related difficulties:
550           Errors like the following:
551
552 "ckutio.c", line 11994: incomplete struct/union/enum tm: _tm
553 "ckutio.c", line 11995: error: cannot dereference non-pointer type
554 "ckutio.c", line 11995: error: assignment type mismatch
555 "ckutio.c", line 11997: warning: using out of scope declaration: localtime
556 "ckutio.c", line 11997: error: unknown operand size: op "="
557 "ckutio.c", line 11997: error: assignment type mismatch
558 "ckutio.c", line 11998: error: undefined struct/union member: tm_year
559 "ckutio.c", line 12000: error: undefined struct/union member: tm_mon
560 "ckutio.c", line 12001: error: undefined struct/union member: tm_mday
561 "ckutio.c", line 12002: error: undefined struct/union member: tm_hour
562 "ckutio.c", line 12003: error: undefined struct/union member: tm_min
563 "ckutio.c", line 12004: error: undefined struct/union member: tm_sec
564
565           are due to failure to include the appropriate time.h header
566           files. Unix platforms generally have one or more of the
567           following: <time.h>, <sys/time.h>, and <sys/timeb.h>. Any
568           combination of these might be required. Defaults are set up for
569           each makefile target. The defaults can be corrected on the CC
570           command line by adding the appropriate definition from the
571           following list to CFLAGS:
572
573 -DTIMEH         Include <time.h>
574 -DNOTIMEH       Don't include <time.h>
575 -DSYSTIMEH      Include <sys/time.h>
576 -DNOSYSTIMEH    Don't include <sys/time.h>
577 -DSYSTIMEBH     Include <sys/timeb.h>
578 -DNOSYSTIMEBH   Don't include <sys/timeb.h>
579
580           Note that <sys/timeb.h> is relatively scarce in the System V and
581           POSIX environments; the only platform of recent vintage where it
582           was/is used is OSF/1 and its derivatives (Digital Unix and Tru64
583           Unix).
584
585    Struct timeval and/or timezone not declared:
586           In some cases, merely including the appropriate time.h header
587           files is still not enough. POSIX.1 does not define the timeval
588           struct, and so the items we need from the header are protected
589           against us by #ifndef _POSIX_SOURCE or somesuch. In this case,
590           we have to declare the timeval (and timezone) structs ourselves.
591           To force this, include -DDCLTIMEVAL in CFLAGS.
592
593    Warnings about dn_expand() Argument #4
594           WARNING: argument is incompatible with prototyp. It's the old
595           char versus unsigned char stupidity again. Try to find a
596           compiler switch like GCC's "-funsigned-char". Failing that, add
597           -DCKQUERYTYPE=xxx to CFLAGS, where xxx is whatever 'man
598           dn_expand' tells you the type of the 4th argument should be
599           (presumably either char or unsigned char; in the latter case use
600           CHAR to avoid confusion caused by multiple words.
601
602    Switch Table Overflow (in [126]ckcuni.c)
603           Add -DNOUNICODE to CFLAGS.
604
605    Compile-time warnings about ck_out() or tgetstr() or tputs():
606           Easy solution: Add -DNOTERMCAP to CFLAGS. But then you lose the
607           SCREEN function. Real solution: Try all different combinations
608           of the following CFLAGS:
609
610 -DTPUTSARGTYPE=char    -DTPUTSFNTYPE=int
611 -DTPUTSARGTYPE=int     -DTPUTSFNTYPE=void
612
613           Until the warnings go away, except maybe "ck_outc: return with a
614           value in a function returning void", and in that case also add
615           -DTPUTSISVOID.
616
617    "Passing arg 1 of to tputs() makes pointer from integer without a
618           cast":
619           Add -DTPUTSARG1CONST to CFLAGS.
620
621    "Undefined symbol: dup2"
622           Add -DNOZEXEC to CFLAGS.
623
624    "header file 'termcap.h' not found"
625           Add -DNOHTERMCAP to CFLAGS.
626
627    Other difficulties are generally of the "where is curses.h and what is
628    it called this week?" variety (most easily solved by making symlinks in
629    the include and lib directories), or overzealous complaints regarding
630    type mismatches in function calls because of the totally needless and
631    silly signed versus unsigned char conflict (*), etc. In any case,
632    please send any compilation or linking warnings or errors to the
633    author, preferably along with fixes.
634
635      * C-Kermit does not use the signed property of chars at all anywhere,
636        ever. So if all chars and char *'s can be made unsigned at compile
637        time, as they can in gcc with "-funsigned-char", they should be.
638
639    IMPORTANT: If you find any of these hints necessary for a particular
640    make target (or you hit upon others not listed here), PLEASE SEND A
641    REPORT TO:
642
643 [127]kermit-support@columbia.edu
644
645 4.1. The Unix Makefile
646
647    [ [128]Top ] [ [129]Contents ] [ [130]Section Contents ] [ [131]Next ]
648    [ [132]Previous ]
649
650    If your distribution does not contain a file with the name "makefile"
651    or "Makefile", then rename the file called ckuker.mak to makefile:
652
653 mv ckuker.mak makefile
654
655    Then type "make xxx", where xxx is the platform you want to build
656    C-Kermit for. These are listed in the [133]comments at the top of the
657    makefile. For example, to build C-Kermit for Linux, type:
658
659 make linux
660
661    Here are some typical examples:
662
663      Target    Description
664      linux     Linux, any version on any hardware platform
665      openbsd   OpenBSD, any version on any hardware platform
666      aix43     AIX 4.3
667      aix43g    AIX 4.3, built with gcc
668      solaris9  Solaris 9
669      solaris9g Solaris 9 built with gcc
670      hpux1100  HP-UX 11-point-anything
671
672    The makefile is quite long, and at least two versions of Unix, SCO
673    Xenix/286 and 2.x BSD, cannot cope with its length. An attempt to "make
674    sco286" gives the message "Make: Cannot alloc mem for env.. Stop".
675    Solution: edit away some or all of the nonrelevant material from the
676    makefile. (A separate version of the makefile is provided for BSD 2.x:
677    ckubs2.mak but C-Kermit 8.0 can't be built for BSD 2.x -- it has simply
678    grown too large.)
679
680    Some make programs reportedly cannot handle continued lines (lines
681    ending in backslash (\)). If you have a problem with the makefile, try
682    editing the makefile to join the continued lines (remove the
683    backslashes and the following linefeed).
684
685    Other makefile troubles may occur because tabs in the makefile have
686    somehow been converted to spaces. Spaces and tabs are distinct in Unix
687    makefiles.
688
689    Similarly, carriage returns might have been added to the end of each
690    line, which also proves confusing to most Unix versions of make.
691
692    Check to see if there are comments about your particular version in its
693    makefile target itself. In a text editor such as EMACS or VI, search
694    for the make entry name followed by a colon, e.g. "linux:" (if you
695    really are building C-Kermit for Linux, do this now).
696
697    Check to see if there are comments about your particular version in the
698    [134]ckubwr.txt file ([135]CLICK HERE for the Web version).
699
700    If you have trouble with building [136]ckwart.c, or running the
701    resulting wart preprocessor program on [137]ckcpro.w:
702
703     1. Just "touch" the [138]ckcpro.c file that comes in the distribution
704        and then give the "make" command again, or:
705     2. Compile ckwart.c "by hand": cc -o wart ckwart.c, or:
706     3. Try various other tricks. E.g. one Linux user reported that that
707        adding the "static" switch to the rule for building wart fixed
708        everything:
709
710 wart: ckwart.$(EXT)
711         $(CC) -static -o wart ckwart.$(EXT) $(LIBS)
712
713    If your compiler supports a compile-time option to treat ALL chars (and
714    char *'s, etc) as unsigned, by all means use it -- and send me email to
715    let me know what it is (I already know about gcc -funsigned-char).
716
717    To add compilation options (which are explained later in this document)
718    to your makefile target without editing the makefile, include
719    "KFLAGS=..." on the make command line, for example:
720
721 make linux KFLAGS=-DNODEBUG
722 make bsd "KFLAGS=-DKANJI -DNODEBUG -DNOTLOG -DDYNAMIC -UTCPSOCKET"
723
724    Multiple options must be separated by spaces. Quotes are necessary if
725    the KFLAGS= clause includes spaces. The KFLAGS are added to the end of
726    the CFLAGS that are defined in the selected makefile target. For
727    example, the "bsd" entry includes -DBSD4 -DTCPSOCKET, so the second
728    example above compiles Kermit with the following options:
729
730 -DBSD4 -DTCPSOCKET -DKANJI -DNODEBUG -DNOTLOG -DDYNAMIC -UTCPSOCKET
731
732    (Notice how "-UTCPSOCKET" is used to negate the effect of the
733    "-DTCPSOCKET" option that is included in the makefile target.)
734
735    WARNING: Be careful with KFLAGS. If you build C-Kermit, change some
736    files, and then run make again using the same make entry but specifying
737    different KFLAGS than last time, make won't detect it and you could
738    easily wind up with inconsistent object modules, e.g. some of them
739    built with a certain option, others not. When in doubt, "make clean"
740    first to make sure all your object files are consistent. Similarly, if
741    you change CFLAGS, LIBS, or any other items in the makefile, or you
742    rebuild using a different makefile target, "make clean" first.
743
744    If you create a new makefile target, use static linking if possible.
745    Even though this makes your C-Kermit binary bigger, the resulting
746    binary will be more portable. Dynamically linked binaries tend to run
747    only on the exact configuration and version where they were built; on
748    others, invocation tends to fail with a message like:
749
750 Can't find shared library "libc.so.2.1"
751
752 4.2. The C-Kermit Initialization File
753
754    [ [139]Top ] [ [140]Contents ] [ [141]Section Contents ] [ [142]Next ]
755    [ [143]Previous ]
756
757    (This section is obsolete.) Read [144]Section 5 about the
758    initialization file.
759
760 4.3. The 2.x BSD Makefile
761
762    [ [145]Top ] [ [146]Contents ] [ [147]Section Contents ] [ [148]Next ]
763    [ [149]Previous ]
764
765      This section is obsolete. C-Kermit 6.0 was the last release that
766      could be built on PDP-11 based BSD versions.
767
768 4.4. The Plan 9 Makefile
769
770    [ [150]Top ] [ [151]Contents ] [ [152]Section Contents ] [ [153]Next ]
771    [ [154]Previous ]
772
773    Use the separate makefile [155]ckpker.mk. NOTE: The Plan 9 version of
774    C-Kermit 8.0 has not yet been built. There should be no impediment to
775    building it. However, even when built successfully, certain key
776    features are missing, notably TCP/IP networking.
777
778 4.5. Makefile Failures
779
780    [ [156]Top ] [ [157]Contents ] [ [158]Section Contents ] [
781    [159]Previous ]
782
783    First, be sure the source files are stored on your current disk and
784    directory with the right names (in lowercase). Second, make sure that
785    the makefile itself does not contain any lines with leading spaces:
786    indented lines must all start with horizontal TAB, and no spaces.
787
788    Then make sure that your Unix PATH is defined to find the appropriate
789    compiler for your makefile target. For example, on SunOS systems, "make
790    sunos41" builds C-Kermit for the BSD environment, and assumes that
791    /usr/ucb/cc will be used for compilation and linking. If your PATH has
792    /usr/5bin ahead of /usr/ucb, you can have problems at compile or link
793    time (a commonly reported symptom is the inability to find "ftime"
794    during linking). Fix such problems by redefining your Unix PATH, or by
795    specifying the appropriate "cc" in CC= and CC2= statements in your
796    makefile target.
797
798    During edits 166-167, considerable effort went into making C-Kermit
799    compilable by ANSI C compilers. This includes prototyping all of
800    C-Kermit's functions, and including the ANSI-defined system header
801    files for system and library functions, as defined in K&R, second
802    edition: <string.h>, <stdlib.h>, <unistd.h> (except in NeXTSTEP this is
803    <libc.h>), and <sys/stdtypes.h>. If you get warnings about any of these
804    header files not being found, or about argument mismatches involving
805    pid_t, uid_t, or gid_t, look in ckcdeb.h and make amendments. C-Kermit
806    assumes it is being compiled by an ANSI-compliant C compiler if
807    __STDC__ is defined, normally defined by the compiler itself. You can
808    force ANSI compilation without defining __STDC__ (which some compilers
809    won't let you define) by including -DCK_ANSIC on the cc command line.
810
811    On the other hand, if your compiler defines __STDC__ but still
812    complains about the syntax of Kermit's function prototypes, you can
813    disable the ANSI-style function prototyping by including -DNOANSI on
814    the command line.
815
816    For SCO OpenServer, UNIX, ODT, and XENIX compilations, be sure to pick
817    the most appropriate [160]makefile target, and be sure you have
818    installed an SCO development system that is keyed to your exact SCO
819    operating system release, down to the minor version (like 2.3.1).
820
821    Also note that SCO distributes some of its libraries in encrypted form,
822    and they must be decrypted before C-Kermit can be linked with them. If
823    not, you might see a message like:
824
825 ld: file /usr/lib/libsocket.a is of unknown type: magic number = 6365
826
827    To decrypt, you must supply a key (password) that came with your
828    license. Call SCO for further info.
829
830    If your compiler uses something other than int for the pid (process id)
831    data type, put -DPID_T=pid_t or whatever in your CFLAGS.
832
833    If you get complaints about unknown data types uid_t and gid_t, put
834    -DUID_T=xxx -DGID_T=yyy in your CFLAGS, where xxx and yyy are the
835    appropriate types.
836
837    If your compilation fails because of conflicting or duplicate
838    declarations for sys_errlist, add -DUSE_STRERROR or -DNDSYSERRLIST to
839    CFLAGS.
840
841    If your compilation dies because getpwnam() is being redeclared (or
842    because of "conflicting types for getwpnam"), add -DNDGPWNAM to your
843    CFLAGS. If that doesn't work, then add -DDCGPWNAM to your CFLAGS (see
844    ckufio.c around line 440).
845
846    If the compiler complains about the declaration of getpwnam() during an
847    ANSI C compilation, remove the declaration from ckufio.c or change the
848    argument in the prototype from (char *) to (const char *).
849
850    If you get complaints that getpwuid() is being called with an improper
851    type, put -DPWID_T=xx in your CFLAGS.
852
853    If you get compile-time warnings that t_brkc or t_eofc (tchars
854    structure members, used in BSD-based versions) are undefined, or
855    structure-member- related warnings that might be traced to this fact,
856    add -DNOBRKC to CFLAGS.
857
858    If you get a linker message to the effect that _setreuid or _setregid
859    is not defined, add -DNOSETREU to CFLAGS, or add -DCKTYP_H=blah to
860    CFLAGS to make C-Kermit read the right <types.h>-kind-of-file to pick
861    up these definitions.
862
863    If you get a message that _popen is undefined, add -DNOPOPEN to CFLAGS.
864
865    If you get a complaint at compile time about an illegal pointer-integer
866    combination in ckufio.c involving popen(), or at link time that _popen
867    is an undefined symbol, add the declaration "FILE *popen();" to the
868    function zxcmd() in ckufio.c (this declaration is supposed to be in
869    <stdio.h>). If making this change does not help, then apparently your
870    Unix does not have the popen() function, so you should add -DNOPOPEN to
871    your make entry, in which case certain functions involving "file" i/o
872    to the standard input and output of subprocesses will not be available.
873
874    If your linker complains that _getcwd is undefined, you can add a
875    getcwd() function to ckufio.c, or add it to your libc.a library using
876    ar:
877
878 #include <stdio.h>
879
880 char *
881 getcwd(buf,size) char *buf; int size; {
882 #ifndef NOPOPEN
883 #ifdef DCLPOPEN
884     FILE *popen();
885 #endif
886     FILE *pfp;
887
888     if (!buf) return(NULL);
889     if (!(pfp = popen("pwd","r"))) return(NULL);
890     fgets(buf,size-2,pfp);
891     pclose(pfp);
892     buf[strlen(buf)-1] = '\0';
893     return((char *)buf);
894 #else
895     buf[0] = '\0';
896     return(NULL);
897 #endif /* NOPOPEN */
898 }
899
900 #ifdef NOPOPEN
901 FILE *popen(s,t) char *s,*t; {
902     return(NULL);
903 }
904 #endif /* NOPOPEN */
905
906    If you get complaints about NPROC having an invalid value, add a valid
907    definition for it (depends on your system), as in the cray entry.
908
909    If you get some symbol that's multiply defined, it probably means that
910    a variable name used by Kermit is also used in one of your system
911    libraries that Kermit is linked with. For example, under PC/IX some
912    library has a variable or function called "data", and the variable
913    "data" is also used extensively by Kermit. Rather than edit the Kermit
914    source files, just put a -D in the make entry CFLAGS to change the
915    Kermit symbol at compile time. In this example, it might be
916    -Ddata=xdata.
917
918    Some symbol is defined in your system's header files, but it produces
919    conflicts with, or undesired results from, Kermit. Try undefining the
920    symbol in the makefile target's CFLAGS, for example -UFIONREAD.
921
922    Some well-known symbol is missing from your system header files. Try
923    defining in the makefile target's CFLAGS, for example -DFREAD=1.
924
925    You get many warnings about pointer mismatches. This probably means
926    that Kermit is assuming an int type for signal() when it should be
927    void, or vice-versa. Try adding -DSIG_I (for integer signal()) or
928    -DSIG_V (for void) to CFLAGS. Or just include KFLAGS=-DSIG_V (or
929    whatever) in your "make" command, for example:
930
931 make bsd KFLAGS=-DSIG_V
932
933    You get many messages about variables that are declared and/or set but
934    never used. It is difficult to avoid these because of all the
935    conditional compilation in the program. Ignore these messages.
936
937    Some of C-Kermit's modules are so large, or contain so many character
938    string constants, or are so offensive in some other way, that some C
939    compilers give up and refuse to compile them. This is usually because
940    the -O (optimize) option is included in the make entry. If this happens
941    to you, you can (a) remove the -O option from the make entry, which
942    will turn off the optimizer for ALL modules; or (b) compile the
943    offending module(s) by hand, including all the switches from make entry
944    except for -O, and then give the appropriate "make" command again; or
945    (c) increase the value of the -Olimit option, if your compiler supports
946    this option; or (d) change the [161]makefile target to first compile
947    each offending module explicitly without optimization, then compile the
948    others normally (with optimization), for example:
949
950 #Fortune 32:16, For:Pro 2.1 (mostly like 4.1bsd)
951 ft21:
952         @echo 'Making C-Kermit $(CKVER) for Fortune 32:16 For:Pro 2.1...'
953         $(MAKE) ckuusx.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
954         -SYM 800 \ -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short"
955         $(MAKE) ckuxla.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
956         -SYM 800 \ -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short"
957         $(MAKE) ckudia.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
958         -SYM 800 \ -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short"
959         $(MAKE) wermit "CFLAGS= -O -DNODEBUG -DBSD4 -DFT21 -DNOFILEH -SYM 800 \
960         -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short" \
961         "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
962
963    As an extreme example, some compilers (e.g. gcc on the DG AViiON) have
964    been known to dump core when trying to compile ckwart.c with
965    optimization. So just do this one "by hand":
966
967 cc -o wart ckwart.c
968
969    or:
970
971 touch ckcpro.c
972
973    and then give the "make" command again.
974
975    Speaking of wart, it is unavoidable that some picky compilers might
976    generate "statement unreachable" messages when compiling ckcpro.c.
977    Unreachable statements can be generated by the wart program, which
978    generates ckcpro.c automatically from [162]ckcpro.w, which translates
979    lex-like state/input constructions into a big switch/case construction.
980
981    Some function in Kermit wreaks havoc when it is called. Change all
982    invocations of the function into a macro that evaluates to the
983    appropriate return code that would have been returned by the function
984    had it been called and failed, for example: -Dzkself()=0. Obviously not
985    a good idea if the function is really needed.
986
987    If you have just installed SunOS 4.1.2 or 4.1.3, you might find that
988    C-Kermit (and any other C program) fails to link because of unresolved
989    references from within libc. This is because of a mistake in Sun's
990    /usr/lib/shlib.etc files for building the new libc. Change the libc
991    Makefile so that the "ld" lines have "-ldl" at the end. Change the
992    README file to say "mv xccs.multibyte. xccs.multibyte.o" and follow
993    that instruction.
994
995 5. INSTALLING THE KERMIT FILES
996
997    [ [163]Top ] [ [164]Contents ] [ [165]Next ] [ [166]Previous ]
998
999    SECTION CONTENTS
1000
1001 5.1. [167]The C-Kermit Initialization File
1002 5.2. [168]Text Files
1003 5.3. [169]Installing the Kermit Files
1004 5.4. [170]The Makefile Install Target
1005
1006    The C-Kermit executable does not need any external files to run.
1007    Unlike, say, the cu program, which on most platforms is useless unless
1008    you (as root) edit the /usr/spool/uucp/Systems and
1009    /usr/spool/uucp/Devices files to supply whatever obscure and
1010    undocumented syntax is required to match some supposedly user-friendly
1011    mnemonic to the real pathname of whatever device you want to use,
1012    Kermit runs on its own without needing any external configuration
1013    files, and lets you refer to device (and network hosts and services) by
1014    their own natural undisguised names.
1015
1016    Nevertheless, a number of external files can be installed along with
1017    the C-Kermit executable if you wish. These include configuration and
1018    customization files that are read by Kermit as well as documentation
1019    files to be read by people. All of this material is (a) optional, and
1020    (b) available on the Kermit website:
1021
1022 [171]http://www.columbia.edu/kermit/
1023
1024    and usually in a more pleasant form, perhaps also with updated content.
1025    So if your computer is on the Internet, there is no need to install
1026    anything but the Kermit executable if users know how to find the Kermit
1027    website (and if they don't, Kermit's "help" command tells them).
1028
1029 5.1. The C-Kermit Initialization File
1030
1031    In C-Kermit 7.0 and earlier, the standard initialization file was a key
1032    C-Kermit component because:
1033
1034     a. It "loaded" the dialing and network directories.
1035     b. It defined all the macros and variables for the services directory.
1036     c. It defined macros for quickly changing Kermit's file-transfer
1037        performance tuning.
1038
1039    The standard initialization file is quite long (more than 600 lines)
1040    and requires noticeable processing time (the slower the computer, the
1041    more noticeable), yet few people actually use the services directory,
1042    whose definition takes up most of its bulk. Meanwhile, in C-Kermit 8.0,
1043    many of the remaining functions of the standard initialization file are
1044    now built in; for example, the FAST, CAUTIOUS, and ROBUST commands.
1045
1046    More to the point, many of the settings that could be made only in the
1047    initialization and customization files can now be picked up from
1048    environment variables. The first group identifies initialization and
1049    directory files:
1050
1051    CKERMIT_INI
1052           The path of your Kermit initialization file, if any. This
1053           overrides the built-in search for $HOME/.kermrc.
1054
1055    K_CHARSET
1056           The character set used for encoding local text files. Equivalent
1057           to SET FILE CHARACTER-SET.
1058
1059    K_DIAL_DIRECTORY
1060           The full pathname of one or more Kermit dialing directory files.
1061           Equivalent to SET DIAL DIRECTORY.
1062
1063    K_NET_DIRECTORY
1064           The full pathname of one or more Kermit network directory files.
1065           Equivalent to SET NETWORK DIRECTORY.
1066
1067    K_INFO_DIRECTORY
1068    K_INFO_DIR
1069           The full pathname of a directory containing Kermit (if any)
1070           containing ckubwr.txt and other Kermit text files. Overrides
1071           Kermit's built-in search for this directory.
1072
1073    The next group is related to dialing modems:
1074
1075    K_COUNTRYCODE
1076           The telephonic numeric country code for this location, e.g. 1
1077           for North America or 39 for Italy. It is recommended that this
1078           one be set for all users, system-wide. Not only is it used to
1079           process portable-format dialing directory entries, but it is
1080           also compared against Kermit's built-in list of "tone countries"
1081           to see if tone dialing can be used. Equivalent to Kermit's SET
1082           DIAL COUNTRY-CODE command.
1083
1084    K_AREACODE
1085           The telephonic numeric area code for this location, e.g. 212 for
1086           Manhattan, New York, USA. Recommend this one also be set
1087           system-wide, so shared portable-format dialing directories will
1088           work automatically for everybody. Equivalent to Kermit's SET
1089           DIAL AREA-CODE command.
1090
1091    K_DIAL_METHOD
1092           TONE or PULSE. Equivalent to Kermit's SET DIAL METHOD command.
1093           If a dial method is not set explicitly (or implicitly from the
1094           country code), Kermit does not specify a dialing method, and
1095           uses the modem's default method, which tends to be pulse.
1096
1097    K_INTL_PREFIX
1098           The telephonic numeric international dialing prefix for this
1099           location. Equivalent to Kermit's SET DIAL INTL-PREFIX command.
1100
1101    K_LD_PREFIX
1102           The telephonic numeric long-distance dialing prefix for this
1103           location. Equivalent to Kermit's SET DIAL LD-PREFIX command.
1104
1105    K_PBX_ICP
1106           The telephonic numeric PBX internal call prefix for this
1107           location. Equivalent to Kermit's SET DIAL PBX-INSIDE-PREFIX
1108           command.
1109
1110    K_PBX_OCP
1111           The telephonic numeric PBX external call prefix for this
1112           location. Equivalent to Kermit's SET DIAL PBX-OUTSIDE-PREFIX
1113           command.
1114
1115    K_PBX_XCH
1116           The telephonic numeric PBX exchange (first part of the
1117           subscriber number). Equivalent to Kermit's SET DIAL PBX-EXCHANGE
1118           command.
1119
1120    K_TF_AREACODE
1121           A list of one or more telephonic numeric toll-free area codes.
1122
1123    K_TF_PREFIX
1124           The telephonic numeric toll-free dialing prefix, in case it is
1125           different from the long-distance prefix. Equivalent to Kermit's
1126           SET DIAL TF-PREFIX command.
1127
1128    The final group includes well-known environment variables that are also
1129    used by Kermit:
1130
1131    CDPATH
1132           Where the CD command should look for relative directory names.
1133
1134    SHELL
1135           The path of your Unix shell. Used by the RUN (!) command to
1136           choose the shell to execute its arguments.
1137
1138    USER
1139           Your Unix username.
1140
1141    EDITOR
1142           The name or path of your preferred editor (used by the EDIT
1143           command). Equivalent to SET EDITOR.
1144
1145    BROWSER
1146           The name or path of your preferred web browser (used by the
1147           BROWSE command). Equivalent to Kermit's SET BROWSER command.
1148
1149    Does this mean the initialization file can be abolished? I think so.
1150    Here's why:
1151
1152      * Kermit already does everything most people want it to do without
1153        one.
1154      * Important site-specific customizations can be done with global
1155        environment variables.
1156      * There is no longer any need for everybody to have to use the
1157        standard initialization file.
1158      * This means that your initialization file, if you want one, can
1159        contain your own personal settings, definitions, and preferences,
1160        rather than 600 lines of "standard" setups.
1161      * If you still want the services directory, you can either TAKE the
1162        standard initialization file (which must be named anything other
1163        than $HOME/.kermrc to avoid being executed automatically every time
1164        you start Kermit), or you can make it a kerbang script and execute
1165        it "directly" (the [172]makefile install target does this for you
1166        by putting ckermit.ini in the same directory as the Kermit binary,
1167        adding the appropriate Kerbang line to the top, and giving it
1168        execute permission).
1169
1170    In fact, you can put any number of kerbang scripts in your PATH to
1171    start up C-Kermit in different ways, to have it adopt certain settings,
1172    make particular connections, execute complicated scripts, whatever you
1173    want.
1174
1175 5.2. Text Files
1176
1177    These are entirely optional. Many of them are to be found at the Kermit
1178    website in HTML form (i.e. as Web pages with clickable links, etc), and
1179    very likely also more up to date. Plain-text files that correspond to
1180    Web pages were simply "dumped" by Lynx from the website to plain ASCII
1181    text. The format is whatever Lynx uses for this purpose. If you wish,
1182    you can install them on your computer as described in the [173]next
1183    section.
1184
1185    [174]COPYING.TXT
1186           Copyright notice, permissions, and disclaimer.
1187
1188    [175]ckermit.ini
1189           The standard initialization file, intended more for reference
1190           (in most cases) than actual use; see [176]Section 5.1.
1191
1192    [177]ckermod.ini
1193           A sample customization file.
1194
1195    [178]ckermit70.txt
1196           Supplement to [179]Using C-Kermit for version 7.0. Available on
1197           the Kermit website as:
1198           [180]http://www.columbia.edu/kermit/ckermit70.html
1199
1200    [181]ckermit80.txt
1201           Supplement to [182]Using C-Kermit for version 8.0. Available on
1202           the Kermit website as:
1203           [183]http://www.columbia.edu/kermit/ckermit80.html
1204
1205    [184]ckcbwr.txt
1206           The general C-Kermit hints and tips ("beware") file. Available
1207           on the Kermit website as:
1208           [185]http://www.columbia.edu/kermit/ckcbwr.html
1209
1210    [186]ckubwr.txt
1211           The Unix-specific C-Kermit hints and tips file. Available on the
1212           Kermit website as:
1213           [187]http://www.columbia.edu/kermit/ckubwr.html
1214
1215    [188]ckuins.txt
1216           Unix C-Kermit Installation Instructions (this file). Available
1217           on the Kermit website as:
1218           [189]http://www.columbia.edu/kermit/ckuins.html
1219
1220    [190]ckccfg.txt
1221           C-Kermit compile-time configuration options. Available on the
1222           Kermit website as:
1223           [191]http://www.columbia.edu/kermit/ckccfg.html
1224
1225    [192]ckcplm.txt
1226           The C-Kermit program logic manual. Available on the Kermit
1227           website as:
1228           [193]http://www.columbia.edu/kermit/ckcplm.html
1229
1230    [194]ca_certs.pem
1231           Certificate Authority certificates for secure connections (see
1232           [195]Section 16).
1233
1234 5.3. Installing the Kermit Files
1235
1236    There is an "install" target in the [196]makefile that you can use if
1237    you wish. However, since every site has its own layout and
1238    requirements, it is often better to install the Kermit files by hand.
1239    You don't have to use the makefile install target to install C-Kermit.
1240    This is especially true since not all sites build C-Kermit from source,
1241    and therefore might not even have the makefile. But you should read
1242    this section in any case.
1243
1244      If your computer already has an older version of C-Kermit installed,
1245      you should rename it (e.g. to "kermit6" or "kermit7") so in case you
1246      have any trouble with the new version, the old one is still
1247      available.
1248
1249    In most cases, you need to be root to install C-Kermit, if only to gain
1250    write accesss to directories in which the binary and manual page are to
1251    be copied. The C-Kermit binary should be installed in a directory that
1252    is in the users' PATH, but that is not likely to be overwritten when
1253    you install a new version of the operating system. A good candidate
1254    would be the /usr/local/bin/ directory, but the specific choice is site
1255    dependent. Example (assuming the appropriate Kermit binary is stored in
1256    your current directory as "wermit", e.g. because you just built it from
1257    source and that's the name the makefile gave it):
1258
1259 mv wermit /usr/local/bin/kermit
1260 chmod 755 /usr/local/bin/kermit
1261
1262    or (only after you finish reading this section!) simply:
1263
1264 make install
1265
1266    IMPORTANT: IF C-KERMIT IS TO BE USED FOR DIALING OUT, you must also do
1267    something to give it accesss to the dialout devices and lockfile
1268    directories. The 'install' target does not attempt to set Kermit's
1269    owner, group, and permissions to allow dialing out. This requires
1270    privileges, open eyes, and human decision-making. Please read
1271    [197]Sections 10 and [198]11 below, make the necessary decisions, and
1272    then implement them by hand as described in those sections.
1273
1274    You should also install the man page, which is called ckuker.nr, in the
1275    man page directory for local commands, such as /usr/man/man1/, renamed
1276    appropriately, e.g. to kermit.1. This is also taken care of by "make
1277    install".
1278
1279    Optionally, the text files listed in the [199]previous section can be
1280    placed in a publicly readable directory. Suggested directory names are:
1281
1282 /usr/local/doc/kermit/
1283 /usr/local/lib/kermit/
1284 /usr/share/lib/kermit/
1285 /opt/kermit/doc/
1286
1287    (or any of these without the "/kermit"). Upon startup, C-Kermit checks
1288    the following environment variables whose purpose is to specify the
1289    directory where the C-Kermit text files are, in the following order:
1290
1291 K_INFO_DIRECTORY
1292 K_INFO_DIR
1293
1294    If either of these is defined, C-Kermit checks for the existence of the
1295    ckubwr.txt file (Unix C-Kermit Hints and Tips). If not found, it checks
1296    the directories listed above (both with and without the "/kermit") plus
1297    several others to see if they contain the ckubwr.txt file. If found,
1298    various C-Kermit messages can refer the user to this directory.
1299
1300    Finally, if you want to put the source code files somewhere for people
1301    to look at, you can do that too.
1302
1303 5.4. The Makefile Install Target
1304
1305    The makefile "install" target does almost everything for you if you
1306    give it the information it needs by setting the variables described
1307    below. You can use this target if:
1308
1309      * You downloaded the [200]complete C-Kermit archive and built
1310        C-Kermit from source; or:
1311      * You downloaded an [201]individual C-Kermit binary and the
1312        [202]C-Kermit text-file archive, and your computer has a "make"
1313        command.
1314
1315    Here are the parameters you need to know:
1316
1317    BINARY
1318           Name of the binary you want to install as "kermit". Default:
1319           "wermit".
1320
1321    prefix
1322           (lower case) If you define this variable, its value is prepended
1323           to all the following xxxDIR variables (8.0.211 and later).
1324
1325    DESTDIR
1326           If you want to install the Kermit files in a directory structure
1327           like /opt/kermit/bin/, /opt/kermit/doc/, /opt/kermit/src/, then
1328           define DESTIR as the root of this structure; for example,
1329           /opt/kermit. The DESTDIR string should not end with a slash. By
1330           default, DESTDIR is not defined. If it is defined, but the
1331           directory does not exist, the makefile attempts to create it,
1332           which might require you to be root. Even so, this can fail if
1333           any segments in the path except the last one do not already
1334           exist. WARNING: If the makefile creates any directories, it
1335           gives them a mode of 755, and the default owner and group.
1336           Modify these by hand if necessary.
1337
1338    BINDIR
1339           Directory in which to install the Kermit binary (and the
1340           standard C-Kermit initialization file, if it is found, as a
1341           Kerbang script). If DESTDIR is defined, BINDIR must start with a
1342           slash. BINDIR must not end with a slash. If DESTDIR is defined,
1343           BINDIR is a subdirectory of DESTDIR. If BINDIR does not exist,
1344           the makefile attempts to create it as with DESTDIR. Default:
1345           /usr/local/bin.
1346
1347    MANDIR
1348           Directory in which to install the C-Kermit manual page as
1349           "kermit" followed by the manual-chapter extension (next item).
1350           Default: /usr/man/man1. If MANDIR is defined, the directory must
1351           already exist.
1352
1353    MANEXT
1354           Extension for the manual page. Default: 1 (digit one).
1355
1356    SRCDIR
1357           Directory in which to install the C-Kermit source code. If
1358           DESTDIR is defined, this is a subdirectory of DESTDIR. Default:
1359           None.
1360
1361    CERTDIR
1362           For secure builds only: Directory in which to install the
1363           ca_certs.pem file. This must be the verification directory used
1364           by programs that use the SSL libraries at your site. Default:
1365           none. Possibilities include: /usr/local/ssl, /opt/ssl,
1366           /usr/lib/ssl, . . .     If CERTDIR is defined, the directory
1367           must already exist.
1368
1369    INFODIR
1370           Directory in which to install the C-Kermit text files. If
1371           DESTDIR is defined, this is a subdirectory of DESTDIR. Default:
1372           None. If INFODIR is defined but does not exist, the makefile
1373           attempts to create it, as with DESTDIR.
1374
1375    Examples:
1376
1377    make install
1378           Installs "wermit" as /usr/local/bin/kermit with permissions 755,
1379           the default owner and group, and no special privileges. The
1380           manual page is installed as /usr/man/man1/kermit.1. Text files
1381           are not copied anywhere, nor are the sources.
1382
1383    make MANDIR= install
1384           Just like "make install" but does not attempt to install the
1385           manual page.
1386
1387    make DESTDIR=/opt/kermit BINDIR=/bin SRCDIR=/src INFODIR=/doc install
1388           Installs the Kermit binary "wermit" as /opt/kermit/bin/kermit,
1389           puts the source code in /opt/kermit/src, and puts the text files
1390           in /opt/kermit/doc, creating the directories if they don't
1391           already exist, and puts the man page in the default location.
1392
1393    make BINDIR=/usr/local/bin CERTDIR=/usr/local/ssl install
1394           Installs the Kerberized Kermit binary "wermit" as
1395           /usr/local/bin/kermit, puts the CA Certificates file in
1396           /usr/local/ssl/, and the man page in the normal place.
1397
1398    For definitive information, see the makefile. The following is
1399    excerpted from the 8.0.211 makefile:
1400
1401 # The following symbols are used to specify library and header file locations
1402 # Redefine them to the values used on your system by:
1403 # . editing this file
1404 # . defining the values on the command line
1405 # . defining the values in the environment and use the -e option
1406 #
1407 prefix  = /usr/local
1408 srproot = $(prefix)
1409 sslroot = $(prefix)
1410 manroot = $(prefix)
1411
1412 K4LIB=-L/usr/kerberos/lib
1413 K4INC=-I/usr/kerberos/include
1414 K5LIB=-L/usr/kerberos/lib
1415 K5INC=-I/usr/kerberos/include
1416 SRPLIB=-L$(srproot)/lib
1417 SRPINC=-I$(srproot)/include
1418 SSLLIB=-L$(sslroot)/ssl/lib
1419 SSLINC=-I$(sslroot)/ssl/include
1420 ...
1421 WERMIT = makewhat
1422 BINARY = wermit
1423 DESTDIR =
1424 BINDIR = $(prefix)/bin
1425 MANDIR = $(manroot)/man/man1
1426 MANEXT = 1
1427 SRCDIR =
1428 INFODIR =
1429 CERTDIR =
1430
1431 6. INSTALLING UNIX C-KERMIT FROM DOS-FORMAT DISKETTES
1432
1433    [ [203]Top ] [ [204]Contents ] [ [205]Next ] [ [206]Previous ]
1434
1435      This section is obsolete. We don't distribute C-Kermit on diskettes
1436      any more because (a)there is no demand, and (b) it no longer fits.
1437
1438    If you received a DOS-format diskette containing a binary executable
1439    C-Kermit program plus supporting text files, be sure to chmod +x the
1440    executable before attempting to run it.
1441
1442    In version 5A(190) and later, all the text files on the C-Kermit
1443    DOS-format diskettes are in Unix format: LF at the end of each line
1444    rather than CRLF. This means that no conversions are necessary when
1445    copying to your Unix file system, and that all the files on the
1446    diskette, text and binary, can be copied together. The following
1447    comments apply to the DOS-format diskettes furnished with version
1448    5A(189) and earlier or to other DOS-format diskettes you might have
1449    obtained from other sources.
1450
1451    If you have received C-Kermit on MS-DOS format diskettes (such as those
1452    distributed by Columbia University), you should make sure that your
1453    DOS-to-Unix conversion utility (such as "dosread") both: (1) changes
1454    line terminators in all files from carriage-return linefeed (CRLF) to
1455    just linefeed (LF) (such as "dosread -a") and remove any Ctrl-Z's, and
1456    (2) that all filenames are converted from uppercase to lowercase. If
1457    these conversions were not done, you can use the following shell script
1458    on your Unix system to do them:
1459
1460 ---(cut here)---
1461 #!/bin/sh
1462 #
1463 # Shell script to convert C-Kermit DOS-format files into Unix format.
1464 # Lowercases the filenames, strips out carriage returns and Ctrl-Z's.
1465 #
1466 x=$1 # the name of the source directory
1467 y=$2 # the name of the target directory if [ $# -lt 2 ]; then
1468   echo "usage: $0 source-directory target-directory"
1469   exit 1
1470 fi
1471 if cd $1 ; then
1472   echo "Converting files from $1 to $2"
1473 else
1474   echo "$0: cannot cd to $1"
1475   exit 1
1476 fi
1477 for i in *; do
1478   j=`echo $i | tr 'A-Z' 'a-z'`
1479   echo $x/$i =\> $y/$j
1480   tr -d '\015\032' < $i > $y/$j
1481 done
1482 ---(cut here)---
1483
1484    Cut out this shell script, save it as "convert.sh" (or any other name
1485    you prefer), then "chmod +x convert.sh". Then, create a new, empty
1486    directory to put the converted files in, and then "convert.sh /xxx
1487    /yyy" where /xxx is the name of the directory where the PC-format files
1488    are, and /yyy is the name of the new, empty directory. The converted
1489    files will appear in the new directory.
1490
1491 7. CHECKING THE RESULTS
1492
1493    [ [207]Top ] [ [208]Contents ] [ [209]Next ] [ [210]Previous ]
1494
1495    First some quick checks for problems that can be easily corrected by
1496    recompiling with different options:
1497
1498    DIRECTORY listing is garbage
1499           Permissions, size, and date are random garbage (but the
1500           filenames are correct) in a C-Kermit DIRECTORY listing. On some
1501           platforms, the lstat() function is present but simply doesn't
1502           work; try adding -DNOLSTAT to CFLAGS and rebuild. If that
1503           doesn't fix it, also add -DNOLINKBITS. If it's still not fixed,
1504           remove -DNOLSTAT and -DNOLINKBITS and add -DNOSYMLINK.
1505
1506    curses
1507           When you make a connection with C-Kermit and transfer files
1508           using the fullscreen (curses) file-transfer display, and then
1509           get the C-Kermit> prompt back afterwards, do characters echo
1510           when you type them? If not, the curses library has altered the
1511           buffering of /dev/tty. Try rebuilding with KFLAGS=-DCK_NEWTERM.
1512           If it already has -DCK_NEWTERM in CFLAGS, try removing it. If
1513           that doesn't help, then rebuild with -DNONOSETBUF (yes, two
1514           NO's). If none of this works (and you can't fix the code), then
1515           either don't use the fullscreen display, or rebuild with
1516           -DNOCURSES.
1517
1518    Ctrl-L or any SCREEN command crashes C-Kermit:
1519           Rebuild with -DNOTERMCAP.
1520
1521    No prompt after CONNECT:
1522           After escaping back from CONNECT mode, does your C-Kermit>
1523           prompt disappear? (Yet, typing "?" still produces a command
1524           list, etc) In that case, add -DCKCONINTB4CB to CFLAGS and
1525           rebuild.
1526
1527    Here is a more thorough checklist can use to tell whether your version
1528    of C-Kermit was built correctly for your Unix system, with hints on how
1529    to fix or work around problems:
1530
1531     a. Start C-Kermit (usually by typing "./wermit" in the directory where
1532        you ran the makefile). Do you see the C-Kermit> prompt? If not,
1533        C-Kermit incorrectly deduced that it was running in the background.
1534        The test is in conbgt() in [211]ckutio.c. If you can fix it for
1535        your system, please send in the fix (Hint: read about "PID_T"
1536        below). Otherwise, you can force C-Kermit to foreground mode by
1537        starting it with the -z command line option, as in "kermit -z", or
1538        giving the interactive command SET BACKGROUND OFF.
1539     b. When you type characters at the C-Kermit prompt, do they echo
1540        immediately? If not, something is wrong with concb() and probably
1541        the other terminal mode settings routines in [212]ckutio.c. Be sure
1542        you have used the most appropriate make entry.
1543     c. At the C-Kermit> prompt, type "send ./?". C-Kermit should list all
1544        the files in the current directory. If not, it was built for the
1545        wrong type of Unix file system. Details below. In the meantime, try
1546        SET WILDCARD-EXPANSION SHELL as a workaround.
1547     d. CD to a directory that contains a variety of files, symlinks, and
1548        subdirectories and give a DIRECTORY command at the C-Kermit>
1549        prompt. Do the permissions, size, and date appear correct? If not
1550        see [213]Section 4.0.
1551     e. Assuming your platform supports long file names, create a file with
1552        a long name in your current directory, e.g.:
1553
1554 $ touch thisisafilewithaveryveryveryveryveryveryveryverylooooooooongname
1555
1556        (you might need to make it longer than this, perhaps as long as 257
1557        or even 1025 characters).
1558        Check with ls to see if your version of Unix truncated the name.
1559        Now start C-Kermit and type "send thisis<ESC>". Does Kermit
1560        complete the name, showing the same name as ls did? If not, wrong
1561        filesystem. Read on.
1562     f. Make sure that Kermit has the maximum path length right. Just type
1563        SHOW FILE and see what it says about this. If it is too short,
1564        there could be some problems at runtime. To correct, look in
1565        [214]ckcdeb.h to see how the symbol CKMAXPATH is set and make any
1566        needed adjustments.
1567     g. Send a file to your new Kermit program from a different Kermit
1568        program that is known to work. Is the date/timestamp of the new
1569        file identical to the original? If not, adjustments are needed in
1570        zstrdt() in [215]ckufio.c.
1571     h. Go to another computer (Computer B) from which you can send files
1572        to C-Kermit. Connect Computer B to the computer (A) where you are
1573        testing C-Kermit. Then:
1574     i. Send a file from B to A. Make sure it transferred OK and was
1575        created with the the right name.
1576     j. Send a file from B to A, specifying an "as-name" that is very, very
1577        long (longer than the maximum name length on computer A). Check to
1578        make sure that the file was received OK and that its name was
1579        truncated to Computer A's maximum length. If not, check the
1580        MAXNAMLEN definition in [216]ckufio.c.
1581     k. Tell C-Kermit on Computer A to "set receive pathnames relative" and
1582        then send it a file from Computer B specifying an as-name that
1583        contains several directory segments:
1584
1585 send foo dir1/dir2/dir3/foo
1586
1587        Check to make sure that dir1/dir2/dir3/foo was created in Computer
1588        A's current directory (i.e. that three levels of directories were
1589        created).
1590     l. Repeat step k, but make each path segment in the pathname longer
1591        than Computer A's maximum name length. Make sure each directory
1592        name, and the final filename, were truncated properly.
1593     m. Type Ctrl-C (or whatever your Unix interrupt character is) at the
1594        prompt. Do you get "^C..." and a new prompt? If instead, you get a
1595        core dump (this shouldn't happen any more) "rm core" and then
1596        rebuild with -DNOCCTRAP added to your CFLAGS. If it did work, then
1597        type another Ctrl-C. If this does the same thing as the first one,
1598        then Ctrl-C handling is OK. Otherwise, the SIGINT signal is either
1599        not getting re-armed (shouldn't happen) or is being masked off
1600        after the first time it is caught, in which case, if your Unix is
1601        POSIX-based, try rebuilding C-Kermit with -DCK_POSIX_SIG.
1602     n. Type Ctrl-Z (or whatever your Unix suspend character is) to put
1603        C-Kermit in the background. Did it work? If nothing happened, then
1604        (a)your version of Unix does not support job control, or (b) your
1605        version of C-Kermit was probably built with -DNOJC. If your session
1606        became totally frozen, then you are probably running C-Kermit on a
1607        Unix version that supports job control, but under a shell that
1608        doesn't. If that's not the case, look in the congm() and psuspend()
1609        routines in [217]ckutio.c and see if you can figure out what's
1610        wrong. If you can't, rebuild with -DNOJC.
1611     o. Give a SET LINE command for a dialout device, e.g. "set line
1612        /dev/tty00". If you got some kind of permission or accesss denied
1613        message, go read [218]Section 10 and then come back here.
1614     p. After giving a successful SET LINE command, type "show comm" to see
1615        the communication parameters. Do they make sense?
1616     q. Type "set speed ?" and observe the list of available speeds. Is it
1617        what you expected? If not, see [219]Section 2) of the
1618        [220]Configurations Options document.
1619     r. Give a SET SPEED command to change the device's speed. Did it work?
1620        (Type "show comm" again to check.)
1621     s. Try dialing out: SET MODEM TYPE , SET LINE , SET SPEED , DIAL . If
1622        it doesn't work, keep reading. After dialing, can you REDIAL?
1623     t. If your version was built with TCP/IP network support, try the
1624        TELNET command.
1625     u. Transfer some files in remote mode on incoming asynchronous serial
1626        (direct or modem) connections, and on incoming network (telnet,
1627        rlogin, terminal server) connections. If you get lots of errors,
1628        try different SET FLOW settings on the remote Kermit program.
1629     v. Establish a serial connection from C-Kermit to another computer
1630        (direct or dialed) and transfer some files. If you have network
1631        support, do the same with a network connection.
1632     w. If your version was built with fullscreen file transfer display
1633        support, check that it works during local-mode file transfer. Also,
1634        check C-Kermit's operation afterwards: is the echoing funny? etc
1635        etc. If there are problems, see [221]Section 4.
1636     x. If your version was built with script programming language support,
1637        TAKE the ckedemo.ksc file to give it a workout.
1638     y. Does C-Kermit interlock correctly with UUCP-family programs (cu,
1639        tip, uucp, etc)? If not, read the section [222]DIALING OUT AND
1640        COORDINATING WITH UUCP below.
1641     z. Modem signals... Give a SET LINE command to a serial device and
1642        then type the SHOW MODEM command. If it says "Modem signals
1643        unavailable in this version of Kermit", then you might want to look
1644        at the ttgmdm() routine in [223]ckutio.c and add the needed code --
1645        if indeed your version of Unix provides a way to get modem signals
1646        (some don't; e.g. modem signals are a foreign concept to POSIX,
1647        requiring politically incorrect workarounds).
1648    aa. If it says "Modem signals unavailable", then it is likely that the
1649        API for getting modem signals is provided, but it doesn't actually
1650        do anything (e.g. ioctl(ttyfd,TIOCMGET,&x) returns EINVAL).
1651    ab. In any case, it still should be able to manipulate the DTR signal.
1652        To test, SET LINE , SET MODEM NONE, and HANGUP. The DTR light
1653        should go out momentarily. If it doesn't, see if you can add the
1654        needed code for your system to the tthang() routine in
1655        [224]ckutio.c.
1656    ac. If your version of Kermit has the SET FLOW RTS/CTS command, check
1657        to see if it works: give Kermit this command, set your modem for
1658        RTS/CTS, transfer some files (using big packet and window sizes)
1659        and watch the RTS and CTS lights on the modem. If they go on and
1660        off (and Kermit does not get packet errors), then it works. If your
1661        version of Kermit does not have this command, but your version of
1662        Unix does support hardware flow control, take a look at the
1663        tthflow() command in [225]ckutio.c and see if you can add the
1664        needed code (see the section on [226]HARDWARE FLOW CONTROL below).
1665        (And please [227]send back any added code, so that others can
1666        benefit from it and it can be carried forward into future
1667        releases.)
1668    ad. If C-Kermit starts normally and issues its prompt, echoing is
1669        normal, etc, but then after returning from a CONNECT session, the
1670        prompt no longer appears, try rebuilding with -DCKCONINTB4CB.
1671    ae. (8.0.206 or later) Type some commands at the C-Kermit prompt. Can
1672        you use the Up-arrow and Down-arrow keys on your keyboard to
1673        accesss Kermit's command history? If not, and you're a programmer,
1674        take a look at the USE_ARROWKEYS sections of ckucmd.c.
1675
1676 8. REDUCING THE SIZE OF THE EXECUTABLE PROGRAM IMAGE
1677
1678    [ [228]Top ] [ [229]Contents ] [ [230]Next ] [ [231]Previous ]
1679
1680    Also see: [232]C-Kermit Configuration Options
1681
1682     a. Many of C-Kermit's options and features can be deselected at
1683        compile time. The greatest savings at the least sacrifice in
1684        functionality is to disable the logging of debug information by
1685        defining NODEBUG during compilation. See the [233]Configurations
1686        Options document for further information.
1687     b. Use shared libraries rather than static linking. This is the
1688        default on many Unix systems anyway. However, executables built for
1689        dynamic linking with shared libraries are generally not portable
1690        away from the machine they were built on, so this is recommended if
1691        the binary is for your use only.
1692     c. Most Unix systems have a "strip" command to remove symbol table
1693        information from an executable program image. "man strip" for
1694        further information. The same effect can be achieved by including
1695        "-s" among the link flags when building C-Kermit.
1696     d. SCO, Interactive, and some other Unix versions have an "mcs"
1697        command. "mcs -d wermit" can be used to delete the contents of the
1698        ".comment" section from the executable program image.
1699     e. Many modern optimizers can be instructed to optimize for space
1700        rather than execution efficiency. Check the CFLAGS in the makefile
1701        target, adjust as desired.
1702
1703 9. UNIX VERSIONS
1704
1705    [ [234]Top ] [ [235]Contents ] [ [236]Next ] [ [237]Previous ]
1706
1707    SECTION CONTENTS
1708
1709 9.1 [238]Standards
1710      9.1.1. [239]POSIX
1711      9.1.2. [240]ANSI C
1712      9.1.3. [241]Other Standards
1713 9.2. [242]Library Issues
1714 9.3. [243]Unix File System Peculiarities
1715 9.4. [244]Hardware Flow Control
1716 9.5. [245]Terminal Speeds
1717 9.6. [246]Millisecond Sleeps
1718 9.7. [247]Nondestructive Input Buffer Peeking
1719 9.8. [248]Other System-Dependent Features
1720 9.9. [249]Terminal Interruption
1721
1722    There are several major varieties of Unix: Bell Laboratories Seventh
1723    Edition, AT&T System V, Berkeley Standard Distribution (BSD), and
1724    POSIX. Each has many, many subvarieties and descendents, and there are
1725    also hybrids that exhibit symptoms of two or more varieties, plus
1726    special quirks of their own.
1727
1728    Seventh edition versions of C-Kermit include the compile-time option
1729    -DV7 in the CFLAGS string in the makefile target. Various V7-based
1730    implementations are also supported: -DCOHERENT, -DMINIX, etc.
1731
1732    AT&T-based versions of Unix Kermit include the compile-time option
1733    -DATTSV (standing for AT&mp;T Unix System V). This applies to System
1734    III and to System V up to and including Release 2. For System V Release
1735    3, the flag -DSVR3 should be used instead (which also implies -DATTSV).
1736    This is because the data type of signal() and several other functions
1737    was changed between SVR2 and SVR3. For System V Release 4, include
1738    -DSVR4 because of changes in UUCP lockfile conventions; this also
1739    implies -DSVR3 and -DATTSV.
1740
1741    For BSD, the flag -BSDxx must be included, where xx is the BSD version
1742    number, for example BSD4 (for version 4.2 or later, using only 4.2
1743    features), -DBSD41 (for BSD 4.1 only), -DBSD43 (for 4.3), -DBSD29 (BSD
1744    2.9 for DEC PDP-11s). -DBSD44 is for 4.4BSD, which is the basis of
1745    FreeBSD, NetBSD, OpenBSD, BSDI, and Mac OS X, and which contains many
1746    POSIX features, and has little relation to 4.3BSD and earlier.
1747
1748    For POSIX, include the flag -DPOSIX. POSIX defines a whole new set of
1749    terminal i/o functions that are not found in traditional AT&T or
1750    Berkeley implementations, and also defines the symbol _POSIX_SOURCE,
1751    which is used in many system and library header files, mainly to
1752    disable non-POSIX (i.e. useful) features.
1753
1754    Note (circa 1997): In order to enable serial speeds higher than 38400
1755    bps, it is generally necessary to add -DPOSIX (among other things),
1756    since the older terminal APIs can not accommodate the new speeds -- out
1757    o' bits. But this often also means wholesale conversion to POSIX APIs.
1758    In general, just try adding -DPOSIX and then see what goes wrong. Be
1759    wary of features disappearing: when _POSIX_SOURCE is defined, all sorts
1760    of things that were perfectly OK before suddenly become politically
1761    incorrect -- like reading modem signals, doing hardware flow control,
1762    etc. POSIX was evidently not designed with serial communication in
1763    mind!
1764
1765    Case in point: In UnixWare 7.0, #define'ing POSIX causes strictness
1766    clauses in the header files to take effect. These prevent <sys/time.h>
1767    from defining the timeval and timezone structs, which are needed for
1768    all sorts of things (like select()). Thus, if we want the high serial
1769    speeds, we have to circumvent the POSIX clauses.
1770
1771    Similarly in SCO OpenServer R5.0.4 where, again, we must use the POSIX
1772    APIs to get at serial speeds higher than 38400, but then doing so
1773    removes hardware flow control -- just when we need it most! In cases
1774    like this, dirty tricks are the only recourse (search for SCO_OSR504 in
1775    [250]ckutio.c for examples).
1776
1777    For reasons like this, Unix implementations tend to be neither pure
1778    AT&T nor pure BSD nor pure POSIX, but a mixture of two or more of
1779    these, with "compatibility features" allowing different varieties of
1780    programs to be built on the same computer. In general, Kermit tries not
1781    to mix and match but to keep a consistent repertoire throughout.
1782    However, there are certain Unix implementations that only work when you
1783    mix and match. For example, the Silicon Graphics IRIX operating system
1784    (prior to version 3.3) is an AT&T Unix but with a BSD file system. The
1785    only way you can build Kermit successfully for this configuration is to
1786    include -DSVR3 plus the special option -DLONGFN, meaning "pretend I was
1787    built with -DBSDxx when it's time to compile file-related code". See
1788    the "iris" makefile target.
1789
1790 9.1. Standards
1791
1792    [ [251]Top ] [ [252]Section Contents ] [ [253]Contents ] [ [254]Next ]
1793
1794    SUBSECTION CONTENTS
1795
1796 9.1.1. [255]POSIX
1797 9.1.2. [256]ANSI C
1798 9.1.3. [257]Other Standards
1799
1800    In edits 166-167 (1988-89), C-Kermit was heavily modified to try to
1801    keep abreast of new standards while still remaining compatible with old
1802    versions of C and Unix. There are two new standards of interest: ANSI C
1803    (as described in Kernighan and Ritchie, "The C Programming Language",
1804    Second Edition, Prentice Hall, 1988) and POSIX.1 (IEEE Standard 1003.1
1805    and ISO/IEC 9945-1, 1990, "Portable Operating System Interface"). These
1806    two standards have nothing to do with each other: you can build
1807    C-Kermit with a non-ANSI compiler for a POSIX system, or for a
1808    non-POSIX system with with an ANSI compiler.
1809
1810 9.1.1. POSIX
1811
1812    POSIX.1 defines a repertoire of system functions and header files for
1813    use by C language programs. Most notably, the ioctl() function is not
1814    allowed in POSIX; all ioctl() functions have been replaced by
1815    device-specific functions like tcsetattr(), tcsendbreak(), etc.
1816
1817    Computer systems that claim some degree of POSIX compliance have made
1818    some attempt to put their header files in the right places and give
1819    them the right names, and to provide system library functions with the
1820    right names and calling conventions. Within the header files,
1821    POSIX-compliant functions are supposed to be within #ifdef
1822    _POSIX_SOURCE..#endif conditionals, and non-POSIX items are not within
1823    these conditionals.
1824
1825    If Kermit is built with neither -D_POSIX_SOURCE nor -DPOSIX, the
1826    functions and header files of the selected version of Unix (or VMS,
1827    etc) are used according to the CFLAGS Kermit was built with.
1828
1829    If Kermit is built with -D_POSIX_SOURCE but not -DPOSIX, then one of
1830    the -DBSD or -DATTSV flags (or one that implies them) must also be
1831    defined, but it still uses only the POSIX features in the system header
1832    files. This allows C-Kermit to be built on BSD or AT&T systems that
1833    have some degree of POSIX compliance, but still use BSD or AT&T
1834    specific features.
1835
1836    The dilimma is this: it is often necessary to define _POSIX_SOURCE to
1837    get at new or modern features, such as high serial speeds and the APIs
1838    to deal with them. But defining _POSIX_SOURCE also hides other APIs
1839    that Kermit needs, for example the ones dealing with modem signals
1840    (others are listed just below). Thus all sorts of hideous contortions
1841    are often required to get a full set of features.
1842
1843    The POSIX standard does not define anything about uucp lockfiles. "make
1844    posix" uses NO (repeat, NO) lockfile conventions. If your
1845    POSIX-compliant Unix version uses a lockfile convention such as HDBUUCP
1846    (see below), use the "posix" entry, but include the appropriate
1847    lockfile option in your KFLAGS on the "make" command line, for example:
1848
1849 make posix "KFLAGS=-DHDBUUCP"
1850
1851    POSIX.1 also lacks certain other features that Kermit needs. For
1852    example:
1853
1854      * There is no defined way for an application to do wildcard matching
1855        of filenames. Kermit uses the inode in the directory structure, but
1856        POSIX.1 does not include this concept. (Later POSIX revisions
1857        include functions named (I think) glob() and fnmatch(), but these
1858        functions are not yet in Kermit, and might not be appropriate in
1859        any case.)
1860      * There is no POSIX mechanism for sensing or controlling modem
1861        signals, nor to enable RTS/CTS or other hardware flow control.
1862      * There is no select() for multiplexing i/o, and therefore no TCP/IP.
1863      * There is no way to check if characters are waiting in a
1864        communications device (or console) input buffer, short of trying to
1865        read them -- no select(), ioctl(fd,FIONREAD,blah), rdchk(), etc.
1866        This is bad for CONNECT mode and bad for sliding windows.
1867      * No way to do a millisecond sleep (no nap(), usleep(), select(),
1868        etc).
1869      * There is no popen().
1870
1871    So at this point, there cannot be one single fully functional POSIX
1872    form of C-Kermit unless it also has "extensions", as do Linux, QNX,
1873    etc.
1874
1875    More on POSIX (quoting from a newsgroup posting by Dave Butenhof):
1876
1877      Standards tend to look at themselves as "enabling". So POSIX
1878      standards say that, in order to use POSIX functions, a program must
1879      define some macro that will put the development environment in
1880      "POSIX mode". For the ancient POSIX 1003.1-1990, the symbol is
1881      _POSIX_SOURCE. For recent revisions, it's _POSIX_C_SOURCE with an
1882      appropriate value. POSIX 1003.1-1996 says that, to use its features
1883      in a portable manner, you must define _POSIX_C_SOURCE=199506L before
1884      including any header files.
1885
1886      But for Solaris, or Digital Unix, the picture is different. POSIX is
1887      one important but small part of the universe. Yet POSIX
1888      unconditionally and unambiguously REQUIRES that, when
1889      _POSIX_C_SOURCE=199506L, ALL of the functions and definitions
1890      required by the standard, and NO others (except in specific
1891      restricted namespaces, specifically "_" followed by an uppercase
1892      letter or "__" followed by a lowercase letter) shall be visible.
1893      That kinda puts a cramp on BSD and SVID support, because those
1894      require names that are not in the "protected" POSIX namespaces. It's
1895      ILLEGAL to make those symbols visible, unless you've done something
1896      else that's beyond the scope of POSIX to allow the system to infer
1897      that you didn't really mean it.
1898
1899      In most cases, you should just compile, with no standards-related
1900      macros defined. The system will make available every interface and
1901      definition that isn't incompatible with the "main stream". There may
1902      indeed be cases where two standards cross, and you really can't use
1903      both together. But, in general, they play nicely together as long as
1904      you don't do anything rash -- like telling the system that it's not
1905      allowed to let them.
1906
1907      In the area of threads, both Solaris and Digital Unix support
1908      incompatible thread APIs. We have POSIX and DCE, they have POSIX and
1909      UI. The nasty areas are in the _r routines and in some aspects of
1910      signal behavior. You cannot compile a single source file that uses
1911      both semantics. That's life. It sounds as if Solaris defaults to the
1912      UI variants, but allows you to define this _POSIX_THREAD_SEMANTICS
1913      to get around it. We default to POSIX, and allow you to define
1914      _PTHREAD_USE_D4 (automatically defined by the cc "-threads" switch)
1915      to select the DCE thread variants. That default, because you're
1916      operating outside of any individual standard, is really just a
1917      marketing decision.
1918
1919 9.1.2. ANSI C
1920
1921    [ [258]Top ] [ [259]Contents ] [ [260]Section Contents ] [
1922    [261]Subsection Contents ] [ [262]Next ] [ [263]Previous ]
1923
1924    The major difference between ANSI C and earlier C compilers is function
1925    prototyping. ANSI C allows function arguments to be checked for type
1926    agreement, and (when possible) type coercion in the event of a
1927    mismatch. For this to work, functions and their arguments must be
1928    declared before they are called. The form for function declarations is
1929    different in ANSI C and non-ANSI C (ANSI C also accepts the earlier
1930    form, but then does not do type checking).
1931
1932    As of edit 167, C-Kermit tries to take full advantage of ANSI C
1933    features, especially function prototyping. This removes many bugs
1934    introduced by differing data types used or returned by the same
1935    functions on different computers. ANSI C features are automatically
1936    enabled when the symbol __STDC__ is defined. Most ANSI C compilers,
1937    such as GNU CC and the new DEC C compiler define this symbol
1938    internally.
1939
1940    On the downside, ANSI C compilation increases the
1941    administrative/bureaucratic burden, spewing out countless unneeded
1942    warnings about mismatched types, especially when we are dealing with
1943    signed and unsigned characters, requiring casts everywhere to shut up
1944    the mindless complaints -- there is no use for signed chars in Kermit
1945    (or probably anywhere else). Some compilers, mercifully, include a
1946    "treat all chars as unsigned" option, and when available it should be
1947    used -- not only to stop the warnings, but also to avoid unhelpful sign
1948    extension on high-bit characters.
1949
1950    To force use of ANSI C prototypes, include -DCK_ANSIC on the cc command
1951    line. To disable the use of ANSI prototypes, include -DNOANSI.
1952
1953 9.1.3. Other Standards
1954
1955    [ [264]Top ] [ [265]Contents ] [ [266]Section Contents ] [
1956    [267]Subsection Contents ] [ [268]Next ] [ [269]Previous ]
1957
1958    As the years go by, standards with-which-all-must-comply continue to
1959    pile up: AES, XPG2, XPG3, XPG4, FIPS 151-2, successive generations of
1960    POSIX, OSF/1, X/Open, Spec 1170, UNIX95, Open Group UNIX98, ISO/IEC
1961    9945 parts 1-4, ISO 9899, 88Open, OS 99, Single Unix Specification
1962    (SUS, [270]IEEE 1003.1-2001, not to mention "mature standards" like V7,
1963    4.2/4.3BSD, System V R3 and R4 (SVID2 and SVID3), 4.4BSD (the basis for
1964    BSDI, OpenBSD, NetBSD, FreeBSD, Mac OS X etc), /usr/group, plus
1965    assorted seismic pronouncements of the neverending series of ephemeral
1966    corporate consortia, not to mention the libc-vs-glibc turmoil in the
1967    Linux arena and who knows what else.
1968
1969    None of these standards simplifies life for portable applications like
1970    C-Kermit -- each one is simply one more environment to support (or
1971    circumvent, as in many cases these standards do more harm than good by
1972    denying accesss to facilities we need, e.g. as noted in above in
1973    [271]9.1.1).
1974
1975 9.2. Library Issues
1976
1977    [ [272]Top ] [ [273]Contents ] [ [274]Section Contents ] [
1978    [275]Subsection Contents ] [ [276]Next ] [ [277]Previous ]
1979
1980    On most modern platforms, applications are -- and often must be --
1981    dynamically linked. This has numerous advantages (smaller executables,
1982    ability to patch a library and thereby patch all applications that use
1983    it, etc), but also causes some headaches: most commonly, the library ID
1984    built into the executable at link time does not match the ID of the
1985    corresponding library on the target system, and so the loader refuses
1986    to let the application run.
1987
1988    This problem only gets worse over time. In the Linux and *BSD world, we
1989    also have totally different libraries (each with their own names and
1990    numbering systems) that cover the same territory; for example, curses
1991    vs ncurses, libc versus glibc. Combinations proliferate and any given
1992    Unix computer might have any combination. For this reason it is
1993    becoming increasingly difficult to produce a "Linux binary" for a given
1994    architecture (e.g. PC or Alpha). There has to be a separate binary for
1995    (at least) every combination of curses vs ncurses and libc vs glibc.
1996
1997    In such cases, the best advice is for every user to build C-Kermit from
1998    source code on the system where it will run. Too bad most commercial
1999    Unix vendors have stopped including C compilers with the operating
2000    system!
2001
2002 9.3. Unix File System Peculiarities
2003
2004    [ [278]Top ] [ [279]Contents ] [ [280]Section Contents ] [ [281]Next ]
2005    [ [282]Previous ]
2006
2007    Normally, including a BSD, System-V, POSIX, or DIRENT flag in the make
2008    entry selects the right file system code. But some versions of Unix are
2009    inconsistent in this regard, and building in the normal way either
2010    gives compiler or linker errors, or results in problems at runtime,
2011    typically failure to properly expand wildcard file specifications when
2012    you do something like "send *.*", or failure to recognize long
2013    filenames, as in "send filewithaveryveryveryveryverylongname".
2014
2015    C-Kermit is supposed to know about all the various styles of Unix file
2016    systems, but it has to be told which one to use when you build it,
2017    usually in the makefile target CFLAGS as shown below, but you might
2018    also have to add something like -I/usr/include/bsd to CFLAGS, or
2019    something like -lbsd to LIBS.
2020
2021    C-Kermit gives you the following CFLAGS switches to adapt to your file
2022    system's peculiarities:
2023
2024 -DDIRENT   - #include <dirent.h>
2025 -DSDIRENT  - #include <sys/dirent.h>
2026 -DNDIR     - #include <ndir.h>
2027 -DXNDIR    - #include <sys/ndir.h>
2028 -DRTU      - #include "/usr/lib/ndir.h", only if NDIR and XNDIR not defined.
2029 -DSYSUTIMH - #include <sys/utime.h> for setting file creation dates.
2030 -DUTIMEH   - #include <utime.h> for setting file creation dates.
2031
2032    (Note, RTU should only be used for Masscomp RTU systems, because it
2033    also selects certain other RTU-specific features.)
2034
2035    If none of these is defined, then <sys/dir.h> is used. IMPORTANT: If
2036    your system has the file /usr/include/dirent.h then be sure to add
2037    -DDIRENT to your makefile target's CFLAGS. "dirent" should be used in
2038    preference to any of the others, because it supports all the features
2039    of your file system, and the others probably don't.
2040
2041    Having selected the appropriate directory header file, you might also
2042    need to tell Kermit how to declare the routines and variables it needs
2043    to read the directory. This happens most commonly on AT&T System-V
2044    based UNIXes, particularly System V R3 and earlier, that provide long
2045    file and directory names (longer than 14 characters). Examples include
2046    certain releases of HP-UX, DIAB DNIX, older versions of Silicon
2047    Graphics IRIX, and perhaps also MIPS. In this case, try adding -DLONGFN
2048    to your makefile target.
2049
2050    Another problem child is <sys/file.h>. Most Unix C-Kermit versions need
2051    to #include this file from within [283]ckufio.c and [284]ckutio.c, but
2052    some not only do not need to include it, but MUST not include it
2053    because (a) it doesn't exist, or (b) it has already been included by
2054    some other header file and it doesn't protect itself against multiple
2055    inclusion, or (c) some other reason that prevents successful
2056    compilation. If you have compilation problems that seem to stem from
2057    including this file, then add the following switch to CFLAGS in your
2058    makefile target:
2059
2060 -DNOFILEH
2061
2062    There are a few odd cases where <sys/file.h> must be included in one of
2063    the cku[ft]io.c files, but not the other. In that case, add the
2064    aforementioned switch, but go into the file that needs <sys/file.h> and
2065    add something like this:
2066
2067 #ifdef XXX       /* (where XXX is a symbol unique to your system) */
2068 #undef NOFILEH
2069 #endif /* XXX */
2070
2071    before the section that includes <sys/file.h>.
2072
2073    Kermit's SEND command expands wildcard characters "?" and "*" itself.
2074    Before version 5A, commands like "send *" would send all regular
2075    (non-directory) files, including "hidden files" (whose names start with
2076    "."). In version 5A, the default behavior is to match like the Bourne
2077    shell or the ls command, and not include files whose names start with
2078    dot. Such files can still be sent if the dot is included explicitly in
2079    the SEND command: "send .oofa, send .*". To change back to the old way
2080    and let leading wildcard characters match dot files, include the
2081    following in your CFLAGS:
2082
2083 -DMATCHDOT
2084
2085    (In C-Kermit 6.0, there is also a command to control this at runtime.)
2086
2087    Complaints about data-type mismatches:
2088
2089      * If you get compile-time complaints about data type mismatches for
2090        process-ID related functions like getpid(), add -DPID_T=pid_t.
2091      * If you get compile-time complaints about data type mismatches for
2092        user ID related functions like getuid(), add -DUID_T=uid_t.
2093      * If you get compile-time complaints about data type mismatches for
2094        user-ID related functions like getgid(), add -DGID_T=gid_t.
2095      * If you get compile-time complaints about data type mismatches for
2096        getpwuid(), add -DPWID_T=uid_t (or whatever it should be).
2097
2098    File creation dates: C-Kermit attempts to set the creation date/time of
2099    an incoming file according to the date/time given in the file's
2100    attribute packet, if any. If you find that the dates are set
2101    incorrectly, you might need to build Kermit with the -DSYSUTIMEH flag,
2102    to tell it to include <sys/utime.h>. If that doesn't help, look at the
2103    code in zstrdt() in [285]ckufio.c.
2104
2105 9.4. Hardware Flow Control
2106
2107    [ [286]Top ] [ [287]Contents ] [ [288]Section Contents ] [ [289]Next ]
2108    [ [290]Previous ]
2109
2110    Hardware flow control is a problematic concept in many popular Unix
2111    implementations. Often it is lacking altogether, and when available,
2112    the application program interface (API) to it is inconsistent from
2113    system to system. Here are some examples:
2114
2115     a. POSIX does not support hardware flow control.
2116     b. RTS/CTS flow control support MIGHT be available for System V R3 and
2117        later if /usr/include/termiox.h exists (its successful operation
2118        also depends on the device driver, and the device itself, not to
2119        mention the [291]cable, etc, actually supporting it). If your
2120        SVR3-or-later Unix system does have this file, add:
2121
2122 -DTERMIOX
2123
2124        to your CFLAGS. If the file is in /usr/include/sys instead, add:
2125
2126 -DSTERMIOX
2127
2128        Note that the presence of this file does not guarantee that RTS/CTS
2129        will actually work -- that depends on the device-driver
2130        implementation (reportedly, many Unix versions treat
2131        hardware-flow-control related ioctl's as no-ops).
2132     c. Search ("grep -i") through /usr/include/*.h and
2133        /usr/include/sys/*.h for RTS or CTS and see what turns up. For
2134        example, in SunOS 4.x we find "CRTSCTS". Figuring out how to use it
2135        is another question entirely! In IBM AIX RS/6000 3.x, we have to
2136        "add" a new "line discipline" (and you won't find uppercase RTS or
2137        CTS symbols in the header files).
2138     d. NeXTSTEP and IRIX, and possibly others, support hardware flow
2139        control, but do not furnish an API to control it, and thus on these
2140        systems Kermit has no command to select it -- instead, a special
2141        device name must be used. (NeXTSTEP: /dev/cufa instead of /dev/cua;
2142        IRIX: /dev/ttyf00)
2143
2144    See the routine tthflow() in [292]ckutio.c for details. If you find
2145    that your system offers hardware flow control selection under program
2146    control, you can add this capability to C-Kermit as follows:
2147
2148     a. See if it agrees with one of the methods already used in tthflow().
2149        if not, add new code, appropriately #ifdef'd.
2150     b. Add -DCK_RTSCTS to the compiler CFLAGS in your makefile target or
2151        define this symbol within the appropriate #ifdefs in [293]ckcdeb.h.
2152
2153    To illustrate the difficulties with RTS/CTS, here is a tale from Jamie
2154    Watson <jw@adasoft.ch>, who added the RTS/CTS code for the RS/6000,
2155    about his attempts to do the same for DEC ULTRIX:
2156
2157      "The number and type of hardware signals available to/from a serial
2158      port vary between different machines and different types of serial
2159      interfaces on each machine. This means that, for example, there are
2160      virtually no hardware signals in or out available on the DECsystem
2161      3000/3100 series; on the DECsystem 5000/2xx series all modem signals
2162      in/out are present on both built-in serial ports; on the DECsystem
2163      5100 some ports have all signals and some only have some; and so
2164      on... It looks to me as if this pretty well rules out any attempt to
2165      use hardware flow control on these platforms, even if we could
2166      figure out how to do it. The confusion on the user level about
2167      whether or not it should work for any given platform or port would
2168      be tremendous. And then it isn't clear how to use the hardware
2169      signals even in the cases where the device supports them."
2170
2171   9.5. Terminal Speeds
2172
2173    [ [294]Top ] [ [295]Contents ] [ [296]Section Contents ] [ [297]Next ]
2174    [ [298]Previous ]
2175
2176    The allowable speeds for the SET SPEED command are defined in
2177    [299]ckcdeb.h. If your system supports speeds that are not listed in
2178    "set speed ?", you can add definitions for them to ckcdeb.h.
2179
2180    Then if the speed you are adding is one that was never used before in
2181    Kermit, such as 921600, you'll also need to add the appropriate
2182    keywords to spdtab[] in [300]ckuus3.c, and the corresponding case to
2183    ttsspd() in [301]ckutio.c.
2184
2185   9.6. Millisecond Sleeps
2186
2187    [ [302]Top ] [ [303]Contents ] [ [304]Section Contents ] [ [305]Next ]
2188    [ [306]Previous ]
2189
2190    There is no standard for millisecond sleeps, but at least five
2191    different functions have appeared in various Unix versions that can be
2192    used for this purpose: nap() (mostly in System V), usleep() (found at
2193    least in SunOS and NeXT OS), select() (found in 4.2BSD and later, and
2194    part of any TCP/IP sockets library), nanosleep(), and sginap(). If you
2195    have any of these available, pick one (in this order of preference, if
2196    you have more than one):
2197
2198 -DSELECT: Include this in CFLAGS if your system has the select() function.
2199 -DNAP:    Include this in CFLAGS if your system has the nap() function.
2200 -USLEEP:  Include this in CFLAGS if your system has the usleep() function.
2201
2202    NOTE: The nap() function is assumed to be a function that puts the
2203    process to sleep for the given number of milliseconds. If your system's
2204    nap() function does something else or uses some other units of time
2205    (like the NCR Tower 32, which uses clock-ticks), do not include -DNAP.
2206
2207    Reportedly, all versions of System V R4 for Intel-based computers, and
2208    possibly also SVR3.2, include nap() as a kernel call, but it's not in
2209    the library. To include code to use it via syscall(3112,x), without
2210    having to include Xenix compatibility features, include the following
2211    compile-time option:
2212
2213 -DNAPHACK
2214
2215   9.7. Nondestructive Input Buffer Peeking
2216
2217    [ [307]Top ] [ [308]Contents ] [ [309]Section Contents ] [ [310]Next ]
2218    [ [311]Previous ]
2219
2220    Some AT&T Unix versions have no way to check if input is waiting on a
2221    tty device, but this is a very important feature for Kermit. Without
2222    it, sliding windows might not work very well (or at all), and you also
2223    have to type your escape character to get Kermit's attention in order
2224    to interrupt a local-mode file transfer. If your system offers an
2225    FIONREAD ioctl, the build procedure should pick that up automatically
2226    and use it, which is ideal.
2227
2228    If your system lacks FIONREAD but has a select() function, this can be
2229    used instead. If the build procedure fails to include it (SHOW FEATURES
2230    will list SELECT), then you can add it to your CFLAGS:
2231
2232 -DSELECT
2233
2234    Conversely, if the build procedure tries to use select() when it really
2235    is not there, add:
2236
2237 -DNOSELECT
2238
2239    Note: select() is not part of System V nor of POSIX, but it has been
2240    added to various System-V- and POSIX-based systems as an extension.
2241
2242    Some System-V variations (SCO Xenix/UNIX/ODT and DIAB DNIX) include a
2243    rdchk() function that can be used for buffer peeking. It returns 0 if
2244    no characters are waiting and 1 if characters are waiting (but unlike
2245    FIONREAD, it does not tell the actual number). If your system has
2246    rdchk(), add:
2247
2248 -DRDCHK:  Include this in CFLAGS if your system has the rdchk() function.
2249
2250    Otherwise, if your version of Unix has the poll() function (and the
2251    /usr/include/poll.h file) -- which appears to be a standard part of
2252    System V going back to at least SVR3, include:
2253
2254 -DCK_POLL
2255
2256   9.8. Other System-Dependent Features
2257
2258    [ [312]Top ] [ [313]Contents ] [ [314]Section Contents ] [ [315]Next ]
2259    [ [316]Previous ]
2260
2261    Systems with <termios.h> might have the symbol IEXTEN defined. This is
2262    used to turn "extended features" in the tty device driver on and off,
2263    such as Ctrl-O to toggle output flushing, Ctrl-V to quote input
2264    characters, etc.
2265
2266    In most Unix implementations, it should be turned off during Kermit
2267    operation, so if [317]ckutio.c finds this symbol, it uses it. This is
2268    necessary, at least, on BSDI. On some systems, however, IEXTEN is
2269    either misdefined or misimplemented. The symptom is that CR, when typed
2270    to the command processor, is echoed as LF, rather than CRLF. This
2271    happens (at least) on Convex/OS 9.1. The solution is to add the
2272    following symbol to the makefile target's CFLACS:
2273
2274 -DNOIEXTEN
2275
2276    However, in at least one Unix implementation, QNX 4.21, IEXTEN must be
2277    set before hardware flow control can be used.
2278
2279    In edits 177 and earlier, workstation users noticed a "slow screen
2280    writing" phenomenon during interactive command parsing. This was traced
2281    to a setbuf() call in [318]ckutio.c that made console (stdout) writes
2282    unbuffered. This setbuf() call has been there forever, and could not be
2283    removed without some risk. Kermit's operation was tested on the NeXT in
2284    edit 178 with the setbuf() call removed, and the slow-writing symptom
2285    was cured, and everything else (command parsing, proper wakeup on ?,
2286    ESC, Ctrl-U, and other editing characters, terminal emulation,
2287    remote-mode and local-mode file transfer, etc) seemed to work as well
2288    as or better than before. In subsequent edits, this change was made to
2289    many other versions too, with no apparent ill effects. To remove the
2290    setbuf() call for your version of Kermit, add:
2291
2292 -DNOSETBUF
2293
2294    Later reports indicate that adding -DNOSETBUF has other beneficial
2295    effects, like cutting down on swapping when Kermit is run on
2296    workstations with small memories. But BEWARE: on certain small Unix
2297    systems, notably the AT&T 6300 and 3B1 (the very same ones that benefit
2298    from NOSETBUF), NOSETBUF seems to conflict with CK_CURSES. The program
2299    builds and runs OK, but after once using the curses display, echoing is
2300    messed up. In this case, we use a System-V specific variation in the
2301    curses code, using newterm() to prevent System V from altering the
2302    buffering. See makefile entries for AT&T 6300 and 3B1.
2303
2304    The Unix version of C-Kermit includes code to switch to file descriptor
2305    zero (stdin) for remote-mode file transfer. This code is necessary to
2306    prevent Kermit from giving the impression that it is "idle" during file
2307    transfers, which, at some sites, can result in the job being logged out
2308    in the middle of an active file transfer by idle-job monitors.
2309
2310    However, this feature can interfere with certain setups; for example,
2311    there is a package which substitutes a pty/tty pair for /dev/tty and
2312    sets file descriptor 0 to be read-only, preventing Kermit from sending
2313    packets. Or... When a Unix shell is invoked under the PICK environment,
2314    file descriptor 0 is inoperative.
2315
2316    To remove this feature and allow Kermit to work in such environments,
2317    add the compile-time option:
2318
2319 -DNOFDZERO
2320
2321    On some versions of Unix, earlier releases of C-Kermit were reported to
2322    render a tty device unusable after a hangup operation. Examples include
2323    IBM AIX on the RT PC and RS/6000. A typical symptom of this phenomenon
2324    is that the DIAL command doesn't work, but CONNECTing to the device and
2325    dialing manually do work. A further test is to SET DIAL HANGUP OFF,
2326    which should make dialing work once by skipping the pre-dial hangup.
2327    However, after the connection is broken, it can't be used any more:
2328    subsequent attempts to DIAL the same device don't work. The cure is
2329    usually to close and reopen the device as part of the hangup operation.
2330    To do this, include the following compile-time option:
2331
2332 -DCLSOPN
2333
2334    Similarly, there is a section of code in ttopen(), which does another
2335    close(open()) to force the O_NDELAY mode change. On some systems, the
2336    close(open()) is required to make the mode change take effect, and
2337    apparently on most others it does no harm. But reportedly on at least
2338    one System V R4 implementation, and on SCO Xenix 3.2, the close(open())
2339    operation hangs if the device lacks carrier, EVEN THOUGH the CLOCAL
2340    characteristic has just been set to avoid this very problem. If this
2341    happens to you, add this to your CFLAGS:
2342
2343 -DNOCOTFMC
2344
2345    or, equivalently, in your KFLAGS on the make command line. It stands
2346    for NO Close(Open()) To Force Mode Change.
2347
2348    C-Kermit renames files when you give a RENAME command and also
2349    according to the current SET FILE COLLISION option when receiving
2350    files. The normal Unix way to rename a file is via two system calls:
2351    link() and unlink(). But this leaves open a window of vulnerability.
2352    Some Unix systems also offer an atomic rename(oldname,newname)
2353    function. If your version of Unix has this function, add the following
2354    to your CFLAGS:
2355
2356 -DRENAME
2357
2358    C-Kermit predefines the RENAME for several Unix versions in
2359    [319]ckcdeb.h (SVR4, SUNOS41, BSD44, AIXRS, etc). You can tell if
2360    rename() is being used if the SHOW FEATURES command includes RENAME in
2361    the compiler options list. If the predefined RENAME symbol causes
2362    trouble, then add NORENAME to your CFLAGS. Trouble includes:
2363
2364     a. Linker complains that _rename is an unresolved symbol.
2365     b. Linking works, but Kermit's RENAME command doesn't work (which
2366        happens because older versions of rename() might have their
2367        arguments reversed).
2368
2369    If rename() is not used, then Kermit uses link()/unlink(), which is
2370    equivalent except it is not atomic: there is a tiny interval in which
2371    some other process might "do something" to one of the files or links.
2372
2373    Some Unix systems (Olivetti X/OS, Amdahl UTS/V, ICL SVR3, etc) define
2374    the S_ISREG and S_ISDIR macros incorrectly. This is compensated for
2375    automatically in [320]ckufio.c. Other systems might have this same
2376    problem. If you get a compile-time error message regarding S_ISREG
2377    and/or S_ISDIR, add the following to your CFLAGS:
2378
2379 -DISDIRBUG
2380
2381    Finally, here's a symbol you should NEVER define:
2382
2383 -DCOMMENT
2384
2385    It's used for commenting out blocks of code. If for some reason you
2386    find that your compiler has COMMENT defined, then add -UCOMMENT to
2387    CFLAGS or KFLAGS! Similarly, some header files have been known to
2388    define COMMENT, in which case you must add "#undef COMMENT" to each
2389    C-Kermit source module, after all the #includes.
2390
2391   9.9. Terminal Interruption
2392
2393    [ [321]Top ] [ [322]Contents ] [ [323]Section Contents ] [ [324]Next ]
2394    [ [325]Previous ]
2395
2396    When C-Kermit enters interactive command mode, it sets a Control-C
2397    (terminal keyboard interrupt = SIGINT) trap to allow it to return to
2398    the command prompt whenever the user types Control-C (or whatever is
2399    assigned to be the interrupt character). This is implemented using
2400    setjmp() and longjmp(). On some systems, depending on the machine
2401    architecture and C compiler and who knows what else, you might get
2402    "Memory fault (coredump)" or "longjmp botch" instead of the desired
2403    effect (this should not happen in 5A(190) and later). In that case, add
2404    -DNOCCTRAP to your CFLAGS and rebuild the program.
2405
2406    Job control -- the ability to "suspend" C-Kermit on a Unix system by
2407    typing the "susp" character (normally Ctrl-Z) and then resume execution
2408    later (with the "fg" command) -- is a tricky business. C-Kermit must
2409    trap suspend signals so it can put the terminal back into normal mode
2410    when you suspend it (Kermit puts the terminal into various strange
2411    modes during interactive command parsing, CONNECT, and file transfer).
2412    Supporting code is compiled into C-Kermit automatically if <signal.h>
2413    includes a definition for the SIGTSTP signal. HOWEVER... some systems
2414    define this signal without supporting job control correctly. You can
2415    build Kermit to ignore SIGTSTP signals by including the -DNOJC option
2416    in CFLAGS. (You can also do this at runtime by giving the command SET
2417    SUSPEND OFF.)
2418
2419      NOTE: As of version 5A(190), C-Kermit makes another safety check.
2420      Even if job control is available in the operating system (according
2421      to the numerous checks made in congm()), it will still disable the
2422      catching of SIGTSTP signals if SIGTSTP was set to SIG_IGN at the
2423      time C-Kermit was started.
2424
2425    System V R3 and earlier systems normally do not support job control. If
2426    you have an SVR3 system that does, include the following option in your
2427    CFLAGS:
2428
2429 -DSVR3JC
2430
2431    On systems that correctly implement POSIX signal handling, signals can
2432    be handled more reliably than in Bell, Berkeley, or AT&T Unixes. On
2433    systems (such as QNX) that are "strictly POSIX", POSIX signal handling
2434    *must* be used, otherwise no signal will work more than once. If you
2435    have POSIX-based system and you find that your version of Kermit
2436    responds to Ctrl-C (SIGINT) or Ctrl-Z (SIGTSTP) only once, then you
2437    should add the following option to your CFLAGS:
2438
2439 -DCK_POSIX_SIG
2440
2441    But be careful; some POSIX implementations, notably 4.4BSD, include
2442    POSIX signal handling symbols and functions as "stubs" only, which do
2443    nothing. Look in <signal.h> for sigsetjmp and siglongjmp and read the
2444    comments.
2445
2446 10. DIALING OUT AND COORDINATING WITH UUCP
2447
2448    [ [326]Top ] [ [327]Contents ] [ [328]Next ] [ [329]Previous ]
2449
2450    The short version (general):
2451
2452      In order for C-Kermit to be able to dial out from your Unix
2453      computer, you need to give it the same owner, group, and permissions
2454      as your other dialout programs, such as cu, tip, minicom, uucp,
2455      seyon, etc.
2456
2457    The short version for Linux only:
2458
2459      Since Red Hat 7.2, about 2002, Linux does not leave the lockfile
2460      handling to each application, but instead provides an external
2461      application, /usr/sbin/lockdev, that all applications should invoke
2462      when they need to accesss a serial port; lockdev locks and unlocks
2463      the port without requiring the application to have privileges, since
2464      the privileges on the lockfile directory are assigned to lockdev.
2465      C-Kermit 8.0.211 and later support this method. But C-Kermit still
2466      needs to be able to open the port itself, and therefore if the
2467      port's permissions do not allow read/write accesss to the general
2468      public, the general rule must still be followed: in the most common
2469      case, it must be SETGID to the group uucp (explained below). If a
2470      pre-8.0.211 version of C-Kermit is to be installed for use with
2471      serial ports on any version of Linux, it must still be installed as
2472      described in the following sections.
2473
2474    The long version:
2475
2476    Make sure your dialout line is correctly configured for dialing out (as
2477    opposed to login). The method for doing this is different for each kind
2478    of Unix. Consult your system documentation for configuring lines for
2479    dialing out (for example, Sun SPARCstation IPC users should read the
2480    section "Setting up Modem Software" in the Desktop SPARC Sun System and
2481    Network Manager's Guide, or the Terminals and Modems section of the HP
2482    manual, "Configuring HP-UX for Peripherals" (e.g. /usr/sbin/sam =>
2483    Peripheral Devices => Terminals and Modems => Add Modem).
2484
2485    Unlike most other multiuser, multitasking operating systems, Unix
2486    allows multiple users to accesss the same serial device at the same
2487    time, even though there is no earthly reason why two users should do
2488    this. When they do, user A will read some of the incoming characters,
2489    and user B will read the others. In all likelihood, neither user will
2490    see them all. Furthermore, User B can hang up User A's call, and so
2491    one.
2492
2493    Rather than change Unix to enforce exclusive accesss to serial devices
2494    such as ttys, when it might still have been possible, Unix developers
2495    opted for a "lock file" mechanism. Any process that wants to open a tty
2496    device should first check to see if a file of a certain name exists,
2497    and if so, not to open the device. If the file does not exist, the
2498    process creates the file and then opens the device. When the process
2499    closes the device, it destroys the lockfile. This procedure was
2500    originated for use with Unix's UUCP, CU, and TIP programs, and so these
2501    lockfiles are commonly called "UUCP lockfiles" (UUCP = Unix-to-Unix
2502    Copy Program).
2503
2504    As you can imagine, this method is riddled with pitfalls:
2505
2506      * If a process does not observe the prevailing lockfile convention,
2507        then it can interfere with other "polite" processes. And in fact,
2508        very few Unix applications or commands handle lockfiles at all; an
2509        original design goal of Unix was that "everything is a file", and
2510        countless utilities operate on files directly (by opening them) or
2511        indirectly through redirection of standard i/o, without creating or
2512        looking for lockfiles.
2513      * If a process crashes while it has the device open, the lockfile is
2514        left behind, preventing further processes from using the device.
2515      * Various versions of Unix use different names for the lockfiles, put
2516        them in different directories, with different owners and groups and
2517        permissions, and specify their contents differently.
2518      * On a given platform, the lockfile conventions may change from one
2519        Unix release to the next (for example, SunOS 4.0 to 4.1) or, in the
2520        case of Linux, across different distributions.
2521      * The same tty device might have more than one name, and most
2522        lockfile conventions don't allow for this. Similarly for symbolic
2523        links.
2524
2525    In an attempt to address the problem of "stale" lockfiles, most UUCP
2526    implementations put the PID (Process ID) of the creating process in the
2527    lockfile. Thus, another process that wants to open the corresponding
2528    device can check not only for the lockfile itself, but also can check
2529    the PID for validity. But this doesn't work well either:
2530
2531      * PIDs are stored in diverse formats that change with every new
2532        release (short, integer, long, or string in any of various
2533        formats). If the reading program does not follow the same
2534        convention as the writing program, it can diagnose a valid PID to
2535        be invalid, and therefore not honor the lock.
2536      * PIDs recycle. If the lockfile was created by PID 1234, which later
2537        crashed without removing the lockfile, and then a new process 1234
2538        exists a the time the lockfile is checked, the lockfile will be
2539        improperly taken as valid, and accesss to the device denied
2540        unnecessarily.
2541
2542    Several techniques address the problem of multiple names for the same
2543    device:
2544
2545      * Multiple lockfiles. For example, if the user opens a device through
2546        a symlink, a lockfile is created for both the symlink name and the
2547        true name (obtained from readlink()). However, when multiple
2548        drivers are installed for the same device (e.g. /dev/cua,
2549        /dev/cufa, etc), this approach won't work unless all applications
2550        *know* all the different names for the same device and make
2551        lockfiles for all of them, which is obviously not practical.
2552      * Lockfiles whose names are not based on the device name. These
2553        lockfiles generally have names like LK.inode/major/minor, where
2554        inode, major, and minor are numbers, which will always be the same
2555        for any physical device, no matter what its name. This form of
2556        lockfile is used in System V R4 and its derivatives, such as
2557        Solaris, UnixWare, etc. If lockfiles must be used (as opposed to,
2558        say, kernel-based locks), this would seem to be the most effective
2559        form.
2560
2561    Most versions of Unix were not designed to accommodate third-party
2562    communications software; thus vendors of these Unix products feel no
2563    compunction about changing lockfile conventions from release to
2564    release, since they also change their versions of the cu, uucp, tip,
2565    etc, programs at the same time to match. And since the source code to
2566    these programs might not be published, it is difficult for makers of
2567    third-party products like C-Kermit to find out what the new conventions
2568    are. It also forces release of new versions of C-Kermit whenever the OS
2569    vendor makes a change like this.
2570
2571    Some Unix vendors have taken a small step to simplify communications
2572    application development for their products: the inclusion of lockfile
2573    routines in the standard system C runtime libraries to shield the
2574    application from the details of lockfile management (IBM AIX is an
2575    example). When such routines are used, communications applications do
2576    not need modification when lockfile conventions change (although they
2577    will need recompiling if the routines are statically linked into the
2578    application). In the AIX example, the simple function calls ttylock(),
2579    ttyunlock(), and ttylocked() replace hundreds of lines of ugly code in
2580    C-Kermit that attempts to keep pace with every release of every Unix
2581    product over the last 20 years. Inclusion of ttylock() code occurs
2582    when:
2583
2584 -DUSETTYLOCK
2585
2586    is included in the CFLAGS.
2587
2588    If such routines are available, they should be used. The rest of this
2589    section applies when they are not.
2590
2591    To fit in with UUCP and other Unix-based serial-port communication
2592    software, C-Kermit must have the same idea as your system's uucp, cu,
2593    and tip programs about what the UUCP lock directory is called, what the
2594    lockfile itself is called, and what its contents should be. In most
2595    cases, C-Kermit preprocessor flags create the appropriate configuration
2596    at compile time if the appropriate makefile target was used (see
2597    [330]ckutio.c). The following CFLAGS options can be used to override
2598    the built-in configuration:
2599
2600    -DLCKDIR
2601           Tells Kermit that the UUCP lock directory is
2602           /usr/spool/uucp/LCK.
2603
2604    -DACUCNTRL
2605           Tells Kermit to use the BSD 4.3 acucntrl() program to turn off
2606           getty (login) on the line before using it, and restore getty
2607           when done.
2608
2609    -DHDBUUCP
2610           Include this if your system uses Honey DanBer UUCP, in which the
2611           lockfile directory and format are relatively standardized.
2612
2613    -DLOCK_DIR=\\\"/xxx/yyy\\\"
2614           Gives the lock directory name explicitly. The triple quoting is
2615           necessary. For example:
2616
2617 CFLAGS= -DBSD4 -DLOCK_DIR=\\\"/usr/local/locks\\\" -DNODEBUG
2618
2619           (NOTE: The triple quoting assumes this is a "top-level" make
2620           entry, and not a make entry that calls another one.)
2621
2622    -DLFDEVNO The lockfile name uses the tty device inode and major and
2623           minor
2624           numbers: LK.dev.maj.min, as in Sys V R4, e.g. LK.035.044.008.
2625
2626    When the LK.inode.major.minor form is used, a single lockfile is
2627    enough. Otherwise, a single lockfile rarely suffices. For example, in
2628    Linux, it is common to have a /dev/modem symbolic link to an actual
2629    dialout device, like /dev/cua0 or /dev/ttyS0, whose purpose is to hide
2630    the details of the actual driver from the user. So if one user opens
2631    /dev/modem, a lockfile called LCK..modem is created, which does not
2632    prevent another user from simultaneously opening the same device by its
2633    real name.
2634
2635    On SCO Unix platforms, we have a slightly different problem: the same
2636    device is, by convention, known by "lowercase" and "uppercase" names,
2637    depending on whether it has modem control. So by convention,
2638    communications programs are supposed to create the lockfiles based on
2639    the lowercase name. But some programs don't follow this convention. In
2640    HP-UX, we have several different names for each serial device. And so
2641    on.
2642
2643    For this reason, on platforms where the LK.inode.major.minor form is
2644    not used, C-Kermit also creates a secondary lockfile (which is simply a
2645    link to the first) if:
2646
2647     a. The given device name is a symbolic link. The secondary link is
2648        based on the device's real name.
2649     b. On SCO: The device name is not a symbolic link, but it contains
2650        uppercase letters. The primary link is based on the lowercase name;
2651        the secondary link is based on the name that was given.
2652     c. On HP-UX: The device name starts with "cu". The primary link is
2653        based on the name that was given; the secondary link is based on
2654        the corresponding "ttyd" device, e.g. "LCK..cua0p0" and
2655        "LCK..ttyd0p0".
2656
2657    NOTE: symlinks are not handled in HP-UX.
2658
2659    Honey DanBer (HDB) UUCP, the basis of many UUCP implementations, has
2660    two characteristics:
2661
2662     a. Lockfiles are kept in /usr/spool/locks/ (usually).
2663     b. A lockfile contains the process id (pid) in ASCII, rather than as
2664        an int.
2665
2666    Non-HDB selections assume the lockfile contains the pid in int form
2667    (or, more precisely, in PID_T form, where PID_T is either int or pid_t,
2668    depending on your system's C library and header files). (b), by the
2669    way, is subject to interpretation: the numeric ASCII string may or may
2670    not be terminated by a newline, it may or may not have leading spaces
2671    (or zeros), and the number of leading spaces or zeros can differ, and
2672    the differences can be significant.
2673
2674    Even if you build the program with the right lockfile option, you can
2675    still have problems when you try to open the device. Here are the error
2676    messages you can get from SET LINE, and what they mean:
2677
2678     a. "Timed out, no carrier." This one is not related to lockfiles. It
2679        means that you have SET CARRIER ON xx, where xx is the number of
2680        seconds to wait for carrier, and carrier did not appear within xx
2681        seconds. Solution: SET CARRIER AUTO or OFF.
2682     b. "Sorry, accesss to lock denied." Kermit has been configured to use
2683        lockfiles, but (a)the lockfile directory is write-protected against
2684        you, or (b) it does not exist. The "accesss to lock denied" message
2685        will tell you the reason. If the directory does not exist, check to
2686        make sure Kermit is using the right name. Just because version n of
2687        your Unix used a certain lockfile directory is no guarantee that
2688        version n.1 does not use a different one. Workaround: ask the
2689        system administrator to install a symbolic link from the old name
2690        to the new name. Other solutions: (see below)
2691     c. "Sorry, accesss to tty device denied." The tty device that you
2692        specified in your SET LINE command is read/write protected against
2693        you. Solution: (see below)
2694     d. "Sorry, device is in use." The tty device you have specified is
2695        currently being used by another user. A prefatory message gives you
2696        an "ls -l" listing of the lockfile, which should show the username
2697        of the person who created it, plus a message "pid = nnn" to show
2698        you the process id of the user's program. Solutions: try another
2699        device, wait until the other user is finished, ask the other user
2700        to hurry up, or ask the system manager for help.
2701     e. "Sorry, can't open connection: reason". The device cannot be opened
2702        for some other reason, which is listed.
2703     f. "sh: /usr/lib/uucp/acucntrl: not found". This means your Kermit
2704        program was built with the -DACUCNTRL switch, but your computer
2705        system does not have the BSD 4.3 acucntrl program. Solution:
2706        install the acucntrl program if you have it, or rebuild Kermit
2707        without the -DACUCNTRL switch.
2708
2709    There are two solutions for problems (b) and (c), both of which involve
2710    intervention by your Unix system administrator (superuser):
2711
2712     a. Have the superuser change the permission of the lockfile directory
2713        and to the tty devices so that everyone on the system has
2714        read/write permission.
2715
2716 su% chmod 777 /usr/spool/locks (or whatever the path is)
2717 su% chmod 666 /dev/ttyXX
2718
2719        One risk here is that people can write lots of junk into the
2720        lockfile directory, delete other people's files in the lockfile
2721        directory, and intercept other people's data as it goes in and out
2722        of the tty device. The major danger here would be intercepting a
2723        privileged password. Of course, any user could write a short,
2724        ordinary, unprivileged program to do exactly the same thing if the
2725        tty device was world read/writeable. The other risk as that
2726        telephone calls are not controlled -- anybody on your system can
2727        make them, without having to belong to any particular group, and
2728        this could run up your phone bill.
2729     b. Use groups to regulate accesss. Normally the lockfile directory and
2730        and the dialout devices will have the same group (such as uucp). If
2731        so, then put everybody who's allowed to dial out into that group,
2732        and make sure that the lockfile directory and the tty devices have
2733        group read AND write permission. Example:
2734
2735 su% chmod 770 /usr/spool/locks (or whatever the path is)
2736 su% chmod 660 /dev/ttyXX
2737
2738        User whatever tool is available on your platform to add users to
2739        the appropriate group (e.g. edit the /etc/group file).
2740     c. Have the superuser change Kermit to run setuid and/or setgid to the
2741        owner and/or group of the lockfile directory and the tty devices if
2742        necessary), typically uucp (see [331]next section), but NOT root.
2743        Example:
2744
2745 su% chown uucp kermit          - or -  chgrp uucp kermit
2746 su% chmod u+s kermit (setuid)  - or -  chmod g+s kermit (setgid)
2747
2748        and then make sure the lockfile directory, and the tty devices,
2749        have owner (setuid) and/or group (setgid) write permission. For
2750        example:
2751
2752 su% chmod o+rwx /usr/spool/uucp
2753 su% chown uucp /dev/ttyXX ; chmod 600 /dev/ttyXX
2754
2755        In some cases, the owner and group must be distinct; the key point
2756        is that read/write accesss is required to both the UUCP lockfile
2757        directory and the tty itself.
2758
2759    If you make C-Kermit setuid or setgid to root, it refuses to run:
2760
2761 Fatal: C-Kermit setuid to root!
2762
2763    Example:
2764
2765 crw-r-----   1 uucp     uucp       5,  67 Feb 11 06:23 /dev/cua3
2766 drwxrwxr-x   3 root     uucp         1024 Feb 11 06:22 /var/lock
2767
2768    requires suid uucp to get read/write accesss on /dev/cua3 and sgid to
2769    get read/write accesss on /var/lock (since you can't set Kermit's uid
2770    or gid to root).
2771
2772      The reason Kermit can't be setuid or setgid to root has to do with
2773      the fact that some Unix OS's can't switch user or group IDs in that
2774      case. Unfortunately, the prohibition against making Kermit setuid or
2775      setgid to root means that Unix C-Kermit can't be used to make rlogin
2776      connections by non-root users. (The rlogin port is privileged, which
2777      is why the regular rlogin command is setuid root -- which is safe
2778      because the rlogin program never has to create or accesss files like
2779      Kermit does.)
2780
2781    For the lockfile mechanism to achieve its desired purpose -- prevention
2782    of accesss to the same tty device by more than one process at a time --
2783    ALL programs on a given computer that open, read or write, and close
2784    tty devices must use the SAME lockfile conventions. Unfortunately, this
2785    is often not the case. Here is a typical example of how this can go
2786    wrong: In SunOS 4.0 and earler, the lockfile directory was
2787    /usr/spool/uucp; in 4.1 it was changed to /var/spool/locks in the quest
2788    for political correctness. Consequently, any third-party programs (such
2789    as C-Kermit) that were not modified to account for this change,
2790    recompiled, and reinstalled, did not use the same lockfiles as uucp,
2791    tip, etc, and so the entire purpose of the lockfile is defeated.
2792
2793    What if your Unix system does not have UUCP installed? For example, you
2794    have a Unix workstation, and you do not use uucp, cu, or tip, or UUCP
2795    was not even supplied with your version of Unix (QNX is an example). In
2796    this case, you have two choices:
2797
2798     a. If there may be more than one person running Kermit at the same
2799        time, competing for the same tty device, then create a special
2800        lockfile directory just for Kermit, for example, /usr/spool/kermit,
2801        and make sure you have read/write accesss to it. Then add the
2802        following to your makefile target CFLAGS, as shown earlier:
2803
2804 -DLOCK_DIR=\\\"/usr/spool/kermit\\\"
2805
2806     b. If you are the only user on your workstation, and no other
2807        processes will ever be competing with Kermit for the dialout tty
2808        device, then add -DNOUUCP to your makefile target's CFLAGS and
2809        rebuild Kermit.
2810
2811 11. RUNNING UNIX C-KERMIT SETUID OR SETGID
2812
2813    [ [332]Top ] [ [333]Contents ] [ [334]Next ] [ [335]Previous ]
2814
2815    Even if you don't intend to run C-Kermit setuid, somebody else might
2816    come along and chown and chmod it after it has been built. You should
2817    be sure that it is built correctly to run setuid on your system. For
2818    POSIX and AT&T Unix based versions, you don't have to do anything
2819    special.
2820
2821    For 4.2 and 4.3 BSD-based Unix versions, you normally need not add
2822    anything special to the makefile. The program assumes that the
2823    setreuid() and setregid() functions are available, without which we
2824    cannot switch back and forth between real and effective uids. If "make"
2825    complains that _setreuid or _setregid is/are not defined, add
2826    -DNOSETREU to CFLAGS. In this case it is very likely (but not certain)
2827    that you cannot protect ttys and lockfiles against people and have them
2828    run Kermit setuid.
2829
2830    If make does not complain about this, you should find out whether your
2831    BSD version (4.3 or other systems like SunOS 4.x that claim to include
2832    BSD 4.3 compatibility) includes the saved-setuid feature (see long
2833    notes under edit 146 in ckc178.upd). If it does, then add -DSAVEDUID to
2834    CFLAGS.
2835
2836      IMPORTANT NOTE: Most Unix system documentation will not give you the
2837      required information. To determine whether your Unix system supplies
2838      the the saved-original-effective-user/group-id feature, use the
2839      ckuuid.c program. Read and follow the instructions in the comments
2840      at the beginning.
2841
2842    C-Kermit for 4.4BSD-based systems automatically use sete[ug]id(). See
2843    [336]ckutio.c.
2844
2845    If you have a version of Unix that is not BSD-based, but which supplies
2846    the setreuid() and setregid() functions, and these are the only way to
2847    switch between real and effective uid, add -DSETREUID to your makefile
2848    target.
2849
2850      WARNING: There are two calls to accesss() in [337]ckufio.c, by which
2851      Kermit checks to see if it can create an output file. These calls
2852      will not work correctly when (a)you have installed C-Kermit setuid
2853      or setgid on a BSD-based Unix system, and (b) the
2854      saved-original-effective-uid/gid feature is not present, and (c) the
2855      accesss() function always checks what it believes to be the real ID
2856      rather than the effective ID. This is the case, for example, in
2857      Olivetti X/OS and in NeXTSTEP. In such cases, you can force correct
2858      operation of accesss() calls by defining the symbol SW_ACC_ID at
2859      compile time in CFLAGS.
2860
2861    If you have a version of Unix that does not allow a process to switch
2862    back and forth between its effective and real user and group ids
2863    multiple times, you probably should not attempt to run Kermit setuid,
2864    because once having given up its effective uid or gid (which it must do
2865    in order to transfer files, fork a shell, etc) it can never get it
2866    back, and so it can not use the original effective uid or gid to create
2867    or delete uucp lockfiles. In this case, you'll either have to set the
2868    permissions on your lockfile directory to make them publicly
2869    read/writable, or dispense with locking altogether.
2870
2871    MORAL: Are you thoroughly sickened and/or frightened by all that you
2872    have just read? You should be. What is the real answer? Simple. Serial
2873    devices -- such as ttys and magnetic tapes -- in Unix should be opened
2874    with exclusive accesss only, enforced by the Unix kernel. Shared
2875    accesss has no conceivable purpose, legitimate or otherwise, except by
2876    privileged system programs such as getty. The original design dates
2877    from the late 1960s, when Unix was developed for laboratory use under a
2878    philosophy of trust by people within shouting distance of each other --
2879    but even then, no useful purpose was served by this particular form of
2880    openness; it was probably more of a political statement. Since the
2881    emergence of Unix from the laboratory into the commercial market, we
2882    have seen every vestige of openness -- but this one -- stripped away.
2883    I'd like to see some influential Unix maker take the bold step of
2884    making the simple kernel change required to enforce exclusive accesss
2885    to serial devices. (Well, perhaps not so simple when bidirectionality
2886    must also be a goal -- but then other OS's like VMS solved this problem
2887    decades ago.)
2888
2889 12. CONFIGURING UNIX WORKSTATIONS
2890
2891    [ [338]Top ] [ [339]Contents ] [ [340]Next ] [ [341]Previous ]
2892
2893    On desktop workstations that are used by only the user at the console
2894    keyboard, C-Kermit is always used in local mode. But as delivered,
2895    C-Kermit runs in remote mode by default. To put it in local mode at
2896    startup, you can put a SET LINE command in your .mykermrc.
2897
2898    You can also build C-Kermit to start up in local mode by default. To do
2899    this, include the following in the CFLAGS in your makefile target:
2900
2901 -DDFTTY=\\\"/dev/ttyxx\\\"
2902
2903    where ttyxx is the name of the device you will be using for
2904    communications. Presently there is no way of setting the default modem
2905    type at compile time, so use this option only for direct lines.
2906
2907    C-Kermit does not work well on certain workstations if it is not run
2908    from within a terminal window. For example, you cannot start C-Kermit
2909    on a NeXT by launching it directly from NeXTstep. Similarly for Sun
2910    workstations in the Open Windows environment. Run Kermit in a terminal
2911    window.
2912
2913 13. BIZARRE BEHAVIOR AT RUNTIME
2914
2915    [ [342]Top ] [ [343]Contents ] [ [344]Next ] [ [345]Previous ]
2916
2917    See the "beware file",
2918
2919    [346]ckubwr.txt, for hints about runtime misbehavior. This section
2920    lists some runtime problems that can be cured by rebuilding C-Kermit.
2921
2922    The program starts, but there is no prompt, and certain operations
2923    don't work (you see error messages like "Kermit command error in
2924    background execution"). This is because Kermit thinks it is running in
2925    the background. See conbgt() in [347]ckutio.c. Try rebuilding Kermit
2926    with:
2927
2928  -DPID_T=pid_t
2929
2930    added to your CFLAGS. If that doesn't help, find out the actual data
2931    type for pids (look in types.h or similar file) and use it in place of
2932    "pid_t", for example:
2933
2934  -DPID_T=short
2935
2936    Unexplainable and inappropriate error messages ("Sockets not supported
2937    on this device", etc) have been traced in at least one case to a lack
2938    of agreement between the system header files and the actual kernel.
2939    This happened because the GNU C compiler (gcc) was being used. gcc
2940    wants to have ANSI-C-compliant header files, and so part of the
2941    installation procedure for gcc is (or was) to run a shell script called
2942    "fixincludes", which translates the system's header files into a
2943    separate set of headers that gcc likes. So far so good. Later, a new
2944    version of the operating system is installed and nobody remembers to
2945    run fixincludes again. From that point, any program compiled with gcc
2946    that makes use of header files (particularly ioctl.h) is very likely to
2947    misbehave. Solution: run fixincludes again, or use your system's
2948    regular C compiler, libraries, and header files instead of gcc.
2949
2950 14. CRASHES AND CORE DUMPS
2951
2952    [ [348]Top ] [ [349]Contents ] [ [350]Next ] [ [351]Previous ]
2953
2954    If C-Kermit consistently dumps core at the beginning of a file
2955    transfer, look in SHOW FEATURES for CKREALPATH. If found, rebuild with
2956    -DNOREALPATH and see if that fixes the problem (some UNIXes have
2957    realpath() but it doesn't work).
2958
2959    Total failure of the Kermit program can occur because of bad memory
2960    references, bad system calls, or problems with dynamic memory
2961    allocation. First, try to reproduce the problem with debugging turned
2962    on: run Kermit with the -d command-line option (for example, "wermit
2963    -d") and then examine the resulting debug.log file. The last entry
2964    should be in the vicinity of the crash. In VMS, a crash automatically
2965    produces a "stack dump" which shows the routine where the crash occurs.
2966    In some versions of Unix, you can get a stack dump with "adb" -- just
2967    type "adb wermit core" and then give the command "$c", then Ctrl-D to
2968    quit (note: replace "wermit" by "kermit" or by the full pathname of the
2969    executable that crashed if it is not in the current directory). Or use
2970    gdb to get a backtrace, etc.
2971
2972    In edit 186, one implementation, UNISYS 5000/95 built with "make
2973    sys5r3", has been reported to run out of memory very quickly (e.g.
2974    while executing a short initialization file that contains a SET DIAL
2975    DIRECTORY command). Debug logs show that malloc calls are failing,
2976    reason unknown. For this and any other implementation that gives error
2977    messages about "malloc failure" or "memory allocation failure", rebuild
2978    the program *without* the -DDYNAMIC CFLAGS definition, for example:
2979
2980 make sys5r3 KFLAGS=-UDYNAMIC
2981
2982    As of edit 169, C-Kermit includes a malloc() debugging package which
2983    you may link with the Kermit program to catch runtime malloc errors.
2984    See the makefile entries for sunos41md and nextmd for examples of how
2985    to select malloc debugging. Once you have linked Kermit with the malloc
2986    debugger, it will halt with an informative message if a malloc-related
2987    error occurs and, if possible, dump core. For this reason,
2988    malloc-debugging versions of Kermit should be built without the "-s"
2989    link option (which removes symbols, preventing analysis of the core
2990    dump). You have several ways to track down the malloc error: Analyze
2991    the core dump with adb. Or reproduce the problem with "log debug" and
2992    then look at the code around the last debug.log entry. If you have gcc,
2993    build the program with "-g" added to CFLAGS and then debug it with gdb,
2994    e.g.
2995
2996 gdb wermit
2997 break main
2998 run
2999 .. set other breakpoints or watchpoints
3000 continue
3001
3002    Watchpoints are especially useful for finding memory leaks, but they
3003    make the program run about a thousand times slower than usual, so don't
3004    set them until the last possible moment. When a watchpoint is hit, you
3005    can use the "where" command to find out which C-Kermit source statement
3006    triggered it.
3007
3008    If you have the Pure Software Inc "Purify" product, see the sunos41cp
3009    makefile entry for an example of how to use it to debug C-Kermit.
3010
3011 15. SYSLOGGING
3012
3013    [ [352]Top ] [ [353]Contents ] [ [354]Next ] [ [355]Previous ]
3014
3015    "Syslogging" means recording selected information in the system log via
3016    the Unix syslog() facility, which is available in most Unix versions.
3017    Syslogging is not done unless C-Kermit is started with:
3018
3019 --syslog:n
3020
3021    on the command-line, where n is a number greater than 0 to indicate the
3022    level of syslogging. See [356]Section 4.2 of the [357]IKSD
3023    Administrator's Guide for details.
3024
3025    Obviously you can't depend on users to include --syslog:3 (or whatever)
3026    on the command line every time they start C-Kermit, so if you want
3027    certain kinds of records to be recorded in the system log, you can
3028    build C-Kermit with forced syslogging at the desired level; for
3029    example, to record logins and dialouts:
3030
3031 make linux KFLAGS=-DSYSLOGLEVEL=2
3032
3033    Levels 2 and 3 are the most likely candidates for this treatment. Level
3034    2 forces logging of all successful dialout calls (e.g. for checking
3035    against or phone bills), and level 3 records all connections (SET LINE
3036    or SET HOST / TELNET / RLOGIN, etc) so you can see who is connecting
3037    out from your system, and to where, e.g. for security auditing.
3038
3039    Level 2 and 3 records are equivalent to those in the connection log;
3040    see the [358]C-Kermit 7.0 Supplement) for a detailed description of the
3041    connection log.
3042
3043 16. BUILDING SECURE VERSIONS OF C-KERMIT 8.0
3044
3045    [ [359]Top ] [ [360]Contents ] [ [361]Next ] [ [362]Previous ]
3046
3047    C-Kermit 7.0 and later may be built with Kerberos(TM) and/or SRP(TM)
3048    (Secure Remote Password) and/or SSL/TLS security for strong
3049    authentication and encryption of Internet connections. These security
3050    methods require external libraries that, in their binary forms, are
3051    restricted from export by USA law. See the [363]Kermit Security
3052    Reference) for details. C-Kermit binaries themselves are likewise
3053    restricted; the C-Kermit binaries that are available for public
3054    download on the Internet are not allowed to contain the security
3055    options.
3056
3057    Sample makefile entries are provided for Linux and many other operating
3058    systems. A list of secure makefile entries is included in the Makefile.
3059    Complete instructions on building C-Kermit 8.0 with MIT Kerberos;
3060    Secure Remote Password; and/or OpenSSL can be found in the [364]Kermit
3061    Security Reference.
3062
3063    SSL/TLS and Kerberos builds are increasingly problematic with the
3064    "deprecation" of DES. There is code to detect the presence or absence
3065    of DES in the OpenSSL builds, but it doesn't always work because
3066    sometimes the SSL libraries are present but routines are missing from
3067    them.
3068
3069      * First of all remember that if your SSL and/or Kerberos header files
3070        and libraries are not in the default place, you'll need to override
3071        the assumed paths. To find out what the default places are type
3072        "make show", e.g.:
3073
3074 [~/kermit] make show
3075 prefix=/usr/local
3076 srproot=/usr/local
3077 sslroot=/usr/local
3078 manroot=/usr/local
3079 K4LIB=-L/usr/kerberos/lib
3080 K4INC=-I/usr/kerberos/include
3081 K5LIB=-L/usr/kerberos/lib
3082 K5INC=-I/usr/kerberos/include
3083 SRPLIB=-L/usr/local/lib
3084 SRPINC=-I/usr/local/include
3085 SSLLIB=-L/usr/local/ssl/lib
3086 SSLINC=-I/usr/local/ssl/include
3087 [~/kermit]
3088
3089      * You can override any or all of these by putting assignments on the
3090        'make' command line; examples:
3091
3092 make linux+krb5 \
3093  "K5INC=-I/usr/include/" \
3094  "K5LIB=-L/usr/lib64/"
3095
3096 make solaris9g+ssl \
3097   "SSLLIB=-L/opt/openssl-0.9.8q/lib" \
3098   "SSLINC=-I/opt/openssl-0.9.8q/include"
3099
3100        Or by setting and exporting environment variables prior to giving
3101        the 'make' command, as in this example in which (after Beta.01 was
3102        uploaded) C-Kermit was successfully linked with OpenSSL 1.0.0d,
3103        which was installed alongside OpenSSL 0.9.8r on the same computer.
3104        Note the use of the '-i' option instead of '-I' to force gcc to
3105        include the right header files (thanks to Nelson Beebe for this):
3106
3107 export PATH=/usr/bin:$PATH
3108 export SSLINC=-isystem/usr/include
3109 export "SSLLIB=-L/usr/lib -Wl,-rpath,/usr/lib"
3110 make linux+ssl
3111
3112        -i is explained in 'man gcc'; there is a change in what -I does
3113        that could have ramifications for many makefile targets, not just
3114        Kermit. And -Wl and -rpath are explained in 'man ld'; the idea is
3115        build a binary from which useful reports can be obtained with ldd.
3116      * Building with OpenSSL versions prior to 0.9.7 doesn't work, even
3117        though C-Kermit is designed to work with both the old and new
3118        versions. This could probably be fixed if anybody cares.
3119      * If a Kerberos or SSL build fails at link time because
3120        des_ecb3_encrypt, des_random_seed, and/or des_set_odd_parity come
3121        up missing, redo the build with -UCK_DES:
3122
3123 make netbsd+krb5+ssl \
3124  "K5INC=-I/usr/local/include" \
3125  "K5LIB=-L/usr/local/kerblib" KFLAGS=-UCK_DES
3126
3127        I suppose all the SSL and Kerberos targets could be recoded to
3128        figure this out automatically (i.e. that DES is installed but with
3129        some entry points missing), but it wouldn't be pretty.
3130      * Different Kerberos and OpenSSL distributions can be installed with
3131        different options; certain libraries might be missing or named
3132        differently (for example, libgssapi vs libgssapi_krb5). Some, but
3133        not all, of the C-Kermit makefile targets have been fixed to take
3134        some of these variations into account by testing for them, most
3135        notably the linux ones, linux+ssl, linux+krb5, and linux+krb5+ssl.
3136        Probably every target that builds with OpenSSL or Kerberos needs
3137        the same treatment but I won't have time.
3138      * Why doesn't C-Kermit just use Autoconf? Mainly because the makefile
3139        is full of targets for platforms that don't have Autoconf or any
3140        other tool like it. (Another reason is that I've always preferred
3141        that Kermit have the least dependencies possible on external
3142        toolsets.) Perhaps certain targets could be converted to use them,
3143        especially Linux because there are so many variations among
3144        distributions and versions. Anybody who wants to make, say, an
3145        Autonf-based Linux target, be my guest, but bear in mind that one
3146        Linux target is supposed to work for all versions and distributions
3147        of Linux on all platforms. Well, one target for Linux by itself,
3148        another for Linux with OpenSSL, another for Linux with Kerberos 5,
3149        and another for Linux with Kerberos 5 and OpenSSL. Each of these is
3150        supposed to work on any Linux version with any version of
3151        Kerberos 5 or OpenSSL.
3152
3153    Also note that Kerberos support is for the MIT version only, Heimdal
3154    and others are not supported (never have been). Of course anybody can
3155    pitch in and add or improve support for whatever they want.
3156
3157 17. INSTALLING C-KERMIT AS AN SSH SERVER SUBSYSTEM
3158
3159    [ [365]Top ] [ [366]Contents ] [ [367]Previous ]
3160
3161    This requires C-Kermit 8.0.206 or later and an SSH v2 server. If you
3162    list C-Kermit as a Subsystem in the SSH v2 server configuration file
3163    (as, for example, SFTP is listed), users can make SSH connections
3164    direct to a Kermit server as explained here:
3165
3166 [368]http://www.columbia.edu/kermit/skermit.html
3167
3168    The name and location of the SSH server configuration file depends on
3169    your platform, which SSH product(s) you have, etc. C-Kermit itself must
3170    be referred to in this file as "kermit-sshsub". On the host, install
3171    the C-Kermit 8.0.211 binary in the normal way. Then, in the same
3172    directory as the C-Kermit binary, make a symbolic link:
3173
3174 ln -s kermit kermit-sshsub
3175
3176    (Note: the "make install" makefile target does this for you.) Then in
3177    the sshd configuration file, add a line:
3178
3179 Subsystem  kermit   /some/path/kermit-sshsub
3180
3181    (where /some/path is the fully specified directory where the symlink
3182    is.) This is similar to the line that sets up the SFTP subsystem.
3183    Example:
3184
3185 Subsystem   sftp    /usr/local/libexec/sftp-server
3186 Subsystem   kermit  /usr/local/bin/kermit-sshsub
3187
3188    The mechanics might vary for other SSH servers; "man sshd" for details.
3189    The method shown here is used because the OpenSSH server does not
3190    permit the subsystem invocation to include command-line options.
3191    C-Kermit would have no way of knowing that it should enter Server mode
3192    if it were not called by a special name.
3193
3194    [ [369]Top ] [ [370]Contents ] [ [371]C-Kermit Home ] [ [372]C-Kermit
3195    9.0 Overview ] [ [373]Kermit Home ]
3196      __________________________________________________________________
3197
3198
3199     C-Kermit 9.0 Unix Installation Instructions / The Kermit Project /
3200     Columbia University / 30 June 2011
3201
3202 References
3203
3204    1. http://www.columbia.edu/
3205    2. mailto:kermit@columbia.edu
3206    3. http://www.columbia.edu/kermit/index.html
3207    4. http://www.columbia.edu/kermit/k95.html
3208    5. http://www.columbia.edu/kermit/ckermit.html
3209    6. http://www.columbia.edu/kermit/ckscripts.html
3210    7. http://www.columbia.edu/kermit/current.html
3211    8. http://www.columbia.edu/kermit/whatsnew.html
3212    9. http://www.columbia.edu/kermit/faq.html
3213   10. http://www.columbia.edu/kermit/support.html
3214   11. http://www.columbia.edu/kermit/ckuins.html#contents
3215   12. http://www.columbia.edu/kermit/ckermit.html
3216   13. http://www.columbia.edu/kermit/index.html
3217   14. http://www.columbia.edu/kermit/ckuins.html
3218   15. http://www.columbia.edu/kermit/ckuins.html#x0
3219   16. http://www.columbia.edu/kermit/ckuins.html#x1
3220   17. http://www.columbia.edu/kermit/ckuins.html#x2
3221   18. http://www.columbia.edu/kermit/ckuins.html#x3
3222   19. http://www.columbia.edu/kermit/ckuins.html#x4
3223   20. http://www.columbia.edu/kermit/ckuins.html#x5
3224   21. http://www.columbia.edu/kermit/ckuins.html#x6
3225   22. http://www.columbia.edu/kermit/ckuins.html#x7
3226   23. http://www.columbia.edu/kermit/ckuins.html#x8
3227   24. http://www.columbia.edu/kermit/ckuins.html#x9
3228   25. http://www.columbia.edu/kermit/ckuins.html#x10
3229   26. http://www.columbia.edu/kermit/ckuins.html#x11
3230   27. http://www.columbia.edu/kermit/ckuins.html#x12
3231   28. http://www.columbia.edu/kermit/ckuins.html#x13
3232   29. http://www.columbia.edu/kermit/ckuins.html#x14
3233   30. http://www.columbia.edu/kermit/ckuins.html#x15
3234   31. http://www.columbia.edu/kermit/ckuins.html#x16
3235   32. http://www.columbia.edu/kermit/ckuins.html#x17
3236   33. http://www.columbia.edu/kermit/ckuins.html#top
3237   34. http://www.columbia.edu/kermit/ckuins.html#contents
3238   35. http://www.columbia.edu/kermit/ckuins.html#x1
3239   36. http://www.columbia.edu/kermit/ckccfg.html
3240   37. http://www.columbia.edu/kermit/ckcbwr.html
3241   38. http://www.columbia.edu/kermit/ckubwr.html
3242   39. http://www.columbia.edu/kermit/ckcplm.html
3243   40. http://www.columbia.edu/kermit/ckuins.html#x2
3244   41. http://www.columbia.edu/kermit/ckuins.html#x3
3245   42. http://www.columbia.edu/kermit/ckuins.html#x4
3246   43. http://www.columbia.edu/kermit/ckuins.html#top
3247   44. http://www.columbia.edu/kermit/ckuins.html#contents
3248   45. http://www.columbia.edu/kermit/ckuins.html#x2
3249   46. http://www.columbia.edu/kermit/ckuins.html#x0
3250   47. ftp://www.columbia.edu/kermit/archives/cku211.tar.Z
3251   48. ftp://www.columbia.edu/kermit/archives/cku211.tar.gz
3252   49. http://kermit.columbia.edu/ftp/archives/cku211.tar.Z
3253   50. http://kermit.columbia.edu/ftp/archives/cku211.tar.gz
3254   51. ftp://www.columbia.edu/kermit/archives/cku211.tar
3255   52. http://kermit.columbia.edu/ftp/archives/cku211.tar
3256   53. http://www.columbia.edu/kermit/ckuins.html#x7
3257   54. http://www.columbia.edu/kermit/ckuins.html#x5
3258   55. http://www.columbia.edu/kermit/ckuins.html#x5
3259   56. http://www.columbia.edu/kermit/ckuins.html#x16
3260   57. http://www.columbia.edu/kermit/ckuins.html#top
3261   58. http://www.columbia.edu/kermit/ckuins.html#contents
3262   59. http://www.columbia.edu/kermit/ckuins.html#x3
3263   60. http://www.columbia.edu/kermit/ckuins.html#x1
3264   61. http://www.columbia.edu/kermit/ckuins.html#x5
3265   62. http://www.columbia.edu/kermit/ckuins.html#X10
3266   63. http://www.columbia.edu/kermit/ckuins.html#x11
3267   64. http://www.columbia.edu/kermit/ckuins.html#x10
3268   65. http://www.columbia.edu/kermit/ckuins.html#x3
3269   66. http://www.columbia.edu/kermit/ck80packages.html
3270   67. http://www.columbia.edu/kermit/ckuins.html#x10
3271   68. http://www.columbia.edu/kermit/ckuins.html#top
3272   69. http://www.columbia.edu/kermit/ckuins.html#contents
3273   70. http://www.columbia.edu/kermit/ckuins.html#x4
3274   71. http://www.columbia.edu/kermit/ckuins.html#x2
3275   72. ftp://www.columbia.edu/kermit/bin/
3276   73. http://www.columbia.edu/kermit/ck80binaries.html
3277   74. http://www.columbia.edu/kermit/ckuins.html#x7
3278   75. http://www.columbia.edu/kermit/ckuins.html#build
3279   76. http://www.columbia.edu/kermit/ckuins.html#x5
3280   77. http://www.columbia.edu/kermit/ckuins.html#x4
3281   78. http://www.columbia.edu/kermit/ckfaq.html#version
3282   79. http://www.columbia.edu/kermit/ckuins.html#x4
3283   80. mailto:kermit@columbia.edu
3284   81. http://www.columbia.edu/kermit/ckuins.html#top
3285   82. http://www.columbia.edu/kermit/ckuins.html#contents
3286   83. http://www.columbia.edu/kermit/ckuins.html#x5
3287   84. http://www.columbia.edu/kermit/ckuins.html#x3
3288   85. http://www.columbia.edu/kermit/ckuins.html#x8
3289   86. http://www.columbia.edu/kermit/ckuins.html#x9
3290   87. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
3291   88. ftp://kermit.columbia.edu/kermit/c-kermit/ckpker.mk
3292   89. ftp://kermit.columbia.edu/kermit/c-kermit/ckubsd.mak
3293   90. http://www.columbia.edu/kermit/ckuins.html#x5
3294   91. mailto:kermit-support@columbia.edu
3295   92. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
3296   93. http://www.columbia.edu/kermit/ckuins.html#x7
3297   94. mailto:kermit-support@columbia.edu
3298   95. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
3299   96. http://www.columbia.edu/kermit/ckuins.html#x5.4
3300   97. http://www.columbia.edu/kermit/ckuins.html#x10
3301   98. http://www.columbia.edu/kermit/ckuins.html#x11
3302   99. http://www.columbia.edu/kermit/ckuins.html#x5
3303  100. http://www.columbia.edu/kermit/iksd.html
3304  101. http://www.columbia.edu/kermit/ckuins.html#top
3305  102. http://www.columbia.edu/kermit/ckuins.html#contents
3306  103. http://www.columbia.edu/kermit/ckuins.html#x4.1
3307  104. http://www.columbia.edu/kermit/ckccfg.html
3308  105. http://www.columbia.edu/kermit/ckuins.html#x4.1
3309  106. http://www.columbia.edu/kermit/ckuins.html#x4.2
3310  107. http://www.columbia.edu/kermit/ckuins.html#x4.3
3311  108. http://www.columbia.edu/kermit/ckuins.html#x4.4
3312  109. http://www.columbia.edu/kermit/ckuins.html#x4.5
3313  110. http://www.columbia.edu/kermit/ckccfg.html
3314  111. http://www.columbia.edu/kermit/ckccfg.html#x8
3315  112. http://www.columbia.edu/kermit/iksd.html
3316  113. http://www.columbia.edu/kermit/iksd.html
3317  114. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
3318  115. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
3319  116. mailto:kermit-support@columbia.edu
3320  117. ftp://kermit.columbia.edu/kermit/c-kermit/ckcmai.c
3321  118. http://www.columbia.edu/kermit/ckuins.html#x15
3322  119. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3323  120. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
3324  121. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3325  122. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
3326  123. ftp://kermit.columbia.edu/kermit/c-kermit/ckcnet.c
3327  124. ftp://kermit.columbia.edu/kermit/c-kermit/ckcnet.c
3328  125. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3329  126. ftp://kermit.columbia.edu/kermit/c-kermit/ckcuni.c
3330  127. mailto:kermit-support@columbia.edu
3331  128. http://www.columbia.edu/kermit/ckuins.html#top
3332  129. http://www.columbia.edu/kermit/ckuins.html#contents
3333  130. http://www.columbia.edu/kermit/ckuins.html#x4
3334  131. http://www.columbia.edu/kermit/ckuins.html#x4.2
3335  132. http://www.columbia.edu/kermit/ckuins.html#x4.0
3336  133. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
3337  134. ftp://kermit.columbia.edu/kermit/c-kermit/ckubwr.txt
3338  135. http://www.columbia.edu/kermit/ckubwr.html
3339  136. ftp://kermit.columbia.edu/kermit/c-kermit/ckwart.c
3340  137. ftp://kermit.columbia.edu/kermit/c-kermit/ckcpro.w
3341  138. ftp://kermit.columbia.edu/kermit/c-kermit/ckcpro.c
3342  139. http://www.columbia.edu/kermit/ckuins.html#top
3343  140. http://www.columbia.edu/kermit/ckuins.html#contents
3344  141. http://www.columbia.edu/kermit/ckuins.html#x4
3345  142. http://www.columbia.edu/kermit/ckuins.html#x4.3
3346  143. http://www.columbia.edu/kermit/ckuins.html#x4.1
3347  144. http://www.columbia.edu/kermit/ckuins.html#x5
3348  145. http://www.columbia.edu/kermit/ckuins.html#top
3349  146. http://www.columbia.edu/kermit/ckuins.html#contents
3350  147. http://www.columbia.edu/kermit/ckuins.html#x4
3351  148. http://www.columbia.edu/kermit/ckuins.html#x4.4
3352  149. http://www.columbia.edu/kermit/ckuins.html#x4.2
3353  150. http://www.columbia.edu/kermit/ckuins.html#top
3354  151. http://www.columbia.edu/kermit/ckuins.html#contents
3355  152. http://www.columbia.edu/kermit/ckuins.html#x4
3356  153. http://www.columbia.edu/kermit/ckuins.html#x4.5
3357  154. http://www.columbia.edu/kermit/ckuins.html#x4.3
3358  155. ftp://kermit.columbia.edu/kermit/c-kermit/ckpker.mk
3359  156. http://www.columbia.edu/kermit/ckuins.html#top
3360  157. http://www.columbia.edu/kermit/ckuins.html#contents
3361  158. http://www.columbia.edu/kermit/ckuins.html#x4
3362  159. http://www.columbia.edu/kermit/ckuins.html#x4.4
3363  160. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
3364  161. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
3365  162. ftp://kermit.columbia.edu/kermit/c-kermit/ckcpro.w
3366  163. http://www.columbia.edu/kermit/ckuins.html#top
3367  164. http://www.columbia.edu/kermit/ckuins.html#contents
3368  165. http://www.columbia.edu/kermit/ckuins.html#x6
3369  166. http://www.columbia.edu/kermit/ckuins.html#x4
3370  167. http://www.columbia.edu/kermit/ckuins.html#x5.1
3371  168. http://www.columbia.edu/kermit/ckuins.html#x5.2
3372  169. http://www.columbia.edu/kermit/ckuins.html#x5.3
3373  170. http://www.columbia.edu/kermit/ckuins.html#x5.4
3374  171. http://www.columbia.edu/kermit/
3375  172. http://www.columbia.edu/kermit/ckuins.html#x5.4
3376  173. http://www.columbia.edu/kermit/ckuins.html#x5.3
3377  174. ftp://kermit.columbia.edu/kermit/c-kermit/COPYING.TXT
3378  175. ftp://kermit.columbia.edu/kermit/c-kermit/ckermit.ini
3379  176. http://www.columbia.edu/kermit/ckuins.html#x5.1
3380  177. ftp://kermit.columbia.edu/kermit/c-kermit/ckermod.ini
3381  178. ftp://kermit.columbia.edu/kermit/c-kermit/ckermit70.txt
3382  179. http://www.columbia.edu/kermit/ck60manual.html
3383  180. http://www.columbia.edu/kermit/ckermit70.html
3384  181. ftp://kermit.columbia.edu/kermit/c-kermit/ckermit80.txt
3385  182. http://www.columbia.edu/kermit/ck60manual.html
3386  183. http://www.columbia.edu/kermit/ckermit80.html
3387  184. ftp://kermit.columbia.edu/kermit/c-kermit/ckcbwr.txt
3388  185. http://www.columbia.edu/kermit/ckcbwr.html
3389  186. ftp://kermit.columbia.edu/kermit/c-kermit/ckubwr.txt
3390  187. http://www.columbia.edu/kermit/ckubwr.html
3391  188. ftp://kermit.columbia.edu/kermit/c-kermit/ckuins.txt
3392  189. http://www.columbia.edu/kermit/ckuins.html
3393  190. ftp://kermit.columbia.edu/kermit/c-kermit/ckccfg.txt
3394  191. http://www.columbia.edu/kermit/ckccfg.html
3395  192. ftp://kermit.columbia.edu/kermit/c-kermit/ckcplm.txt
3396  193. http://www.columbia.edu/kermit/ckcplm.html
3397  194. ftp://kermit.columbia.edu/kermit/c-kermit/ca_certs.pem
3398  195. http://www.columbia.edu/kermit/ckuins.html#x16"
3399  196. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
3400  197. http://www.columbia.edu/kermit/ckuins.html#x?
3401  198. http://www.columbia.edu/kermit/ckuins.html#x11
3402  199. http://www.columbia.edu/kermit/ckuins.html#x5.2
3403  200. http://www.columbia.edu/kermit/ckermit.html#download
3404  201. http://www.columbia.edu/kermit/ck80binaries.html
3405  202. http://www.columbia.edu/kermit/ckermit.html#download
3406  203. http://www.columbia.edu/kermit/ckuins.html#top
3407  204. http://www.columbia.edu/kermit/ckuins.html#contents
3408  205. http://www.columbia.edu/kermit/ckuins.html#x7
3409  206. http://www.columbia.edu/kermit/ckuins.html#x5
3410  207. http://www.columbia.edu/kermit/ckuins.html#top
3411  208. http://www.columbia.edu/kermit/ckuins.html#contents
3412  209. http://www.columbia.edu/kermit/ckuins.html#x8
3413  210. http://www.columbia.edu/kermit/ckuins.html#x6
3414  211. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3415  212. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3416  213. http://www.columbia.edu/kermit/ckuins.html#x4.0
3417  214. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
3418  215. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
3419  216. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
3420  217. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3421  218. http://www.columbia.edu/kermit/ckuins.html#x10
3422  219. http://www.columbia.edu/kermit/ckccfg.html#x2
3423  220. http://www.columbia.edu/kermit/ckccfg.html
3424  221. http://www.columbia.edu/kermit/ckuins.html#x4
3425  222. http://www.columbia.edu/kermit/ckuins.html#x10
3426  223. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3427  224. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3428  225. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3429  226. http://www.columbia.edu/kermit/ckuins.html#x9.4
3430  227. mailto:kermit-support@columbia.edu
3431  228. http://www.columbia.edu/kermit/ckuins.html#top
3432  229. http://www.columbia.edu/kermit/ckuins.html#contents
3433  230. http://www.columbia.edu/kermit/ckuins.html#x9
3434  231. http://www.columbia.edu/kermit/ckuins.html#x7
3435  232. http://www.columbia.edu/kermit/ckccfg.html
3436  233. http://www.columbia.edu/kermit/ckccfg.html
3437  234. http://www.columbia.edu/kermit/ckuins.html#top
3438  235. http://www.columbia.edu/kermit/ckuins.html#contents
3439  236. http://www.columbia.edu/kermit/ckuins.html#x10
3440  237. http://www.columbia.edu/kermit/ckuins.html#x8
3441  238. http://www.columbia.edu/kermit/ckuins.html#x9.1
3442  239. http://www.columbia.edu/kermit/ckuins.html#x9.1.1
3443  240. http://www.columbia.edu/kermit/ckuins.html#x9.1.2
3444  241. http://www.columbia.edu/kermit/ckuins.html#x9.1.3
3445  242. http://www.columbia.edu/kermit/ckuins.html#x9.2
3446  243. http://www.columbia.edu/kermit/ckuins.html#x9.3
3447  244. http://www.columbia.edu/kermit/ckuins.html#x9.4
3448  245. http://www.columbia.edu/kermit/ckuins.html#x9.5
3449  246. http://www.columbia.edu/kermit/ckuins.html#x9.6
3450  247. http://www.columbia.edu/kermit/ckuins.html#x9.7
3451  248. http://www.columbia.edu/kermit/ckuins.html#x9.8
3452  249. http://www.columbia.edu/kermit/ckuins.html#x9.9
3453  250. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3454  251. http://www.columbia.edu/kermit/ckuins.html#top
3455  252. http://www.columbia.edu/kermit/ckuins.html#x9
3456  253. http://www.columbia.edu/kermit/ckuins.html#contents
3457  254. http://www.columbia.edu/kermit/ckuins.html#x9.2
3458  255. http://www.columbia.edu/kermit/ckuins.html#x9.1.1
3459  256. http://www.columbia.edu/kermit/ckuins.html#x9.1.2
3460  257. http://www.columbia.edu/kermit/ckuins.html#x9.1.3
3461  258. http://www.columbia.edu/kermit/ckuins.html#top
3462  259. http://www.columbia.edu/kermit/ckuins.html#contents
3463  260. http://www.columbia.edu/kermit/ckuins.html#x9
3464  261. http://www.columbia.edu/kermit/ckuins.html#x9.1
3465  262. http://www.columbia.edu/kermit/ckuins.html#x9.1.3
3466  263. http://www.columbia.edu/kermit/ckuins.html#x9.1.1
3467  264. http://www.columbia.edu/kermit/ckuins.html#top
3468  265. http://www.columbia.edu/kermit/ckuins.html#contents
3469  266. http://www.columbia.edu/kermit/ckuins.html#x9
3470  267. http://www.columbia.edu/kermit/ckuins.html#x9.1
3471  268. http://www.columbia.edu/kermit/ckuins.html#x9.2
3472  269. http://www.columbia.edu/kermit/ckuins.html#x9.1.2
3473  270. http://www.opengroup.org/onlinepubs/007904975/
3474  271. http://www.columbia.edu/kermit/ckuins.html#x9.1.1
3475  272. http://www.columbia.edu/kermit/ckuins.html#top
3476  273. http://www.columbia.edu/kermit/ckuins.html#contents
3477  274. http://www.columbia.edu/kermit/ckuins.html#x9
3478  275. http://www.columbia.edu/kermit/ckuins.html#x9.1
3479  276. http://www.columbia.edu/kermit/ckuins.html#x9.3
3480  277. http://www.columbia.edu/kermit/ckuins.html#x9.1
3481  278. http://www.columbia.edu/kermit/ckuins.html#top
3482  279. http://www.columbia.edu/kermit/ckuins.html#contents
3483  280. http://www.columbia.edu/kermit/ckuins.html#x9
3484  281. http://www.columbia.edu/kermit/ckuins.html#x9.4
3485  282. http://www.columbia.edu/kermit/ckuins.html#x9.2
3486  283. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
3487  284. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3488  285. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
3489  286. http://www.columbia.edu/kermit/ckuins.html#top
3490  287. http://www.columbia.edu/kermit/ckuins.html#contents
3491  288. http://www.columbia.edu/kermit/ckuins.html#x9
3492  289. http://www.columbia.edu/kermit/ckuins.html#x9.5
3493  290. http://www.columbia.edu/kermit/ckuins.html#x9.3
3494  291. http://www.columbia.edu/kermit/cable.html
3495  292. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3496  293. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
3497  294. http://www.columbia.edu/kermit/ckuins.html#top
3498  295. http://www.columbia.edu/kermit/ckuins.html#contents
3499  296. http://www.columbia.edu/kermit/ckuins.html#x9
3500  297. http://www.columbia.edu/kermit/ckuins.html#x9.6
3501  298. http://www.columbia.edu/kermit/ckuins.html#x9.4
3502  299. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
3503  300. ftp://kermit.columbia.edu/kermit/c-kermit/ckuus3.c
3504  301. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3505  302. http://www.columbia.edu/kermit/ckuins.html#top
3506  303. http://www.columbia.edu/kermit/ckuins.html#contents
3507  304. http://www.columbia.edu/kermit/ckuins.html#x9
3508  305. http://www.columbia.edu/kermit/ckuins.html#x9.7
3509  306. http://www.columbia.edu/kermit/ckuins.html#x9.5
3510  307. http://www.columbia.edu/kermit/ckuins.html#top
3511  308. http://www.columbia.edu/kermit/ckuins.html#contents
3512  309. http://www.columbia.edu/kermit/ckuins.html#x9
3513  310. http://www.columbia.edu/kermit/ckuins.html#x9.8
3514  311. http://www.columbia.edu/kermit/ckuins.html#x9.6
3515  312. http://www.columbia.edu/kermit/ckuins.html#top
3516  313. http://www.columbia.edu/kermit/ckuins.html#contents
3517  314. http://www.columbia.edu/kermit/ckuins.html#x9
3518  315. http://www.columbia.edu/kermit/ckuins.html#x9.9
3519  316. http://www.columbia.edu/kermit/ckuins.html#x9.7
3520  317. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3521  318. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3522  319. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
3523  320. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
3524  321. http://www.columbia.edu/kermit/ckuins.html#top
3525  322. http://www.columbia.edu/kermit/ckuins.html#contents
3526  323. http://www.columbia.edu/kermit/ckuins.html#x9
3527  324. http://www.columbia.edu/kermit/ckuins.html#x10
3528  325. http://www.columbia.edu/kermit/ckuins.html#x9.8
3529  326. http://www.columbia.edu/kermit/ckuins.html#top
3530  327. http://www.columbia.edu/kermit/ckuins.html#contents
3531  328. http://www.columbia.edu/kermit/ckuins.html#x11
3532  329. http://www.columbia.edu/kermit/ckuins.html#x9
3533  330. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3534  331. http://www.columbia.edu/kermit/ckuins.html#x11
3535  332. http://www.columbia.edu/kermit/ckuins.html#top
3536  333. http://www.columbia.edu/kermit/ckuins.html#contents
3537  334. http://www.columbia.edu/kermit/ckuins.html#x12
3538  335. http://www.columbia.edu/kermit/ckuins.html#x10
3539  336. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3540  337. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
3541  338. http://www.columbia.edu/kermit/ckuins.html#top
3542  339. http://www.columbia.edu/kermit/ckuins.html#contents
3543  340. http://www.columbia.edu/kermit/ckuins.html#x13
3544  341. http://www.columbia.edu/kermit/ckuins.html#x11
3545  342. http://www.columbia.edu/kermit/ckuins.html#top
3546  343. http://www.columbia.edu/kermit/ckuins.html#contents
3547  344. http://www.columbia.edu/kermit/ckuins.html#x14
3548  345. http://www.columbia.edu/kermit/ckuins.html#x12
3549  346. ftp://kermit.columbia.edu/kermit/c-kermit/ckubwr.txt
3550  347. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
3551  348. http://www.columbia.edu/kermit/ckuins.html#top
3552  349. http://www.columbia.edu/kermit/ckuins.html#contents
3553  350. http://www.columbia.edu/kermit/ckuins.html#x15
3554  351. http://www.columbia.edu/kermit/ckuins.html#x13
3555  352. http://www.columbia.edu/kermit/ckuins.html#top
3556  353. http://www.columbia.edu/kermit/ckuins.html#contents
3557  354. http://www.columbia.edu/kermit/ckuins.html#x16
3558  355. http://www.columbia.edu/kermit/ckuins.html#x14
3559  356. http://www.columbia.edu/kermit/uiksd.html#x4.2
3560  357. http://www.columbia.edu/kermit/uiksd.html
3561  358. http://www.columbia.edu/kermit/ckermit2.html
3562  359. http://www.columbia.edu/kermit/ckuins.html#top
3563  360. http://www.columbia.edu/kermit/ckuins.html#contents
3564  361. http://www.columbia.edu/kermit/ckuins.html#x17
3565  362. http://www.columbia.edu/kermit/ckuins.html#x15
3566  363. http://www.columbia.edu/kermit/security.html
3567  364. http://www.columbia.edu/kermit/security80.html
3568  365. http://www.columbia.edu/kermit/ckuins.html#top
3569  366. http://www.columbia.edu/kermit/ckuins.html#contents
3570  367. http://www.columbia.edu/kermit/ckuins.html#x16
3571  368. http://www.columbia.edu/kermit/skermit.html
3572  369. http://www.columbia.edu/kermit/ckuins.html#top
3573  370. http://www.columbia.edu/kermit/ckuins.html#contents
3574  371. http://www.columbia.edu/kermit/ckermit.html
3575  372. http://www.columbia.edu/kermit/ck90updates.html
3576  373. http://www.columbia.edu/kermit/index.html