Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef ACE_OS_INCLUDE_NETINET_OS_IN_H
00018 #define ACE_OS_INCLUDE_NETINET_OS_IN_H
00019
00020 #include "ace/pre.h"
00021
00022 #include "ace/config-all.h"
00023
00024 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 # pragma once
00026 #endif
00027
00028 #include "ace/os_include/os_inttypes.h"
00029 #include "ace/os_include/sys/os_socket.h"
00030
00031 #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
00032 # include <ws2tcpip.h>
00033 #endif
00034
00035
00036 #ifdef __cplusplus
00037 extern "C"
00038 {
00039 #endif
00040
00041 #if !defined (ACE_LACKS_NETINET_IN_H)
00042 # include <netinet/in.h>
00043 #endif
00044
00045
00046 # if defined (ACE_HAS_PHARLAP_RT)
00047 # define ACE_IPPROTO_TCP SOL_SOCKET
00048 # else
00049 # define ACE_IPPROTO_TCP IPPROTO_TCP
00050 # endif
00051
00052 # if !defined (ACE_HAS_IP_MULTICAST) && defined (ACE_LACKS_IP_ADD_MEMBERSHIP)
00053
00054
00055
00056 struct ip_mreq
00057 {
00058
00059 struct in_addr imr_multiaddr;
00060
00061 struct in_addr imr_interface;
00062 };
00063 # endif
00064
00065 # if defined (ACE_LACKS_IN_ADDR)
00066 struct in_addr
00067 {
00068 u_long s_addr;
00069 };
00070 # endif
00071
00072 # if defined (ACE_LACKS_SOCKADDR_IN)
00073 struct sockaddr_in
00074 {
00075 short sin_family;
00076 unsigned short sin_port;
00077 struct in_addr sin_addr;
00078 char sin_zero[8];
00079 };
00080 # endif
00081
00082 # if defined (ACE_LACKS_SOCKADDR_UN)
00083 struct sockaddr_un {
00084 u_char sun_len;
00085 u_char sun_family;
00086 char sun_path[104];
00087 };
00088 #endif
00089
00090 # if defined (ACE_LACKS_IP_MREQ)
00091 struct ip_mreq
00092 {
00093 struct in_addr imr_multiaddr;
00094 struct in_addr imr_interface;
00095 };
00096 # endif
00097
00098 #if !defined (IPPORT_RESERVED)
00099 # define IPPORT_RESERVED 1024
00100 #endif
00101
00102 #if !defined (IPPORT_USERRESERVED)
00103 # define IPPORT_USERRESERVED 5000
00104 #endif
00105
00106
00107
00108 #if !defined (INADDR_LOOPBACK)
00109 # define INADDR_LOOPBACK ((ACE_UINT32) 0x7f000001)
00110 #endif
00111
00112
00113 #if !defined (INADDR_NONE)
00114 # define INADDR_NONE ((ACE_UINT32) 0xffffffff)
00115 #endif
00116
00117
00118
00119
00120 #if !defined (INET_ADDRSTRLEN)
00121 # define INET_ADDRSTRLEN 16
00122 #endif
00123
00124
00125 #if !defined (INET6_ADDRSTRLEN)
00126 # define INET6_ADDRSTRLEN 46
00127 #endif
00128
00129 # if !defined (IP_DROP_MEMBERSHIP)
00130 # define IP_DROP_MEMBERSHIP 0
00131 # endif
00132
00133 # if !defined (IP_ADD_MEMBERSHIP)
00134 # define IP_ADD_MEMBERSHIP 0
00135 # define ACE_LACKS_IP_ADD_MEMBERSHIP
00136 # endif
00137
00138 # if !defined (IP_DEFAULT_MULTICAST_TTL)
00139 # define IP_DEFAULT_MULTICAST_TTL 0
00140 # endif
00141
00142 # if !defined (IP_DEFAULT_MULTICAST_LOOP)
00143 # define IP_DEFAULT_MULTICAST_LOOP 0
00144 # endif
00145
00146 # if !defined (IP_MULTICAST_IF)
00147 # define IP_MULTICAST_IF 0
00148 # endif
00149
00150 # if !defined (IP_MULTICAST_TTL)
00151 # define IP_MULTICAST_TTL 1
00152 # endif
00153
00154 # if !defined (IP_MULTICAST_LOOP)
00155 # define IP_MULTICAST_LOOP 2
00156 # endif
00157
00158 # if !defined (IP_MAX_MEMBERSHIPS)
00159 # define IP_MAX_MEMBERSHIPS 0
00160 # endif
00161
00162 # if !defined (IPPROTO_IP)
00163 # define IPPROTO_IP 0
00164 # endif
00165
00166 # if !defined (IPPROTO_TCP)
00167 # define IPPROTO_TCP 6
00168 # endif
00169
00170 # if !defined (INADDR_ANY)
00171 # define INADDR_ANY (u_long)0x00000000
00172 # endif
00173
00174 #ifdef __cplusplus
00175 }
00176 #endif
00177
00178 #include "ace/post.h"
00179 #endif