Merge branch 'master' of git://localhost/acess2
[tpg/acess2.git] / Usermode / Libraries / libpsocket.so_src / include_exp / netdb.h
1 #ifndef _LIBPSOCKET__NETDB_H_
2 #define _LIBPSOCKET__NETDB_H_
3
4 #include <sys/socket.h>
5
6 #define AI_PASSIVE      0x001
7 #define AI_V4MAPPED     0x002
8 #define AI_ADDRCONFIG   0x004
9 #define AI_NUMERICHOST  0x008
10
11 enum
12 {
13         EAI_SUCCESS,
14         EAI_AGAIN,
15         EAI_BADFLAGS,
16         EAI_FAMILY,
17         EAI_SOCKTTPE,
18         
19         EAI_ADDRFAMILY,
20         EAI_FAIL,
21         EAI_MEMORY,
22         EAI_NODATA,
23         EAI_NONAME,
24         EAI_SERVICE,
25         EAI_SYSTEM
26 };
27
28 struct addrinfo
29 {
30         int     ai_flags;
31         int     ai_family;
32         int     ai_socktype;
33         int     ai_protocol;
34         socklen_t       ai_addrlen;
35         struct sockaddr *ai_addr;
36         char    *ai_canonname;
37         struct addrinfo *ai_next;
38 };
39
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);
43
44
45 #endif
46

UCC git Repository :: git.ucc.asn.au