curl-library
Re: Re: IPv6 Support
Date: Thu, 11 Dec 2008 19:15:06 +0000
"curl 3.x" doesn't seem like a reasonable curl version. If this is
really your version then it must be very old: the current one is curl
7.19.x. Where are you finding this number?
Anyway, on your actual problem. "getaddrinfo(3) failed" sounds rather
like the problem is in your system resolver, not in libcurl itself.
Have you tried building libcurl to use c-ares rather than the host
resolver? Are other programs - ping, say - able to resolve the address
format in question?
p.
On Thu, 2008-12-11 at 14:45 +0000, keshav krity wrote:
> Hi,
>
> Thanks for the reply. My apologies for not mentioning the system
> details.
>
> I am using curl 3.x version on a linux(fedora 8).
>
> There are many formats of IPv6-IPv4 mixed addressing.
> I require to connect to IP of the following format.
> http://[2001:1890:110b:151e:20d:56ff:254.197.153.216]
> Browser(Mozilla) is able to resolve this link.
>
> But libcurl gives -> getaddrinfo(3) failed.
>
> Any idea why is it not working for this format ?
>
> Thanking you
> KeshavK
>
>
>
>
> On Wed, 10 Dec 2008 Phil Blundell wrote :
> >On Wed, 2008-12-10 at 13:25 +0000, keshav krity wrote:
> > > Does lib-curl support mixed addressing of the format that has IPv4
> > > address embedded into the an IPv6 address. Example :
> > > 805B:2D9D:DC28::FC57:212.200.31.255
> >
> >You didn't mention what OS you are using, what version of libcurl you
> >have, or what resolver library it was configured to use, so it is
> >difficult to say exactly what would be causing your problem.
> However,
> >addresses in this form do work OK for me using c-ares under Linux:
> >
> >$ strace -f ./curl -g http://[805B:2D9D:DC28::FC57:212.200.31.255]/
> 2>&1
> >|grep 805b
> >connect(3, {sa_family=AF_INET6, sin6_port=htons(80),
> inet_pton(AF_INET6,
> >"805b:2d9d:dc28::fc57:d4c8:1fff", &sin6_addr), sin6_flowinfo=0,
> >sin6_scope_id=0}, 28) = -1 EINPROGRESS (Operation now in progress)
> >$
> >
> >p.
> >
>
>
>
>
>
>
> Hi All,
>
> Does lib-curl support mixed addressing of the format that has IPv4
> address embedded into the an IPv6 address. Example :
> 805B:2D9D:DC28::FC57:212.200.31.255
>
> This is the sample code that I wrote
>
> #include <stdio.h>
> #include <curl/curl.h>
>
> int main(void)
> {
> CURL *curl;
> CURLcode res;
>
> curl = curl_easy_init();
> if(curl) {
> curl_easy_setopt(curl, CURLOPT_URL, "/*any mixed address*/");
> curl_easy_setopt( curl, CURLOPT_VERBOSE, 1 );
> res = curl_easy_perform(curl);
> /* always cleanup */
> curl_easy_cleanup(curl);
> }
> return 0;
> }
>
> When I provide pure IPv6 address it works fine but when I try with
> mixed address as mentioned above I get the following
> *error.getaddrinfo(3) failed for IP: ...
> * Couldn't resolve host
> * Closing connection #0
> * couldn't resolve host name
>
>
> Is there a problem in the way I am implementing or is mixed addressing
> not supported by lib-curl?
>
>
>
>
Received on 2008-12-11