VR-Link API Documentation for HLA 1.3
vlSocketStuff.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1998 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: vlSocketStuff.h,v $ $Revision: 1.3.6.1 $ $State: Exp $
00007 *********************************************************************/
00008 #ifndef vlSocketStuff_H_
00009 #define vlSocketStuff_H_
00010 
00011 
00016 
00017 // For the errno redifinitions in Windows
00018 #include <vlutil/vlInet.h>
00019 
00020 #if VMS //! VMS
00021 extern "C++"
00022 {
00023 #endif //! VMS
00024 
00025 extern "C"
00026 { 
00027 #ifdef _WIN32
00028 #define close closesocket
00029 #else
00030 #include <netinet/in.h>
00031 #include <netinet/tcp.h>
00032 #include <sys/socket.h>
00033 #include <errno.h>
00034 #define ERRNO errno
00035 #if !VXWORKS
00036 #include <netdb.h>
00037 #endif
00038 #endif
00039 
00040 #include <stdlib.h>
00041 #include <string.h>
00042 #include <stddef.h>
00043 #include <stdio.h>
00044 #include <signal.h>
00045 #include <fcntl.h>
00046 #include <sys/types.h>
00047 
00048 #if VXWORKS
00049 #include <ioLib.h>
00050 #endif
00051 
00052 #ifndef _WIN32
00053 #include <netinet/in.h>
00054 #include <netinet/tcp.h>
00055 #include <sys/socket.h>
00056 #include <errno.h>
00057 #define ERRNO errno
00058 #if !VXWORKS
00059 #include <netdb.h>
00060 #endif
00061 #endif
00062 
00063 #if DT_HAVE_NET_IF_H
00064 #include <net/if.h> 
00065 #endif
00066 
00067 #if DT_HAVE_UNISTD_H
00068 #include <unistd.h> 
00069 #endif
00070 
00071 #if DT_HAVE_STD_H
00072 #include <std.h>
00073 #endif
00074 
00075 #if DT_HAVE_PARAM_H
00076 #include <sys/param.h>
00077 #endif 
00078 
00079 #if DT_FNDELAY_NOT_IN_FCNTL_H
00080 #include <sys/file.h>
00081 #endif
00082 
00083 #if DT_HAVE_SOCKIO_H
00084 #include <sys/sockio.h>
00085 #endif
00086 
00087 #if DT_HAVE_IOCTL_H
00088 #include <sys/ioctl.h>
00089 #endif
00090 
00091 #if !DT_HAVE_SOCKET_PROTOS
00092 int socket (int, int, int);
00093 int setsockopt (int, int, int, const char *, int);
00094 int bind (int, struct sockaddr *, int);
00095 int sendto (int, char *, int, int, sockaddr *, int);
00096 int recvfrom(int, char *, int, int, sockaddr *, int *);
00097 int getsockname (int s, struct sockaddr* name, int* namelen);
00098 int accept(int s, struct sockaddr* addr, int* addrlen);
00099 int listen (int s, int backlog);
00100 int connect (int s, const struct sockaddr *name, int namelen);
00101 int send(int s, char* buf, int bufLen, int flags); 
00102 int recv(int s, char* buf, int bufLen, int flags);
00103 #endif
00104 
00106 #if sgi
00107 #include <net/soioctl.h>
00108 #include <CC/osfcn.h>
00109 #elif DT_HPUX || VMS
00110 #undef FNDELAY
00111 #define FNDELAY O_NONBLOCK
00112 #elif concurrent
00113 #include <net/in.h>
00114 #elif __OSF1__
00115    struct ifaddr; struct rtentry; struct mbuf;
00116 #elif ( __GNUC__ && ! __GNU_LIBRARY__ && !__darwin__ && !__solaris__ )
00117    int ioctl(int fd, int request, caddr_t arg);
00118 #elif VXWORKS
00119 #include <sockLib.h>
00120 #include <net/if.h>
00121 #endif
00122 } 
00123 
00124 #if _PowerUX
00125 #define sockaddrptr sockaddr*
00126 #define constCharPtr caddr_t
00127 #elif VXWORKS
00128 #define sockaddrptr sockaddr*
00129 #define constCharPtr char*
00130 #else
00131 #define sockaddrptr sockaddr*
00132 #define constCharPtr const char*
00133 #endif
00134 
00135 #if VXWORKS
00136 #define IOCTL_DATA int
00137 #else
00138 #define IOCTL_DATA char*
00139 #endif
00140 
00141 #if VMS //! VMS
00142 } 
00143 #endif
00144 
00145 #endif //! DtSocketStuff_H_
00146  

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)