cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: asynch name resolves

From: <crpalmer_at_vivisimo.com>
Date: Wed, 23 Jul 2003 08:36:12 -0400

On Sun, Jul 20, 2003 at 01:01:58AM +0200, Daniel Stenberg wrote:
> On Wed, 16 Jul 2003 crpalmer_at_vivisimo.com wrote:
> > Have you looked at "ares"?
>
> Nope, I have not.
>
> > The license is MIT which I believe makes it compatible with Curl.
>
> It would indeed. We could even incorporate it into our source tree, should we
> consider that a good thing.

It would also be interesting to see if the original author would like to be
involved in Curl...

> > The second is that it is UNIX based. In the last couple of days, we ported
> > it to windows and the example programs are working (but we haven't tested it
> > all that extensively yet).
>
> Ah, cool. Then I guess the only problem is the lack of IPv6 support, and we
> can surely survive not having that in a first step towards true and proper
> asynch resolves!
>
> I bet that we have a different problem as well, that you didn't mention here.
> This library probably only looks up names from DNS, but gethostbyname() and
> similar calls in the operating systems use more mechanisms than just DNS to
> find names and we need to support those as well... And that might take some
> platform dependent stuff. Or does ares take this into account already?

Ares seems to support the gethostbyname interface. I believe it uses
/etc/resolv.conf to find name servers (and implements the proper search)
and it uses /etc/hosts for local names. The windows port should be
doing roughly the equivalent steps by getting the name server information
out of the registry and using the c:\windows\system\hosts (or whatever it's
called file).

> > If Curl is interested in looking into this library, I'd be glad to make a
> > patch available as well as a VC++ project for the windows version of the
> > library.
>
> I think this sounds and seems highly interesting. I'll be back for real from
> my vacation this upcoming week and I hope to be able to get some time to dig
> into ares a bit deeper then.
>
> I'll appreciate all help, patches and things you can provide!

I've put two files up on our web server:

http://vivisimo.com/ares/ares-1.1.1-win32patch
http://vivisimo.com/ares/ares-1.1.1-win32.tar.gz

The first file is a patch against the official 1.1.1 version and the
second contains the patched version (builds on both windows and
unix platforms).

It was actually liren_at_vivisimo.com who worked on the windows version
of ares and if you have any (off-list) questions, you can email him
directly.

Cheers,
Chris.

--
Christopher R. Palmer                     palmer_at_vivisimo.com
Chief Technology Officer                  www.vivisimo.com
Vivisimo, Inc.                            412-422-2499
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
Received on 2003-07-23