<html>
<head>
    <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
</head>
<body>
<style>
    font{
        line-height: 1.6;
    }
    ul,ol{
        padding-left: 20px;
        list-style-position: inside;
    }
</style>
<div style = 'font-family:微软雅黑,Verdana,"Microsoft Yahei",SimSun,sans-serif; line-height:1.6;'>
    <div ><div>
    <div>
        <div style="color: rgb(49, 53, 59); font-family: Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px; clear: both;"><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px;">Hi, all.</div><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px;"><br></div><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px;">I am currently reading the source code of ospf6d. I found it hard to understand the link state data base (LSDB) part. After some digging, I make some conclusions as follows. Could anyone tell me whether my understanding is right or not?</div><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px;"><br></div><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px;">The lib/table.c implements some kind of Trie. I guess it is Patricia Trie, am I right? </div><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px;">I make some search about Trie and found that LSDB use some parameters of link state advertisement (LSA) as the key to store each LSA into the Trie. </div><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px;">The key is constituted by 2 byte type + 4 byte adv_router and 4 byte link state ID and totally 80 bit. (ospf6_lsdb_add() in ospf6_lsdb.c)</div><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px;">The key is stored in a <span style="line-height: 1.6;">prefix_ipv6 structure. </span></div><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px;">In summary, the LSDBuses route table in lib/table.c to store the LSA and also borrow the prefix_ipv6 structure to store the key. The lib/table.c not only stores the route for a route table, but also stores LSA for an LSDB. Am I right? </div></div><div style="color: rgb(49, 53, 59); font-family: Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px; clear: both;"><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px;"><br></div></div><div style="color: rgb(49, 53, 59); font-family: Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px; clear: both;"><div style="line-height: 22.4px;"></div><div style="line-height: 22.4px;"><em><span style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif;">ps. I don't know why the email I sent do not have the text and the dev Archives display "An HTML attachment was scrubbed...". So I reply the thread with the text again. Sorry for bother you.</span></em></div></div><div style="color: rgb(49, 53, 59); font-family: Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px; clear: both;"><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px;"><br></div></div><div style="color: rgb(49, 53, 59); font-family: Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px; clear: both;"><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px;"></div><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px;">Thanks.</div><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px;"><br></div><div style="font-family: 微软雅黑, Verdana, 'Microsoft Yahei', SimSun, sans-serif; line-height: 22.4px;">York.</div></div><span>
            
        </span>
    </div>
    </div></div><div class="J-reply" style="background-color:#f2f2f2;color:black;padding-top:6px;padding-bottom:6px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;margin-top:45px;margin-bottom:20px;font-family:'微软雅黑';"><div style="font-size:12px;line-height:1.5;word-break:break-all;margin-left:10px;margin-right:10px">On <span class="mail-date">6/29/2020 21:48</span>,<a class="mail-to" style="text-decoration:none;color:#2a83f2;" href="mailto:dev@lists.frrouting.org">yanhc519 via dev<dev@lists.frrouting.org></a> wrote: </div>
</div>
<blockquote id="ntes-pcmail-quote" style="margin: 0; padding: 0; font-size: 14px; font-family: '微软雅黑';">
_______________________________________________<br>dev mailing list<br>dev@lists.frrouting.org<br>https://lists.frrouting.org/listinfo/dev<br></blockquote><!--😀-->
</div>
</body>
</html>