📄 ckcnet.h
字号:
#include "twg$tcp:[netdist.include.sys]ioctl.h"#else /* Not WINTCP */#ifdef DEC_TCPIP#ifdef UCX50#ifndef IF_DOT_H#define IF_DOT_H#endif /* IF_DOT_H */#endif /* UCX50 */#ifdef IF_DOT_H#include <if.h> /* Needed to put up u_int typedef */#else#ifdef NEEDUINTtypedef unsigned int u_int;#endif /* NEEDUINT */#endif /* IF_DOT_H */#include <in.h>#include <netdb.h>#include <socket.h>#include "ckvioc.h"#define socket_errno errno#ifdef COMMENT/* No longer needed because now bzero/bcopy are macros defined as memset/memmove in all VMS builds.*//* Translation: In <strings.h>, which exists only for DECC >= 5.2, bzero() and bcopy() are declared only for OpenVMS >= 7.0. This still might need adjustment for DECC 5.0 and higher.*/#ifdef __DECC_VER#ifdef VMSV70/* Note: you can't use "#if (__VMS_VER>=70000000)" because that is not portable and kills non-VMS builds.*/#include <strings.h>#else#ifndef bzero#define bzero(s,n) memset(s,0,n)#endif#ifndef bcopy#define bcopy(h,a,l) memmove(a,h,l)#endif#endif /* VMSV70 */#else#ifndef bzero#define bzero(s,n) memset(s,0,n)#endif#ifndef bcopy#define bcopy(h,a,l) memmove(a,h,l)#endif#endif /* __DECC_VER */#endif /* COMMENT */#define socket_read read#define socket_write write#define socket_ioctl ioctl#define socket_close close#ifdef __DECCint ioctl (int d, int request, void *argp);#elseint ioctl (int d, int request, char *argp);#endif /* DECC *//* UCX supports select(), but does not provide the needed symbol and structure definitions in any header file, so ...*/#include <types.h>#ifndef NBBY/*- * Copyright (c) 1982, 1986, 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)types.h 8.1 (Berkeley) 6/2/93 */#define NBBY 8 /* number of bits in a byte *//* * Select uses bit masks of file descriptors in longs. These macros * manipulate such bit fields (the filesystem macros use chars). * FD_SETSIZE may be defined by the user, but the default here should * be enough for most uses. */#ifndef FD_SETSIZE#define FD_SETSIZE 256#endiftypedef long fd_mask;#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */#ifndef howmany#define howmany(x, y) (((x)+((y)-1))/(y))#endiftypedef struct fd_set { fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];} fd_set;#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))#define FD_COPY(f, t) bcopy(f, t, sizeof(*(f)))#define FD_ZERO(p) bzero(p, sizeof(*(p)))#endif /* !NBBY */#else /* Not DEC_TCPIP */#ifdef CMU_TCPIP#include <types.h>#include <in.h>#include <netdb.h>#include <socket.h>#include <inet.h>#include <ioctl.h>#include "ckvioc.h"#define socket_errno errno/* * Routines supplied in LIBCMU.OLB */#define socket_ioctl ioctl#define socket_read cmu_read#define socket_write cmu_write#define socket_close cmu_close#endif /* CMU_TCPIP */#endif /* DEC_TCPIP */#endif /* WINTCP */#endif /* MULTINET */#else /* Not VMS */#ifdef OS2#include "ckonet.h"#ifndef NT#include <nerrno.h>#endif#endif /* OS2 */#ifdef STRATUS /* Stratus VOS using OS TCP/IP products S235, S236, S237 */#include <tcp_socket.h>/* This gets used some places when TCPSOCKET is defined. *//* OS TCP provides bzero(), but not bcopy()... go figure. */#define bcopy(s,d,z) memcpy(d,s,z)#endif /* STRATUS */#ifdef OSK#ifndef OSKXXC#include <inet/in.h>#include <inet/netdb.h>#include <inet/socket.h>#else#include <INET/in.h>#include <INET/netdb.h>#include <INET/socket.h>#endif /* OSKXXC */#ifndef bzero#define bzero(s,n) memset(s,0,n)#endif#ifndef bcopy#define bcopy(h,a,l) memcpy(a,h,l)#endiftypedef char * caddr_t; /* core address type */#endif /* OSK */#endif /* VMS */#endif /* UNIX */#endif /* TCPSOCKET */#ifdef TCPSOCKET#ifndef NOHADDRLIST#ifndef HADDRLIST#ifdef SUNOS41#define HADDRLIST#endif /* SUNOS41 */#ifdef SOLARIS#define HADDRLIST#endif /* SOLARIS */#ifdef LINUX#define HADDRLIST#endif /* LINUX */#ifdef AIXRS#define HADDRLIST#endif /* AIXRS */#ifdef HPUX#define HADDRLIST#endif /* HPUX */#ifdef IRIX#define HADDRLIST#endif /* IRIX */#ifdef I386IX#define HADDRLIST#endif /* I386IX */#endif /* HADDRLIST *//* A system that defines h_addr as h_addr_list[0] should be HADDRLIST */#ifndef HADDRLIST#ifdef h_addr#define HADDRLIST#endif /* h_addr */#endif /* HADDRLIST */#endif /* NOHADDRLIST */#endif /* TCPSOCKET */#ifdef TNCODE /* If we're compiling telnet code... */#ifndef IKS_OPTION#ifndef STRATUS#define IKS_OPTION#endif /* STRATUS */#endif /* IKS_OPTION */#include "ckctel.h"#elseextern int sstelnet;#ifdef IKSD#undef IKSD#endif /* IKSD */#ifndef NOIKSD#define NOIKSD#endif /* NOIKSD */#ifdef IKS_OPTION#undef IKS_OPTION#endif /* IKS_OPTION */#endif /* TNCODE */#ifndef NOTCPOPTS/* Automatically define NOTCPOPTS for configurations where they can't be used at runtime or cause too much trouble at compile time.*/#ifdef CMU_TCPIP /* CMU/Tek */#define NOTCPOPTS#endif /* CMU_TCPIP */#ifdef MULTINET /* Multinet on Alpha */#ifdef __alpha#define NOTCPOPTS#endif /* __alpha */#endif /* MULTINET */#endif /* NOTCPOPTS */#ifdef NOTCPOPTS#ifdef TCP_NODELAY#undef TCP_NODELAY#endif /* TCP_NODELAY */#ifdef SO_LINGER#undef SO_LINGER#endif /* SO_LINGER */#ifdef SO_KEEPALIVE#undef SO_KEEPALIVE#endif /* SO_KEEPALIVE */#ifdef SO_SNDBUF#undef SO_SNDBUF#endif /* SO_SNDBUF */#ifdef SO_RCVBUF#undef SO_RCVBUF#endif /* SO_RCVBUF */#endif /* NOTCPOPTS *//* This function is declared even when TCPSOCKET is not available */_PROTOTYP( char * ckgetpeer, (VOID));#ifdef TCPSOCKET#ifdef SOL_SOCKET#ifdef TCP_NODELAY_PROTOTYP( int no_delay, (int, int) );#endif /* TCP_NODELAY */#ifdef SO_KEEPALIVE_PROTOTYP( int keepalive, (int, int) ) ;#endif /* SO_KEEPALIVE */#ifdef SO_LINGER_PROTOTYP( int ck_linger, (int, int, int) ) ;#endif /* SO_LINGER */#ifdef SO_SNDBUF_PROTOTYP( int sendbuf,(int, int) ) ;#endif /* SO_SNDBUF */#ifdef SO_RCVBUF_PROTOTYP( int recvbuf, (int, int) ) ;#endif /* SO_RCVBUF */#ifdef SO_DONTROUTE_PROTOTYP(int dontroute, (int, int));#endif /* SO_DONTROUTE */#endif /* SOL_SOCKET */_PROTOTYP( int getlocalipaddr, (VOID));_PROTOTYP( int getlocalipaddrs, (char *,int,int));_PROTOTYP( char * ckgetfqhostname,(char *));_PROTOTYP( struct hostent * ck_copyhostent,(struct hostent *));_PROTOTYP( char * ckname2addr, (char *));_PROTOTYP( char * ckaddr2name, (char *));/* AIX */#ifdef AIXRS#ifndef TCP_NODELAY#define TCP_NODELAY 0x1#endif /* TCP_NODELAY */#ifndef TCP_MAXSEG#define TCP_MAXSEG 0x2#endif /* TCP_MAXSEG */#ifndef TCP_KEEPALIVE#define TCP_KEEPALIVE 0x8#endif /* TCP_KEEPALIVE */#endif /* AIXRS */#endif /* TCPSOCKET */#ifdef RLOGCODE#ifndef CK_TTGWSIZSORRY_RLOGIN_REQUIRES_TTGWSIZ_see_ckcplm.doc#endif /* CK_TTGWSIZ */#endif /* RLOGCODE */#ifdef CK_NAWS#ifndef CK_TTGWSIZSORRY_CK_NAWS_REQUIRES_TTGWSIZ_see_ckcplm.doc#endif /* CK_TTGWSIZ */#endif /* CK_NAWS */#ifndef PF_INET#ifdef AF_INET#define PF_INET AF_INET#endif /* AF_INET */#endif /* PF_INET */#ifndef IPPORT_ECHO#define IPPORT_ECHO 7#endif /* IPPORT_ECHO */#ifdef CK_KERBEROS#ifdef RLOGCODE_PROTOTYP(int ck_krb_rlogin,(CHAR *, int, CHAR *, CHAR *, CHAR *, struct sockaddr_in *, struct sockaddr_in *, int, int));#endif /* RLOGCODE */#endif /* CK_KERBEROS */_PROTOTYP( VOID ini_kerb, ( void ) ); /* Kerberos initialization routine */_PROTOTYP( int doauth, (int) ); /* AUTHENTICATE action routine */#ifdef CK_DNS_SRV_PROTOTYP(int locate_srv_dns,(char *host, char *service, char *protocol, struct sockaddr **addr_pp, int *naddrs));#endif /* CK_DNS_SRV */#ifndef NOHTTP_PROTOTYP(int http_open, (char *, char *, int, char *, int, char *));_PROTOTYP(int http_reopen, (VOID));_PROTOTYP(int http_close, (VOID));_PROTOTYP(int http_get, (char *,char **,char *,char *,char,char *,char *, int));_PROTOTYP(int http_head, (char *,char **,char *,char *,char,char *,char *, int));_PROTOTYP(int http_put, (char *,char **,char *,char *,char *,char,char *, char *, char *, int));_PROTOTYP(int http_delete, (char *,char **,char *,char *,char,char *));_PROTOTYP(int http_connect, (int, char *,char **,char *,char *,char,char *));_PROTOTYP(int http_post, (char *,char **,char *,char *,char *,char,char *, char *,char *, int));_PROTOTYP(int http_index, (char *,char **,char *,char *,char,char *,char *, int));_PROTOTYP(int http_inc, (int));_PROTOTYP(int http_isconnected, (void));extern char * tcp_http_proxy; /* Name[:port] of http proxy server */extern int tcp_http_proxy_errno; /* Return value from server */extern char * tcp_http_proxy_user; /* Name of user for authentication */extern char * tcp_http_proxy_pwd; /* Password of user */#endif /* NOHTTP */#ifdef TCPSOCKET/* Type needed as 5th argument (length) to get/setsockopt() */#ifndef SOCKOPT_T#define SOCKOPT_T int#ifdef AIX42#undef SOCKOPT_T#define SOCKOPT_T unsigned long#else#ifdef PTX#undef SOCKOPT_T#define SOCKOPT_T size_t#else#ifdef NT#undef SOCKOPT_T#define SOCKOPT_T int#else /* NT */#ifdef UNIXWARE#undef SOCKOPT_T#define SOCKOPT_T size_t#else /* UNIXWARE */#ifdef VMS#ifdef DEC_TCPIP#ifdef __DECC_VER#undef SOCKOPT_T#define SOCKOPT_T size_t#endif /* __DECC_VER */#endif /* DEC_TCPIP */#endif /* VMS */#endif /* UNIXWARE */#endif /* NT */#endif /* PTX */#endif /* AIX42 */#endif /* SOCKOPT_T *//* Ditto for getsockname() */#ifndef GSOCKNAME_T#define GSOCKNAME_T int#ifdef PTX#undef GSOCKNAME_T#define GSOCKNAME_T size_t#else#ifdef AIX42 /* size_t in 4.2++, int in 4.1-- */#undef GSOCKNAME_T#define GSOCKNAME_T size_t#else#ifdef UNIXWARE#undef GSOCKNAME_T#define GSOCKNAME_T size_t#else#ifdef VMS#ifdef DEC_TCPIP#ifdef __DECC_VER#undef GSOCKNAME_T#define GSOCKNAME_T size_t#endif /* __DECC_VER */#endif /* DEC_TCPIP */#endif /* VMS */#endif /* UNIXWARE */#endif /* AIX41 */#endif /* PTX */#endif /* GSOCKNAME_T */#endif /* TCPSOCKET */#ifdef MACOSX10#ifdef bcopy#undef bcopy#endif#ifdef bzero#undef bzero#endif#endif /* MACOSX10 */#endif /* CKCNET_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -