Is there a way to programmatically check if IPv6 is installed/enabled on windows using c++? Either at an interface level, or system wide.
+1
A:
With a lot of network availability things the easiest way is to attempt to use it and catch the exceptions if it fails.
Fish
2010-06-24 13:37:12
A:
One answer would be to enumerate the system interfaces using GetAdapterAddresses()
and look for an IPv6 address.
Steve-o
2010-07-07 08:03:49
+1
A:
WSCEnumProtocols()
can be used to check whether IPv6 is installed as a protocol.
Steve-o
2010-07-07 08:09:49
A:
Easiest is just to try opening a socket,
const int sock6 = socket (AF_INET6, SOCK_DGRAM, 0);
const BOOL is_ip6_enabled = (SOCKET_ERROR != sock6);
close (sock6);
Steve-o
2010-07-07 08:16:39