39#ifndef DNS_TICK_INTERVAL
40 #define DNS_TICK_INTERVAL 200
41#elif (DNS_TICK_INTERVAL < 10)
42 #error DNS_TICK_INTERVAL parameter is not valid
47 #define DNS_CACHE_SIZE 8
48#elif (DNS_CACHE_SIZE < 1)
49 #error DNS_CACHE_SIZE parameter is not valid
53#ifndef DNS_MAX_NAME_LEN
54 #define DNS_MAX_NAME_LEN 63
55#elif (DNS_MAX_NAME_LEN < 1)
56 #error DNS_MAX_NAME_LEN parameter is not valid
60#ifndef DNS_CACHE_INIT_POLLING_INTERVAL
61 #define DNS_CACHE_INIT_POLLING_INTERVAL 10
62#elif (DNS_CACHE_INIT_POLLING_INTERVAL < 1)
63 #error DNS_CACHE_INIT_POLLING_INTERVAL parameter is not valid
67#ifndef DNS_CACHE_MAX_POLLING_INTERVAL
68 #define DNS_CACHE_MAX_POLLING_INTERVAL 1000
69#elif (DNS_CACHE_MAX_POLLING_INTERVAL < 10)
70 #error DNS_CACHE_MAX_POLLING_INTERVAL parameter is not valid
86 DNS_STATE_IN_PROGRESS = 1,
87 DNS_STATE_RESOLVED = 2,
88 DNS_STATE_PERMANENT = 3
105 char_t name[DNS_MAX_NAME_LEN + 1];
121void dnsFlushCache(NetInterface *interface);
DnsState
DNS cache entry states.
Definition dns_cache.h:84
error_t
Error codes.
Definition error.h:43
uint32_t systime_t
System time.
Definition os_port_none.h:90
HostType
Host types.
Definition socket.h:202
HostnameResolver
Name resolution protocols.
Definition socket.h:214
DNS cache entry.
Definition dns_cache.h:97
uint_t dnsServerIndex
This parameter selects between the primary and secondary DNS server.
Definition dns_cache.h:102
systime_t maxTimeout
Maximum retransmission timeout.
Definition dns_cache.h:109
HostType type
IPv4 or IPv6 host?
Definition dns_cache.h:99
systime_t timeout
Retransmission timeout.
Definition dns_cache.h:108
uint16_t port
Port number used by the resolver.
Definition dns_cache.h:103
uint_t retransmitCount
Retransmission counter.
Definition dns_cache.h:110
IpAddr ipAddr
IP address.
Definition dns_cache.h:106
uint16_t id
Identifier used to match queries and responses.
Definition dns_cache.h:104
DnsState state
Entry state.
Definition dns_cache.h:98
NetInterface * interface
Underlying network interface.
Definition dns_cache.h:101
systime_t timestamp
Time stamp to manage entry lifetime.
Definition dns_cache.h:107
HostnameResolver protocol
Name resolution protocol.
Definition dns_cache.h:100
IP network address.
Definition ip.h:72