cURL / Mailing Lists / curl-library / Single Mail

curl-library

c-ares name lookup order (was Re: TODO for 7.11 (update))

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Sun, 4 Jan 2004 12:46:10 +0100 (CET)

On Fri, 19 Dec 2003, codemastr wrote:

> I did a little research on the nsswitch.conf file. Adding support for the
> 'files bind' vs 'bind files' doesn't seem like it is too difficult, however
> the thing is this file seems to offer a lot more options than that. There
> seems to be some way to define 'criteria.' For example it seems as though
> you can do:
>
> hosts: files [SUCCESS=return UNAVAIL=return NOTFOUND=continue] dns
>
> In all there are four criteria, SUCCESS, UNAVAIL, NOTFOUND, TRYAGAIN. Any
> of these can either have the value of continue or return assigned. For more
> info, <http://www.unidata.ucar.edu/cgi-bin/man-cgi?nsswitch.conf+4>. Anyway
> though my point is, to fully support the /etc/nsswitch.conf file seems like
> it is actually a lot of work since this file seems to offer a great deal of
> configurability.

I was more thinking about getting some basic functionality added first, to be
able to extend it further in the future. Or don't you think that is
feasable/reasonable?

> Also as a side note, does anyone happen to know if Windows has such an
> option as well? I'd assume there is a way to tell it whether to use the
> C:\windows\hosts or the DNS server first just as nsswitch.conf seems to do.
> I'd guess (if Windows does have such a feature) that if nsswitch.conf
> support is added to c-ares, then the same function should be added for
> Windows as well.

Well, we could of course allow the Windows version to check for and use a
"C:\windows\nsswitch.conf" file (or similar) to accomplish this.

> By the way, I've read Frank Ticheler's email 3 times now, I can't see
> anywhere where he mentioned that the _default_ order should be changed. To
> me it seems like what he is requesting is that c-ares read the
> /etc/nsswitch.conf file and use whatever order is defined therein.

Right, but "files bind" is the standard default search order for name lookups
on all operating systems I know of, and thus we should use that order unless
stated otherwise.

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2004-01-04