34 #ifndef LWIP_HDR_DNS_H 35 #define LWIP_HDR_DNS_H 48 #define DNS_TMR_INTERVAL 1000 51 #define LWIP_DNS_ADDRTYPE_IPV4 0 52 #define LWIP_DNS_ADDRTYPE_IPV6 1 53 #define LWIP_DNS_ADDRTYPE_IPV4_IPV6 2 54 #define LWIP_DNS_ADDRTYPE_IPV6_IPV4 3 55 #if LWIP_IPV4 && LWIP_IPV6 56 #ifndef LWIP_DNS_ADDRTYPE_DEFAULT 57 #define LWIP_DNS_ADDRTYPE_DEFAULT LWIP_DNS_ADDRTYPE_IPV4_IPV6 59 #elif defined(LWIP_IPV4) 60 #define LWIP_DNS_ADDRTYPE_DEFAULT LWIP_DNS_ADDRTYPE_IPV4 62 #define LWIP_DNS_ADDRTYPE_DEFAULT LWIP_DNS_ADDRTYPE_IPV6 65 #if DNS_LOCAL_HOSTLIST 67 struct local_hostlist_entry {
72 struct local_hostlist_entry *next;
74 #if DNS_LOCAL_HOSTLIST_IS_DYNAMIC 75 #ifndef DNS_LOCAL_HOSTLIST_MAX_NAMELEN 76 #define DNS_LOCAL_HOSTLIST_MAX_NAMELEN DNS_MAX_NAME_LENGTH 78 #define LOCALHOSTLIST_ELEM_SIZE ((sizeof(struct local_hostlist_entry) + DNS_LOCAL_HOSTLIST_MAX_NAMELEN + 1)) 89 typedef void (*dns_found_callback)(
const char *name,
const ip_addr_t *ipaddr,
void *callback_arg);
96 dns_found_callback found,
void *callback_arg);
97 err_t dns_gethostbyname_addrtype(
const char *hostname,
ip_addr_t *addr,
98 dns_found_callback found,
void *callback_arg,
102 #if DNS_LOCAL_HOSTLIST && DNS_LOCAL_HOSTLIST_IS_DYNAMIC 103 int dns_local_removehost(
const char *hostname,
const ip_addr_t *addr);
104 err_t dns_local_addhost(
const char *hostname,
const ip_addr_t *addr);