14 #define h_addr h_addr_list[0]
37 #define NETDB_INTERNAL -1
38 #define NETDB_SUCCESS 0
39 #define HOST_NOT_FOUND 1
43 #define NO_ADDRESS NO_DATA
45 #define EAI_ADDRFAMILY 1
47 #define EAI_BADFLAGS 3
54 #define EAI_SOCKTYPE 10
56 #define EAI_BADHINTS 12
57 #define EAI_PROTOCOL 13
58 #define EAI_OVERFLOW 14
61 #define NI_MAXHOST 1025
65 #define NI_NOFQDN 0x0001
66 #define NI_NUMERICHOST 0x0002
67 #define NI_NAMEREQD 0x0004
68 #define NI_NUMERICSERV 0x0008
69 #define NI_DGRAM 0x0010
70 #define NI_NUMERICSCOPE 0x0020
73 #define AI_PASSIVE 0x0001
74 #define AI_CANONNAME 0x0002
75 #define AI_NUMERICHOST 0x0004
76 #define AI_V4MAPPED 0x0008
78 #define AI_ADDRCONFIG 0x0020
struct servent * getservbyport(int port, const char *proto)
struct sockaddr * ai_addr
int getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res)
void freeaddrinfo(struct addrinfo *res)
const char * gai_strerror(int ecode)
struct hostent * gethostent(void)
int getnameinfo(const struct sockaddr *addr, socklen_t addrlen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags)
struct hostent * gethostbyaddr(const void *addr, socklen_t len, int type)
struct hostent * gethostbyname(const char *name)
struct servent * getservbyname(const char *name, const char *proto)
struct addrinfo * ai_next
struct servent * getservent(void)