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