curl-library
Re: proxy question
Date: Wed, 18 Feb 2009 11:14:04 +0100 (CET)
On Mon, 16 Feb 2009, Markus Moeller wrote:
>> However, I don't think we need a full getnameinfo()-replacement, do we? I
>> mean it would work if we just write up a gethostbyaddr()-wrapper for
>> non-ipv6 systems like we do for getaddrinfo().
>
> I assume you refer to hostip4.c which looks quite complicated with the 3
> gethostbyname_r versions. I will see if I can do something similar.
Well, it _is_ fairly complicated but I don't see how we can avoid that. We
want thread-safe functions and we want to use the native functions for that.
How else can we do it?
The getnameinfo() replacement from KAME you mentioned previously (which also
is a fairly complicated solution) isn't suitable as-is either because it isn't
using thread-safe versions of gethostbyaddr...
I figure a half-baked solution as a first step could be to simply only do the
reverse-lookup if an "ipv6-enabled" stack is present. That would basically
only require some extra code to your existing patch.
-- / daniel.haxx.seReceived on 2009-02-18