34#ifndef LWIP_HDR_NETDB_H
35#define LWIP_HDR_NETDB_H
39#if LWIP_DNS && LWIP_SOCKET
50#ifndef LWIP_DNS_API_DECLARE_H_ERRNO
51#define LWIP_DNS_API_DECLARE_H_ERRNO 1
54#ifndef LWIP_DNS_API_DEFINE_ERRORS
55#define LWIP_DNS_API_DEFINE_ERRORS 1
58#ifndef LWIP_DNS_API_DEFINE_FLAGS
59#define LWIP_DNS_API_DEFINE_FLAGS 1
62#ifndef LWIP_DNS_API_DECLARE_STRUCTS
63#define LWIP_DNS_API_DECLARE_STRUCTS 1
66#if LWIP_DNS_API_DEFINE_ERRORS
69#define EAI_SERVICE 201
74#define HOST_NOT_FOUND 210
76#define NO_RECOVERY 212
80#if LWIP_DNS_API_DEFINE_FLAGS
82#define AI_PASSIVE 0x01
83#define AI_CANONNAME 0x02
84#define AI_NUMERICHOST 0x04
85#define AI_NUMERICSERV 0x08
86#define AI_V4MAPPED 0x10
88#define AI_ADDRCONFIG 0x40
91#if LWIP_DNS_API_DECLARE_STRUCTS
100#define h_addr h_addr_list[0]
115#define NETDB_ELEM_SIZE (sizeof(struct addrinfo) + sizeof(struct sockaddr_storage) + DNS_MAX_NAME_LENGTH + 1)
117#if LWIP_DNS_API_DECLARE_H_ERRNO
122struct hostent *lwip_gethostbyname(
const char *
name);
125void lwip_freeaddrinfo(
struct addrinfo *ai);
126int lwip_getaddrinfo(
const char *nodename,
131#if LWIP_COMPAT_SOCKETS
133#define gethostbyname(name) lwip_gethostbyname(name)
135#define gethostbyname_r(name, ret, buf, buflen, result, h_errnop) \
136 lwip_gethostbyname_r(name, ret, buf, buflen, result, h_errnop)
138#define freeaddrinfo(addrinfo) lwip_freeaddrinfo(addrinfo)
140#define getaddrinfo(nodname, servname, hints, res) \
141 lwip_getaddrinfo(nodname, servname, hints, res)
GLenum GLuint GLenum GLsizei const GLchar * buf
namespace GUID const ADDRINFOEXW * hints
static const ADDRINFOW PADDRINFOW *static const WCHAR * servname
struct sockaddr * ai_addr
struct addrinfo * ai_next