DNS Handler Fixes
DNS Handler Fixes

Fixed some cross-platform issues preventing dns_handler.cpp from building on Linux:

struct ip_addr appears to be defined differently between Linux and Windows.  On Linux struct ip_addr seems to only contain a single member -- an integer -- whereas on Windows it still contains a single member, but that single member is a union which in turn contains several members.  This caused code attempting to use/convert/correct the endianness of IPv4 addresses to fail to compile on Linux.

libc-ares appears to not use struct ip6_addr at all on Linux, whereas it does on Windows.  This -- from what I found -- is to avoid pulling in system headers and as a legacy support issue -- some older systems' system headers don't define struct ip6_addr at all, but libc-ares is capable of resolving AAAA records even on those platforms.

I adopted a union-based solution to get around these issues: I use decltype to deduce the type -- so it makes no difference whether it's OS-/Berkeley sockets-supplied or a libc-ares drop-in replacement -- and place the objects of that type returned by libc-ares in a union alongside an integer type of equal size -- either UInt128 or UInt32, depending on the address family-in-question -- and a buffer of bytes.  The buffer of bytes is passed to a helper template which corrects the endianness, and then the integers are actually consumed.  This means that at no time do I actually touch the internals of these structures, which prevents a mess of preprocessor macros to adjust the code depending on the platform.

RobertLeahy/MCPP,RobertLeahy/MCPP