00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef ACE_OS_NS_NETDB_H
00018 #define ACE_OS_NS_NETDB_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_netdb.h"
00029 #include "ace/ACE_export.h"
00030
00031 #if defined (ACE_EXPORT_MACRO)
00032 # undef ACE_EXPORT_MACRO
00033 #endif
00034 #define ACE_EXPORT_MACRO ACE_Export
00035
00036 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00037
00038 namespace ACE_OS
00039 {
00040
00041 #if defined (ACE_VXWORKS) && defined (ACE_LACKS_GETHOSTBYADDR)
00042 extern ACE_Export
00043 #else
00044 ACE_NAMESPACE_INLINE_FUNCTION
00045 #endif
00046 struct hostent *gethostbyaddr (const char *addr,
00047 int length,
00048 int type);
00049
00050 #if defined (ACE_VXWORKS) && defined (ACE_LACKS_GETHOSTBYADDR)
00051 extern ACE_Export
00052 #else
00053 ACE_NAMESPACE_INLINE_FUNCTION
00054 #endif
00055 struct hostent *gethostbyaddr_r (const char *addr,
00056 int length,
00057 int type,
00058 struct hostent *result,
00059 ACE_HOSTENT_DATA buffer,
00060 int *h_errnop);
00061
00062 #if defined (ACE_VXWORKS) && defined (ACE_LACKS_GETHOSTBYNAME)
00063 extern ACE_Export
00064 #else
00065 ACE_NAMESPACE_INLINE_FUNCTION
00066 #endif
00067 struct hostent *gethostbyname (const char *name);
00068
00069 #if defined (ACE_VXWORKS) && defined (ACE_LACKS_GETHOSTBYNAME)
00070 extern ACE_Export
00071 #else
00072 ACE_NAMESPACE_INLINE_FUNCTION
00073 #endif
00074 struct hostent *gethostbyname_r (const char *name,
00075 struct hostent *result,
00076 ACE_HOSTENT_DATA buffer,
00077 int *h_errnop);
00078
00079
00080 ACE_NAMESPACE_INLINE_FUNCTION
00081 struct hostent *getipnodebyaddr (const void *src, size_t len,
00082 int family);
00083
00084 ACE_NAMESPACE_INLINE_FUNCTION
00085 struct hostent *getipnodebyname (const char *name, int family,
00086 int flags = 0);
00087
00088
00089
00090
00091
00092 struct macaddr_node_t {
00093 unsigned char node[6];
00094 };
00095
00096 extern ACE_Export
00097 int getmacaddress (struct macaddr_node_t *node);
00098
00099 ACE_NAMESPACE_INLINE_FUNCTION
00100 struct protoent *getprotobyname (const char *name);
00101
00102 ACE_NAMESPACE_INLINE_FUNCTION
00103 struct protoent *getprotobyname_r (const char *name,
00104 struct protoent *result,
00105 ACE_PROTOENT_DATA buffer);
00106
00107 ACE_NAMESPACE_INLINE_FUNCTION
00108 struct protoent *getprotobynumber (int proto);
00109
00110 ACE_NAMESPACE_INLINE_FUNCTION
00111 struct protoent *getprotobynumber_r (int proto,
00112 struct protoent *result,
00113 ACE_PROTOENT_DATA buffer);
00114
00115 ACE_NAMESPACE_INLINE_FUNCTION
00116 struct servent *getservbyname (const char *svc,
00117 const char *proto);
00118
00119 ACE_NAMESPACE_INLINE_FUNCTION
00120 struct servent *getservbyname_r (const char *svc,
00121 const char *proto,
00122 struct servent *result,
00123 ACE_SERVENT_DATA buf);
00124
00125 # if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) && defined (ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
00126 extern ACE_Export
00127 int netdb_acquire (void);
00128
00129 extern ACE_Export
00130 int netdb_release (void);
00131 # endif
00132
00133 }
00134
00135 ACE_END_VERSIONED_NAMESPACE_DECL
00136
00137 # if defined (ACE_HAS_INLINED_OSCALLS)
00138 # if defined (ACE_INLINE)
00139 # undef ACE_INLINE
00140 # endif
00141 # define ACE_INLINE inline
00142 # include "ace/OS_NS_netdb.inl"
00143 # endif
00144
00145 # include "ace/post.h"
00146 #endif