Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 321 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 403 of file lwip_dns.c.
Generated on Tue Aug 9 2022 00:37:26 by
