Re: gethostbyname (was Re: (DNS) draft wording for W.G. review. )

gethostbyname() needs to be updated, and someone on the BIND team is working
on that.  it cannot become any more DNS-centric than it is now, however.

getconninfo() or whatever POSIX calls it needs to be implemented and shipped
with BIND, and that will be done once it stops changing.  keith sklower and
eric allman have an implementation of the current draft specification.

a DNS-specific accessor function needs to be provided, that will allow
unmarshalling of DNS responses so that applications who don't want to call
GETSHORT() and its ilk, won't have to.  a thread safe API for this will
appear in version current+2 of BIND.

> > gethostbyname() is part of the BSD System Interface and we can't change it
> > lightly.  Note that it is very general, pertaining equally well to NIS and
> > /etc/hosts as to DNS -- therefore widening it to include authentication or
> > TTL information would be irrelevant and possibly incorrect.
> 
> This is a real problem that puts software developers between a rock and hard
> place. On the one hand, you have to replace gethostbyname because of its
> limitations (doesn't return all the info you need, not thread safe on some
> systems, etc.). But in turn gethostbyname may provide the only useful means of
> accessing some sorts of host data your application needs to see. Some sites
> depend on host data kept in non-DNS databases (NIS isn't the only one by any
> means).
> 
> In a perfect world there would be a single interface provided by the various
> OSes that provides thread-safe access to all of the information incorporating
> access to local information sources as well as DNS. But quite frankly I have no
> idea how to achieve this state of perfection -- I'm skeptical that it's even
> possible to get there. The one thing I do know, however, is that neither
> coding a replacement for gethostbyname nor sticking with the existing
> routine and all its warts are acceptable answers.
> 
> 				Ned

Received on Thursday, 28 March 1996 00:17:52 UTC