[bind10-dev] DNS message API: resource data classes

Francis Dupont fdupont at isc.org
Mon Aug 17 09:29:22 UTC 2009


Some questions about resource data classes:
 - what is DNSInvalidSubstitution? (still unused)

 - why there is no getClass() method in Rdata abstract class?

 - how the fact some types exist only in a particular class
  will be handled? BTW I like the way dnspython solves this
  through name spaces.

 - I can't see a virtual fromText(), I believe the idea is to
  provide it in constructors of subclasses and with an external
  factory function, isn't it?
 - there is no comparaison virtual function. I have no problem
  with limiting comparaison between Rdatas inside the same
  subclass (i.e., rdatatype and rdataclass must be the same) even
  we need full comparaison (i.e., not only == and !=).
  Note DNSSEC requires a more generic comparaison between rdatasets.
 - why _rdclass and _rdtype are not defined in Rdata class itself
  (i.e., Rdata class has not to be fully abstract).
 - there are a lot of cases we'd like to see a XXRdata to be
  a WireRdata too, and the opposite. So the separate class is
  perhaps a bad idea, I imagine more a cache in the Rdata class itself.
 - obviously ARdata, AAAARdata, etc, should go into their own files.
 - toWire/fromWire implies string copies, IMHO we should imagine
  a buffer class and overload these methods.

 - IMHO RdataSet could be sorted. If it is always kept sorted some
  operations are easier but this has a cost of all others. Perhaps
  we simply need a flag to keep the sorted/unsorted state.

 - I have a question about the covers of RRSIG RR. BTW can two RRSIG
  RRs with different covers be members of the same RRset? I don't
  believe (nor dnspython).

 - should RR be a subclass of Rdata?

 - we need the fromText() and fromWire() functions (note, not methods).
  I don't know how C++ gives access to the class lookup but there should
  be a way to write the equivalent of dnspython get_rdata_class()
  (without dynamic loading :-).

 - we need a GenericRdata to catch unknown class/types.

Francis_Dupont at isc.org



More information about the bind10-dev mailing list