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

> 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 Wednesday, 27 March 1996 16:11:20 UTC