RetroArch
netdb.h
Go to the documentation of this file.
1 #ifndef _NETDB_H
2 #define _NETDB_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #include <stdint.h>
9 
11 
12 #define NI_NUMERICHOST 2
13 #define NI_NUMERICSERV 8
14 
15 #define AI_PASSIVE 1
16 
17 #define NI_MAXHOST 1025
18 #define NI_MAXSERV 32
19 
20 
21 struct addrinfo {
22  int ai_flags; /* AI_PASSIVE, AI_CANONNAME,
23  AI_NUMERICHOST, .. */
24  int ai_family; /* AF_xxx */
25  int ai_socktype; /* SOCK_xxx */
26  int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
27  int ai_addrlen; /* length of ai_addr */
28  char *ai_canonname; /* canonical name for node name */
29  struct sockaddr *ai_addr; /* binary address */
30  struct addrinfo *ai_next; /* next structure in linked list */
31 };
32 
33 int getaddrinfo(const char *node, const char *service, struct addrinfo *hints, struct addrinfo **res);
34 void freeaddrinfo(struct addrinfo *__ai);
35 int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags);
36 
37 
38 #ifdef __cplusplus
39 }
40 #endif
41 
42 #endif /* _NETDB_H */
void freeaddrinfo(struct addrinfo *__ai)
int ai_family
Definition: netdb.h:24
GLuint res
Definition: glext.h:10520
int ai_flags
Definition: netdb.h:22
int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags)
Definition: sockets.h:46
struct addrinfo * ai_next
Definition: netdb.h:30
int ai_protocol
Definition: netdb.h:26
int getaddrinfo(const char *node, const char *service, struct addrinfo *hints, struct addrinfo **res)
char * ai_canonname
Definition: netdb.h:28
struct sockaddr * ai_addr
Definition: netdb.h:29
Definition: netdb.h:21
int ai_addrlen
Definition: netdb.h:27
int ai_socktype
Definition: netdb.h:25
GLbitfield flags
Definition: glext.h:7828
unsigned int uint32_t
Definition: stdint.h:126
uint32_t socklen_t
Definition: netdb.h:10