⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ckccfg.txt

📁 C-Kermit源码。是使用串口/Modem和网络通讯的程序
💻 TXT
📖 第 1 页 / 共 5 页
字号:
signal.h).  If this code should cause problems, you can disable it withoutdisabling the NAWS feature altogether, by defining NOSIGWINCH at compile time.8.1.5. Enabling Incoming TCP/IP ConnectionsThis feature lets you "set host * <port>" and wait for an incoming connectionon the given port.  This feature is enabled automatically at compile ifTCPSOCKET is defined and SELECT is also defined.  But watch out, simplydefining SELECT on the cc command line does not guarantee successfulcompilation or linking (see section 11).If you want to disable incoming TCP/IP connections, then build C-Kermitwith:  -DNOLISTEN8.1.6. Disabling "SET TCP" Options.The main reason for this is because of header file / prototype conflicts atcompile time regardting get/setsockopt().  If you can't fix them (withoutbreaking other builds), just include the following in CFLAGS:  -DNOTCPOPTS8.2. X.25X.25 support requires (a) a SUN, (b) the SunLink product (libraries and headerfiles), and (c) an X.25 connection into your SUN, or else Stratus VOS and theappropriate X.25 development tools.  Support for IBM AIXlink X.25 was addedin C-Kermit 6.1.In UNIX, special makefile entries sunos4x25 and sunos41x25 (for SUNOS 4.0 and4.1, respectively), or aix41x25, are provided to build in this feature, butthey only work if conditions (a)-(c) are met.  To request this feature,include -DSUNX25 (or -DIBMX25) in CFLAGS.SUNX25 (or -DIBMX25) and TCPSOCKET can be freely mixed and matched.8.3. Other NetworksSupport for other networking methods -- NETBIOS, LAT, Named Pipes, etc --is included in CK*NET.H and CK*NET.C for implementations (such as OS/2) wherethese methods are supported.Provision is made in the organization of the modules, header files, commands,etc, for addition of new network types such as DECnet, X.25 for other systems(HP-UX, VMS, etc), and so on.  Send email to kermit@columbia.edu if you areinterested in working on such a project.9. EXCEPTION HANDLINGThe setjmp/longjmp mechanism is used for handling exceptions.  The jumpbuffer is of type jmp_buf, which almost everywhere is typedef'd as an array,in which case you should have no trouble compiling the exception-handlingcode.  However, if you are building C-Kermit in/for an environment wherejmp_buf is something other than an array (e.g. a struct), then you'll haveto define the following symbol:  JBNOTARRAY10. SECURITY FEATURESCompiling with the NOPUSH symbol defined removes all the "shell escape"features from the program, including the PUSH, RUN, and SPAWN commands, the"!"  and "@" command prefixes, OPEN !READ, OPEN !WRITE, job control (includingthe SUSPEND command), the REDIRECT command, shell/DCL escape from CONNECTmode, as well as the server's execution of REMOTE HOST commands (and, ofcourse, the ENABLE HOST command).  Add NODISPO to also prevent acceptance ofincoming MAIL or REMOTE PRINT files.  For UNIX, also be sure to readCKUINS.TXT about set[ug]id installation.  Additional restrictions can beenforced when in server mode; read about the DISABLE command.Compiling with NOCCTRAP prevents the trapping of SIGINT by Kermit.  Thusif the user generates a SIGINT signal (e.g. by typing the system's interruptcharacter), Kermit will exit immediately, rather than returning to itsprompt.NOPUSH and NOCCTRAP together allow Kermit to be run from restricted shells,preventing access to system functions.11. ENABLING SELECT()Kermit works best if it can do nonblocking reads, nondestructive input bufferchecking, and millisecond sleeps.  All of these functions can be accomplishedby the select() function, which, unfortunately, is not universally available.Furthermore, select() is required if incoming TCP/IP connections are to besupported.select() was introduced with Berkeley UNIX, rejected by AT&T for System V,but is gradually creeping in to all UNIX versions (and other operating systemstoo) by virtue of its presence in the sockets library, which is needed forTCP/IP.  AT&T SVID for System V R4 includes select(), but that does not meanthat all SVR4 implementations have it.Furthermore, even when select() is available, it might work only on socketfile descriptors, but not on others like serial ports, pipes, etc.  Forexample, in AOS/VS and BeOS (DR8 and earlier), it works only with filedescriptors that were created by socket() and opened by connect() or accept().Other alternatives include poll() and rdchk().  Only one of these threefunctions should be included.  The following symbols govern this:  SELECT  Use select() (BSD, or systems with sockets libraries)  CK_POLL Use poll()   (System V)  RDCHK   Use rdchk()  (SCO)If your system supports the select() function, but your version of C-Kermitdoes not, try adding:  -DSELECTto the CFLAGS, and removing -DRDCHK or -DCK_POLL if it is there.  If you getcompilation errors, some adjustments to ck*tio.c and/or ck*net.c might beneeded; search for SELECT (uppercase) in these files (note that there areseveral variations on the calling conventions for select()).Various macros and data types need to be defined in order to use select().Usually these are picked up from <types.h> or <sys/types.h>.  But on somesystems, they are in <sys/select.h>.  In that case, add the following:  -DSELECT_Hto the CFLAGS to tell C-Kermit to #include <sys/select.h>.  A good indicationthat you need to do this would be if you get compile-time complaints about"fd_set" or "FD_SET" not being declared or defined.In UNIX, the use of select() vs fork() in the CONNECT command is independentof the above considerations, and is governed by choosing a particular makefiletarget.As of C-Kermit 6.1, select() is also the preferred control mechanism forthe CONNECT command.  Unfortunately, the structures used by the originalUNIX CONNECT command, based on fork(), and those used by select(), are sodifferent, it was not practical to implement them both in one module.  So theselect()-based CONNECT command module for UNIX is ckucns.c, and the fork-basedone remains ckucon.c.  To choose the fork-based one, which is more portable(but slower and more fragile), use "wermit" as the make target.  To choose theselect-based one, use "xermit" (as is done, for example, in the SunOS 4.1make target).  Only do this if you can verify that the CONNECT command workson serial connections and PIPE connections as well as TCP connections.  The select() version of ckucon.c MUST be used if encryption is to be  done, since the fork() version loses its ability to share vital state  information between the two forks.  Also note that the select() version  is superior in many other ways too.  For example, it recovers better from  exterior killing, forced disconnections, etc.SHOW VERSIONS tells whether the CONNECT module uses fork() or select().12. I/O REDIRECTIONThe REDIRECT command allows a local program to be run with its i/o redirectedover the communications connection.  Your version of C-Kermit has a REDIRECTcommand if it was built with the following CFLAG:  -DCK_REDIRThis, in turn, is possible only if the underlying API is there.  In the caseof UNIX this is just the wait() system call, so all UNIX versions get thisfeature as of 6.0.192 (earlier versions needed a <sys/wait.h> header filedefining the symbols WIFEXITED and WEXITSTATUS).As of version 6.1, file transfer can be done using pipes and filters.  Toenable this feature, #define PIPESEND (and fill in the code).  To disable onsystems where it is normally enabled, define NOPIPESEND.  This feature is, ofcourse, also disabled by building with NOPUSH (or giving the "nopush" commandat runtime).Version 6.1 also adds the PIPE and SET HOST /COMMAND commands, which provideanother form of redirection.  This feature is selected with -DNETCMD.  CK_RDIRmust also be defined, since the same mechanisms are used internally.13. FLOATING-POINT TIMERSC-Kermit 6.1 can be configured to use high-precision file-transfer timersfor more accurate statistics.  This feature is enabled with:  -DGFTIMERand disabled with:  -DNOGFTIMERIf you try to build with -DGFTIMER but you get compilation errors, eitherfix them (and send email to kermit@columbia.edu telling what you did), orelse give up and use -DNOGFTIMER instead.  Hint: depending on your machinearchitecture, you might have better luck using double than float as the datatype for floating-point numbers, or vice versa.  Look in ckcdeb.h for thesection that handles this (search for "float").If it builds successfully, test the result carefully -- watch the time-relatedfields in the fullscreen file-transfer display and the numbers reported by theSTATISTICS command.  If the results are nonsense, then try switching fromfloat to double or vice versa as noted in the previous paragraph.  If thatdoesn't help, use -DNOFGTIMER.14. SPECIAL CONFIGURATIONSAs of C-Kermit 7.0, if you build C-Kermit normally, but with -DNOICP (NoInteractive Command Parser), you get a program capable of making serialconnections (but not dialing) and network connections (if TCPSOCKET orother network option included), and can also transfer files using Kermitprotocol, but only via autodownload/upload.  Furthermore, if you callthe executable "telnet", it will act like Telnet -- using the command-lineoptions.  However, in this case there is nothing to escape back to, so ifyou type Ctrl-\c, it just prints a message to this effect.You can also build C-Kermit with -DNOXFER, meaning omit all the file-transferfeatures.  This leaves you with a scriptable communications program that isconsiderably smaller than the full C-Kermit.----------------------------------------------------------------------APPENDIX I: SUMMARY OF COMPILE-TIME OPTIONSThese are the symbols that can be specified on the cc command line, listedalphabetically.  Others are used internally, including those taken from headerfiles, those defined by the compiler itself, and those inferred from the onesgiven below.  Kermit's SHOW VERSIONS command attempts to display most ofthese.  See ckcdeb.h and ckcnet.h for inference rules.  For example SVR3implies ATTSV, MULTINET implies TCPSOCKET, and so on.The following options are not included in all makefile entries, but they arebeneficial if they work.  It is recommended that you add them to your makefileentry if they are lacking and test the result.  If it's OK, let me know andI'll add them to the official makefile:DYNAMIC        Dynamic packet buffer allocation, bigger packets allowed, etc.NOSETBUF       Don't do unbuffered single-character writes to the console.               This tends to speed up CONNECT mode.Here is the complete list of the Kermit-specific compile-time switches:ACUCNTRL       Select BSD 4.3-style acucntrl() bidirectional tty control.aegis          Build for Apollo Aegis (predefined on Apollo systems).AIX370         Build for IBM AIX/370 for IBM mainframes.AIXESA         Build for IBM AIX/ESA for IBM mainframes.AIXPS2         Build for IBM AIX 3.0 for PS/2 series (never formally released).AIXRS          Build for IBM AIX 3.x on RS/6000.AIX41          Build for IBM AIX 4.x on RS/6000.AMIGA          Build for Commodore Amiga with Intuition OS.ATT6300        Build for AT&T 6300 PLUS.ATT7300        Build for AT&T 7300 UNIX PC (3B1).ATTSV          Build for AT&T System III or V UNIX.AUX            Build for Apple A/UX for the Macintosh.BIGBUFOK       OK to use big buffers - "memory is not a problem"BPS_xxxx       Enable SET SPEED xxxxBSD29          Build for BSD 2.9 or 2.10.BSD4           Build for BSD 4.2.BSD41          Build for BSD 4.1.BSD43          Build for BSD 4.3.BSD44          Build for BSD 4.4.C70            Build for BBN C/70.CIE            Build for CIE Systems 680/20.CKCONINTB4CB   Work around prompt-disappears after escape back from CONNECT.CKLOGDIAL      Enable connection log.CKMAXPATH      Maximum length for a fully qualified filename.CKREGEX        Include [...] or {xxx,xxx,xxx} matching in ckmatch().CKSYSLOG       Enable syslogging.CK_ANSIC       Enable ANSI C constructs - prototypes, etc.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -