Subject: Mixed ipv4/ipv6 from ares_gethostbyname

Mixed ipv4/ipv6 from ares_gethostbyname

From: Pawel Veselov via c-ares <c-ares_at_cool.haxx.se>
Date: Thu, 18 May 2017 19:11:02 -0700

Hello.

I'm integrating c-ares into a project of mine, haven't used it before.
I understand the best function for simply resolving a name to an address
is ares_gethostbyname().

One thing I don't understand is what happens when there are both ipv4 and
ipv6 address records for a host, and I specify AF_UNSPEC for the family.
AFAIU, struct hostent can only contain records of the same address type.

Thank you.
Received on 2017-05-19