1 #ifndef AI_ADDRCONFIG
2 #define AI_ADDRCONFIG 0
3 #endif /* AI_ADDRCONFIG */
4 #ifndef AI_PASSIVE
5 #define AI_PASSIVE 1
6 #endif /* AI_PASSIVE */
7
8 /* undef these, just in case, to avoid noisy warnings */
9 #undef addrinfo
10 #undef freeaddrinfo
11 #undef getaddrinfo
12
13 #define addrinfo xaddrinfo
14 #define freeaddrinfo xfreeaddrinfo
15 #define getaddrinfo xgetaddrinfo
16
17 struct addrinfo
18 {
19 int ai_flags;
20 int ai_socktype;
21 int ai_family;
22 int ai_protocol;
23 socklen_t ai_addrlen;
24 struct sockaddr * ai_addr;
25 struct xaddrinfo * ai_next;
26 };
27
28 void freeaddrinfo(struct xaddrinfo * res);
29
30 int getaddrinfo(const char * hostname, const char * portname,
31 struct xaddrinfo * hints, struct xaddrinfo ** res);
32
33 const char *gai_strerror(int errcode);