1.2.1.7.39 TCPIP_DNS_Send_Query Function

C

TCPIP_DNS_RESULT TCPIP_DNS_Send_Query(
    const char* hostName, 
    TCPIP_DNS_RESOLVE_TYPE type
);

Description

This function attempts to send a query packet for the supplied host name and DNS type.

Preconditions

The DNS client module must be initialized.

Parameters

ParametersDescription
hostNameA pointer to the null terminated string specifying the host for which to resolve an IP.
typeA TCPIP_DNS_RESOLVE_TYPE value specifying the desired resolution.

Returns

  • TCPIP_DNS_RES_OK - Success, name is solved.

  • TCPIP_DNS_RES_PENDING - Operation is ongoing.

  • TCPIP_DNS_RES_NAME_IS_IPADDRESS - Name request is a IPv4 or IPv6 address.

  • An error code if an error occurred.

Remarks

If the name is already part of the DNS resolution process (has been previously requested with TCPIP_DNS_Resolve or TCPIP_DNS_Send_Query) the function will force a new DNS query . If the name resolution is already solved and completed, this function will mark it as incomplete and a new response from the server will be requested.

If the name was not part of the DNS client resolution, then this function is equivalent to TCPIP_DNS_Resolve().