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
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.