BIND 10 #2087: add LabelSequence::getOffsetData() method

BIND 10 Development do-not-reply at isc.org
Sat Jun 30 06:35:10 UTC 2012


#2087: add LabelSequence::getOffsetData() method
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  UnAssigned
  jinmei                             |                Status:  new
                       Type:  task   |             Milestone:  Next-Sprint-
                   Priority:         |  Proposed
  medium                             |            Resolution:
                  Component:         |             Sensitive:  0
  libdns++                           |           Sub-Project:  DNS
                   Keywords:         |  Estimated Difficulty:  0
            Defect Severity:  N/A    |           Total Hours:  0
Feature Depending on Ticket:         |
  scalable inmemory                  |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Description changed by jinmei:

Old description:

> It's the offset version of getData().
>
> This should be easy, so let's piggy back this: Extend
> MessageRenderer::writeName so it can take LabelSequence We should
> be able to do this so we don't have to construct a name object from
> in-memory encoded data.
>
> Better to do this after #2086.

New description:

 It's the offset version of getData().

 This should be easy, so let's piggy back this: Extend
 MessageRenderer::writeName so it can take `LabelSequence`.  We should
 be able to do this so we don't have to construct a name object from
 in-memory encoded data.

 Unlike getData(), however, there's one non trivial issue: the internal
 offset values would have to be adjusted because stripRight/Left
 (rightly) doesn't adjust them.  In my experiment I passed a placeholder
 and let the method fill in it

 {{{#!cpp
     const uint8_t* getOffsetData(size_t* len,
                                  uint8_t placeholder[Name::MAX_LABELS])
 const;
 }}}

 but this may not be a cleanest way to do it.  Please consider if
 there's a better way.  This method won't be used the most performance
 sensitive path (like find() or rendering) so it could be relatively
 less efficient.

 Better to do this after #2086.

--

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


More information about the bind10-tickets mailing list