OS_NS_netdb.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   OS_NS_netdb.h
00006  *
00007  *  OS_NS_netdb.h,v 1.7 2006/01/24 12:30:29 jwillemsen Exp
00008  *
00009  *  @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
00010  *  @author Jesper S. M|ller<stophph@diku.dk>
00011  *  @author and a cast of thousands...
00012  *
00013  *  Originally in OS.h.
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 /* ACE_LACKS_PRAGMA_ONCE */
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 /* ACE_VXWORKS */
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 /* ACE_VXWORKS */
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 /* ACE_VXWORKS */
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 /* ACE_VXWORKS */
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    * Get the first adapter found on the machine.
00090    * @todo: this is really useless except for UUID, move there? dhinton
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 /* defined (ACE_MT_SAFE) && ACE_LACKS_NETDB_REENTRANT_FUNCTIONS */
00132 
00133 } /* namespace ACE_OS */
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 /* ACE_INLINE */
00141 #   define ACE_INLINE inline
00142 #   include "ace/OS_NS_netdb.inl"
00143 # endif /* ACE_HAS_INLINED_OSCALLS */
00144 
00145 # include /**/ "ace/post.h"
00146 #endif /* ACE_OS_NS_NETDB_H */

Generated on Thu Nov 9 09:41:57 2006 for ACE by doxygen 1.3.6