📄 ckcnet.h
字号:
/* ckcnet.h -- Symbol and macro definitions for C-Kermit network support *//* Author: Frank da Cruz <fdc@columbia.edu> Columbia University Academic Information Systems, New York City. Copyright (C) 1985, 2000, Trustees of Columbia University in the City of New York. All rights reserved. See the C-Kermit COPYING.TXT file or the copyright text in the ckcmai.c module for disclaimer and permissions.*/#ifndef CKCNET_H#define CKCNET_H/* Network types */#define NET_NONE 0 /* None */#define NET_TCPB 1 /* TCP/IP Berkeley (socket) */#define NET_TCPA 2 /* TCP/IP AT&T (streams) */#define NET_SX25 3 /* SUNOS SunLink X.25 */#define NET_DEC 4 /* DECnet */#define NET_VPSI 5 /* VAX PSI */#define NET_PIPE 6 /* LAN Manager Named Pipe */#define NET_VX25 7 /* Stratus VOS X.25 */#define NET_BIOS 8 /* IBM NetBios */#define NET_SLAT 9 /* Meridian Technologies' SuperLAT */#define NET_FILE 10 /* Read from a file */#define NET_CMD 11 /* Read from a sub-process */#define NET_DLL 12 /* Load a DLL for use as comm channel*/#define NET_SSH 13 /* Use SSH */#define NET_IX25 14 /* IBM AIX 4.1 X.25 */#define NET_HX25 15 /* HP-UX 10 X.25 */#define NET_PTY 16 /* Pseudoterminal */#ifdef OS2 /* In OS/2, only the 32-bit */#ifndef __32BIT__ /* version gets NETBIOS */#ifdef CK_NETBIOS#undef CK_NETBIOS#endif /* CK_NETBIOS */#endif /* __32BIT__ */#endif /* OS2 */#ifdef _M_PPC#ifdef SUPERLAT#undef SUPERLAT#endif /* SUPERLAT */#endif /* _M_PPC */#ifdef NPIPE /* For items in common to */#define NPIPEORBIOS /* Named Pipes and NETBIOS */#endif /* NPIPE */#ifdef CK_NETBIOS#ifndef NPIPEORBIOS#define NPIPEORBIOS#endif /* NPIPEORBIOS */#endif /* CK_NETBIOS *//* Network virtual terminal protocols */#define NP_DEFAULT 255#define NP_NONE 0 /* None (async) */#define NP_TELNET 1 /* TCP/IP telnet */#define NP_VTP 2 /* ISO Virtual Terminal Protocol */#define NP_X3 3 /* CCITT X.3 */#define NP_X28 4 /* CCITT X.28 */#define NP_X29 5 /* CCITT X.29 */#define NP_RLOGIN 6 /* TCP/IP Remote login */#define NP_KERMIT 7 /* TCP/IP Kermit */#define NP_FTP 8 /* TCP/IP FTP */#define NP_TCPRAW 9 /* TCP/IP Raw socket */#define NP_TCPUNK 10 /* TCP/IP Unknown */#define NP_SSL 11 /* TCP/IP SSLv23 */#define NP_TLS 12 /* TCP/IP TLSv1 */#define NP_SSL_TELNET 13 /* TCP/IP Telnet over SSLv23 */#define NP_TLS_TELNET 14 /* TCP/IP Telnet over TLSv1 */#define NP_K4LOGIN 15 /* TCP/IP Kerberized remote login */#define NP_EK4LOGIN 16 /* TCP/IP Encrypted Kerberized ... */#define NP_K5LOGIN 17 /* TCP/IP Kerberized remote login */#define NP_EK5LOGIN 18 /* TCP/IP Encrypted Kerberized ... */#define NP_CTERM 20 /* DEC CTERM */#define NP_LAT 21 /* DEC LAT *//* others here... *//* RLOGIN Modes */#define RL_RAW 0 /* Do Not Process XON/XOFF */#define RL_COOKED 1 /* Do Process XON/XOFF *//* Encryption types */#define CX_NONE 999#ifdef ENCTYPE_ANY#define CX_AUTO ENCTYPE_ANY#else#define CX_AUTO 0#endif /* ENCTYPE_ANY */#ifdef ENCTYPE_DES_CFB64#define CX_DESC64 ENCTYPE_DES_CFB64#else#define CX_DESC64 1#endif /* ENCTYPE_DES_CFB64 */#ifdef ENCTYPE_DES_OFB64#define CX_DESO64 ENCTYPE_DES_OFB64#else#define CX_DESO64 2#endif /* ENCTYPE_DES_OFB64 */#ifdef ENCTYPE_DES3_CFB64#define CX_DES3C64 ENCTYPE_DES3_CFB64#else#define CX_DES3C64 3#endif /* ENCTYPE_DES_CFB64 */#ifdef ENCTYPE_DES3_OFB64#define CX_DESO64 ENCTYPE_DES3_OFB64#else#define CX_DES3O64 4#endif /* ENCTYPE_DES_OFB64 */#ifdef ENCTYPE_CAST5_40_CFB64#define CX_C540C64 ENCTYPE_CAST5_40_CFB64#else#define CX_C540C64 8#endif /* ENCTYPE_CAST5_40_CFB64 */#ifdef ENCTYPE_CAST5_40_OFB64#define CX_C540O64 ENCTYPE_CAST5_40_OFB64#else#define CX_C540O64 9#endif /* ENCTYPE_CAST5_40_OFB64 */#ifdef ENCTYPE_CAST128_CFB64#define CX_C128C64 ENCTYPE_CAST128_CFB64#else#define CX_C128C64 10#endif /* ENCTYPE_CAST128_CFB64 */#ifdef ENCTYPE_CAST128_OFB64#define CX_C128O64 ENCTYPE_CAST128_OFB64#else#define CX_C128O64 11#endif /* ENCTYPE_CAST128_OFB64 *//* Basic network function prototypes, common to all. */_PROTOTYP( int netopen, (char *, int *, int) );_PROTOTYP( int netclos, (void) );_PROTOTYP( int netflui, (void) );_PROTOTYP( int nettchk, (void) );_PROTOTYP( int netbreak, (void) );_PROTOTYP( int netinc, (int) );_PROTOTYP( int netxin, (int, CHAR *) );_PROTOTYP( int nettol, (CHAR *, int) );_PROTOTYP( int nettoc, (CHAR) );/* SunLink X.25 support by Marcello Frutig, Catholic University, Rio de Janeiro, Brazil, 1990. Maybe this can be adapted to VAX PSI and other X.25 products too.*/#ifndef SUNOS4 /* Only valid for SUNOS4 */#ifndef SOLARIS#ifdef SUNX25#undef SUNX25#endif /* SUNX25 */#endif /* SOLARIS */#endif /* SUNOS4 */#ifdef STRATUSX25#define ANYX25#define MAX_USER_DATA 128 /* SUN defines this in a header file, I believe. */#endif /* STRATUSX25 */#ifdef SUNX25#define ANYX25#endif /* SUNX25 */#ifdef IBMX25 /* AIX 4.1 X.25 */#ifndef AIX41#undef IBMX25#else /* AIX41 */#define ANYX25#define MAX_USER_DATA NPI_MAX_DATA /* used for buffer sizes */#endif /* AIX41 */#endif /* IBMX25 */#ifdef HPX25 /* HP-UX 10.* X.25 */#ifndef HPUX10#undef HPX25#else /* HPUX10 */#define ANYX25#endif /* HPUX10 */#endif /* HPX25 */#ifdef ANYX25#ifndef NETCONN /* ANYX25 implies NETCONN */#define NETCONN#endif /* NETCONN */#define MAXPADPARMS 22 /* Number of PAD parameters */#define MAXCUDATA 12 /* Max length of X.25 call user data */#define X29PID 1 /* X.29 protocol ID */#define X29PIDLEN 4 /* X.29 protocol ID length */#define X29_SET_PARMS 2#define X29_READ_PARMS 4#define X29_SET_AND_READ_PARMS 6#define X29_INVITATION_TO_CLEAR 1#define X29_PARAMETER_INDICATION 0#define X29_INDICATION_OF_BREAK 3#define X29_ERROR 5#define INVALID_PAD_PARM 1#define PAD_BREAK_CHARACTER 0#define PAD_ESCAPE 1#define PAD_ECHO 2#define PAD_DATA_FORWARD_CHAR 3#define PAD_DATA_FORWARD_TIMEOUT 4#define PAD_FLOW_CONTROL_BY_PAD 5#define PAD_SUPPRESSION_OF_SIGNALS 6#define PAD_BREAK_ACTION 7#define PAD_SUPPRESSION_OF_DATA 8#define PAD_PADDING_AFTER_CR 9#define PAD_LINE_FOLDING 10#define PAD_LINE_SPEED 11#define PAD_FLOW_CONTROL_BY_USER 12#define PAD_LF_AFTER_CR 13#define PAD_PADDING_AFTER_LF 14#define PAD_EDITING 15#define PAD_CHAR_DELETE_CHAR 16#define PAD_BUFFER_DELETE_CHAR 17#define PAD_BUFFER_DISPLAY_CHAR 18#define MAXIX25 MAX_USER_DATA*7#define MAXOX25 MAX_USER_DATA#endif /* ANYX25 */#ifdef SUNX25#ifdef SOLARIS25 /* and presumably SunLink 9.xx */#include <fcntl.h>#include <errno.h>#include <sys/ioccom.h>#include <sys/types.h>#include <sys/socket.h>#include <sys/sockio.h>#include <sundev/syncstat.h>#include <netx25/x25_pk.h>#include <netx25/x25_ctl.h>#include <netx25/x25_ioctl.h>#else#include <sys/ioctl.h> /* X.25 includes, Sun only */#include <sys/param.h>#include <sys/systm.h>#ifndef SOLARIS#include <sys/mbuf.h>#endif /* SOLARIS */#include <sys/socket.h>#include <sys/protosw.h>#ifdef SOLARIS#include <sys/sockio.h>#else#include <sys/domain.h>#endif /* SOLARIS */#include <sys/socketvar.h>#include <net/if.h>#include <sundev/syncstat.h>#include <netx25/x25_pk.h>#include <netx25/x25_ctl.h>#include <netx25/x25_ioctl.h>#endif /* SOLARIS25 */#endif /* SUNX25 */#ifdef ANYX25#ifdef IBMX25 /* X.25 includes, AIX only */#include <fcntl.h>#include <sys/twtypes.h>#include <sys/twlib.h>#include <sys/stream.h>#include <stropts.h>#define NPI_20 /* required to include the whole NPI */#include <sys/npi_20.h>#include <sys/npiapi.h>#include <sys/pktintf.h>#include <odmi.h> /* required for access to the ODM */#include <sys/cfgodm.h> /* database, needed to find out the */ /* local NUA. see x25local_nua() *//* IBM X25 NPI generic primitive type */typedef union N_npi_ctl_t { ulong PRIM_type; /* generic primitive type */ char buffer[NPI_MAX_CTL]; /* maximum primitive size */ N_bind_ack_t bind_ack; N_bind_req_t bind_req; N_conn_con_t conn_con; N_conn_ind_t conn_ind; N_conn_req_t conn_req; N_conn_res_t conn_res; N_data_req_t data_req; N_data_ind_t data_ind; N_discon_ind_t discon_ind; N_discon_req_t discon_req; N_error_ack_t error_ack; N_exdata_ind_t exdata_ind; N_info_ack_t info_ack; N_ok_ack_t ok_ack; N_reset_con_t reset_con; N_reset_req_t reset_req; N_reset_ind_t reset_ind;} N_npi_ctl_t;/* some extra definitions to help out */typedef char x25addr_t[45]; /* max 40 defined by CCITT */typedef char N_npi_data_t[NPI_MAX_DATA];/* fd or server waiting for connections, used by netclos and netopen */extern int x25serverfd;#endif /* IBMX25 */#ifdef HPX25 /* X.25 includes, HP-UX only */#include <x25/ccittproto.h>#include <x25/x25.h>#include <x25/x25addrstr.h>#include <x25/x25codes.h>#include <x25/x25hd_ioctl.h>#include <x25/x25ioctls.h>#include <x25/x25str.h>#include <sys/ioctl.h>#endif /* HPX25 *//* C-Kermit X.3 / X.25 / X.29 / X.121 support functions *//* (riehm: this list of functions isn't quite right for AIX) */_PROTOTYP( int shopad, (int) );_PROTOTYP( int shox25, (int) );_PROTOTYP( VOID initpad, (void) );_PROTOTYP( VOID setpad, (CHAR *, int) );_PROTOTYP( VOID readpad, (CHAR *, int, CHAR *) );_PROTOTYP( int qbitpkt, (CHAR *, int) );_PROTOTYP( VOID setqbit, (void) );_PROTOTYP( VOID resetqbit, (void) );_PROTOTYP( VOID breakact, (void) );_PROTOTYP( int pkx121, (char *, CHAR *) );_PROTOTYP( SIGTYP x25oobh, (int) );_PROTOTYP( int x25diag, (void) );_PROTOTYP( int x25intr, (char) );_PROTOTYP( int x25reset, (char, char) );_PROTOTYP( int x25clear, (void) );_PROTOTYP( int x25stat, (void) );_PROTOTYP( int x25in, (int, CHAR *) );_PROTOTYP( int setpadp, (void) );_PROTOTYP( int setx25, (void) );_PROTOTYP( int x25xin, (int, CHAR *) );_PROTOTYP( int x25inl, (CHAR *, int, int, CHAR) );#ifdef IBMX25 /* setup x25 */_PROTOTYP( ulong x25bind, (int, char *, char *, int, int, int, ulong) );_PROTOTYP( int x25call, (int, char *, char *) ); /* connect to remote */_PROTOTYP( int x25unbind, (int) ); /* disconnect */_PROTOTYP( char *x25prim, (int) ); /* display primitives */_PROTOTYP( int x25local_nua, (char *) ); /* find local NUA */#endif /* IBMX25 */#endif /* ANYX25 *//* CMU-OpenVMS/IP */#ifdef CMU_TCPIP /* CMU_TCPIP implies TCPSOCKET */#ifndef TCPSOCKET#define TCPSOCKET#endif /* TCPSOCKET */#ifndef TCPIPLIB#define TCPIPLIB#endif /* TCPIPLIB */#endif /* CMU_TCPIP *//* DEC TCP/IP for (Open)VMS, previously known as UCX */#ifdef DEC_TCPIP /* DEC_TCPIP implies TCPSOCKET */#ifndef TCPSOCKET#define TCPSOCKET#endif /* TCPSOCKET */#ifndef TCPIPLIB#define TCPIPLIB#endif /* TCPIPLIB */#endif /* DEC_TCPIP *//* SRI/TGV/Cisco/Process MultiNet, TCP/IP for VAX/VMS */#ifdef MULTINET /* MULTINET implies TCPSOCKET */#ifndef TCPSOCKET#define TCPSOCKET#endif /* TCPSOCKET */#ifndef TCPIPLIB#define TCPIPLIB#endif /* TCPIPLIB */#ifndef TGVORWIN /* MULTINET and WINTCP */#define TGVORWIN /* share a lot of code... */#endif /* TGVORWIN */#endif /* MULTINET *//* Wollongong TCP/IP for VAX/VMS */#ifdef WINTCP /* WINTCP implies TCPSOCKET */#ifndef TCPSOCKET#define TCPSOCKET#endif /* TCPSOCKET */#ifndef TCPIPLIB#define TCPIPLIB#endif /* TCPIPLIB */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -