cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: cleaning up lib/hostip.c

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 22 Apr 2004 15:33:25 +0200 (CEST)

On Thu, 22 Apr 2004, Gisle Vanem wrote:

> Attached is a patch for 'curl-7.12-hostip2'

Awesome!

> adding a threaded getaddrinfo(). There's no Curl_ip2addr() for 'struct
> addrinfo', so all names are passed to getaddrinfo().

I think that's OK, the situation gets much more complicated with ipv6 enabled
stuff so I think letting getaddrinfo() handle it all is good.

> The Curl_inet_ntop() in dump_addrinfo() will probably go away, unless we add
> inet_ntop.* (attached).

I think we can add them, they will be useful for trace outputs like this.

Most of your patch applied cleanly, but I think my edits since hostip2 broke
the biggest chunk and I don't understand every bit of it. I've uploaded a
hostip3 package with the now somewhat "crippled" lib/hostthre.c file. Can you
repatch that file?

* Does your patch really provide an ipv4-only version too of the threaded
  resolver?

* I think we should put the getaddrinfo_callback in hostasyn.c together
  with the ipv4 version (within #ifdef CURLRES_IPV6), since if/when ares
  supports ipv6 it is very likely to use a callback that looks like that as
  well.

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-04-22