STM32F7 Ethernet interface for nucleo STM32F767

Embed: (wiki syntax)

« Back to documentation index

dns.h File Reference

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_tdns_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:
namepointer to the name that was looked up.
ipaddrpointer 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_arga user-specified callback argument passed to dns_gethostbyname

Definition at line 102 of file dns.h.


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.