<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>
        <span>Hi, all.
        </span></div><div><span><br></span></div><div><span>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?</span></div><div><span><br></span></div><div><span>The lib/table.c implements some kind of Trie. I guess it is Patricia Trie, am I right? </span></div><div><span>I make some search about </span><span style="line-height: 22.4px;">Trie and found that </span>LSDB <span style="line-height: 22.4px;">use some parameters</span><span style="line-height: 22.4px;"> of</span><span style="line-height: 22.4px;"> link state advertisement (LSA) as the key to store each LSA into the Trie. </span></div><div><span style="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. (</span>ospf6_lsdb_add() in ospf6_lsdb.c<span style="line-height: 22.4px;">)</span></div><div><span style="line-height: 22.4px;">The key is stored in a </span><span style="line-height: 1.6;">prefix_ipv6 structure. </span></div><div><span style="line-height: 22.4px;">In summary, the </span>LSDB<span style="line-height: 22.4px;">uses 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 </span>LSA <span style="line-height: 22.4px;">for an </span>LSDB<span style="line-height: 22.4px;">. Am I right? </span></div><div><span style="line-height: 22.4px;"><br></span></div><div><span style="line-height: 22.4px;">Thanks.</span></div><div><span style="line-height: 22.4px;"><br></span></div><div><span style="line-height: 22.4px;">York.</span></div><div><br></div><div>
    </div>
    <div  style="font-family:'微软雅黑'">
        
        <div style="font-size:14px; padding: 0;  margin:0;">

        </div>
    </div>
</div><!--😀-->
</div>
</body>
</html>