[bind10-dev] the responsibility of rbtree in BIND10
feng
hanfeng at cnnic.cn
Tue Nov 16 04:53:34 UTC 2010
Now I am porting RBTree from bind9 to bind10. Instead of porting, I am writing the code from scratch, according to the attached document, I think the
Responsibility of RBTree will be as follows.
>From outside (who gonna use the tree), it’s a map, the type of the key is domain name (the Name instance in bind10) and the value can be anything, so if used it for one zone, the value will be rrsets. If used for one zone table, the value maybe the pointer of the data source.
>From implementation point of view, the map is build on red black tree and with one more down pointer which will point to sub domain names .
with the following domain names,
a x.d.e.f o.w.y.d.e.f
b z.d.e.f p.w.y.d.e.f
c g.h q.w.y.d.e.f
the tree will looks like:
b
/ \
a d.e.f
/|\
c | g.h
|
w.y
/|\
x | z
|
p
/ \
o q
Is it what we want?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20101116/d48ed78d/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: red-black.txt
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20101116/d48ed78d/attachment.txt>
More information about the bind10-dev
mailing list