<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Arial Unicode MS";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"\@Arial Unicode MS";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Arial Unicode MS","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>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<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>Responsibility of RBTree will be as follows.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>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 .<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>with the following domain names, <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>a       x.d.e.f     o.w.y.d.e.f<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>b       z.d.e.f     p.w.y.d.e.f<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>c       g.h         q.w.y.d.e.f<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>the tree will looks like:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>                                b<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>                              /   \<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>                             a    d.e.f<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>                                   /|\<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>                                 c | g.h<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>                                    |<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>                                   w.y<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>                                   /|\<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>                                  x | z<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>                                    |<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>                                    p<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>                                   / \<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>                                  o   q<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Arial Unicode MS","sans-serif"'>Is it what we want?<o:p></o:p></span></p></div></body></html>