3 //=============================================================================
7 * $Id: OS_NS_netdb.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
10 * @author Jesper S. M|ller<stophph@diku.dk>
11 * @author and a cast of thousands...
15 //=============================================================================
17 #ifndef ACE_OS_NS_NETDB_H
18 #define ACE_OS_NS_NETDB_H
20 # include /**/ "ace/pre.h"
22 # include "ace/config-all.h"
24 # if !defined (ACE_LACKS_PRAGMA_ONCE)
26 # endif /* ACE_LACKS_PRAGMA_ONCE */
28 #include "ace/os_include/os_netdb.h"
29 #include /**/ "ace/ACE_export.h"
31 #if defined (ACE_EXPORT_MACRO)
32 # undef ACE_EXPORT_MACRO
34 #define ACE_EXPORT_MACRO ACE_Export
36 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
41 #if defined (ACE_VXWORKS) && defined (ACE_LACKS_GETHOSTBYADDR)
44 ACE_NAMESPACE_INLINE_FUNCTION
45 #endif /* ACE_VXWORKS */
46 struct hostent
*gethostbyaddr (const char *addr
,
50 #if defined (ACE_VXWORKS) && defined (ACE_LACKS_GETHOSTBYADDR)
53 ACE_NAMESPACE_INLINE_FUNCTION
54 #endif /* ACE_VXWORKS */
55 struct hostent
*gethostbyaddr_r (const char *addr
,
58 struct hostent
*result
,
59 ACE_HOSTENT_DATA buffer
,
62 #if defined (ACE_VXWORKS) && defined (ACE_LACKS_GETHOSTBYNAME)
65 ACE_NAMESPACE_INLINE_FUNCTION
66 #endif /* ACE_VXWORKS */
67 struct hostent
*gethostbyname (const char *name
);
69 #if defined (ACE_VXWORKS) && defined (ACE_LACKS_GETHOSTBYNAME)
72 ACE_NAMESPACE_INLINE_FUNCTION
73 #endif /* ACE_VXWORKS */
74 struct hostent
*gethostbyname_r (const char *name
,
75 struct hostent
*result
,
76 ACE_HOSTENT_DATA buffer
,
80 ACE_NAMESPACE_INLINE_FUNCTION
81 struct hostent
*getipnodebyaddr (const void *src
, size_t len
,
84 ACE_NAMESPACE_INLINE_FUNCTION
85 struct hostent
*getipnodebyname (const char *name
, int family
,
89 * Get the first adapter found on the machine.
90 * @todo: this is really useless except for UUID, move there? dhinton
92 struct macaddr_node_t
{
93 unsigned char node
[6];
97 int getmacaddress (struct macaddr_node_t
*node
);
99 ACE_NAMESPACE_INLINE_FUNCTION
100 struct protoent
*getprotobyname (const char *name
);
102 ACE_NAMESPACE_INLINE_FUNCTION
103 struct protoent
*getprotobyname_r (const char *name
,
104 struct protoent
*result
,
105 ACE_PROTOENT_DATA buffer
);
107 ACE_NAMESPACE_INLINE_FUNCTION
108 struct protoent
*getprotobynumber (int proto
);
110 ACE_NAMESPACE_INLINE_FUNCTION
111 struct protoent
*getprotobynumber_r (int proto
,
112 struct protoent
*result
,
113 ACE_PROTOENT_DATA buffer
);
115 ACE_NAMESPACE_INLINE_FUNCTION
116 struct servent
*getservbyname (const char *svc
,
119 ACE_NAMESPACE_INLINE_FUNCTION
120 struct servent
*getservbyname_r (const char *svc
,
122 struct servent
*result
,
123 ACE_SERVENT_DATA buf
);
125 # if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) && defined (ACE_LACKS_NETDB_REENTRANT_FUNCTIONS)
127 int netdb_acquire (void);
130 int netdb_release (void);
131 # endif /* defined (ACE_MT_SAFE) && ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */
133 } /* namespace ACE_OS */
135 ACE_END_VERSIONED_NAMESPACE_DECL
137 # if defined (ACE_HAS_INLINED_OSCALLS)
138 # if defined (ACE_INLINE)
140 # endif /* ACE_INLINE */
141 # define ACE_INLINE inline
142 # include "ace/OS_NS_netdb.inl"
143 # endif /* ACE_HAS_INLINED_OSCALLS */
145 # include /**/ "ace/post.h"
146 #endif /* ACE_OS_NS_NETDB_H */