Archive Index This month's Index

Subject: Re: IPv6 servers redux

Re: IPv6 servers redux

From: Daniel Stenberg <>
Date: Tue, 3 Feb 2009 19:54:44 +0100 (CET)

On Tue, 3 Feb 2009, Gregor Jasny wrote:

Thanks for the update!

> I've created ares_free(), a simple wrapper around free(). I think that will
> do it for now.

Right, but I'd then prefer if the data ares_get_servers() return somehow is
identifiable as such data. Like an int field with an identifier first in the
struct or similar.

The idea I'm having is that even in the future when we introduce more
ares_get_*() functions that possibly return all sorts of various structs that
have one or more allocs associated to it, we can use ares_free() to free all
such data - if and only if we can identify the particular data in the
ares_free() call itself.

> +#if !defined(HAVE_STRUCT_IN6_ADDR) && !defined(s6_addr)
> +struct in6_addr {
> + union {
> + unsigned char _S6_u8[16];
> + } _S6_un;
> +};
> +#define s6_addr _S6_un._S6_u8
> +#endif

This must be wrong. It brings back the struct I renamed to ares_in6_addr and
it brings back the (bad) dependency on HAVE_STRUCT_IN6_ADDR which I already
removed from the public header file!

Received on 2009-02-03