I have dual stack Windows m/c, with IPv4 and IPv6 address.
The etc\hosts
contains only IPv4 address of that hostname.
So whenever I call getaddrinfo()
function, it returns IP address from etc\hosts
file (i.e IPv4 only not IPv6 address).
ipconfig
command shows both IPv4 as well as IPv6 address.
How to configure getaddrinfo()
function to always return IPs from DNS rather than etc\hosts
file ?
Any other way to do this ?