You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Jeff Trawick <tr...@attglobal.net> on 2004/02/19 19:20:24 UTC

getaddrinfo() on HP-UX 11i

Can anyone make that thing work well enough for APR's use without the optional 
IPv6 networking stack installed?

To the extent that I test httpd 2+ and APR on HP-UX, I'm accustomed to using 
httpd+apr as built on HP-UX 11.00 and have only casually used builds created on 
11i.  Because getaddrinfo() was able to resolve the hostname of the 11i box I 
never noticed any problem until today.  But it seems that APR isn't able to 
resolve hosts in general, even though nslookup can.  This sounds bizarre, but 
check out

   http://www.openldap.org/faq/data/cache/778.html

 From a google of ->hp-ux getaddrinfo<- I see that some other open source 
projects have disabled the use of getaddrinfo().

It seems very strange that we have not seen such reports before if indeed this 
is really the state of getaddrinfo().  I'm hoping for some enlightenment!

Jeff


Re: getaddrinfo() on HP-UX 11i

Posted by Jeff Trawick <tr...@attglobal.net>.
Joe Orton wrote:
> On Thu, Feb 19, 2004 at 01:20:24PM -0500, Jeff Trawick wrote:
> 
>>Can anyone make that thing work well enough for APR's use without the 
>>optional IPv6 networking stack installed?
> 
> 
> But it works well enough that APR_CHECK_WORKING_GETADDRINFO doesn't
> fail?

yep

> What's the simplest thing that fails, getaddrinfo("localhost", ...) 
> even?

localhost lookup works for me; getaddrinfo() for anything in /etc/hosts seems 
to work in fact

The test program is simply:

> #include <stdio.h>
> #include <stdlib.h>
> 
> #include <sys/socket.h>
> #include <netdb.h>
> 
> int main(int argc, char **argv) {
>     int rc;
>     int family;
>     const char *hostname;
>     struct addrinfo hints, *ai_list;
> 
>     if (argc != 3) {
>         exit(1);
>     }
>     family = atoi(argv[1]);
>     hostname = argv[2];
>     memset(&hints, 0, sizeof(hints));
>     hints.ai_family = family;
>     hints.ai_socktype = SOCK_STREAM;
>     rc = getaddrinfo(hostname, NULL, &hints, &ai_list);
>     printf("getaddrinfo()->%d\n", rc);
> 
>     return rc != 0;
> }

but substitute ab (to use getaddrinfo() via apr_sockaddr_info_get()) and I get 
the same results


Re: getaddrinfo() on HP-UX 11i

Posted by Joe Orton <jo...@manyfish.co.uk>.
On Thu, Feb 19, 2004 at 01:20:24PM -0500, Jeff Trawick wrote:
> Can anyone make that thing work well enough for APR's use without the 
> optional IPv6 networking stack installed?

But it works well enough that APR_CHECK_WORKING_GETADDRINFO doesn't
fail?  When I looked into this for neon it worked OK on the 11.11 boxes
I tested on (and still does on the HP TestDrive boxes), but maybe they
had the IPv6 stuff installed.

What's the simplest thing that fails, getaddrinfo("localhost", ...) 
even?

joe