Subject: c-ares recursive name resolving

c-ares recursive name resolving

From: Paweł Piątkowski <pawelp_at_cubiware.com>
Date: Tue, 15 Feb 2011 10:45:15 +0100

Hello,

What does c-ares do when server returns NS reply (list of DNS servers to
ask) instead of A reply?

I was under the impression it was handled by c-ares internally (meaning
c-ares would ask those servers until it finds a server that has IP
address for the name).

I wanted to test my software against this case so I initialized c-ares
to ask root server (e.g. 128.8.10.90). I can see in Wireshark that it
replies with the list of servers to ask but c-ares just calls callback
function with status == ARES_ENODATA and hostent == NULL.

Can I handle NS response manually somehow? I see there is
ares_parse_ns_reply(). Are there any examples on how to use it?

Thanks for your time,
Pawel
Received on 2011-02-15