I would like to obtain IPv6 addresses of DNS servers in system.
This topic helped me very much with IPv4.
But GetNetworkParams()
is not returning IPv6 servers, only IPv4. Is there any other way to do this?
EDIT:
I found GetAdaptersAddresses()
which fills a PIP_ADAPTER_ADDRESSES
structure, that contains IP_ADAPTER_DNS_SERVER_ADDRESS
structure. Then you can just use getnameinfo()
to convert IP to String.