-
-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathnetdb.h
More file actions
32 lines (26 loc) · 652 Bytes
/
Copy pathnetdb.h
File metadata and controls
32 lines (26 loc) · 652 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//==============================================================================
//
// netdb.h
//
#ifdef OS_LINUX
#ifndef NETDB_H_INCLUDED
#define NETDB_H_INCLUDED
#include "socket.h"
struct addrinfo
{
int ai_flags;
int ai_family;
int ai_socktype;
int ai_protocol;
socklen_t ai_addrlen;
sockaddr* ai_addr;
char* ai_canonname;
addrinfo* ai_next;
};
int getaddrinfo(const char* name, const char* service,
const addrinfo* req, addrinfo** pai);
void freeaddrinfo(addrinfo* ai);
int getnameinfo(const sockaddr* sa, socklen_t salen, char* host,
socklen_t hostlen, char* serv, socklen_t servlen, int flags);
#endif
#endif