📄 tcp.h
字号:
};#endif /* NO_TIMEVAL */#endif /* MULTINET */#ifdef DECNET#include <types.h>#include <errno.h>#include <time.h>#include "types.h" /* for socket.h */#include "socket.h"#include "dn"#include "dnetdb"/* #include "vms.h" */#define TCP_INCLUDES_DONE#endif /* DECNET */#ifdef UCX#include <types.h>#include <errno.h>#include <time.h>#include <socket.h>#include <in.h>#include <inet.h>#if defined(TCPWARE) && !defined(__DECC)#include "tcpware_include:netdb.h"#include "tcpware_include:ucx$inetdef.h"#else#include <netdb.h>#include <ucx$inetdef.h>#endif /* TCPWARE */#define TCP_INCLUDES_DONE#endif /* UCX */#ifdef CMU_TCP#include <types.h>#include <errno.h>#include "cmuip_root:[syslib]time.h"#include "cmuip_root:[syslib]socket.h"#include <in.h>#include <inet.h>#include <netdb.h>#include "cmuip_root:[syslib]ioctl.h"#define TCP_INCLUDES_DONE#endif /* CMU_TCP */#ifdef SOCKETSHR_TCP#include <types.h>#include <errno.h>#include <time.h>#include <socket.h>#include <in.h>#include <inet.h>#include <netdb.h>#include "socketshr_library:socketshr.h"#include "socketshr_library:ioctl.h"#define TCP_INCLUDES_DONE#endif /* SOCKETSHR_TCP */#ifdef WIN_TCP#include <types.h>#include <errno.h>#include <time.h>#include <socket.h>#include <in.h>#include <inet.h>#include <netdb.h>#ifndef NO_IOCTL#include <ioctl.h>#endif /* !NO_IOCTL */#define TCP_INCLUDES_DONE#endif /* WIN_TCP */#ifndef TCP_INCLUDES_DONE#include <types.h>#include <errno.h>#include <time.h>#ifdef VMS_SOCKET_HEADERS/*** Not all versions of VMS have the full set of headers** for socket library functions, because the TCP/IP** packages were layered products. If we want these** specifically, instead of those for the above packages,** the module should be compiled with VMS_SOCKET_HEADERS** defined instead of layered product definitions, above.** If the module is not using socket library functions,** none of the definitions need be used, and we include** only the above three headers. - FM*/#include <socket.h>#include <in.h>#include <inet.h>#include <netdb.h>#include <ioctl.h>#endif /* VMS_SOCKET_HEADERS */#define TCP_INCLUDES_DONE#endif /* !TCP_INCLUDES_DONE *//* On VMS machines, the linker needs to be told to put global data sections into a data segment using these storage classes. (MarkDonszelmann) */#if defined(VAXC) && !defined(__DECC)#define GLOBALDEF globaldef#define GLOBALREF globalref#else#ifdef __GNUC__ /* this added by Sterling Bjorndahl */#define GLOBALREF_IS_MACRO 1#define GLOBALDEF_IS_MACRO 1#include <gnu_hacks.h> /* defines GLOBALREF and GLOBALDEF for GNUC on VMS */#endif /* __GNUC__ */#endif /* VAXC && !DECC */#endif /* VMS *//* * On non-VMS machines and for DECC on VMS, the GLOBALDEF and GLOBALREF * storage types default to normal C storage types. */#ifndef GLOBALREF#define GLOBALDEF#define GLOBALREF extern#endif /* !GLOBALREF */#ifdef DJGPP#undef SELECT#define TCP_INCLUDES_DONE#define NO_IOCTL#include <errno.h>#include <sys/types.h>#include <socket.h>#undef NETWRITE#define NETWRITE write_s#undef NETREAD#define NETREAD read_s#undef NETCLOSE#define NETCLOSE close_s#endif/*SCO ODT unix version */#if HAVE_UNISTD_H#include "unistd.h"#endif /* HAVE_UNISTD_H */#if HAVE_SYS_FILIO_H#include <sys/filio.h>#endif /* HAVE_SYS_FILIO_H *//*MIPS unix *//* Mips hack (bsd4.3/sysV mixture...) */#ifdef mipsextern int errno;#endif /* mips *//*Regular BSD unix versions========================= These are a default unix where not already defined specifically. */#ifndef INCLUDES_DONE#include <sys/types.h>/* #include <streams/streams.h> not ultrix */#if HAVE_STRING_H#include <string.h>#endif /* HAVE_STRING_H */#include <errno.h> /* independent */#ifdef SCO#include <sys/timeb.h>#include <time.h>#endif /* SCO */#if defined(AIX) || defined(SVR4)#include <time.h>#endif /* AIX || SVR4 */#include <sys/time.h> /* independent */#include <sys/stat.h>//#include <sys/param.h>//#include <sys/file.h> /* For open() etc */#if defined(NeXT) || defined(sony_news)#ifndef mode_ttypedef unsigned short mode_t;#endif /* !mode_t */#ifndef pid_ttypedef int pid_t;#endif /* !pid_t */#ifndef S_ISREG#define S_ISREG(m) (((m) & 0170000) == 0100000)#endif /* S_ISREG */#ifndef WEXITSTATUS#ifdef sony_news#define WEXITSTATUS(s) WIFEXITED(s)#else#define WEXITSTATUS(s) (((s).w_status >> 8) & 0377)#endif /* sony_news */#endif /* !WEXITSTATUS */#ifndef WTERMSIG#ifdef sony_news#define WTERMSIG(s) (s).w_termsig#else#define WTERMSIG(s) (((s).w_status >> 8) & 0177)#endif /* sony_news */#endif /* !WTERMSIG */#endif /* NeXT || sony_news */#define INCLUDES_DONE#endif /* Normal includes *//* FIXME: this should be autoconf'd *//* Interactive UNIX for i386 and i486 -- Thanks to jeffrey@itm.itm.org */#ifdef ISC#include <net/errno.h>#include <sys/types.h>#include <sys/tty.h>#include <sys/sioctl.h>#include <sys/bsdtypes.h>#ifndef MERGE#define MERGE#include <sys/pty.h>#undef MERGE#else#include <sys/pty.h>#endif /* !MERGE */#ifndef USE_DIRENT#define USE_DIRENT /* sys V style directory open */#endif /* USE_DIRENT */#include <sys/dirent.h>#endif /* ISC *//* Directory reading stuff - BSD or SYS V*/#if defined(UNIX) && !defined(unix)#define unix#endif /* UNIX && !unix */#ifdef HAVE_CONFIG_H# ifdef HAVE_LIMITS_H# include <limits.h># endif /* HAVE_LIMITS_H */# if !defined(MAXINT) && defined(INT_MAX)# define MAXINT INT_MAX# endif /* !MAXINT && INT_MAX */#else/* FIXME: remove after completing configure-script */#ifdef unix /* if this is to compile on a UNIX machine */#define HAVE_READDIR 1 /* if directory reading functions are available */#ifdef USE_DIRENT /* sys v version */#include <dirent.h>#define direct dirent#else#include <sys/dir.h>#endif /* USE_DIRENT */#if defined(sun) && defined(__svr4__)#include <sys/fcntl.h>#include <limits.h>#else#if defined(__hpux) || defined(LINUX) || defined (__FreeBSD__) #include <limits.h>#endif /* __hpux || LINUX || __FreeBSD__ */#endif /* sun && __svr4__ */#if !defined(MAXINT) && defined(INT_MAX)#define MAXINT INT_MAX#endif /* !MAXINT && INT_MAX */#endif /* unix */#ifndef VM#ifndef VMS#ifndef THINK_C#define DECL_SYS_ERRLIST 1#endif /* !THINK_C */#endif /* !VMS */#endif /* !VM */#endif /* !HAVE_CONFIG_H *//*Defaults======== INCLUDE FILES FOR TCP */#ifndef TCP_INCLUDES_DONE#ifndef NO_IOCTL//#include <sys/ioctl.h> /* EJB */#endif /* !NO_IOCTL *///#include <sys/socket.h>//#include <netinet/in.h>#ifndef __hpux /* this may or may not be good -marc *///#include <arpa/inet.h> /* Must be after netinet/in.h */#endif /* !__hpux *///#include <netdb.h>#endif /* TCP includes *//*ROUGH ESTIMATE OF MAX PATH LENGTH*/#ifndef HT_MAX_PATH#ifdef MAXPATHLEN#define HT_MAX_PATH MAXPATHLEN#else#ifdef PATH_MAX#define HT_MAX_PATH PATH_MAX#else#define HT_MAX_PATH 1024 /* Any better ideas? */#endif#endif#endif /* HT_MAX_PATH */#if HT_MAX_PATH < 256#undef HT_MAX_PATH#define HT_MAX_PATH 256#endif/* MACROS FOR MANIPULATING MASKS FOR SELECT() */#ifdef SELECT#ifndef FD_SETtypedef unsigned int fd_set;#define FD_SET(fd,pmask) (*(pmask)) |= (1<<(fd))#define FD_CLR(fd,pmask) (*(pmask)) &= ~(1<<(fd))#define FD_ZERO(pmask) (*(pmask))=0#define FD_ISSET(fd,pmask) (*(pmask) & (1<<(fd)))#endif /* !FD_SET */#endif /* SELECT */#endif /* TCP_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -