Subject: Re: 'ares_getaddrinfo' is available?

Re: 'ares_getaddrinfo' is available?

From: Pavel Simerda <psimerda_at_redhat.com>
Date: Tue, 18 Nov 2014 04:04:22 -0500 (EST)

----- Original Message -----
> From: "Jakub Hrozek" <jhrozek_at_redhat.com>
> To: c-ares_at_cool.haxx.se
> Sent: Saturday, November 1, 2014 4:06:17 PM
> Subject: Re: 'ares_getaddrinfo' is available?
>
> On Fri, Oct 31, 2014 at 12:51:30PM -0400, Pavel Simerda wrote:
> > ----- Original Message -----
> > > From: "Daniel Stenberg" <daniel_at_haxx.se>
> > > To: "Vinay Kumar" <win_i008_at_yahoo.com>, "c-ares hacking"
> > > <c-ares_at_cool.haxx.se>
> > > Sent: Thursday, October 30, 2014 11:09:12 AM
> > > Subject: Re: 'ares_getaddrinfo' is available?
> > >
> > > On Thu, 30 Oct 2014, Vinay Kumar wrote:
> > >
> > > > I am using 'c-ares' library in our application. We have used
> > > > 'getaddrinfo'
> > > > in many places. Is there any equivalent function called
> > > > 'ares_getaddrinfo'?
> > > > Because 'ares_nameinfo.pdf' contains 'ares_getaddrinfo' in SEE ALSO
> > > > section.
> > > > If 'ares_getaddrinfo' is availabe, then what is the syntax?
> >
> > By the way the netresolve project[1] which can work on top of c-ares
> > (libunbound is currently the default but subject to change at any time)
> > offers getaddrinfo and getnameinfo functions. I found out some issues with
> > the current APIs in c-ares, so if you would like to add stuff like that,
> > please contact me so I can share the experience gained so far.
> >
> > [1] https://sourceware.org/git/?p=netresolve.git;a=blob;f=README;hb=HEAD
> >
> > Cheers,
> >
> > Pavel
>
> Can you summarize the issues on this list?

I'm definitely not going to keep them for myself. I'll probably follow the
same approach as for DNSSEC features and cover those in downstream Fedora
bugzilla so I can further track them and then send to the upstream mailing
list with detailed information.

To give some examples, the file descriptor interface feels overly complicated
to anyone not using select(), not to say well documented from the user
perspective. The ares_gethostbyname call doesn't let the callback retrieve
important information like the TTL. One cannot easily override how the ares
channel gets configured (i.e. by using a specific file as /etc/resolv.conf,
or even by trying multiple locations). There are lots of situation where
c-ares does't do so well, just as there are lots of situations where it does
better than other options ;).

One thing, not API related, that drives me crazy is the overly complicated
build system overriding almost anything you try to set. Fortunately, just
removing m4/cares-compilers.m4 fixed the most outstanding issues.

As I said, I don't have a ready to use list of issues. I basically got over
some of the inconveniences and am using local patches for others, one day
going to submit them.

Cheers,

Pavel
Received on 2014-11-18