BIND 10 #1602: Introduce dns::LabelSequence class

BIND 10 Development do-not-reply at isc.org
Thu Mar 1 11:02:04 UTC 2012


#1602: Introduce dns::LabelSequence class
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  vorner
  jinmei                             |                Status:  reviewing
                       Type:  task   |             Milestone:
                   Priority:  major  |  Sprint-20120306
                  Component:         |            Resolution:
  libdns++                           |             Sensitive:  0
                   Keywords:         |           Sub-Project:  DNS
            Defect Severity:  N/A    |  Estimated Difficulty:  7
Feature Depending on Ticket:  auth   |           Total Hours:  0
  performance                        |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Changes (by jelte):

 * owner:  jelte => vorner


Comment:

 Replying to [comment:11 vorner]:
 >
 > Your clock seem to be off by quite a lot, did you run ntp recently? ;-)
 > {{{#!c++
 > // Copyright (C) 2009  Internet Systems Consortium, Inc. ("ISC")
 > }}}
 >

 Wait, what year is this then?

 But good point, fixed :)

 > This could go to the initalizers of the constructor as well:
 > {{{#!c++
 > last_label_ = name.getLabelCount();
 > }}}
 >

 ack

 >
 > However, I don't think it is a good idea here to distinguish the ends by
 positive/negative integers. I think two separate methods would be better
 in this case ‒ I don't see any way this could be more convenient and it is
 possibly more confusing.
 >

 ok, split up split into split and split, er, leftSplit() and rightSplit()

 > The offsets are created each time it is created. However, as the `Name`
 object must have go through the lengths as well (because it counted the
 labels), wouldn't it be better to put the offsets vector into the name and
 only access that one? (This would also make the class much more
 lightweight, since there'd be one pointer and two `size_t` integers).
 >
 > And, the `at_p` (besides having the wrong capitalization) could be made
 private and `LabelSequence` made a friend. It sounds cleaner to me than
 the current „not recommended to any use“ way.

 Also per discussion on the jabber room, I made it a friend class indeed,
 not only can it then simply use the Name's offsets vector, at_p() isn't
 even necessary anymore (as getData can then get the address directly.

-- 
Ticket URL: <http://bind10.isc.org/ticket/1602#comment:12>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list