Subject: Re: c-ares IPv6 support (preliminary patch)

Re: c-ares IPv6 support (preliminary patch)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: 2005-03-07

On Mon, 7 Mar 2005, codemastr wrote:

> I have started to do some work on adding IPv6 support to c-ares.

Awesome!

> What is done so far:

> * ares_gethostbyname/ares_gethostbyaddr now accept a family parameter of
> AF_INET6. If AF_INET6 is specified, an IPv6 lookup is performed. In the case
> of ares_gethostbyname, it will first query for an AAAA, if no result is
> found, it will then go for an A. For ares_gethostbyaddr, it will do a PTR
> lookup on ip6.arpa.

I figure this choice could be a subject of discussion. Personally I'd vote to
keep compatibility with current c-ares and add support for IPv6 in a new
function.

> * OS independence. For IPv6 lookups, all we need is an AF_INET6, in6_addr
> and perhaps inet_ntop/inet_pton. Hence, IPv6 DNS lookups should be possible
> regardless of whether the system itself supports IPv6. We will simply
> provide the necessary structs/functions if they are not available.

That's cool indeed!

> * OS support. I've only tested this on FreeBSD. I'm sure it does NOT work on
> Windows (I know very little about IPv6 under Windows).

I think can do some rudimentary testing on Linux. At least for file-based
lookups.

> * addrinfo style system. I went with hostent because 1, it's what I'm
> familiar with and 2, it's what the program I will be using c-ares in needs.
> However, having ares_getaddrinfo would probably be beneficial and it seems
> necessary for libcurl.

Not strictly necessary, but I would rather appreciate it. I also think it'll
be what other ipv6-users out there would want.

> * IPv6 DNS server support. c-ares needs the ability to actually communicate
> with the DNS server over IPv6.

But this is possible to save for later, right?

> Hope this turns out to be a good start!

I'm excited. Now I'm starting to visualize a future in which we make using
c-ares mandatory in libcurl...

Very nice work Dominick!

-- 
          -=- Daniel Stenberg -=- http://daniel.haxx.se -=-
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
_______________________________________________
http://cool.haxx.se/mailman/listinfo/c-ares
Received on Mon Mar 7 20:55:59 2005