Subject: Re: DNS on LAN vs PPP
To: None <netbsd-help@netbsd.org>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-help
Date: 07/10/2002 20:47:07
On Wed, 10 Jul 2002 16:33:51 -0700 (PDT), "Jeremy C. Reed"
<reed@reedmedia.net> wrote:

> > because I don't see anything between gated and gftp.
> 
> It is in pkgsrc as of this morning. (I should have mentioned that.)

Ah, OK.  That's a value of "new" I hadn't considered.  

> I don't think
> gethostbyname(3) reports where it gets its info from.

True.  gethostbyname(3) just sets up and calls nsdispatch(3), who answer
yea or nae and what, but not "where from?".  

OT, perhaps:  I'm wondering, can I fix this in any way acceptable to
NetBSD?  The answer to "where from?" lies in the final value of "i" in the
last loop.  To pass that value out of nsdispatch, we'd have to change
either the meaning of its return code or add a member to the hostent
structure.  

Where's the right place to get a reaction to the notion of adding, say, 

	char **h_src	/* source of host informaton */

to struct hostent in /usr/include/netdb.h?  The domain of values would be
taken straight from nsswitch.h:

           #define      value
           NSSRC_FILES  "files"
           NSSRC_DNS    "dns"
           NSSRC_NIS    "nis"
           NSSRC_COMPAT "compat"

nsdispatch could set that pointer, and voila! the caller of gethostbyname
would have an answer. 

Regards, 

--jkl