TCPIP_DNS_IsResolved Function

C

TCPIP_DNS_RESULT TCPIP_DNS_IsResolved(
    const char* hostName, 
    IP_MULTI_ADDRESS* hostIP, 
    IP_ADDRESS_TYPE type
);

Description

Call this function to determine if the DNS resolution of an address has been completed. If so, the resolved address will be provided in hostIP.

Preconditions

TCPIP_DNS_Resolve() has been called.

Parameters

ParametersDescription
hostNameA pointer to the null terminated string specifying the host for which to resolve an IP.
hostIPA pointer to an IP_MULTI_ADDRESS structure in which to store the resolved IPv4/IPv6 address if resolution is complete. Could be NULL if not needed.
typetype of address needed: IP_ADDRESS_TYPE_IPV4/IP_ADDRESS_TYPE_IPV6/IP_ADDRESS_TYPE_ANY.

Remarks

The function will set either an IPv6 or an IPv4 address to the hostIP address, depending on what's available.

If type IP_ADDRESS_TYPE_ANY is specified the hostIP will be updated with the first available solved address: either IPv6 or IPv4.