home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ck9197.zip / ckccfg.txt < prev    next >
Text File  |  2000-02-27  |  64KB  |  1,319 lines

  1. C-KERMIT CONFIGURATION INFORMATION                                   -*-text-*-
  2.  
  3.   As of C-Kermit version:  7.0.197
  4.   This file last updated:  8 February 2000
  5.  
  6.   Frank da Cruz, Columbia University
  7.  
  8.   Copyright (C) 1985, 2000,
  9.     Trustees of Columbia University in the City of New York.
  10.     All rights reserved.  See the C-Kermit COPYING.TXT file or the
  11.     copyright text in the ckcmai.c module for disclaimer and permissions.
  12.  
  13.  
  14. DOCUMENTATION
  15.  
  16.   Frank da Cruz and Christine M. Gianone, "Using C-Kermit", Second Edition,
  17.   1997, Digital Press / Butterworth-Heinemann, Woburn, MA, ISBN 1-55558-164-1
  18.   US single-copy price: $44.95; quantity discounts available.  Available in
  19.   computer bookstores or directly from Columbia University:
  20.  
  21.     The Kermit Project
  22.     Columbia University
  23.     612 West 115th Street
  24.     New York NY  10025-7799  USA
  25.     Telephone: +1 (212) 854-3703
  26.     Email: kermit-orders@columbia.edu
  27.     Web: http://www.columbia.edu/kermit/
  28.  
  29.   The CKERMIT2.TXT file contains supplementary info for C-Kermit 7.0 to be
  30.   used until the 3rd edition of the manual is ready.
  31.  
  32.  
  33. WHAT IS IN THIS FILE
  34.  
  35. This file is for C-Kermit developers.  It explains compilation options,
  36. feature selection, and compilation problem-solving, as they (should) apply to
  37. all versions of C-Kermit: UNIX, VMS, OS/2, and the rest.
  38.  
  39. CONTENTS
  40.  
  41.   0. OVERVIEW
  42.   1. FILE TRANSFER
  43.   2. SERIAL COMMUNICATION SPEEDS
  44.   3. FULLSCREEN FILE TRANSFER DISPLAY
  45.   4. CHARACTER SETS
  46.   5. APC EXECUTION
  47.   6. PROGRAM SIZE
  48.      6.1. When Memory Is Not a Problem
  49.      6.2. Removing Features
  50.      6.3. Changing Buffer Sizes
  51.      6.4. Other Size-Related Items
  52.      6.5. Space/Time Tradeoffs
  53.   7. DIALER SUPPORT
  54.   8. NETWORK SUPPORT
  55.      8.1. TCP/IP
  56.       8.1.1. Firewalls
  57.       8.1.2. Solving Compilation and Linking Problems
  58.       8.1.3. Enabling Host Address Lists
  59.       8.1.4. Enabling Telnet NAWS
  60.           8.1.5. Enabling Incoming TCP/IP Connections
  61.      8.2. X.25
  62.      8.3. Other Networks
  63.   9. EXCEPTION HANDLING
  64.  10. SECURITY FEATURES
  65.  11. ENABLING SELECT()
  66.  12. I/O REDIRECTION
  67.  13. FLOATING-POINT TIMERS
  68.  14. SPECIAL CONFIGURATIONS
  69.  APPENDIX I: SUMMARY OF COMPILE-TIME OPTIONS
  70.  
  71.  
  72. 0. OVERVIEW
  73.  
  74. This file gives more-or-less system-independent configuration information for
  75. C-Kermit 5A and later.  The major topics covered include program size (and how
  76. to reduce it), how to include or exclude particular features, notes on modem
  77. and network support, and a list of C-Kermit's compile-time options.
  78.  
  79. For details about your particular operating system, consult the system-specific
  80. installation instructions file:
  81.  
  82.   CK?INS.TXT
  83.  
  84. (? = U for UNIX, V for VMS, etc, for example, CKUINS.TXT for UNIX, CKVINS.TXT
  85. for VAX/VMS, CKDINS.TXT for Data General AOS/VS, etc).  Also consult the
  86. following files (use lowercase on UNIX):
  87.  
  88.   CKAAAA.TXT   Explanation of file naming conventions
  89.   CKCPLM.TXT   C-Kermit "program logic manual"
  90.   CK?KER.HLP   System-specific help file, if any
  91.   CK?KER.MAK   System-specific build procedure
  92.   CKCBWR.TXT   "Beware file": C-Kermit bugs, limitations, workarounds
  93.   CK?BWR.TXT   System-specific "beware file"
  94.   CKERMIT2.TXT User-level documentation for new features since "Using
  95.                C-Kermit", 2nd Edition, was published.
  96.   CKCnnn.TXT   Program edit history for edit nnn, e.g. CKC195.TXT.
  97.  
  98.  
  99. 1. FILE TRANSFER
  100.  
  101. Prior to version 7.0, C-Kermit was always built with the most conservative
  102. Kermit file-transfer protocol defaults on every platform: no control-character
  103. prefixing, 94-byte packets, and a window size of 1.
  104.  
  105. Starting in version 7.0, fast settings are the default for UNIX and VMS.  To
  106. override these at compile time, include:
  107.  
  108.   -DNOFAST
  109.  
  110. in the C compiler CFLAGS.  Even with the fast defaults, it will drop down to
  111. whatever window and packet sizes requested by the other Kermit, if these are
  112. smaller, when sending files (except for control-character unprefixing, which
  113. is not negotiated, and which is now set to CAUTIOUS rather than NONE at
  114. startup).  C-Kermit's settings prevail when it is receiving.  To build with
  115. fast defaults for other platforms, add:
  116.  
  117.   -DCK_FAST
  118.  
  119. to CFLAGS.
  120.  
  121.  
  122. 2. SERIAL COMMUNICATION SPEEDS
  123.  
  124. As of 6 September 1997, a new simplified mechanism for obtaining the list
  125. of legal serial interface speeds is in place:
  126.  
  127.  . If the symbol TTSPDLIST is defined, the system-dependent routine
  128.    ttspdlist() is called at program initialization to obtain the list.
  129.  
  130.  . This symbol should be defined only for C-Kermit implementations that
  131.    have implemented the ttspdlist() function, typically in the ck?tio.c
  132.    module.  See ckutio.c for an example.
  133.  
  134.  . TTSPDLIST is automatically defined in ckcdeb.h for UNIX.  Add the
  135.    appropriate #ifdefs for other platforms when the corresponding
  136.    ttspdlist() functions are filled in.
  137.  
  138.  . If TTSPDLIST is (or normally would be) defined, the old code (described
  139.    below) can still be selected by defining NOTTSPDLIST.
  140.  
  141. The ttspdlist() function can obtain the speeds in any way that works.  For
  142. example, based simply on #ifdef Bnnnn..#endif (in UNIX).  Although it might be
  143. better to actually check each speed against the currently selected hardware
  144. interface before allowing it in the array, there is usually no passive and/or
  145. reliable and safe way to do this, and so it's better to let some speeds into
  146. the array that might not work, than it is to erroneously exclude others.
  147. Speeds that don't work are caught when the SET SPEED command is actually given.
  148.  
  149. Note that this scheme does not necessarily rule out split speed operation,
  150. but effectively it does in C-Kermit as presently constituted since there are
  151. no commands to set input and output speed separately (except the special
  152. case "set speed 75/1200").
  153.  
  154. Note that some platforms, notably AIX 4.2 and 4.3, implement high serial
  155. speeds transparently to the application, e.g. by mapping 50 bps to 57600 bps,
  156. and so on.  See (e.g.) ckubwr.txt for examples.
  157.  
  158. That's the whole deal.  When TTSPDLIST is *not* defined, the following applies:
  159.  
  160. Speeds are defined in two places: the SET SPEED keyword list in the command
  161. parser (as of this writing, in the ckuus3.c source file), and in the system-
  162. dependent communications i/o module, CK?TIO.C, functions ttsspd() (set speed)
  163. and ttgspd() (get speed).  The following speeds are assumed to be available
  164. in all versions:
  165.  
  166.   0, 110, 300, 600, 1200, 2400, 4800, 9600
  167.  
  168. If one or more of these speeds is not supported by your system, you'll need
  169. to change the source code (this has never happened so far).  Other speeds
  170. that are not common to all systems have Kermit-specific symbols:
  171.  
  172.                Symbol       Symbol
  173.   Speed (bps)  to enable    to disable
  174.        50       BPS_50       NOB_50
  175.        75       BPS_75       NOB_75
  176.        75/1200  BPS_7512     NOB_7512
  177.       134.5     BPS_134      NOB_134
  178.       150       BPS_150      NOB_150
  179.       200       BPS_200      NOB_200
  180.      1800       BPS_1800     NOB_1800
  181.      3600       BPS_3600     NOB_3600
  182.      7200       BPS_7200     NOB_7200
  183.     14400       BPS_14K      NOB_14K
  184.     19200       BPS_19K      NOB_19K
  185.     28800       BPS_28K      NOB_28K
  186.     38400       BPS_38K      NOB_38K
  187.     57600       BPS_57K      NOB_57K
  188.     76800       BPS_76K      NOB_76K
  189.    115200       BPS_115K     NOB_155K
  190.    230400       BPS_230K     NOB_230K
  191.    460800       BPS_460K     NOB_460K
  192.    921600       BPS_921K     NOB_921K
  193.  
  194. and maybe some others...
  195.  
  196. The ckcdeb.h header file contains default speed configurations for the many
  197. systems that C-Kermit supports.  You can override these defaults by (a)
  198. editing ckcdeb.h, or (b) defining the appropriate enabling and/or disabling
  199. symbols on the CC command line, for example:
  200.  
  201.   -DBPS_14400 -DNOB_115200
  202.  
  203. or the "make" command line, e.g.:
  204.  
  205.   make blah "KFLAGS=-DBPS_14400 -DNOB_115200"
  206.  
  207. Note: some speeds have no symbols defined for them, because they have never
  208. been needed: 12.5bps, 45.5bps, 20000bps, etc.  These can easily be added if
  209. required (but they will work only if the OS supports them).
  210.  
  211. IMPORTANT: Adding one of these flags at compile time does not necessarily mean
  212. that you will be able to use that speed.  A particular speed is usable only if
  213. your underlying operating system supports it.  In particular, it needs to be
  214. defined in the appropriate system header file (e.g. in UNIX, cd to
  215. /usr/include and grep for B9600 in *.h and sys/*.h to find the header file
  216. that contains the definitions for the supported speeds), and supported by the
  217. serial device driver, and of course by the physical device itself.
  218.  
  219. ALSO IMPORTANT: The list of available speeds is independent of how they are
  220. set.  The many UNIXes, for example, offer a wide variety of APIs that are
  221. BSD-based, SYSV-based, POSIX-based, and purely made up.  See the ttsspd(),
  222. ttgspd(), and ttspdlist() routines for illustrations.
  223.  
  224. The latest entries in this horserace are the tcgetspeed() and ttsetspeed()
  225. routines found in UnixWare 7.  Unlike other methods, they accept the entire
  226. range of integers (longs really) as speed values, rather than certain codes,
  227. and return an error if the number is not, in fact, a legal speed for the
  228. device/driver in question.  In this case, there is no way to build a list of
  229. legal speeds at compile time, since no Bnnnn symbols are defined (except for
  230. "depracated, legacy" interfaces like ioctl()) and so the legal speed list must
  231. be enumerated in the code -- see ttspdlist() in ckutio.c.
  232.  
  233.  
  234. 3. FULLSCREEN FILE TRANSFER DISPLAY
  235.  
  236. New to edit 180 is support for an MS-DOS-Kermit-like local-mode full screen
  237. file transfer display, accomplished using the curses library, or something
  238. equivalent (for example, the Screen Manager on DEC VMS).  To enable this
  239. feature, include the following in your CFLAGS:
  240.  
  241.   -DCK_CURSES
  242.  
  243. and then change your build procedure (if necessary) to include the necessary
  244. libraries, usually "curses", perhaps also "termcap" or "termlib":
  245.  
  246.   "LIBS= -lcurses -ltermcap"
  247.   "LIBS= -lcurses -ltermlib"
  248.   "LIBS= -lcurses"
  249.   "LIBS= -ltermlib"
  250.  
  251. to pull in the required libraries.  "man curses" for further information, and
  252. search through the makefile for "CK_CURSES" to see many examples.
  253.  
  254. Plus maybe you'll have to replace "curses" above by "ncurses".
  255.  
  256. There might still be a complication.  Some implementations of curses reserve
  257. the right to alter the buffering on the output file without restoring it
  258. afterwards, which can leave Kermit's command processing in a mess when the
  259. prompt comes back after a fullscreen file transfer display.  The typical
  260. symptom is that characters you type at the prompt after a file transfer do not
  261. echo until you press the Return (Enter) key.  If this happens to you, try
  262. adding
  263.  
  264.   -DCK_NEWTERM
  265.  
  266. to your makefile entry (see comments in screenc() in ckuusx.c for an
  267. explanation).
  268.  
  269. In SCO Xenix and SCO UNIX, there are two separate curses libraries, one based
  270. on termcap and the other based on terminfo.  The default library, usually
  271. terminfo, is established when the development system is installed.  To
  272. manually select terminfo (at compile time):
  273.  
  274.   compile -DM_TERMINFO and link -ltinfo
  275.  
  276. and to manually select termcap:
  277.  
  278.   compile -DM_TERMCAP and link -ltcap -ltermlib
  279.  
  280. <curses.h> looks at M_TERMINFO and M_TERMCAP to decide which header files to
  281. use.  /usr/lib/libcurses.a is a link to either libtinfo.a or libtcap.a.  The
  282. C-Kermit compilation options must agree with the version of the curses library
  283. that is actually installed.
  284.  
  285. NOTE: If you are doing an ANSI-C compilation and you get compile time warnings
  286. like the following:
  287.  
  288.   Warning: function not declared in ckuusx.c: wmove, printw, wclrtoeol,
  289.   wclear, wrefresh, endwin, etc...
  290.  
  291. it means that your <curses.h> file does not contain prototypes for these
  292. functions.  The warnings should be harmless.
  293.  
  294. New to edit 190 is the ability to refresh a messed-up full-screen display,
  295. e.g. after receiving a broadcast message.  This depends on the curses package
  296. including the wrefresh() and clearok() functions and the curscr variable.  If
  297. your version has these, or has code to simulate them, then add:
  298.  
  299.   -DCK_WREFRESH
  300.  
  301. The curses and termcap libraries add considerable size to the program image
  302. (e.g. about 20K on a SUN-4, 40K on a 386).  On some small systems, such as the
  303. AT&T 6300 PLUS, curses support can push Kermit over the edge... even though it
  304. compiles, loads, and runs correctly, its increased size apparently makes it
  305. swap constantly, slowing it down to a crawl, even when the curses display is
  306. not in use.  Some new makefile entries have been added to take care of this
  307. (e.g. sys3upcshcc), but similar tricks might be necessary in other cases too.
  308.  
  309. Also new to edit 190 is an ASCII-graphic percent-done "thermometer".  This is
  310. not included unless you add:
  311.  
  312.   -DCK_PCT_BAR
  313.  
  314. to your CFLAGS.
  315.  
  316. Just below the bar is a running display of the transfer rate, as a flat
  317. quotient of file characters per elapsed seconds so far.  You can change this
  318. to an average that gives greater weight to recent history (0.25 *
  319. instantaneous cps + 0.75 * historical cps) by adding -DCPS_WEIGHTED to
  320. your CFLAGS (sorry folks, this one is not worth a SET command).  You can
  321. choose a second type of weighted average in which the weighting smooths
  322. out progressively as the transfer progresses by adding -DCPS_VINCE to
  323. -DCPS_WEIGHTED.
  324.  
  325. An alternative to curses is also available at compile time, but should be
  326. selected if your version of Kermit is to be run in local mode only in an ANSI
  327. terminal environment, for example on a desktop workstation that has an ANSI
  328. console driver.  To select this option in place of curses, define the symbol
  329. MYCURSES:
  330.  
  331.   -DMYCURSES
  332.  
  333. instead of CK_CURSES.  The MYCURSES option uses built-in ANSI (VT100) escape
  334. sequences, and depends upon your terminal or console driver to interpret them
  335. correctly.
  336.  
  337. In some C-Kermit builds, we replace printf() via #define printf...  However,
  338. this can cause conflicts with the [n]curses header files.  Various hacks are
  339. required to get around this -- see ckutio.c, ckuusx.c, ckufio.c, ckucmd.c,
  340. etc.
  341.  
  342. To use the fullscreen display feature, SET FILE DISPLAY FULLSCREEN.  Beware, it
  343. can slow the transfer down a bit (or a lot).  The faster the connection speed,
  344. the more likely the fullscreen display will become the bottleneck.  To test
  345. whether the fullscreen display is slowing your transfers down on a particular
  346. connection, transfer the same with it and without it, and compare the figures
  347. given in the STATISTICS command.  The default file transfer display is still
  348. the old SERIAL ("dots") display, even if you build in curses support.
  349.  
  350. A compromise between the two styles (new to edit 183), that can be used on any
  351. video display terminal, can be elected at runtime with the SET FILE DISPLAY
  352. CRT.  It relies only on the ability of the terminal to write over the current
  353. line when it receives a bare carriage return.  The same performance comments
  354. apply to this display option.
  355.  
  356.  
  357. 4. CHARACTER SETS
  358.  
  359. By default, C-Kermit is built with support for translation of character sets
  360. for Western European languages (i.e. languages that originated in Western
  361. Europe, but are now also spoken in the Western Hemisphere and other parts of
  362. the world), via ISO 8859-1 Latin Alphabet 1, for Eastern European languages
  363. (ISO Latin-2), Hebrew (and Yiddish), and Cyrillic-alphabet languages (ISO
  364. Latin/Cyrillic).  Many file (local) character sets are supported: ISO 646
  365. 7-bit national sets, IBM code pages, Apple, DEC, DG, NeXT, etc.
  366.  
  367. To build Kermit with no character-set translation at all, include -DNOCSETS in
  368. the CFLAGS.  To build with no Latin-2, add -DNOLATIN2.  To build with no
  369. Cyrillic, add -DNOCYRIL.  To omit Hebrew, add -DNOHEBREW.  If -DNOCSETS is
  370. *not* included, you'll always get LATIN1.  To build with no KANJI include
  371. -DNOKANJI.  There is presently no way to include Latin-2, Cyrillic, Hebrew, or
  372. Kanji without also including Latin-1.
  373.  
  374. Unicode support was added in version 7.0, and it adds a fair amount of tables
  375. and code (and this is only a "Level 1" implementation -- a higher level would
  376. also require building in the entire Unicode database).  On a PC with RH 5.2
  377. Linux, building C-Kermit 7.0 Beta 11:
  378.  
  379.   NOCSETS NOUNICODE NOKANJI   Before    After
  380.    [   ]    [   ]    [   ]    1329014          (Full)
  381.    [   ]    [   ]    [ X ]    1325686          (Unicode but no Kanji)
  382.    [   ]    [ X ]    [   ]    1158837          (All charsets except Unicode)
  383.    [ X ]    [ x ]    [ x ]    1090845          (NOCSETS implies the other two)
  384.  
  385. Note, by the way, that NOKANJI without NOUNICODE only removes the non-Unicode
  386. Kanji sets (Shift-JIS, EUC-JP, JIS-7, etc).  Kanji is still representable in
  387. UCS-2 and UTF-8.
  388.  
  389.  
  390. 5. APC EXECUTION
  391.  
  392. The Kermit CONNECT module can be coded to execute Application Program Command
  393. escape sequences from the host:
  394.  
  395.   <ESC>_<text><ESC>\
  396.  
  397. where <text> is a C-Kermit command, or a list of C-Kermit commands separated
  398. by commas, up to about 1K in length.
  399.  
  400. To date, this feature has been coded into the OS/2, Windows, VMS, OS-9, and
  401. UNIX versions, for which the symbol:
  402.  
  403.   CK_APC
  404.  
  405. is defined automatically in ckuusr.h.  For OS/2, APC is enabled at runtime
  406. by default, for UNIX it is disabled.  It is controlled by the SET TERMINAL
  407. APC command.  Configuring APC capability into a version that gets it by
  408. default (because CK_APC is defined in ckuusr.h) can be overridden by including:
  409.  
  410.   -DNOAPC
  411.  
  412. on the CC command line.
  413.  
  414. The autodownload feature depends on the APC feature, so deconfiguring APC
  415. also disables autodownload.
  416.  
  417.  
  418. 6. PROGRAM SIZE
  419.  
  420. (Also see Section 4: Character Sets)
  421.  
  422. C-Kermit has become a large program, much larger than early versions because
  423. of all the new features, primarily the script programming language, sliding
  424. window packet protocol, and international character set translation.  On some
  425. systems, the size of the program prevents it from being successfully linked
  426. and loaded.  On some others, it occupies so much memory that it is constantly
  427. swapping or paging.  In such cases, you can reduce C-Kermit's size in various
  428. ways, outlined in this section.  The following options can cut down on the
  429. program's size at compile time by removing features or changing the size of
  430. storage areas.
  431.  
  432. 6.1. When Memory Is Not a Problem
  433.  
  434. But first, also note that if "memory is no problem" on your system, you can
  435. easily INCREASE the sizes of many things (buffers, command length, macro
  436. length, maximum number of all sorts of things) simply by defining the
  437. following symbol at compile time:
  438.  
  439.   BIGBUFOK
  440.  
  441. This symbol is defined for certain platforms by default in ckcdeb.h.  If you
  442. want to override this, use:
  443.  
  444.   make xxxx KFLAGS=-DNOBIGBUF
  445.  
  446. 6.2. Removing Features
  447.  
  448. Features can be removed by defining symbols on the CC (C compiler) command
  449. line.  "-D" is the normal CC directive to define a symbol so, for example,
  450. "-DNODEBUG" defines the symbol NODEBUG.  Some C compilers might use different
  451. syntax, e.g.  "-d NODEBUG" or "/DEFINE=NODEBUG".  For C compilers that do not
  452. take command-line arguments, you can put the corresponding #define statements
  453. in the file CKCSYM.H, for example:
  454.  
  455. #define NODEBUG
  456.  
  457. (The #define statement must be on the left margin.)  Here are C-Kermit's
  458. size-related compile-time options.  The ones that take up the most space are
  459. marked by asterisk (*).  If you are desperate to save space, remove debugging
  460. first, rather than some more useful feature.  Remove built-in help only if
  461. absolutely necessary.  The final resort is to remove the interactive command
  462. parser completely, leaving only a UNIX-style command-line interface
  463. ("kermit -s foo").  This cuts the program down to about 25% of its fully
  464. configured size.
  465.  
  466. * -DNOUNICODE:Add this option to omit Unicode character-set support.
  467. * -DNOCSETS:  Add this option to remove ALL character set support.
  468. * -DNODEBUG:  Add this option to omit all debugging code.
  469.   -DNOTLOG:   Add this option to omit transaction logging.
  470. * -DNOHELP:   Add this option to omit built-in help.
  471.   -DNODISPLAY:Add this option to omit the file-transfer display.
  472.   -DTCPSOCKET:Remove this option to omit TCP/IP support.
  473.   -DSUNX25:   Remove this option to omit SunLink X.25 support.
  474. * -DNONET:    Add this to remove all network support.
  475.   -DNOMSEND:  Add this option to remove the MSEND command.
  476. * -DNOLOCAL:  Add this option to remove all support for making connections.
  477. * -DNODIAL:   Add this option to remove the DIAL command and modem support.
  478. * -DMINIDIAL: Add this option to support only standard &/or generic modem types
  479. * -DNOOLDMODEMS: Add this option to drop support for "old" modem types.
  480. * -DNOCHANNELIO: Add this option to remove the FILE command & related functions
  481.   -DNOXMIT:   Add this option to remove the TRANSMIT command.
  482.   -DNOSCRIPT: Add this option to remove the UUCP-style SCRIPT command.
  483.   -DNOCMDL:   Add this option to remove the command-line option interface.
  484. * -DNOSPL:    Add this option to remove the script programming language.
  485. * -DNOICP:    Add this option to remove the entire interactive command parser.
  486.   -DNOIKSD:   Remove support for the Internet Kermit Service Daemon.
  487.   -DDCMDBUF:  Add this option to allocate command buffers dynamically.
  488.   -DNOLATIN2  Add this option to remove ISO Latin-2 character-set translation.
  489.   -DNOCYRIL:  Add this option to remove Cyrillic character set translation.
  490.   -DNOLATIN2: Add this option to remove Latin-2 character set translation.
  491.   -DNOHEBREW: Add this option to remove Hebrew character set translation.
  492.   -DKANJI:    Omit this option to exclude Kanji character set translation.
  493.   -DNOESCSEQ: Add this option to omit ANSI escape sequence recognition.
  494.   -DNOSERVER: Add this option to remove server mode.
  495.   -DNOSETKEY: Add this option to remove the SET KEY command.
  496.   -DNOPUSH:   Add this option to remove escapes to operating system.
  497.   -DNOFRILLS: Add this option to remove "frills".
  498. * -DNOCURSES: Omit this option to keep the curses library out of Kermit.
  499. * -DNOBIGBUF: Override BIGBUFOK in case it is defined: force smaller buffers.
  500. * -DNOXFER:   Add this option to omit all file-transfer protocols.
  501.  
  502.   -DSBSIZ=nnnn -DRBSIZ=nnnnn
  503.      Change the overall size of the packet send and receive buffers.
  504.  
  505. -DNOFRILLS removes various command synonyms; the following top-level commands:
  506. CLEAR, DELETE, DISABLE, ENABLE, GETOK, MAIL, RENAME, TYPE, WHO; and the
  507. following REMOTE commands: KERMIT, LOGIN, LOGOUT, PRINT, TYPE, WHO.
  508.  
  509. The CK_CURSES option, at least on UNIX, requires C-Kermit be linked with a
  510. large external library (curses or ncurses).  On certain small systems,
  511. C-Kermit programs built this way have been observed to cause swapping and/or
  512. performance problems.  If you include -DNOCURSES, you might also have to edit
  513. the makefile entry to remove all references to "curses", "termcap", and/or
  514. "termlib", etc, from the LIBS clause.
  515.  
  516. 6.3. Changing Buffer Sizes
  517.  
  518. (This section is somewhat obsolete -- most modern C-Kermit versions are built
  519. with BIGBUFOK defined, which selects maximum-size packet buffers, plus big
  520. command and other buffers).
  521.  
  522. There are options to control Kermit's packet buffer allocations.  The
  523. following symbols are defined in ckcker.h in such a way that you can override
  524. them by redefining them in CFLAGS:
  525.  
  526.   -DMAXSP=xxxx - Maximum send-packet length, default 2048.
  527.   -DMAXRP=xxxx - Maximum receive-packet length, 2048 for UNIX, 1920 for VMS.
  528.   -DSBSIZ=xxxx - Total allocation for send-packet buffers, default 3008.
  529.   -DRBSIZ=xxxx - Total allocation for receive-packet buffers, default 3008.
  530.  
  531. The program size is affected by SBSIZ and RBSIZ (send and receive packet
  532. buffer size).  These are static character arrays compiled into the program.
  533. If you wish, you can have Kermit allocate packet buffers dynamically at
  534. runtime using malloc() by including the CFLAGS switch:
  535.  
  536.   -DDYNAMIC
  537.  
  538. In this case, the default packet and buffers sizes are changed to:
  539.  
  540.   -DMAXSP=9024 (for UNIX, 2048 for VMS)
  541.   -DMAXRP=9024 (for UNIX, 1920 for VMS)
  542.   -DSBSIZ=9050
  543.   -DRBSIZ=9050
  544.  
  545. but you can change the packet buffer sizes (not the maximum packet size) at
  546. runtime using the command:
  547.  
  548.   SET BUFFERS <sbsiz> <rbsiz>
  549.  
  550. Using dynamic allocation (-DDYNAMIC) reduces storage requirements for the
  551. executable program on disk, and allows more and bigger packets at runtime.
  552. But dynamic allocation might not work on all systems.  Try it.  If it works
  553. for you, there is no reason not to use it.  But if the program hangs or core
  554. dumps, then omit the -DDYNAMIC option from CFLAGS.
  555.  
  556. 6.4. Other Size-Related Items
  557.  
  558. To make Kermit compile and load successfully, you might have to change your
  559. build procedure to:
  560.  
  561.    a. Request a larger ("large" or "huge") model.  This is particularly true
  562.       for 16-bit PC-based UNIX versions.  This is typically done with a -M
  563.       and/or -F switch (see your cc manual or man page for details).
  564.  
  565.    b. Some systems support overlays.  If the program is too big to be built
  566.       as is, check your loader manual ("man ld") to see if an overlay feature
  567.       is available.  See the 2.10/2.11 BSD example in the UNIX makefile.
  568.  
  569.    c. Similarly, some systems support "code mapping", which is similar to
  570.       overlays.  Again, see "man ld".
  571.  
  572. It is also possible to reduce the size of the executable program file in
  573. several other ways:
  574.  
  575.    a. Include the -O (optimize) compiler switch if it isn't already included
  576.       in your "make" entry (and if it works!).  If your compiler supports
  577.       higher levels of optimization (e.g. -O2), try them.
  578.  
  579.    b. If your UNIX system supports shared libraries, change the make entry to
  580.       take advantage of this feature.  The way to do this depends on your
  581.       particular system.  Some (like SunOS) do it automatically.  See the NeXT
  582.       entry for an example.
  583.  
  584.    c. Strip the program image after building ("man strip" for further info),
  585.       or add -s to the LNKFLAGS (UNIX only).  This strips the program of its
  586.       symbol table and relocation information.
  587.  
  588.    d. Move character strings into a separate file.  See the 2.10 BSD entry
  589.       for an example.
  590.  
  591. 6.5. Space/Time Tradeoffs
  592.  
  593. There are over 2000 debug() statements in the program.  If you want to save
  594. both space (program size) and time (program execution time), include -DNODEBUG
  595. in the compilation.  If you want to include debugging for tracking down
  596. problems, omit -DNODEBUG from the make entry.  But when you include debugging,
  597. you have two choices for how it's done.  One definition defines debug() to be
  598. a function call; this is cheap in space but expensive in execution.  The other
  599. defines debug as "if (deblog)" and then the function call, to omit the
  600. function call overhead when the debug log is not active.  But this adds a lot
  601. of space to the program.  Both methods work, take your choice; IFDEBUG is
  602. preferred if memory is not a constraint but the computer is likely to be slow.
  603. The first method is the default, i.e. if nothing is done to the CFLAGS or in
  604. ckcdeb.h (but in some cases, e.g. VMS, it is).  To select the second method,
  605. include -DIFDEBUG in the compilation (and don't include -DNODEBUG).
  606.  
  607.  
  608. 7. DIALER SUPPORT
  609.  
  610. -DNODIAL removes automatic modem dialing completely, including the entire
  611. ckudia.c module, plus all commands that refer to dialing in the various
  612. ckuus*.c modules.
  613.  
  614. -DMINIDIAL leaves the DIAL and related commands (SET/SHOW MODEM, SET/SHOW
  615. DIAL) intact, but removes support for all types of modems except CCITT, Hayes,
  616. Unknown, User-defined, Generic-high-speed, and None (= Direct).  The MINIDIAL
  617. option cuts the size of the dial module approximately in half.  Use this
  618. option if you have only Hayes or CCITT modems and don't want to carry the
  619. baggage for the other types.
  620.  
  621. A compromise between full dialer support and MINIDIAL is obtained by removing
  622. support for "old" modems -- all the strange non-Hayes compatible 1200 and 2400
  623. bps modems that C-Kermit has been carrying around code for since 1985 or so.
  624. To remove support for these modems, add -DNOOLDMODEMS to CFLAGS at compilation
  625. time.
  626.  
  627. Finally, if you keep support for old modems, you will notice that their names
  628. appear on the "set modem ?" menu.  That's because their names are, by default,
  629. "visible".  But the list is confusing to the younger generation, who have only
  630. heard of modems from the V.32bis-and-later era.  If you want to be able to
  631. use old modems, but don't want their names cluttering up menus, add this to
  632. CFLAGS:
  633.  
  634.   -DM_OLD=1
  635.  
  636. 8. NETWORK SUPPORT
  637.  
  638. C-Kermit supports not only RS-232 serial connections, direct and modem, but
  639. also TCP/IP and X.25 network connections.  The OS/2 version supports DECnet
  640. (LAT) connections.  If you define the following symbol:
  641.  
  642.   NONET
  643.  
  644. then all network support will be compiled away.
  645.  
  646. 8.1. TCP/IP
  647.  
  648. TCP/IP support requires the Berkeley sockets library, and is generally
  649. available on any UNIX system.  It is also available in OS/2, VMS, AOS/VS, VOS,
  650. etc.  The TCP/IP support includes built-in TELNET negotiation handling.  To
  651. select TCP/IP support, include -DTCPSOCKET in your makefile entry's CFLAGS, or
  652. the appropriate variant (e.g. -DWOLLONGONG, -DMULTINET, -DEXCELAN, -DWINTCP,
  653. etc).
  654.  
  655. Reportedly, even some of these are not consistent within themselves.  For
  656. example, Wollongong reportedly puts header files in different directories for
  657. different UNIX versions:
  658.  
  659.   in.h can be in either /usr/include/sys or /user/include/netinet.
  660.   telnet.h can be in either /usr/include/arpa or /user/include/netinet.
  661.   inet.h can be in either /usr/include/arpa or /user/include/sys.
  662.  
  663. In cases like this, use the -I cc command-line option when possible; otherwise
  664. it's better to make links in the file system than it is to hack up the
  665. C-Kermit source code.  Suppose, for example, Kermit is looking for telnet.h in
  666. /usr/include/arpa, but on your system it is in /usr/include/netinet.  Do this
  667. (as root, or get the system manager to do it):
  668.  
  669.   cd /usr/include/arpa
  670.   ln /usr/include/netinet/telnet.h telnet.h
  671.  
  672. ("man ln" for details about links.)
  673.  
  674. The network support for TCP/IP and X.25 is in the source files CKCNET.H and
  675. CKCNET.C, with miscellaneous SHOW commands, etc, in the various CKUUS*.C
  676. modules, plus code in the CK*CON.C (CONNECT command) and several other modules
  677. to detect TELNET negotiations, etc.
  678.  
  679. Within the TCPSOCKET code, some socket-level controls are included if
  680. TCPSOCKET is defined in the C-Kermit CFLAGS and SOL_SOCKET is defined in
  681. in the system's TCP-related header files, such as <sys/socket.h>.  These are
  682.  
  683.   SET TCP KEEPALIVE
  684.   SET TCP LINGER
  685.   SET TCP RECVBUF
  686.   SET TCP SENDBUF
  687.  
  688. In addition, if TCP_NODELAY is defined, the following command is also
  689. enabled:
  690.  
  691.   SET TCP NODELAY (Nagle algorithm)
  692.  
  693. See the user documentation for descriptions of these commands.
  694.  
  695. 8.1.1. Firewalls
  696.  
  697. There exist various types of firewalls, set up allow separate users of an
  698. internal TCP/IP network from the great wide Internet.  Of course, this could
  699. be accomplished most easily and safely by simply not connecting the internal
  700. network to the Internet, but in many cases some restricted forms of access are
  701. needed.  Thus a "firewall" is set up to allow only authorized accesses.
  702.  
  703. One firewall method is called SOCKS, in which a proxy server allows users
  704. inside a firewall to access the outside world, based on a permission list
  705. generally stored in a file.  SOCKS is enabled in one of two ways.  First, the
  706. standard sockets library is modified to handle the firewall, and then all the
  707. client applications are relinked (in systems where linking is not dynamic)
  708. with the modified sockets library.  The APIs are all the same, so the
  709. applications do not need to be recoded or recompiled.
  710.  
  711. In the other method, the applications must be modified to call replacement
  712. routines, such as Raccept() instead of accept(), Rbind() instead of bind(),
  713. etc, and then linked with a separate SOCKS library.  This second method is
  714. accomplished in C-Kermit by including -DCK_SOCKS in your CFLAGS, and also
  715. adding:
  716.  
  717.   -lsocks
  718.  
  719. to LIBS, or replacing -lsockets with -lsocks (depending on whether the socks
  720. library also includes all the sockets entry points).
  721.  
  722. For SOCKS5, use -DCK_SOCKS5.
  723.  
  724. Explicit firewall support can, in general, not be a standard feature or a
  725. feature that is selected at runtime, because the SOCKS library tends to be
  726. different at each site -- local modifications abound.
  727.  
  728. The ideal situation occurs when firewalls are supported by the first method,
  729. using dynamically linked sockets-replacement libraries; in this case, all your
  730. TCP/IP client applications will negotiate the firewall transparently.
  731.  
  732. 8.1.2. Solving Compilation and Linking Problems
  733.  
  734. The main() routine is in ckcmai.c.  If you get complaints about "main: return
  735. type is not blah", define MAINTYPE on the CC command line, e.g.
  736.  
  737.   make xxx "KFLAGS=-DMAINTYPE=blah" (where "blah" is int, long, or whatever).
  738.  
  739. If the complaint is "Attempt to return a value from a function of type void"
  740. then add -DMAINISVOID:
  741.  
  742.   make xxx "KFLAGS=-DMAINISVOID"
  743.  
  744. If you get a compilation error in CKCNET.C, with a complaint like
  745. "incompatible types in assignment", it probably has something to do with the
  746. data type your system uses for the inet_addr() function, which is declared
  747. (usually) in <arpa/inet.h>.  Kermit uses "unsigned long" unless the symbol
  748. INADDRX is defined, in which case "struct inaddr" is used instead.  Try adding
  749. -DINADDRX to CFLAGS in your make entry, and if that fixes the problem, please
  750. send a report to kermit@columbia.edu.
  751.  
  752. Compilation errors might also have to do with the data type used for
  753. getsockopt() and setsockopt() option-length field.  This is normally an int,
  754. but sometimes it's a short, a long, or an unsigned any of those, or a size_t.
  755. To fix the compilation problem, add -DSOCKOPT_T=xxx to the CFLAGS in your
  756. makefile entry, where xxx is the appropriate type (use "man getsockopt" or
  757. grep through your system/network header files to find the needed type).
  758.  
  759. 8.1.3. Enabling Host Address Lists
  760.  
  761. When you give Kermit an IP host name, it calls the socket routine
  762. gethostbyname() to resolve it.  gethostbyname() returns a hostent struct,
  763. which might or might not not include a list of addresses; if it does, then
  764. if the first one fails, Kermit can try the second one, and so on.  However,
  765. this will only work if the symbol "h_addr" is a macro defined as
  766. "h_addr_list[0]", usually in netdb.h.  If it is, then you can activate this
  767. feature by defining the following symbol in CFLAGS:
  768.  
  769.   HADDRLIST
  770.  
  771. 8.1.4. Enabling Telnet NAWS
  772.  
  773. TELNET Negotiation About Window Size (NAWS) support requires the ability to
  774. find out the terminal screen's dimensions.  E.g. in UNIX, we need something
  775. like ioctl(0, TIOCGWINSZ, ...).  If your version of Kermit was built with NAWS
  776. capability, SHOW VERSIONS will include CK_NAWS among the compiler options.  If
  777. it doesn't, you can add it by defining CK_NAWS at compile time.  Then, if the
  778. compiler or linker complain about undefined or missing symbols, or there is no
  779. complaint but SHOW TERMINAL fails to show reasonable "Rows =, Columns ="
  780. values, then take a look at (or write) the appropriate ttgwsiz() routine.  On
  781. the other hand, if CK_NAWS is defined by default for your system (in ckcnet.h),
  782. but causes trouble, you can override this definition by including the -DNONAWS
  783. switch on your CC command line, thus disabling the NAWS feature.
  784.  
  785. This appears to be needed at least on the AT&T 3B2, where in ckutio.c,
  786. the routine ttgwsiz() finds that the TIOCGWINSZ symbol is defined but lacks
  787. definitions for the corresponding winsize struct and its members ws_col
  788. and ws_row.
  789.  
  790. The UNIX version of C-Kermit also traps SIGWINCH, so it can send a NAWS any
  791. time the console terminal window size changes, e.g. when you stretch it with a
  792. mouse.  The SIGWINCH-trapping code is enabled if SIGWINCH is defined (i.e. in
  793. signal.h).  If this code should cause problems, you can disable it without
  794. disabling the NAWS feature altogether, by defining NOSIGWINCH at compile time.
  795.  
  796. 8.1.5. Enabling Incoming TCP/IP Connections
  797.  
  798. This feature lets you "set host * <port>" and wait for an incoming connection
  799. on the given port.  This feature is enabled automatically at compile if
  800. TCPSOCKET is defined and SELECT is also defined.  But watch out, simply
  801. defining SELECT on the cc command line does not guarantee successful
  802. compilation or linking (see section 11).
  803.  
  804. If you want to disable incoming TCP/IP connections, then build C-Kermit
  805. with:
  806.  
  807.   -DNOLISTEN
  808.  
  809. 8.1.6. Disabling "SET TCP" Options.
  810.  
  811. The main reason for this is because of header file / prototype conflicts at
  812. compile time regardting get/setsockopt().  If you can't fix them (without
  813. breaking other builds), just include the following in CFLAGS:
  814.  
  815.   -DNOTCPOPTS
  816.  
  817.  
  818. 8.2. X.25
  819.  
  820. X.25 support requires (a) a SUN, (b) the SunLink product (libraries and header
  821. files), and (c) an X.25 connection into your SUN, or else Stratus VOS and the
  822. appropriate X.25 development tools.  Support for IBM AIXlink X.25 was added
  823. in C-Kermit 6.1.
  824.  
  825. In UNIX, special makefile entries sunos4x25 and sunos41x25 (for SUNOS 4.0 and
  826. 4.1, respectively), or aix41x25, are provided to build in this feature, but
  827. they only work if conditions (a)-(c) are met.  To request this feature,
  828. include -DSUNX25 (or -DIBMX25) in CFLAGS.
  829.  
  830. SUNX25 (or -DIBMX25) and TCPSOCKET can be freely mixed and matched.
  831.  
  832. 8.3. Other Networks
  833.  
  834. Support for other networking methods -- NETBIOS, LAT, Named Pipes, etc --
  835. is included in CK*NET.H and CK*NET.C for implementations (such as OS/2) where
  836. these methods are supported.
  837.  
  838. Provision is made in the organization of the modules, header files, commands,
  839. etc, for addition of new network types such as DECnet, X.25 for other systems
  840. (HP-UX, VMS, etc), and so on.  Send email to kermit@columbia.edu if you are
  841. interested in working on such a project.
  842.  
  843. 9. EXCEPTION HANDLING
  844.  
  845. The setjmp/longjmp mechanism is used for handling exceptions.  The jump
  846. buffer is of type jmp_buf, which almost everywhere is typedef'd as an array,
  847. in which case you should have no trouble compiling the exception-handling
  848. code.  However, if you are building C-Kermit in/for an environment where
  849. jmp_buf is something other than an array (e.g. a struct), then you'll have
  850. to define the following symbol:
  851.  
  852.   JBNOTARRAY
  853.  
  854. 10. SECURITY FEATURES
  855.  
  856. Compiling with the NOPUSH symbol defined removes all the "shell escape"
  857. features from the program, including the PUSH, RUN, and SPAWN commands, the
  858. "!"  and "@" command prefixes, OPEN !READ, OPEN !WRITE, job control (including
  859. the SUSPEND command), the REDIRECT command, shell/DCL escape from CONNECT
  860. mode, as well as the server's execution of REMOTE HOST commands (and, of
  861. course, the ENABLE HOST command).  Add NODISPO to also prevent acceptance of
  862. incoming MAIL or REMOTE PRINT files.  For UNIX, also be sure to read
  863. CKUINS.TXT about set[ug]id installation.  Additional restrictions can be
  864. enforced when in server mode; read about the DISABLE command.
  865.  
  866. Compiling with NOCCTRAP prevents the trapping of SIGINT by Kermit.  Thus
  867. if the user generates a SIGINT signal (e.g. by typing the system's interrupt
  868. character), Kermit will exit immediately, rather than returning to its
  869. prompt.
  870.  
  871. NOPUSH and NOCCTRAP together allow Kermit to be run from restricted shells,
  872. preventing access to system functions.
  873.  
  874. 11. ENABLING SELECT()
  875.  
  876. Kermit works best if it can do nonblocking reads, nondestructive input buffer
  877. checking, and millisecond sleeps.  All of these functions can be accomplished
  878. by the select() function, which, unfortunately, is not universally available.
  879. Furthermore, select() is required if incoming TCP/IP connections are to be
  880. supported.
  881.  
  882. select() was introduced with Berkeley UNIX, rejected by AT&T for System V,
  883. but is gradually creeping in to all UNIX versions (and other operating systems
  884. too) by virtue of its presence in the sockets library, which is needed for
  885. TCP/IP.  AT&T SVID for System V R4 includes select(), but that does not mean
  886. that all SVR4 implementations have it.
  887.  
  888. Furthermore, even when select() is available, it might work only on socket
  889. file descriptors, but not on others like serial ports, pipes, etc.  For
  890. example, in AOS/VS and BeOS (DR8 and earlier), it works only with file
  891. descriptors that were created by socket() and opened by connect() or accept().
  892.  
  893. Other alternatives include poll() and rdchk().  Only one of these three
  894. functions should be included.  The following symbols govern this:
  895.  
  896.   SELECT  Use select() (BSD, or systems with sockets libraries)
  897.   CK_POLL Use poll()   (System V)
  898.   RDCHK   Use rdchk()  (SCO)
  899.  
  900. If your system supports the select() function, but your version of C-Kermit
  901. does not, try adding:
  902.  
  903.   -DSELECT
  904.  
  905. to the CFLAGS, and removing -DRDCHK or -DCK_POLL if it is there.  If you get
  906. compilation errors, some adjustments to ck*tio.c and/or ck*net.c might be
  907. needed; search for SELECT (uppercase) in these files (note that there are
  908. several variations on the calling conventions for select()).
  909.  
  910. Various macros and data types need to be defined in order to use select().
  911. Usually these are picked up from <types.h> or <sys/types.h>.  But on some
  912. systems, they are in <sys/select.h>.  In that case, add the following:
  913.  
  914.   -DSELECT_H
  915.  
  916. to the CFLAGS to tell C-Kermit to #include <sys/select.h>.  A good indication
  917. that you need to do this would be if you get compile-time complaints about
  918. "fd_set" or "FD_SET" not being declared or defined.
  919.  
  920. In UNIX, the use of select() vs fork() in the CONNECT command is independent
  921. of the above considerations, and is governed by choosing a particular makefile
  922. target.
  923.  
  924. As of C-Kermit 6.1, select() is also the preferred control mechanism for
  925. the CONNECT command.  Unfortunately, the structures used by the original
  926. UNIX CONNECT command, based on fork(), and those used by select(), are so
  927. different, it was not practical to implement them both in one module.  So the
  928. select()-based CONNECT command module for UNIX is ckucns.c, and the fork-based
  929. one remains ckucon.c.  To choose the fork-based one, which is more portable
  930. (but slower and more fragile), use "wermit" as the make target.  To choose the
  931. select-based one, use "xermit" (as is done, for example, in the SunOS 4.1
  932. make target).  Only do this if you can verify that the CONNECT command works
  933. on serial connections and PIPE connections as well as TCP connections.
  934.  
  935.   The select() version of ckucon.c MUST be used if encryption is to be
  936.   done, since the fork() version loses its ability to share vital state
  937.   information between the two forks.  Also note that the select() version
  938.   is superior in many other ways too.  For example, it recovers better from
  939.   exterior killing, forced disconnections, etc.
  940.  
  941. SHOW VERSIONS tells whether the CONNECT module uses fork() or select().
  942.  
  943.  
  944. 12. I/O REDIRECTION
  945.  
  946. The REDIRECT command allows a local program to be run with its i/o redirected
  947. over the communications connection.  Your version of C-Kermit has a REDIRECT
  948. command if it was built with the following CFLAG:
  949.  
  950.   -DCK_REDIR
  951.  
  952. This, in turn, is possible only if the underlying API is there.  In the case
  953. of UNIX this is just the wait() system call, so all UNIX versions get this
  954. feature as of 6.0.192 (earlier versions needed a <sys/wait.h> header file
  955. defining the symbols WIFEXITED and WEXITSTATUS).
  956.  
  957. As of version 6.1, file transfer can be done using pipes and filters.  To
  958. enable this feature, #define PIPESEND (and fill in the code).  To disable on
  959. systems where it is normally enabled, define NOPIPESEND.  This feature is, of
  960. course, also disabled by building with NOPUSH (or giving the "nopush" command
  961. at runtime).
  962.  
  963. Version 6.1 also adds the PIPE and SET HOST /COMMAND commands, which provide
  964. another form of redirection.  This feature is selected with -DNETCMD.  CK_RDIR
  965. must also be defined, since the same mechanisms are used internally.
  966.  
  967.  
  968. 13. FLOATING-POINT TIMERS
  969.  
  970. C-Kermit 6.1 can be configured to use high-precision file-transfer timers
  971. for more accurate statistics.  This feature is enabled with:
  972.  
  973.   -DGFTIMER
  974.  
  975. and disabled with:
  976.  
  977.   -DNOGFTIMER
  978.  
  979. If you try to build with -DGFTIMER but you get compilation errors, either
  980. fix them (and send email to kermit@columbia.edu telling what you did), or
  981. else give up and use -DNOGFTIMER instead.  Hint: depending on your machine
  982. architecture, you might have better luck using double than float as the data
  983. type for floating-point numbers, or vice versa.  Look in ckcdeb.h for the
  984. section that handles this (search for "float").
  985.  
  986. If it builds successfully, test the result carefully -- watch the time-related
  987. fields in the fullscreen file-transfer display and the numbers reported by the
  988. STATISTICS command.  If the results are nonsense, then try switching from
  989. float to double or vice versa as noted in the previous paragraph.  If that
  990. doesn't help, use -DNOFGTIMER.
  991.  
  992.  
  993. 14. SPECIAL CONFIGURATIONS
  994.  
  995. As of C-Kermit 7.0, if you build C-Kermit normally, but with -DNOICP (No
  996. Interactive Command Parser), you get a program capable of making serial
  997. connections (but not dialing) and network connections (if TCPSOCKET or
  998. other network option included), and can also transfer files using Kermit
  999. protocol, but only via autodownload/upload.  Furthermore, if you call
  1000. the executable "telnet", it will act like Telnet -- using the command-line
  1001. options.  However, in this case there is nothing to escape back to, so if
  1002. you type Ctrl-\c, it just prints a message to this effect.
  1003.  
  1004. You can also build C-Kermit with -DNOXFER, meaning omit all the file-transfer
  1005. features.  This leaves you with a scriptable communications program that is
  1006. considerably smaller than the full C-Kermit.
  1007.  
  1008.  
  1009. ----------------------------------------------------------------------
  1010. APPENDIX I: SUMMARY OF COMPILE-TIME OPTIONS
  1011.  
  1012. These are the symbols that can be specified on the cc command line, listed
  1013. alphabetically.  Others are used internally, including those taken from header
  1014. files, those defined by the compiler itself, and those inferred from the ones
  1015. given below.  Kermit's SHOW VERSIONS command attempts to display most of
  1016. these.  See ckcdeb.h and ckcnet.h for inference rules.  For example SVR3
  1017. implies ATTSV, MULTINET implies TCPSOCKET, and so on.
  1018.  
  1019. The following options are not included in all makefile entries, but they are
  1020. beneficial if they work.  It is recommended that you add them to your makefile
  1021. entry if they are lacking and test the result.  If it's OK, let me know and
  1022. I'll add them to the official makefile:
  1023.  
  1024. DYNAMIC        Dynamic packet buffer allocation, bigger packets allowed, etc.
  1025. NOSETBUF       Don't do unbuffered single-character writes to the console.
  1026.                This tends to speed up CONNECT mode.
  1027.  
  1028. Here is the complete list of the Kermit-specific compile-time switches:
  1029.  
  1030. ACUCNTRL       Select BSD 4.3-style acucntrl() bidirectional tty control.
  1031. aegis          Build for Apollo Aegis (predefined on Apollo systems).
  1032. AIX370         Build for IBM AIX/370 for IBM mainframes.
  1033. AIXESA         Build for IBM AIX/ESA for IBM mainframes.
  1034. AIXPS2         Build for IBM AIX 3.0 for PS/2 series (never formally released).
  1035. AIXRS          Build for IBM AIX 3.x on RS/6000.
  1036. AIX41          Build for IBM AIX 4.x on RS/6000.
  1037. AMIGA          Build for Commodore Amiga with Intuition OS.
  1038. ATT6300        Build for AT&T 6300 PLUS.
  1039. ATT7300        Build for AT&T 7300 UNIX PC (3B1).
  1040. ATTSV          Build for AT&T System III or V UNIX.
  1041. AUX            Build for Apple A/UX for the Macintosh.
  1042. BIGBUFOK       OK to use big buffers - "memory is not a problem"
  1043. BPS_xxxx       Enable SET SPEED xxxx
  1044. BSD29          Build for BSD 2.9 or 2.10.
  1045. BSD4           Build for BSD 4.2.
  1046. BSD41          Build for BSD 4.1.
  1047. BSD43          Build for BSD 4.3.
  1048. BSD44          Build for BSD 4.4.
  1049. C70            Build for BBN C/70.
  1050. CIE            Build for CIE Systems 680/20.
  1051. CKCONINTB4CB   Work around prompt-disappears after escape back from CONNECT.
  1052. CKLOGDIAL      Enable connection log.
  1053. CKMAXPATH      Maximum length for a fully qualified filename.
  1054. CKREGEX        Include [...] or {xxx,xxx,xxx} matching in ckmatch().
  1055. CKSYSLOG       Enable syslogging.
  1056. CK_ANSIC       Enable ANSI C constructs - prototypes, etc.
  1057. CK_ANSILIBS    Use header files for ANSI C libraries.
  1058. CK_APC         Enable APC execution by CONNECT module.
  1059. CK_CURSES      Enable fullscreen file transfer display.
  1060. CK_DSYSINI     Use system-wide init file, with name supplied by Kermit.
  1061. CK_DTRCD       DTR/CD flow control is available.
  1062. CK_FAST        Build with fast Kermit protocol defaults.
  1063. CK_FORK_SIG    UNIX only: signal() number for CONNECT module forks.
  1064. CK_IFRO        IF REMOTE command is available (and can run in remote mode).
  1065. CK_INI_A       System-wide init file takes precedence over user's.
  1066. CK_INI_B       User's init file takes precedence over the system-wide one.
  1067. CK_LABELED     Include support for SET FILE TYPE LABELED.
  1068. CK_LBRK        This version can send Long BREAK.
  1069. CK_LINGER      Add code to turn of TCP socket "linger" parameter.
  1070. CK_MKDIR       This version has a zmkdir() command to create directories.
  1071. CK_NAWS        Include TELNET Negotiate About Window Size support.
  1072. CK_NEWTERM     Use newterm() rather than initscr() to initialize curses.
  1073. CK_PCT_BAR     Fullscreen file transfer display should include "thermometer".
  1074. CK_POLL        System-V or POSIX based UNIX has poll() function.
  1075. CK_POSIX_SIG   Use POSIX signal handing: sigjmp_buf, sigsetjmp, siglongjmp.
  1076. CK_READ0       read(fd,&x,0) can be used to test TCP/IP connections.
  1077. CK_REDIR       Enable the REDIRECT command.
  1078. CK_RESEND      Include the RESEND command (needs zfseek() + append).
  1079. CK_RTSCTS      RTS/CTS flow control is available.
  1080. CK_SOCKBUF     Enable TCP socket-buffer-size-increasing code.
  1081. CK_SOCKS       UNIX only: Build with socks library rather than regular sockets
  1082. CK_SOCKS5      UNIX only: Build with socks 5 lib rather than regular sockets
  1083. CK_SPEED       Enable control-character unprefixing.
  1084. CK_SYSINI="xxxxx"  Quoted string to be used as system-wide init file name.
  1085. CK_TIMERS      Build with support for dynamically calculated packet timeouts.
  1086. CK_TMPDIR      This version of Kermit has an isdir() function.
  1087. CK_TTYFD       Defined on systems where the communications connection file
  1088.                descriptor (ttyfd) can be passed to other processes as a
  1089.                command-line argument via \v(ttyfd).
  1090. CK_URL         Parse URLs as well as hostnames, etc.
  1091. CK_XONXOFF     Xon/Xoff flow control available.
  1092. CK_XYZ         Include support for XYZMODEM protocols.
  1093. CK_WREFRESH    Curses package includes wrefresh(),clearok() for screen refresh.
  1094. CKTYP_H=xxx    Force include of xxx as <types.h> file.
  1095. CLSOPN         When hanging up a tty device, also close and reopen it.
  1096. CMDDEP         Maximum recursion depth for self-referential user-defined fn's.
  1097. COHERENT       Build for Mark Williams Coherent UNIX
  1098. CONGSPD        Define if this version has congspd() routine in ck?tio.c
  1099. datageneral    Build for Data General AOS/VS or AOS/VS II
  1100. DCLPOPEN       popen() is available but needs to be declared
  1101. DEC_TCPIP      Build with support for DEC TCP/IP (UCX) for (Open)VMS
  1102. DGUX430        Build for DG/UX 4.30
  1103. DGUX540        Build for DG/UX 5.40
  1104. DEFPAR=x       Default parity, 0, 'e', 'o', 'm', or 's'.
  1105. DFTTY=xxx      Default communications device name.
  1106. DIRENT         UNIX directory structure to be taken from <dirent.h>
  1107. DIRPWDRP       Prompt for password in REMOTE CWD command.
  1108. DTILDE         Include UNIX ~ notation for username/home-directory
  1109. DYNAMIC        Allocate file transfer packet buffers dynamically with malloc.
  1110. ENCORE         Build for Encore Multimax computers.
  1111. EXCELAN        Build with excelan TCP/IP.
  1112. FT18           Build for Fortune For:Pro 1.8.
  1113. FT21           Build for Fortune For:Pro 2.1.
  1114. GEMDOS         Build for Atari ST GEMDOS.
  1115. GFTIMER        Use high-precision floating-point file-transfer timers.
  1116. GID_T=xxx      Group IDs are of type xxx (usually int, short, or gid_t).
  1117. HADDRLIST      If gethostbyname() hostent struct contains a list of addresses.
  1118. HDBUUCP        Build with support for Honey DanBer UUCP.
  1119. HPUX           Build for Hewlett Packard HP-UX.
  1120. HPUX9          Build for Hewlett Packard HP-UX 9.x.
  1121. HPUX10         Build for Hewlett Packard HP-UX 10.x.
  1122. HWPARITY       Define if this version can SET PARITY HARDWARE { EVEN, ODD...}
  1123. I386IX         Build for Interactive System V R3.
  1124. IFDEBUG        Add IF stmts "if (deblog)" before "debug()" calls.
  1125. INADDRX        TCP/IP inet_addr() type is struct inaddr, not unsigned long.
  1126. INTERLAN       Build with support for Racal/Interlan TCP/IP.
  1127. ISDIRBUG       System defs of S_ISDIR and S_ISREG have bug, define ourselves.
  1128. ISIII          Build for Interactive System III.
  1129. IX370          Build for IBM IX/370.
  1130. KANJI          Build with Kanji character-set translation support.
  1131. LCKDIR         UUCP lock directory is /usr/spool/uucp/LCK/.
  1132. LFDEVNO        UUCP lockfile name uses device numbers, as in SVR4.
  1133. LINUXFSSTND    For Linux, use FSSTND UUCP lockfile conventions (default).
  1134. LOCK_DIR=xxx   UUCP lock directory is xxx.
  1135. LOCKF          Use lockf() (in addition to lockfiles) on serial lines
  1136. LONGFN         BSD long filenames supported using <dir.h> and opendir().
  1137. LYNXOS         Build for Lynx OS 2.2 or later (POSIX-based).
  1138. MAC            Build for Apple Macintosh with Mac OS.
  1139. MATCHDOT       Make wildcards match filenames that start with period (.)
  1140. MAXRP=xxx      Maximum receive-packet length.
  1141. MAXSP=xxx      Maximum send-packet length.
  1142. MDEBUG         Malloc-debugging requested.
  1143. MINIDIAL       Minimum modem dialer support: CCITT, Hayes, Unkown, and None.
  1144. MINIX          Build for MINIX.
  1145. MIPS           Build for MIPS workstation.
  1146. MULTINET       Build with support for TGV MultiNet TCP/IP (VAX/VMS).
  1147. M_UNIX         Defined by SCO.
  1148. NAP            The nap() is available (conflicts with SELECT and USLEEP)
  1149. NAPHACK        The nap() call is available but only as syscall(3112,...)
  1150. NDIR           BSD long filenames supported using <ndir.h> and opendir().
  1151. NDGPWNAM       Don't declare getpwnam().
  1152. NDSYSERRLIST   Don't declare sys_errlist[].
  1153. NEEDSELECTDEFS select() is avaible but we need to define FD_blah ourselves.
  1154. NETCMD         Build with support for SET HOST /COMMAND and PIPE commands.
  1155. NEXT           Build for NeXT Mach 1.x or 2.x or 3.0, 3.1, or 3.2.
  1156. NEXT33         Build for NeXT Mach 3.3.
  1157. NOANSI         Disable ANSI C function prototyping.
  1158. NOAPC          Do not include CK_APC code.
  1159. NOB_xxxx       Disable SET SPEED xxxx
  1160. NOBIGBUF       Override BIGBUFOK when it is the default
  1161. NOBRKC         Don't try to refer to t_brkc or t_eof tchars structure members.
  1162. NOCCTRAP       Disable Control-C (SIGINT) trapping.
  1163. NOCKSPEED      Disable control-prefix removal feature (SET CONTROL).
  1164. NOCKTIMERS     Build without support for dynamic timers.
  1165. NOCKXYZ        Overrides CK_XYZ.
  1166. NOCKREGEX      Do not include [...] or {xxx,xxx,xxx} matching in ckmatch().
  1167. NOCMDL         Build with no command-line option processing.
  1168. NOCOTFMC       No Close(Open()) To Force Mode Change (UNIX version).
  1169. NOCSETS        Build with no support for character set translation.
  1170. NOCYRIL        Build with no support for Cyrillic character set translation.
  1171. NOCYRILLIC     Ditto.
  1172. NODEBUG        Build with no debug logging capability.
  1173. NODIAL         Build with no DIAL or SET DIAL commands.
  1174. NODISPO        Build to always refuse incoming MAIL or REMOTE PRINT files.
  1175. DNODISPLAY     Build with no file-transfer display.
  1176. NOESCSEQ       Build with no support for ANSI escape sequence recognition.
  1177. NOFAST         Do not make FAST Kermit protocol settings the default.
  1178. NOFDZERO       Do not use file descriptor 0 for remote-mode file transfer.
  1179. NOFILEH        Do not #include <sys/file.h>.
  1180. NOFRILLS       Build with "no frills" (this should be phased out...)
  1181. NOFTRUNCATE    Include this on UNIXes that don't have ftruncate().
  1182. NOGETUSERSHELL Include this on UNIXes that don't have getusershell().
  1183. NOGFTIMER      Don't use high-precision floating-point file-transfer timers.
  1184. NOHEBREW       Build with no support for Hebrew character sets.
  1185. NOHELP         Build with no built-in help.
  1186. NOIKSD         Build with IKSD support excluded.
  1187. NOINITGROUPS   Include this on UNIXes that don't have initgroups().
  1188. NOICP          Build with no interactive command parser.
  1189. NOJC           Build with no support for job control (suspend).
  1190. NOKANJI        Build with no support for Japanese Kanji character sets.
  1191. NOKVERBS       Build with no support for keyboard verbs (\Kverbs).
  1192. NOLATIN2       Build with no ISO Latin-2 character-set translation support.
  1193. NOLINKBITS     Use of S_ISLNK and _IFLNK untrustworthy; use readlink() instead.
  1194. NOLOCAL        Build without any local-mode features: No Making Connections.
  1195. NOLOGDIAL      Disable connection log.
  1196. NOLOGIN        Build without IKSD (network login) support.
  1197. NOLSTAT        Not OK to use lstat().
  1198. NOMDMHUP       Build without "modem-specific hangup" (e.g. ATH0) feature.
  1199. NOMHHOST       Exclude the multihomed-host TCP/IP code (if compilcation errors)
  1200. NOMINPUT       Build without MINPUT command.
  1201. NOMSEND        Build with no MSEND command.
  1202. NONAWS         Do not include TELNET Negotiate About Window Size support.
  1203. NONET          Do not include any network support.
  1204. NOPARSEN       Build without automatic parity detection.
  1205. NOPIPESEND     Disable file transfer using pipes and filters.
  1206. NOPOLL         Override CK_POLL definition.
  1207. NOPOPEN        The popen() library call is not available.
  1208. NOPURGE        Build with no PURGE command.
  1209. NOPUSH         Build with no escapes to operating system.
  1210. NOREALPATH     In UNIX, realpath() function is not available.
  1211. NORECALL       Disable the command-recall feature.
  1212. NOREDIRECT     Disable REDIRECT command.
  1213. NORENAME       Don't use rename() system call, use link()/unlink() (UNIX).
  1214. NORESEND       Build with no RESEND command.
  1215. NORETRY        Build with no command-retry feature.
  1216. NOSCRIPT       Build with no SCRIPT command.
  1217. NOSELECT       Don't try to use select().
  1218. NOSERVER       Build with no SERVER mode and no server-related commands.
  1219. NOSETBUF       Don't make console writes unbuffered.
  1220. NOSETREU       setreuid() and/or setregid() not available.
  1221. NOSHOW         Build with no SHOW command (not recommended!).
  1222. NOSIGWINCH     Disable SIGWINCH signal trapping.
  1223. NOSPL          Build with no script programming language.
  1224. NOSYMLINK      Include this for UNIXes that don't have readlink().
  1225. NOSYSIOCTLH    Do not #include <sys/ioctl.h>.
  1226. NOSYSTIMEH     Co not include <sys/time.h>.
  1227. NOSYSLOG       Disable syslogging code.
  1228. NOTCPOPTS      Build with no SET TCP options or underlying support.
  1229. NOTLOG         Build with no support for transaction logging.
  1230. NOUNICODE      Build with no support for Unicode character-set translation.
  1231. NOURL          Don't parse URLs
  1232. NOUUCP         Build with no UUCP lockfile support (dangerous!).
  1233. NOWARN         Make EXIT WARNING be OFF by default (otherwise it's ON).
  1234. NOWREFRESH     Override built-in definition of CK_WREFRESH (q.v.).
  1235. NOXFER         Build with no Kermit or other file-transfer protocols.
  1236. NOXMIT         Build with no TRANSMIT command.
  1237. NOXPRINT       Disables transparent print code.
  1238. OLDMSG         Use old "entering server mode" message (see ckcmai.c).
  1239. OLINUXHISPEED  Build in old Linux hi-serial-speed code (for Linux <= 1.0).
  1240. OPENBSD        Build for OpenBSD.
  1241. OS2            Build for OS/2.
  1242. OSF            Build for OSF/1.
  1243. OSFPC          Build for OSF/1 on a PC.
  1244. OSF32          Digital UNIX 3.2 or later.
  1245. OSF40          Build for Digital UNIX 4.0.
  1246. OSF50          Build for Digital UNIX 5.0.
  1247. OSK            Build for OS-9.
  1248. OXOS           Build for Olivetti X/OS 2.3.
  1249. PCIX           Build for PC/IX
  1250. PID_T=xxx      Type for pids is xxx (normally int or pid_t).
  1251. POSIX          Build for POSIX: use POSIX header files, functions, etc.
  1252. _POSIX_SOURCE  Disable non-POSIX features.
  1253. PROVX1         Build for Venix 1.0 on DEC Professional 3xx.
  1254. PTX            Build for Dynix/PTX
  1255. PWID_T=xxx     getpwid() type is xxx.
  1256. RBSIZ=xxx      Define overall size of receive-packet buffer (with DYNAMIC).
  1257. RDCHK          rdchk() system call is available.
  1258. RENAME         rename() system call is available (UNIX).
  1259. RTAIX          Build for AIX 2.2.1 on IBM RT PC.
  1260. RTU            Build for Masscomp / Concurrent RTU.
  1261. SAVEDUID       BSD or other non-AT&T UNIX has saved-setuid feature.
  1262. SBSIZ=xxx      Define overall size of send-packet buffer (use with DYNAMIC).
  1263. SDIRENT        Directory structure specified in <sys/dirent.h>.
  1264. SELECT         select() function available (conflicts with RDCHK and CK_POLL)
  1265. SELECT_H       Include <sys/select.h> for select()-releated definitions.
  1266. SETEUID        BSD 4.4-style seteXid() functions available.
  1267. SIG_V          Type for signal() is void.  Used to override normal assumption.
  1268. SIG_I          Type for signal() is int.  Used to override normal assumption.
  1269. SOCKOPT_T      Override default data type for get/setsockopt() option length.
  1270. SOLARIS        Build for Solaris.
  1271. SOLARIS25      Build for Solaris 2.5 or later.
  1272. SONYNEWS       Build for Sony NEWS-OS.
  1273. STERMIOX       <sys/termiox.h> is available.
  1274. STRATUS        Build for Stratus VOS.
  1275. STRATUSX25     Include Stratus VOS X.25 support.
  1276. SUN4S5         Build for SUNOS 4.x in the System V R3 environment.
  1277. SUNOS4         Build for SUNOS 4.0 in the BSD environment.
  1278. SUNOS41        Build for SUNOS 4.1 in the BSD environment.
  1279. SUNX25         Build with support for SunLink X.25.
  1280. SVR3           Build for AT&T System V Release 3.
  1281. SVR3JC         Allow job control support on System V Release 3 UNIX versions.
  1282. SVR4           Build for AT&T System V Release 4.
  1283. SW_ACC_ID      UNIX only -- swap real & effective ids around access() calls.
  1284. sxaE50         Build for PFU Compact A Series SX/A TISP.
  1285. SYSLOGLEVEL=n  Force syslogging at given level.
  1286. SYSTIMEH       Include <sys/time.h>.
  1287. SYSUTIMEH      Include <sys/utime.h> for setting file dates (88OPEN)
  1288. TCPSOCKET      Build with support for TCP/IP via Berkeley sockets library.
  1289. TERMIOX        <termiox.h> header file is available (mostly SVR4).
  1290. TNCODE         Include TELNET-specific code.
  1291. TOWER1         Build for NCR Tower 1632 with OS 1.02.
  1292. TRS16          Build for Tandy 16/6000.
  1293. UID_T=xxx      Type for uids is xxx (normally int or uid_t).
  1294. UNIX           Must be defined for all UNIX versions.
  1295. UNIX351M       AT&T UNIX 3.51m on the AT&T 7300 UNIX PC.
  1296. USE_LSTAT      OK to use lstat().
  1297. USE_MEMCPY     Define this if memcpy()/memset()/memmove() available.
  1298. USE_STRERROR   Define this if strerror() is available.
  1299. USLEEP         usleep() system call available (conflicts with NAP & SELECT).
  1300. UTEK           Build for Tektronix workstations with UTEK OS.
  1301. UTIMEH         Include <utime.h> for setting file dates (SVR4, POSIX)
  1302. UTS24          Build for Amdahl UTS 2.4.
  1303. V7             Build for Version 7 UNIX.
  1304. VMS            Build for VAX/VMS.
  1305. VOID=xxx       VOID type for functions (int or void).
  1306. VXVE           Build for CDC VX/VE 5.2.1.
  1307. WAIT_T=xxx     Type of argument passed to wait().
  1308. WINTCP         Build with Wollongong VAX/VMS TCP/IP (implies TCPSOCKET)
  1309. WOLLONGONG     Build with Wollongong UNIX TCP/IP (implies TCPSOCKET)
  1310. XENIX          Build for Xenix (SCO, Tandy, others).
  1311. XNDIR          Support for BSD long filenames via <sys/ndir.h>.
  1312. XYZ_INTERNAL   Support for XYZMODEM protocols is internal, not external.
  1313. ZFCDAT         Define this if zfcdat() function is available in Kermit.
  1314. ZILOG          Build for Zilog ZEUS.
  1315. ZJDATE         Has zjdate() function that converts date to Julian format.
  1316. XPRINT         Transparent print code included in CONNECT module.
  1317.  
  1318. (End of CKCCFG.TXT)
  1319.