1 #ifndef _LIBPSOCKET__NETDB_H_
2 #define _LIBPSOCKET__NETDB_H_
4 #include <sys/socket.h>
6 #define AI_PASSIVE 0x001
7 #define AI_V4MAPPED 0x002
8 #define AI_ADDRCONFIG 0x004
9 #define AI_NUMERICHOST 0x008
35 struct sockaddr *ai_addr;
37 struct addrinfo *ai_next;
40 extern int getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res);
41 extern void freeaddrinfo(struct addrinfo *res);
42 const char *gai_strerror(int errorcode);