The following program I wrote to try out the DNS classes does not return my hosts ipv6 addresses only its ipv4 address.
And I doing something wrong, or is this just not supported? The platform is windows vista and I have functioning ipv6 address on the machine.
I don't seem to get back any addresses from using DNS::resolve either when I give it the name of a host with ipv6 addresses.
Code: Select all
using namespace std;
using namespace Poco;
using namespace Poco::Net;
const HostEntry& he = DNS::thisHost();
const HostEntry::AddressList& addr = he.addresses();
for(HostEntry::AddressList::const_iterator i = addr.begin(); i != addr.end(); ++i)
cout << format("Address entry is %s\n", (*i).toString());