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