os_netdb.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    os_netdb.h
00006  *
00007  *  definitions for network database operations
00008  *
00009  *  os_netdb.h,v 1.7 2006/05/05 08:03:49 jwillemsen Exp
00010  *
00011  *  @author Don Hinton <dhinton@dresystems.com>
00012  *  @author This code was originally in various places including ace/OS.h.
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 /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 #include "ace/os_include/netinet/os_in.h"
00028 #include "ace/os_include/os_limits.h"
00029 
00030 #if !defined (ACE_LACKS_NETDB_H)
00031 #  if defined (ACE_HAS_STL_QUEUE_CONFLICT)
00032 #    define queue _Queue_
00033 #  endif /* ACE_HAS_STL_QUEUE_CONFLICT */
00034    extern "C" {
00035 #  include /**/ <netdb.h>
00036    }
00037 #  if defined (ACE_HAS_STL_QUEUE_CONFLICT)
00038 #    undef queue
00039 #  endif /* ACE_HAS_STL_QUEUE_CONFLICT */
00040 #endif /* !ACE_LACKS_NETDB_H */
00041 
00042 #if defined (ACE_VXWORKS) && (ACE_VXWORKS < 0x620)
00043 #  include /**/ <hostLib.h>
00044 #endif /* ACE_VXWORKS */
00045 
00046 // Place all additions (especially function declarations) within extern "C" {}
00047 #ifdef __cplusplus
00048 extern "C"
00049 {
00050 #endif /* __cplusplus */
00051 
00052 #if defined (ACE_HAS_STRUCT_NETDB_DATA)
00053    typedef char ACE_HOSTENT_DATA[sizeof(struct hostent_data)];
00054    typedef char ACE_SERVENT_DATA[sizeof(struct servent_data)];
00055    typedef char ACE_PROTOENT_DATA[sizeof(struct protoent_data)];
00056 #else
00057 #  if !defined ACE_HOSTENT_DATA_SIZE
00058 #    define ACE_HOSTENT_DATA_SIZE (4*1024)
00059 #  endif /*ACE_HOSTENT_DATA_SIZE */
00060 #  if !defined ACE_SERVENT_DATA_SIZE
00061 #    define ACE_SERVENT_DATA_SIZE (4*1024)
00062 #  endif /*ACE_SERVENT_DATA_SIZE */
00063 #  if !defined ACE_PROTOENT_DATA_SIZE
00064 #    define ACE_PROTOENT_DATA_SIZE (2*1024)
00065 #  endif /*ACE_PROTOENT_DATA_SIZE */
00066    typedef char ACE_HOSTENT_DATA[ACE_HOSTENT_DATA_SIZE];
00067    typedef char ACE_SERVENT_DATA[ACE_SERVENT_DATA_SIZE];
00068    typedef char ACE_PROTOENT_DATA[ACE_PROTOENT_DATA_SIZE];
00069 #endif /* ACE_HAS_STRUCT_NETDB_DATA */
00070 
00071 # if !defined(MAXHOSTNAMELEN)
00072 #   define MAXHOSTNAMELEN  HOST_NAME_MAX
00073 # endif /* MAXHOSTNAMELEN */
00074 
00075 #ifdef __cplusplus
00076 }
00077 #endif /* __cplusplus */
00078 
00079 #include /**/ "ace/post.h"
00080 #endif /* ACE_OS_INCLUDE_OS_NETDB_H */

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