Subject: ARES_ENODATA vs. ARES_ENOTFOUND

ARES_ENODATA vs. ARES_ENOTFOUND

From: Jakub Hrozek <jhrozek_at_redhat.com>
Date: Mon, 13 Jun 2011 13:56:03 +0200

Hi,

the ares_gethostbyname(3) manual page states that ARES_ENOTFOUND shall
be returned in the "status" argument of the ares callback when "The
address _addr_ was not found."

First, the message should probably say "The name _name_ was not found".

Second, at least when actually performing DNS queries, the status after
receiving is actually ARES_ENODATA. ARES_ENOTFOUND seems to be only used
in the files based search.

My question is - should just the docs be amended such that ENODATA is a
valid and expected return code, or should ares_gethostbyname() be
changed so that it translates ENODATA into ENOTFOUND somehow?

Thank you,
        Jakub

Received on 2011-06-13