39 #ifndef LWIP_HDR_DNS_H
40 #define LWIP_HDR_DNS_H
53 #define DNS_TMR_INTERVAL 1000
56 #define LWIP_DNS_ADDRTYPE_IPV4 0
57 #define LWIP_DNS_ADDRTYPE_IPV6 1
58 #define LWIP_DNS_ADDRTYPE_IPV4_IPV6 2
59 #define LWIP_DNS_ADDRTYPE_IPV6_IPV4 3
60 #if LWIP_IPV4 && LWIP_IPV6
61 #ifndef LWIP_DNS_ADDRTYPE_DEFAULT
62 #define LWIP_DNS_ADDRTYPE_DEFAULT LWIP_DNS_ADDRTYPE_IPV4_IPV6
65 #define LWIP_DNS_ADDRTYPE_DEFAULT LWIP_DNS_ADDRTYPE_IPV4
67 #define LWIP_DNS_ADDRTYPE_DEFAULT LWIP_DNS_ADDRTYPE_IPV6
70 #if DNS_LOCAL_HOSTLIST
72 struct local_hostlist_entry {
77 struct local_hostlist_entry *next;
79 #define DNS_LOCAL_HOSTLIST_ELEM(name, addr_init) {name, addr_init, NULL}
80 #if DNS_LOCAL_HOSTLIST_IS_DYNAMIC
81 #ifndef DNS_LOCAL_HOSTLIST_MAX_NAMELEN
82 #define DNS_LOCAL_HOSTLIST_MAX_NAMELEN DNS_MAX_NAME_LENGTH
84 #define LOCALHOSTLIST_ELEM_SIZE ((sizeof(struct local_hostlist_entry) + DNS_LOCAL_HOSTLIST_MAX_NAMELEN + 1))
89 extern const ip_addr_t dns_mquery_v4group;
92 extern const ip_addr_t dns_mquery_v6group;
102 typedef void (*dns_found_callback)(
const char *name,
const ip_addr_t *
ipaddr,
void *callback_arg);
109 dns_found_callback found,
void *callback_arg);
110 err_t dns_gethostbyname_addrtype(
const char *hostname,
ip_addr_t *addr,
111 dns_found_callback found,
void *callback_arg,
115 #if DNS_LOCAL_HOSTLIST
116 size_t dns_local_iterate(dns_found_callback iterator_fn,
void *iterator_arg);
118 #if DNS_LOCAL_HOSTLIST_IS_DYNAMIC
119 int dns_local_removehost(
const char *hostname,
const ip_addr_t *addr);
120 err_t dns_local_addhost(
const char *hostname,
const ip_addr_t *addr);