Annotation of coherent/e/bin/cku179/ckcnet.h, revision 1.1

1.1     ! root        1: #ifndef CKCNET_H
        !             2: #define CKCNET_H
        !             3: 
        !             4: /* Network types */
        !             5: 
        !             6: #define NET_NONE 0                     /* None */
        !             7: #define NET_TCPB 1                     /* TCP/IP Berkeley (socket) */
        !             8: #define NET_TCPA 2                     /* TCP/IP AT&T (streams) */
        !             9: #define NET_SX25 3                     /* SUNOS SunLink X.25 */
        !            10: #define NET_DEC  4                     /* DECnet */
        !            11: #define NET_VPSI 5                     /* VAX PSI */
        !            12: 
        !            13: /* Network virtual terminal protocols */
        !            14: 
        !            15: #define NP_NONE 0                      /* None (async) */
        !            16: #define NP_TELNET 1                    /* TCP/IP telnet */
        !            17: #define NP_VTP 2                       /* ISO Virtual Terminal Protocol */
        !            18: #define NP_X3 3                                /* CCITT X.3 */
        !            19: #define NP_X28 4                       /* CCITT X.28 */
        !            20: #define NP_X29 5                       /* CCITT X.28 */
        !            21: #define NP_CTERM 20                    /* DEC CTERM */
        !            22: #define NP_LAT 21                      /* DEC LAT */
        !            23: /* others here... */
        !            24: 
        !            25: /* Basic network function prototypes, common to all. */
        !            26: 
        !            27: _PROTOTYP( int netopen, (char *, int *, int) );
        !            28: _PROTOTYP( int netclos, (void) );
        !            29: _PROTOTYP( int netflui, (void) );
        !            30: _PROTOTYP( int nettchk, (void) );
        !            31: _PROTOTYP( int netbreak, (void) );
        !            32: _PROTOTYP( int netinc, (int) );
        !            33: _PROTOTYP( int nettol, (char *, int) );
        !            34: _PROTOTYP( int nettoc, (char) );
        !            35: 
        !            36: /*
        !            37:   SunLink X.25 support by Marcello Frutig, Catholic University,
        !            38:   Rio de Janeiro, Brazil, 1990.
        !            39: 
        !            40:   Maybe this can be adapted to VAX PSI and other X.25 products too.
        !            41: */
        !            42: #ifndef SUNOS4                         /* Only valid for SUNOS4 */
        !            43: #ifdef SUNX25
        !            44: #undef SUNX25
        !            45: #endif /* SUNX25 */
        !            46: #endif /* SUNOS4 */
        !            47: 
        !            48: #ifdef SUNX25
        !            49: 
        !            50: #ifndef NETCONN                                /* SUNX25 implies NETCONN */
        !            51: #define NETCONN
        !            52: #endif /* NETCONN */
        !            53: 
        !            54: #define MAXPADPARMS                18  /* Number of PAD parameters */
        !            55: #define MAXCUDATA                 12   /* Max length of X.25 call user data */
        !            56: #define X29PID                     1   /* X.29 protocol ID */
        !            57: #define X29PIDLEN                  4   /* X.29 protocol ID length */
        !            58: 
        !            59: #define X29_SET_PARMS               2
        !            60: #define X29_READ_PARMS              4
        !            61: #define X29_SET_AND_READ_PARMS      6
        !            62: #define X29_INVITATION_TO_CLEAR     1
        !            63: #define X29_PARAMETER_INDICATION    0
        !            64: #define X29_INDICATION_OF_BREAK     3
        !            65: #define X29_ERROR                   5
        !            66: 
        !            67: #define INVALID_PAD_PARM            1
        !            68: 
        !            69: #define PAD_BREAK_CHARACTER         0
        !            70: 
        !            71: #define PAD_ESCAPE                  1
        !            72: #define PAD_ECHO                    2
        !            73: #define PAD_DATA_FORWARD_CHAR       3
        !            74: #define PAD_DATA_FORWARD_TIMEOUT    4
        !            75: #define PAD_FLOW_CONTROL_BY_PAD     5
        !            76: #define PAD_SUPPRESSION_OF_SIGNALS  6
        !            77: #define PAD_BREAK_ACTION            7
        !            78: #define PAD_SUPPRESSION_OF_DATA     8
        !            79: #define PAD_PADDING_AFTER_CR        9
        !            80: #define PAD_LINE_FOLDING           10
        !            81: #define PAD_LINE_SPEED             11
        !            82: #define PAD_FLOW_CONTROL_BY_USER   12
        !            83: #define PAD_LF_AFTER_CR            13
        !            84: #define PAD_PADDING_AFTER_LF       14
        !            85: #define PAD_EDITING                15
        !            86: #define PAD_CHAR_DELETE_CHAR       16
        !            87: #define PAD_BUFFER_DELETE_CHAR     17
        !            88: #define PAD_BUFFER_DISPLAY_CHAR    18
        !            89: 
        !            90: #define MAXIX25 MAX_USER_DATA*7
        !            91: #define MAXOX25 MAX_USER_DATA
        !            92: 
        !            93: #include <sys/ioctl.h>                 /* X.25 includes */
        !            94: #include <sys/param.h>
        !            95: #include <sys/systm.h>
        !            96: #include <sys/mbuf.h>
        !            97: #include <sys/socket.h>
        !            98: #include <sys/protosw.h>
        !            99: #include <sys/domain.h>
        !           100: #include <sys/socketvar.h>
        !           101: #include <net/if.h>
        !           102: #include <sundev/syncstat.h>
        !           103: #include <netx25/x25_pk.h>
        !           104: #include <netx25/x25_ctl.h>
        !           105: #include <netx25/x25_ioctl.h>
        !           106: 
        !           107: /* C-Kermit X.3 / X.25 / X.29 / X.121 support functions */
        !           108: 
        !           109: _PROTOTYP( VOID shopad, (void) );
        !           110: _PROTOTYP( VOID initpad, (void) );
        !           111: _PROTOTYP( VOID setpad, (CHAR *, int) );
        !           112: _PROTOTYP( VOID readpad, (CHAR *, int, CHAR *) );
        !           113: _PROTOTYP( int qbitpkt, (CHAR *, int) );
        !           114: _PROTOTYP( VOID setqbit, (void) );
        !           115: _PROTOTYP( VOID resetqbit, (void) );
        !           116: _PROTOTYP( VOID breakact, (void) );
        !           117: _PROTOTYP( int pkx121, (char *, CHAR *) );
        !           118: _PROTOTYP( VOID x25oobh, (void) );
        !           119: _PROTOTYP( int x25diag, (void) );
        !           120: _PROTOTYP( int x25intr, (char) );
        !           121: _PROTOTYP( int x25reset, (char, char) );
        !           122: _PROTOTYP( int x25clear, (void) );
        !           123: _PROTOTYP( int x25stat, (void) );
        !           124: _PROTOTYP( int x25in, (int, CHAR *) );
        !           125: _PROTOTYP( int x25inl, (CHAR *, int, int, CHAR) );
        !           126: 
        !           127: #endif /* SUNX25 */
        !           128: 
        !           129: /* TGV / SRI MultiNet, TCP/IP for VAX/VMS */
        !           130: 
        !           131: #ifdef MULTINET                                /* MULTINET implies TCPSOCKET */
        !           132: #ifndef TCPSOCKET
        !           133: #define TCPSOCKET
        !           134: #endif /* TCPSOCKET */
        !           135: #endif /* MULTINET */
        !           136: 
        !           137: /* Wollongong TCP/IP for AT&T Sys V */
        !           138: 
        !           139: #ifdef WOLLONGONG                      /* WOLLONGONG implies TCPSOCKET */
        !           140: #ifndef TCPSOCKET
        !           141: #define TCPSOCKET
        !           142: #endif /* TCPSOCKET */
        !           143: #endif /* WOLLONGONG */
        !           144: 
        !           145: /* Should do the same for EXCELAN, INTERLAN, etc... */
        !           146: 
        !           147: /* Telnet protocol */
        !           148: 
        !           149: #ifdef TCPSOCKET                       /* TCPSOCKET implies TNCODE */
        !           150: #ifndef TNCODE                         /* Which means... */
        !           151: #define TNCODE                         /* Compile in telnet code */
        !           152: #endif /* TNCODE */
        !           153: #endif /* TCPSOCKET */
        !           154: 
        !           155: #ifdef SUNX25                          /* SUNX25 implies TCPSOCKET */
        !           156: #ifndef TCPSOCKET                      /* But doesn't imply TNCODE */
        !           157: #define TCPSOCKET
        !           158: #endif /* TCPSOCKET */
        !           159: #endif /* SUNX25 */
        !           160: 
        !           161: /* This is the TCPSOCKET section... */
        !           162: 
        !           163: #ifdef TCPSOCKET
        !           164: 
        !           165: #ifndef NETCONN                                /* TCPSOCKET implies NETCONN */
        !           166: #define NETCONN
        !           167: #endif /* NETCONN */
        !           168: 
        !           169: /* BSD sockets library header files */
        !           170: 
        !           171: #ifdef UNIX                            /* UNIX section */
        !           172: 
        !           173: #ifdef INTERLAN                                /* Racal-Interlan TCP/IP */
        !           174: #include <interlan/socket.h>
        !           175: #include <interlan/il_types.h>
        !           176: #include <interlan/telnet.h>
        !           177: #include <interlan/il_errno.h>
        !           178: #include <interlan/in.h>
        !           179: #include <interlan/telnet.h>
        !           180: #else                                  /* Normal BSD TCP/IP library */
        !           181: #ifndef HPUX
        !           182: #include <arpa/telnet.h>
        !           183: #endif /* HPUX */
        !           184: #include <sys/socket.h>
        !           185: #ifdef WOLLONGONG
        !           186: #include <sys/in.h>
        !           187: #else
        !           188: #include <netinet/in.h>
        !           189: #endif /* WOLLONGONG */
        !           190: #endif /* INTERLAN */
        !           191: 
        !           192: #ifndef EXCELAN
        !           193: #include <netdb.h>
        !           194: #ifndef INTERLAN
        !           195: #ifdef WOLLONGONG
        !           196: #define minor                          /* Do not include <sys/macros.h> */
        !           197: #include <sys/inet.h>
        !           198: #else
        !           199: #ifndef HPUX
        !           200: #include <arpa/inet.h>
        !           201: #endif /* HPUX */
        !           202: #endif /* WOLLONGONG */
        !           203: #endif /* INTERLAN */
        !           204: #endif /* EXCELAN */
        !           205: 
        !           206: #ifdef EXCELAN                         /* Excelan TCP/IP */
        !           207: #include <ex_errno.h>
        !           208: #endif /* EXCELAN */
        !           209: 
        !           210: #ifdef I386IX                          /* Interactive Sys V R3 network. */
        !           211: /* #define TELOPTS */                  /* This might need defining. */
        !           212: #define ORG_NLONG ENAMETOOLONG         /* Resolve conflicting symbols */
        !           213: #undef ENAMETOOLONG                    /* in <errno.h> and <net/errno.h> */
        !           214: #define ORG_NEMPTY ENOTEMPTY
        !           215: #undef ENOTEMPTY
        !           216: #include <net/errno.h>
        !           217: #undef ENAMETOOLONG
        !           218: #define ENAMETOOLONG ORG_NLONG
        !           219: #undef ENOTEMPTY
        !           220: #define ENOTEMPTY ORG_NEMPTY
        !           221: #endif /* I386IX */
        !           222: /*
        !           223:   Data type of the inet_addr() function...
        !           224:   We define INADDRX if it is of type struct inaddr.
        !           225:   If it is undefined, unsigned long is assumed.
        !           226:   Look at <arpa/inet.h> to find out.  The following known cases are
        !           227:   handled here.  Other systems that need it can be added here, or else
        !           228:   -DINADDRX can be included in the CFLAGS on the cc command line.
        !           229: */
        !           230: #ifdef DGUX540                         /* Data General UX 5.40 */
        !           231: #define INADDRX
        !           232: #endif /* DGUX540 */
        !           233: #ifdef DU2                             /* DEC Ultrix 2.0 */
        !           234: #define INADDRX
        !           235: #endif /* DU2 */
        !           236: #ifdef OXOS                            /* Olivetti X/OS */
        !           237: /*
        !           238:   Reportedly this was only necessary because of a bug in X/OS,
        !           239:   which is now fixed.  X/OS users who have trouble compiling ckcnet.c
        !           240:   should uncomment this section.
        !           241: */
        !           242: #ifdef COMMENT
        !           243: #define INADDRX
        !           244: #endif /* COMMENT */
        !           245: #endif /* OXOS */
        !           246: 
        !           247: #else /* Not UNIX */
        !           248: 
        !           249: #ifdef VMS                             /* VAX/VMS section */
        !           250: 
        !           251: #ifdef MULTINET                                /* TGV MultiNet */
        !           252: #include "multinet_root:[multinet.include]errno.h"
        !           253: #include "multinet_root:[multinet.include.sys]types.h"
        !           254: #include "multinet_root:[multinet.include.sys]socket.h"
        !           255: #include "multinet_root:[multinet.include]netdb.h"
        !           256: #include "multinet_root:[multinet.include.netinet]in.h"
        !           257: #include "multinet_root:[multinet.include.sys]ioctl.h"
        !           258: #endif /* MULTINET */
        !           259: /* Others here -- DECnet, VAX/PSI */
        !           260: #endif /* VMS */
        !           261: #endif /* UNIX */
        !           262: #endif /* TCPSOCKET */
        !           263: 
        !           264: #ifdef TNCODE                          /* If we're compiling telnet code... */
        !           265: /*
        !           266:   Make sure telnet symbols are defined; can't rely on library header files
        !           267:   for any of them.
        !           268: */
        !           269: #ifndef IAC                            /* First the telnet commands */
        !           270: #define IAC 255
        !           271: #endif /* IAC */
        !           272: #ifndef DONT
        !           273: #define DONT 254
        !           274: #endif /* DONT */
        !           275: #ifndef DO
        !           276: #define DO 253
        !           277: #endif /* DO */
        !           278: #ifndef WONT
        !           279: #define WONT 252
        !           280: #endif /* WONT */
        !           281: #ifndef WILL
        !           282: #define WILL 251
        !           283: #endif /* WILL */
        !           284: #ifndef SB
        !           285: #define SB 250
        !           286: #endif /* SB */
        !           287: #ifndef BREAK
        !           288: #define BREAK 243
        !           289: #endif /* BREAK */
        !           290: #ifndef SE
        !           291: #define SE 240
        !           292: #endif /* SE */
        !           293: 
        !           294: #ifndef TELOPT_ECHO                    /* Then the options */
        !           295: #define TELOPT_ECHO 1
        !           296: #endif /* TELOPT_ECHO */
        !           297: #ifndef TELOPT_SGA 
        !           298: #define        TELOPT_SGA 3
        !           299: #endif /* TELOPT_SGA */
        !           300: #ifndef TELOPT_STATUS 
        !           301: #define        TELOPT_STATUS 5
        !           302: #endif /* TELOPT_STATUS */
        !           303: #ifndef TELOPT_TTYPE 
        !           304: #define        TELOPT_TTYPE 24
        !           305: #endif /* TELOPT_TTYPE */
        !           306: #ifndef NTELOPTS
        !           307: #define        NTELOPTS 24
        !           308: #endif /* NTELOPTS */
        !           309: 
        !           310: /* Telnet protocol functions defined in C-Kermit */
        !           311: 
        !           312: _PROTOTYP( int tn_ini, (void) );       /* Telnet protocol support */
        !           313: _PROTOTYP( int tn_sopt, (int, int) );
        !           314: _PROTOTYP( int tn_doop, (CHAR, int) );
        !           315: _PROTOTYP( int tn_sttyp, (void) );
        !           316: _PROTOTYP( int tnsndbrk, (void) );
        !           317: 
        !           318: #endif /* TNCODE */
        !           319: 
        !           320: #endif /* CKCNET_H */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.