[bind10-dev] AbstractRRsets and RRSIGs

Stephen Morris stephen at isc.org
Thu Jan 26 08:02:53 UTC 2012


Have just taken a brief look at #1604 (reorganise RRset hierarchy).
The ticket suggests that we need to make sure that the external
interface uses AbstractRRset objects instead of RRsets.

The current inheritance hierarchy is:

AbstractRRset - the interface
   |
BasicRRset - a concrete implementation of a RRset
   |
RRset - as for BasicRRset but with a pointer to the associated RRsig.

Some of the methods that will be affected (such as
Message::addRRset(), mentioned in the ticket) require that the passed
object support the addRRsig() and getRRsig() methods.

My initial thought was to move the add/getRRsig() methods to
AbstractRRset.  This is the simplest solution but:

a) It breaks the model of an RRset - an RRset can exist without an
associated RRSIG RRset, so should the interface defining what an RRset
is have methods referencing an associated set of RRSIGs?
c) There is no longer a distinction between BasicRRset and RRset.

In practice though, there doesn't appear to be anything using
BasicRRset as anything other than a base class for RRset: and there
does not seem to be any reason why, for BIND 10, we can't define an
RRset object as containing a pointer to an RRSIG RRset.

However, the RRset class is pretty fundamental to BIND 10, and I
didn't want to change something at such a low level without getting
agreement.  Thoughts?

Stephen




More information about the bind10-dev mailing list