cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: cleaning up lib/hostip.c

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Thu, 22 Apr 2004 17:06:27 +0200

"Daniel Stenberg" <daniel-curl_at_haxx.se> said:

> I build on a ipv6-enabled Linux, and then when trying 'curl -v localhost' this
> line claims:
>
> * host is: 2.0.0.80
>
> It seems there's a (network?) byte order problem or something but I can't
> understand why...
>
> --
> Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
> Dedicated custom curl help for hire: http://haxx.se/curl.html
>

:-) Curl_inet_nop() does not take a "struct sockaddr", but an array
or "struct in6_addr". See the dump_addrinfo():
    const struct in6_addr *addr6 = &((const struct sockaddr_in6*)ai->ai_addr)->sin6_addr;

--gv
Received on 2004-04-22