cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Solaris 5.9 (intel)

From: Tor Arntsen <tor_at_spacetec.no>
Date: Wed, 10 Mar 2004 12:44:58 +0100

On Mar 9, 19:25, Joe Halpin wrote:
>I'm not very familiar with IPv6 so I was looking through Stevens just
>now and realized that the hints struct isn't getting passed to
>getaddrinfo. I modified the line
>
>> if ((ret = getaddrinfo (argv[1], NULL, NULL, &res)) != 0)
>
>to be
>
>if ((ret = getaddrinfo (argv[1], NULL, &hints, &res)) != 0)

Yes, the hints should be passed as you indicate above. The version of the
test program I posted just happened to be one of the incarnations where I
had tested getaddrinfo() with no hints (I did a lot of different things to
figure out where the AIX problem was). I should proably have posted the
'hints' version instead, as it resembles the actual curl code better.

>and I get more reasonable output
>
>ok
>res->ai_flags = 0
>res->ai_family = 2
>res->ai_socktype = 2
>res->ai_addrlen = 16
>res->ai_canonname = (NULL)
>res->ai_addr = 0x8061aa8
>res->ai_next = 0x0

On AIX that doesn't happen, unfortunately -- even with proper hints the
ai_socktype is still 0. On the other hand you have now verified that
getaddrinfo() as used in curl actually works fine on Solaris :-)

Your other comment (in another posting) about the localhost/hostname
difference is interesting. I don't know much about ipv6 either, so
this is quite new territory for me too.

-Tor
Received on 2004-03-10