39 #ifndef LWIP_HDR_DNS_H
40 #define LWIP_HDR_DNS_H
54 #define DNS_TMR_INTERVAL 1000
57 #define LWIP_DNS_ADDRTYPE_IPV4 0
58 #define LWIP_DNS_ADDRTYPE_IPV6 1
59 #define LWIP_DNS_ADDRTYPE_IPV4_IPV6 2
60 #define LWIP_DNS_ADDRTYPE_IPV6_IPV4 3
61 #if LWIP_IPV4 && LWIP_IPV6
62 #ifndef LWIP_DNS_ADDRTYPE_DEFAULT
63 #define LWIP_DNS_ADDRTYPE_DEFAULT LWIP_DNS_ADDRTYPE_IPV4_IPV6
66 #define LWIP_DNS_ADDRTYPE_DEFAULT LWIP_DNS_ADDRTYPE_IPV4
68 #define LWIP_DNS_ADDRTYPE_DEFAULT LWIP_DNS_ADDRTYPE_IPV6
71 #if DNS_LOCAL_HOSTLIST
73 struct local_hostlist_entry {
78 struct local_hostlist_entry *next;
80 #define DNS_LOCAL_HOSTLIST_ELEM(name, addr_init) {name, addr_init, NULL}
81 #if DNS_LOCAL_HOSTLIST_IS_DYNAMIC
82 #ifndef DNS_LOCAL_HOSTLIST_MAX_NAMELEN
83 #define DNS_LOCAL_HOSTLIST_MAX_NAMELEN DNS_MAX_NAME_LENGTH
85 #define LOCALHOSTLIST_ELEM_SIZE ((sizeof(struct local_hostlist_entry) + DNS_LOCAL_HOSTLIST_MAX_NAMELEN + 1))
90 extern const ip_addr_t dns_mquery_v4group;
93 extern const ip_addr_t dns_mquery_v6group;
103 typedef void (*dns_found_callback)(
const char *name,
const ip_addr_t *ipaddr,
void *callback_arg);
110 dns_found_callback found,
void *callback_arg);
111 err_t dns_gethostbyname_addrtype(
const char *hostname,
ip_addr_t *addr,
112 dns_found_callback found,
void *callback_arg,
116 #if DNS_LOCAL_HOSTLIST
117 size_t dns_local_iterate(dns_found_callback iterator_fn,
void *iterator_arg);
119 #if DNS_LOCAL_HOSTLIST_IS_DYNAMIC
120 int dns_local_removehost(
const char *hostname,
const ip_addr_t *addr);
121 err_t dns_local_addhost(
const char *hostname,
const ip_addr_t *addr);
uint8_t u8_t
Definition: arch.h:125
s8_t err_t
Definition: err.h:96
ip6_addr_t ip_addr_t
Definition: ip_addr.h:318