Subject: Re: [RFC] Support querying IPv6 servers

Re: [RFC] Support querying IPv6 servers

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 27 Nov 2008 07:34:33 +0100 (CET)

On Wed, 26 Nov 2008, Erik Kline wrote:

> So perhaps, if the ABI is broken anyway, it's worth the time to *also* make
> ares_options private and add manipulation methods? "Once and for all", as
> it were?

Yeah, that public ares_options struct certainly makes it a bit too easy to
break the ABI. It clearly seems we've already broken it so we better make the
best of the situation.

I can think of several different ways to improve ABI "survival rate" (in an
order of increasing work amount):

A very minor thing that would help is a "size of struct" field that
ares_save_options() could use to work even with added fields.

A somewhat bigger change is to require a particular ares function to allocate
and return the struct, so that it could set internal magic in it too to deal
with different sizes in the future etc.

The biggest change would be to simply not expose the struct and introduce a
ares_setopt() style function for setting specific options on the channel
handle. This is the way we did it in libcurl and it has proven to be very good
for maintaining ABI even when larger changes are done.

-- 
  / daniel.haxx.se
Received on 2008-11-27