BIND 10 #2409: define complete RRtype instances without having Rdata definition

BIND 10 Development do-not-reply at isc.org
Thu Oct 25 19:13:36 UTC 2012


#2409: define complete RRtype instances without having Rdata definition
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  defect        |  UnAssigned
            Priority:  medium        |                       Status:  new
           Component:  libdns++      |                    Milestone:  Next-
           Sensitive:  0             |  Sprint-Proposed
         Sub-Project:  DNS           |                     Keywords:
Estimated Difficulty:  0             |              Defect Severity:  N/A
         Total Hours:  0             |  Feature Depending on Ticket:
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
 Currently we don't define `RRType` instances for types that don't have
 corresponding Rdata derived classes with a few special exceptions
 hardcoded in the placeholder file (namely, IXFR, AXFR, and ANY).
 Same for RR classes for 0 ("NONE") and 254 ("ANY").

 This causes some inconvenience.  The most notable one is that textual
 conversion doesn't work well.  For example,
 {{{#!cpp
     RRType rrtype_a("A"); // okay
     RRType rrtype_axfr("AXFR"); // fail with exception
     RRType::A().toText(); // returns "A"
     RRType::AXFR().toText(); // returns "TYPE252", counter intuitive.
 }}}

 This has been a known issue for quite some time, and is now becoming
 more problematic, e.g., in implementing per RR type statistics.  So
 it's probably the time to fix this.

 I propose the following approach:
 - for any pre-defined RR types that don't have corresponding Rdata
   definition (including meta types like AXFR and types that we simply
   haven't supported Rdata, like A6), create a dummy header file
   under the dns/rdata directory.  example: dns/rdata/in_1/a6_38.h
   it may just be empty or would have some special keyword indicating
   it's a dummy file.
 - update gen-rdatacode.py so that if a particular type header file
   indicates it doesn't have Rdata it only generates RRType
   definitions.  would also need to update generate_rrparam() so
   `RRParamRegistry` has complete mapping between text and type/class
   codes.
 - do the same thing for meta classes, but in this case we'll use
   empty directories.
 - we can then remove hardcoded special cases.

-- 
Ticket URL: <http://bind10.isc.org/ticket/2409>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list