Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef ACE_OS_INCLUDE_OS_NETDB_H
00017 #define ACE_OS_INCLUDE_OS_NETDB_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/netinet/os_in.h"
00028 #include "ace/os_include/os_limits.h"
00029
00030 #if defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x620)
00031 # include <hostLib.h>
00032 #endif
00033
00034
00035 #ifdef __cplusplus
00036 extern "C"
00037 {
00038 #endif
00039
00040 #if !defined (ACE_LACKS_NETDB_H)
00041 # include <netdb.h>
00042 #endif
00043
00044 #if defined (ACE_LACKS_HOSTENT)
00045 struct hostent {
00046 char *h_name;
00047 char **h_aliases;
00048 int h_addrtype;
00049 int h_length;
00050 char **h_addr_list;
00051 #define h_addr h_addr_list[0]
00052 };
00053 #endif
00054
00055 #if defined (ACE_LACKS_PROTOENT)
00056 struct protoent {
00057 char *p_name;
00058 char **p_aliases;
00059 int p_proto;
00060 };
00061 #endif
00062
00063 #if defined (ACE_LACKS_SERVENT)
00064 struct servent {
00065 char *s_name;
00066 char **s_aliases;
00067 int s_port;
00068 char *s_proto;
00069 };
00070 #endif
00071
00072 #if defined (ACE_HAS_STRUCT_NETDB_DATA)
00073 typedef char ACE_HOSTENT_DATA[sizeof(struct hostent_data)];
00074 typedef char ACE_SERVENT_DATA[sizeof(struct servent_data)];
00075 typedef char ACE_PROTOENT_DATA[sizeof(struct protoent_data)];
00076 #else
00077 # if !defined ACE_HOSTENT_DATA_SIZE
00078 # define ACE_HOSTENT_DATA_SIZE (4*1024)
00079 # endif
00080 # if !defined ACE_SERVENT_DATA_SIZE
00081 # define ACE_SERVENT_DATA_SIZE (4*1024)
00082 # endif
00083 # if !defined ACE_PROTOENT_DATA_SIZE
00084 # define ACE_PROTOENT_DATA_SIZE (2*1024)
00085 # endif
00086 typedef char ACE_HOSTENT_DATA[ACE_HOSTENT_DATA_SIZE];
00087 typedef char ACE_SERVENT_DATA[ACE_SERVENT_DATA_SIZE];
00088 typedef char ACE_PROTOENT_DATA[ACE_PROTOENT_DATA_SIZE];
00089 #endif
00090
00091 # if !defined(MAXHOSTNAMELEN)
00092 # define MAXHOSTNAMELEN HOST_NAME_MAX
00093 # endif
00094
00095 #ifdef __cplusplus
00096 }
00097 #endif
00098
00099 #include "ace/post.h"
00100 #endif