...
p_host_name | Pointer to a string that contains the host name. |
p_res_host_name | Pointer to a string that will receive the host name resulting from a reverse lookup OR the canonical name resulting from a forward lookup with the DNSc_FLAG_CANON set. |
res_hostname_len | String length of p_res_host_name. This argument should evaluate to 0 if a simple forward DNS request is desired (with DNSc_FLAG_CANON cleared). |
p_addrs | Pointer to arrays that will receive the IP address(es) from this function. |
p_addr_nbr | Pointer to a variable that: (1) Indicates how many addresses can fit into the addresses array pointed by the 'p_addrs' argument. If the caller desires a reverse lookup, the variable should evaluate to 1. and (2) Will receive the number of address(es) copied into the addresses array. |
flags | DNS client flag: DNSc_FLAG_NONE - By default this function is blocking. |
p_cfg | Must be set to DEF_NULL to use default configuration. Pointer to a request configuration. Should be set used to overwrite override the default DNS configuration (such as 's values for DNS server, request timeout, etc.). per request. Must be set to DEF_NULL to use default configuration. |
p_err | Pointer to variable that will receive the return error code from this function. |
...
Required Configuration
None.
Notes / Warnings
(1) The DNSc_FLAG_REVERSE_LOOKUP flag must be used in conjunction with the DNSc_FLAG_FORCE_RESOLUTION flag. (2) If this function successfully resolves a reverse lookup, the host's address information is added to the cache just as it would be for a forward lookup.
(2) If a forward request is successfully resolved and a reverse request is issued for the same host name, the same host cache entry will be used and the
reverse name will be updated internally.
(3) DNSc_FLAG_REVERSE_LOOKUP and DNSc_FLAG_CANON flags cannot not be set simultaneously.
(4) DNSc_FLAG_FORCE_CACHE and DNSc_FLAG_FORCE_RENEW flags cannot be set simultaneously.
(5) DNSc_FLAG_UPDATE_PREF and DNSc_FLAG_RESET_REQ flags are meant for internal use and should never be set.
Example Usage
See Sample Application.