cURL / Mailing Lists / curl-library / Single Mail

curl-library

Asynch DNS in Curl

From: codemastr <codemstr_at_ptd.net>
Date: Fri, 12 Sep 2003 17:24:53 -0400

Hi, I was just looking through the new curl with asynch dns and I came
across your win32 patch for ares. It states:

On Windows 2000, you can found it in:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interf
aces\{AdapterID}\NameServer

That is not necessarily true. If that method were used on my system, it
would return an empty string. I've only confirmed this in Windows XP but I
assume it happens in other versions as well. If you use DHCP, then it
appears instead of using the NameServer as the key, it uses DhcpNameServer
for the key that contains the NS. To make matters even worse, the NameServer
key does exist, so RegQueryValueEx will succeed, however the 'size' returned
by RegQueryValueEx will be 1 (just the null character). If that occurs, you
should then check for the presence of the DhcpNameServer key.

I spent many hours trying to figure out exactly how to 100% get this
information (MS doesn't provide the world's greatest documentation on the
registry) so rather than have you guys spend the same time doing it,
http://www.codemastr.com/win32res.txt is what I used to get the nameserver
from the NT/2k/XP registry. I hope that helps somewhat :)

Also about IPv6 in the ares stuff, I don't know how helpful this would be,
but there is a version of adns that supports IPv6, and also a resolver
called firedns that has IPv6 support, perhaps taking a look at that would
give you some ideas on how to add IPv6 support to ares?

-- codemastr

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-09-12