Rtos API example
dns.h File Reference
DNS API. More...
Go to the source code of this file.
Data Structures | |
struct | local_hostlist_entry |
struct used for local host-list More... | |
Typedefs | |
typedef void(* | dns_found_callback )(const char *name, const ip_addr_t *ipaddr, void *callback_arg) |
Callback which is invoked when a hostname is found. | |
Functions | |
void | dns_init (void) |
Initialize the resolver: set up the UDP pcb and configure the default server (if DNS_SERVER_ADDRESS is set). | |
void | dns_tmr (void) |
The DNS resolver client timer - handle retries and timeouts and should be called every DNS_TMR_INTERVAL milliseconds (every second by default). | |
void | dns_setserver (u8_t numdns, const ip_addr_t *dnsserver) |
Initialize one of the DNS servers. | |
const ip_addr_t * | dns_getserver (u8_t numdns) |
Obtain one of the currently configured DNS server. | |
err_t | dns_gethostbyname (const char *hostname, ip_addr_t *addr, dns_found_callback found, void *callback_arg) |
Resolve a hostname (string) into an IP address. | |
err_t | dns_gethostbyname_addrtype (const char *hostname, ip_addr_t *addr, dns_found_callback found, void *callback_arg, u8_t dns_addrtype) |
Like dns_gethostbyname, but returned address type can be controlled: | |
size_t | dns_local_iterate (dns_found_callback iterator_fn, void *iterator_arg) |
Iterate the local host-list for a hostname. | |
err_t | dns_local_lookup (const char *hostname, ip_addr_t *addr, u8_t dns_addrtype) |
Scans the local host-list for a hostname. | |
int | dns_local_removehost (const char *hostname, const ip_addr_t *addr) |
Remove all entries from the local host-list for a specific hostname and/or IP address. | |
err_t | dns_local_addhost (const char *hostname, const ip_addr_t *addr) |
Add a hostname/IP address pair to the local host-list. |
Detailed Description
DNS API.
Definition in file dns.h.
Typedef Documentation
typedef void(* dns_found_callback)(const char *name, const ip_addr_t *ipaddr, void *callback_arg) |
Callback which is invoked when a hostname is found.
A function of this type must be implemented by the application using the DNS resolver.
- Parameters:
-
name pointer to the name that was looked up. ipaddr pointer to an ip_addr_t containing the IP address of the hostname, or NULL if the name could not be found (or on any other error). callback_arg a user-specified callback argument passed to dns_gethostbyname
Function Documentation
void dns_init | ( | void | ) |
Initialize the resolver: set up the UDP pcb and configure the default server (if DNS_SERVER_ADDRESS is set).
Definition at line 318 of file lwip_dns.c.
void dns_tmr | ( | void | ) |
The DNS resolver client timer - handle retries and timeouts and should be called every DNS_TMR_INTERVAL milliseconds (every second by default).
Definition at line 398 of file lwip_dns.c.
Generated on Sun Jul 17 2022 08:25:34 by 1.7.2