Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
netdb.h
Go to the documentation of this file.
1
34#ifndef _NETDB_H_
35#define _NETDB_H_
36
37#include <sys/types.h>
38#include <stdint.h>
39#include <netinet/in.h>
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
58
59const char *gai_strerror (int __ecode);
60
61void freeaddrinfo(struct addrinfo *ai);
62
63int getaddrinfo(const char *nodename, const char *servname,
64 const struct addrinfo *hints,
65 struct addrinfo **res);
66
67# define EAI_AGAIN -3
68# define EAI_FAIL -4
69# define EAI_MEMORY -10
72#ifdef __cplusplus
73}
74#endif
75
76#endif /* _NETDB_H_ */
void freeaddrinfo(struct addrinfo *ai)
see 'man freeaddrinfo'
const char * gai_strerror(int __ecode)
see 'man gai_strerror'
int getaddrinfo(const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res)
see 'man getaddrinfo'
uint32_t socklen_t
type of sockaddr lenth
Definition socket.h:89
Structure to contain information about address of a service provider.
Definition netdb.h:48
struct sockaddr * ai_addr
Socket address for socket.
Definition netdb.h:54
char * ai_canonname
Canonical name for service location.
Definition netdb.h:55
int ai_socktype
Socket type.
Definition netdb.h:51
int ai_protocol
Protocol for socket.
Definition netdb.h:52
socklen_t ai_addrlen
Length of socket address.
Definition netdb.h:53
struct addrinfo * ai_next
Pointer to next in list.
Definition netdb.h:56
int ai_flags
Input flags.
Definition netdb.h:49
int ai_family
Protocol family for socket.
Definition netdb.h:50
IPv4 socket address.
Definition socket.h:83