Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 92998 invoked by uid 500); 20 Jul 2001 05:28:21 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 92987 invoked from network); 20 Jul 2001 05:28:20 -0000 Date: Fri, 20 Jul 2001 01:28:25 -0400 (EDT) From: Dale Ghent To: "Roy T. Fielding" cc: Subject: Re: [PATCH] Add reentrant gethostbyname call In-Reply-To: <20010719204345.E1028@waka.ebuilt.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N On Thu, 19 Jul 2001, Roy T. Fielding wrote: | The test needs to be a bit more complicated than that, | since Solaris has different definitions of gethostbyname_r defined based | on the POSIX level. Bugger, it looks like the Solaris man page is | recommending against that function anyway, in favor of getipnodebyname() | because the old ones won't work with IPv6. What's the likelihood | that it will be portable? Perhaps we should write a test for each | and use the best one found. getipnodebyname() is new as of Solaris 8. In Solaris 8, it is preferable to use the IPv6-derived getaddrinfo() (as we already do) In < Solaris 8, we should use gethostby{addr|name}_r() when threads are used (which is the default.) On the issue of it being overhead... I think the point's moot since we're wanting to do a DNS lookup anyways. True, in httpd, that may matter. But for other apps (samba, perhaps), the benefit of a resolver outwieghs any overhead it may cause. So let's finish this out with a rounded-out resolver interface and strike an item of the httpd STATUS list. I know that the icecast streaming mp3 server deals with the various implementations of gethostby*_r, and eventhough it's GPL, it may be worth a look at for ideas. /dale