34 #ifndef __LWIP_DNS_H__
35 #define __LWIP_DNS_H__
46 #define DNS_TMR_INTERVAL 1000
49 #define DNS_RRTYPE_A 1
50 #define DNS_RRTYPE_NS 2
51 #define DNS_RRTYPE_MD 3
52 #define DNS_RRTYPE_MF 4
53 #define DNS_RRTYPE_CNAME 5
54 #define DNS_RRTYPE_SOA 6
55 #define DNS_RRTYPE_MB 7
56 #define DNS_RRTYPE_MG 8
57 #define DNS_RRTYPE_MR 9
58 #define DNS_RRTYPE_NULL 10
59 #define DNS_RRTYPE_WKS 11
60 #define DNS_RRTYPE_PTR 12
61 #define DNS_RRTYPE_HINFO 13
62 #define DNS_RRTYPE_MINFO 14
63 #define DNS_RRTYPE_MX 15
64 #define DNS_RRTYPE_TXT 16
67 #define DNS_RRCLASS_IN 1
68 #define DNS_RRCLASS_CS 2
69 #define DNS_RRCLASS_CH 3
70 #define DNS_RRCLASS_HS 4
71 #define DNS_RRCLASS_FLUSH 0x800
78 #define NETDB_ELEM_SIZE (32 + 16 + DNS_MAX_NAME_LENGTH + 1)
80 #if DNS_LOCAL_HOSTLIST
82 struct local_hostlist_entry {
87 struct local_hostlist_entry *next;
89 #if DNS_LOCAL_HOSTLIST_IS_DYNAMIC
90 #ifndef DNS_LOCAL_HOSTLIST_MAX_NAMELEN
91 #define DNS_LOCAL_HOSTLIST_MAX_NAMELEN DNS_MAX_NAME_LENGTH
93 #define LOCALHOSTLIST_ELEM_SIZE ((sizeof(struct local_hostlist_entry) + DNS_LOCAL_HOSTLIST_MAX_NAMELEN + 1))
104 typedef void (*dns_found_callback)(
const char *name,
ip_addr_t *ipaddr,
void *callback_arg);
111 dns_found_callback found,
void *callback_arg);
113 #if DNS_LOCAL_HOSTLIST && DNS_LOCAL_HOSTLIST_IS_DYNAMIC
114 int dns_local_removehost(
const char *hostname,
const ip_addr_t *addr);
115 err_t dns_local_addhost(
const char *hostname,
const ip_addr_t *addr);