home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / cku200txt.tar / ckuins.txt < prev    next >
Text File  |  2001-12-18  |  169KB  |  3,401 lines

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