Subject: Re: Multiple IP addresses for a single host in "/etc/hosts"
To: Matthias Scheler <tron@lyssa.owl.de>
From: Chris G. Demetriou <cgd@netbsd.org>
List: tech-net
Date: 05/30/1999 16:40:37
tron@lyssa.owl.de (Matthias Scheler) writes:
> In article <87btf26swo.fsf@redmail.redback.com>,
> 	cgd@netbsd.org (Chris G. Demetriou) writes:
> > Is there any non-broken code that requires gethostbyname() to return
> > exactly one address?
> 
> I don't know. We probably won't notice that until we change "libc".

Heh, true.  really, though, I think the answer is "likely few."
After all, who's to say that hosts rather than DNS is being used?


> > Of course, with /etc/hosts there's an efficiency issue (i.e. it'd be
> > nice to just fine one match and return, rather than having to scan the
> > whole file), but that's perhaps best addressed via a (new)
> > nsswitch.conf option.
> 
> Something like "files" vs. "files_multi"?

That's one possibility, sure.  I suck at picking names, though, and am
not too familiar with how it 'should' be done in the nsswitch.conf
world, so i'm quite willing to let somebody else pick the name and
implementation.  It just seems like the right general direction to
shoot for.  8-)


chris
-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.