39#define DNS_TIMEOUT (1)
40#define DNS_NOSUCHNAME (2)
61const uint16_t extra_dns_t=
DNS_A;
94int fd_dns_part1(
const char *name,
const IPADDR &dns_server, uint16_t TYPE =
DNS_A, uint16_t TYPE2 = extra_dns_t,
int ifn = -1);
146int RootGetHostByName(
const char *name,
IPADDR & Ipa,
const IPADDR & dnsServer,
const TickTimeout & timeout, uint16_t TYPE, uint16_t TYPE2,
int ifn_select, uint32_t *ttl);
190 uint16_t TYPE1 =
DNS_A,
191 uint16_t TYPE2 = extra_dns_t,
192 uint32_t *ttl = NULL)
194 return RootGetHostByName(name,*pIpaddr,dns_server,tout,TYPE1,TYPE2, -1,ttl);
203 uint16_t TYPE1 =
DNS_A,
204 uint16_t TYPE2 = extra_dns_t,
205 uint32_t *ttl = NULL)
208 int rv=RootGetHostByName(name,ir,dns_server,tout,TYPE1,TYPE2, -1,ttl);
242 const IPADDR & dns_server,
245 uint16_t TYPE1 =
DNS_A,
246 uint16_t TYPE2 = extra_dns_t,
247 uint32_t *ttl = NULL)
249 return RootGetHostByName(name,*pIpaddr,dns_server,tout,TYPE1,TYPE2, ifn,ttl);
257 const IPADDR & dns_server,
260 uint16_t TYPE1 =
DNS_A,
261 uint16_t TYPE2 = extra_dns_t,
262 uint32_t *ttl = NULL)
265 int rv=RootGetHostByName(name,ir,dns_server,tout,TYPE1,TYPE2, ifn,ttl);
276void RegisterResult(
const char* name,
IPADDR ia,uint32_t ttl, uint16_t atype);
Used to store and manipulate IPv4 addresses in dual stack mode.
Definition nettypes.h:225
IPADDR4 Extract4() const
Extracts an IPv4 address from the object.
Definition ipv6_addr.h:80
TickTimeout objects are used to facilitate sequential function calls with timeout parameters that nee...
Definition nbrtos.h:162
bool fd_dns_processresult(int fd, const char *name, IPADDR &addr_out, uint16_t TYPE=DNS_A, uint16_t TYPE2=DNS_AAAA, uint32_t *ttl=0)
Process any responses on the UDP socket opened for DNS.
int fd_outstanding_Responses(int fd)
Check to see if there are any outstanding DNS requests.
bool AnyDNSInterFaceActive()
Determine if we have an active DNS route; DNS server is set for an active interface.
int GetHostByNameViaIfNum(const char *name, IPADDR *pIpaddr, const IPADDR &dns_server, int ifn, const TickTimeout &tout, uint16_t TYPE1=DNS_A, uint16_t TYPE2=extra_dns_t, uint32_t *ttl=NULL)
Get the IP address associated with the specified domain name on a specific interface.
Definition dns.h:239
bool CheckDnsCache(const char *name, IPADDR &ia, uint32_t *ttl, uint16_t rtype)
Check the DNS cache for a stored response.
int fd_dns_part1(const char *name, const IPADDR &dns_server, uint16_t TYPE=DNS_A, uint16_t TYPE2=extra_dns_t, int ifn=-1)
Open a UDP socket and initiate a DNS lookup.
int GetHostByName(const char *name, IPADDR *pIpaddr, const IPADDR &dns_server, const TickTimeout tout, uint16_t TYPE1=DNS_A, uint16_t TYPE2=extra_dns_t, uint32_t *ttl=NULL)
Get the IP address associated with the specified domain name.
Definition dns.h:186
bool IsNameIPAddress(const char *name)
Determine if the name is a valid IP Address and does not need to be looked up.
#define DNS_OK
Success.
Definition dns.h:38
#define DNS_AAAA
128-bit IPv6 address
Definition dns.h:54
#define DNS_A
32-bit IPv4 address
Definition dns.h:49
IPADDR6 IPADDR
IPADDR Object Type (either v4 or v6).
Definition nettypes.h:568