I am having problems in understanding how GetAdapterAddresses functions works. I am trying to get the UnicastAddresses along with the Prefixes for an interface. This is how I have used this function PIP_ADAPTER_ADDRESSES table; some allocation code GetAdaptersAddresses(AF_UNSPEC, GAA_FLAG_INCLUDE_PREFIX | GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_DNS_SERVER | GAA_FLAG_SKIP_FRIENDLY_NAME , NULL, table, &size); I can get all unicast addresses by traversing the list starting with "FirstUnicastAddress" and prefixes through "FirstPrefix" members of IP_ADAPTER_ADDRESSES structure . However, how do I associate each prefix with the corresponding address ? For testing purposes I assigned 5 IP addresses with some common subnets. In this case I get only three prefixes and that too in no order. How should I interpret this result? Is there a better API for doing this (Getting IP addresses/subnet for an interface)? I also need to support IPv6 addresses as well. -- Regards, Ranjan