TCPIP_DNS_GetIPv6Addresses Function

C

int TCPIP_DNS_GetIPv6Addresses(
    const char* hostName, 
    int startIndex, 
    IPV6_ADDR* pIPv6Addr, 
    int nIPv6Addresses
);

Description

This function will return IPv6 addresses for a host name if the DNS resolution has been completed.

Preconditions

TCPIP_DNS_Resolve() has been called.

Parameters

ParametersDescription
hostNameA pointer to the null terminated string specifying the host name.
startIndexStarting index of the IP address to be returned when multiple addresses are available. The max number of addresses that can be stored for a host name is given by TCPIP_DNS_CLIENT_MODULE_CONFIG::nIPv6Entries. The current number of valid entries for an address is given by TCPIP_DNS_GetIPAddressesNumber(). A valid index is [0, TCPIP_DNS_GetIPAddressesNumber(IP_ADDRESS_TYPE_IPV6)).
pIPv6AddrPointer to array of IPv6 addresses to store the host IPv6 addresses.
nIPv6AddressesNumber of IPv6 addresses in the pIPv6Addr array.

Returns

  • > 0 - The number of addresses copied to the pIPv6Addr array.

  • 0 - If the host name was not found, invalid index, bad parameter, etc.

Remarks

None.