65 # ifdef HAVE_PROTOTYPES 66 # define __P(args) args 78 #define EAI_ADDRFAMILY 1 80 #define EAI_BADFLAGS 3 87 #define EAI_SOCKTYPE 10 89 #define EAI_BADHINTS 12 90 #define EAI_PROTOCOL 13 96 #define AI_PASSIVE 0x00000001 97 #define AI_CANONNAME 0x00000002 98 #define AI_NUMERICHOST 0x00000004 99 #define AI_NUMERICSERV 0x00000008 103 #define AI_MASK (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV) 106 #define AI_ALL 0x00000100 107 #define AI_V4MAPPED_CFG 0x00000200 108 #define AI_ADDRCONFIG 0x00000400 109 #define AI_V4MAPPED 0x00000800 111 #define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG) 117 #define NI_MAXHOST 1025 118 #define NI_MAXSERV 32 124 #define NI_NOFQDN 0x00000001 125 #define NI_NUMERICHOST 0x00000002 126 #define NI_NAMEREQD 0x00000004 127 #define NI_NUMERICSERV 0x00000008 128 #define NI_DGRAM 0x00000010 130 #ifndef HAVE_TYPE_STRUCT_ADDRINFO 143 #ifndef HAVE_GETADDRINFO 145 #define getaddrinfo getaddrinfo__compat 147 #ifndef HAVE_GETNAMEINFO 149 #define getnameinfo getnameinfo__compat 151 #ifndef HAVE_FREEHOSTENT 153 #define freehostent freehostent__compat 155 #ifndef HAVE_FREEADDRINFO 157 #define freeaddrinfo freeaddrinfo__compat 161 const char *hostname,
const char *servname,
166 const struct sockaddr *sa,
177 #ifdef GAI_STRERROR_CONST 186 #define offsetof(p_type,field) ((size_t)&(((p_type *)0)->field))
char * gai_strerror(int ecode)
struct addrinfo * ai_next
struct sockaddr * ai_addr