BIND 10 #2093: implement RBNode Node::getAbsoluteLabelSequence
BIND 10 Development
do-not-reply at isc.org
Tue Jul 3 06:18:04 UTC 2012
#2093: implement RBNode Node::getAbsoluteLabelSequence
-------------------------------------+-------------------------------------
Reporter: | Owner:
jinmei | Status: new
Type: task | Milestone: Next-Sprint-
Priority: | Proposed
medium | Resolution:
Component: data | Sensitive: 0
source | 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:
> This returns a LabelSequence object corresponding to the absolute name
> of the node. Since the node itself may not be absolute, it generally
> needs to use the newly introduced "getUpLevelNode()" method. We'll
> need this for message rendering, so it should be efficient as well as
> safe. In my experiment I'll let the call pass sufficient size of
> buffers for name and offset data, and have the method fill in the
> buffer, and then construct the LabelSequence. Assuming the buffers
> can be reasonably reused this is probably okay in terms of efficiency,
> but may not be very safe. we may want to introduce an extension to
> LabelSequence so keep its user as agnostic as possible about its
> internal.
>
> On top of this, I also suggest adding Node::getAbsoluteName()
> method. It calls getAbsoluteLabelSequence and construct a name
> object and returns it. It's inefficient, but will be more
> convenient for things like debug logging.
>
> Depends on #2091, #2092
New description:
This returns a `LabelSequence` object corresponding to the absolute name
of the node. Since the node itself may not be absolute, it generally
needs to use the newly introduced "getUpLevelNode()" method. We'll
need this for message rendering, so it should be efficient as well as
safe. In my experiment I'll let the caller pass sufficient size of
buffers for name and offset data, and have the method fill in the
buffer, and then construct the `LabelSequence`:
{{{#!cpp
dns::LabelSequence getAbsoluteLabelSequence(
uint8_t namebuf[dns::Name::MAX_WIRE],
uint8_t offsetbuf[dns::Name::MAX_LABELS]) const
}}}
Assuming the buffers can be reasonably reused this is probably okay in
terms of efficiency, but may not be very safe. we may want to
introduce an extension to `LabelSequence` in order to keep its user as
agnostic as possible about its internal.
On top of this, I also suggest adding Node::getAbsoluteName()
method. It calls getAbsoluteLabelSequence and construct a name
object and returns it. It's inefficient, but will be more
convenient for things like debug logging.
Depends on #2091, #2092
--
--
Ticket URL: <http://bind10.isc.org/ticket/2093#comment:2>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list