dns_gethostbyname() is only used within LwIP.
 
Symbols
loading...
Files
loading...

dns_gethostbyname() function

Resolve a hostname (string) into an IP address. NON-BLOCKING callback version for use with raw API!!! Returns immediately with one of err_t return codes: - ERR_OK if hostname is a valid IP address string or the host name is already in the local names table. - ERR_INPROGRESS enqueue a request to be sent to the DNS server for resolution if no errors are present. - ERR_ARG: dns client not initialized or invalid hostname

Syntax

err_t dns_gethostbyname(const char *hostname,     ip_addr_t *addr,     dns_found_callback found,     void *callback_arg);
Implemented in dns.c:1525

Arguments

hostname

the hostname that is to be queried

addr

pointer to a ip_addr_t where to store the address if it is already cached in the dns_table (only valid if ERR_OK is returned!)

found

a callback function to be called on success, failure or timeout (only if ERR_INPROGRESS is returned!)

callback_arg

argument to pass to the callback function

Return value

a err_t return code.

References

LocationText
dns.c:1526
dns_gethostbyname(const char *hostname, ip_addr_t *addr, dns_found_callback found,
dns.h:109
err_t dns_gethostbyname(const char *hostname, ip_addr_t *addr,

Call Tree

Functions called by dns_gethostbyname()
dns_gethostbyname()
all items filtered out
Type of dns_gethostbyname()
dns_gethostbyname()
all items filtered out