<div class="__aliyun_email_body_block"><div  style="clear:both;"><div  style="color:#31353b;font-family:微软雅黑,Verdana,Microsoft Yahei,SimSun,sans-serif;font-size:14.0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:22.4px;text-align:start;text-indent:.0px;text-transform:none;widows:1;">Hi, all.</div><div  style="color:#31353b;font-family:微软雅黑,Verdana,Microsoft Yahei,SimSun,sans-serif;font-size:14.0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:22.4px;text-align:start;text-indent:.0px;text-transform:none;widows:1;"><br ></div><div  style="color:#31353b;font-family:微软雅黑,Verdana,Microsoft Yahei,SimSun,sans-serif;font-size:14.0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:22.4px;text-align:start;text-indent:.0px;text-transform:none;widows:1;">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="color:#31353b;font-family:微软雅黑,Verdana,Microsoft Yahei,SimSun,sans-serif;font-size:14.0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:22.4px;text-align:start;text-indent:.0px;text-transform:none;widows:1;"><br ></div><div  style="color:#31353b;font-family:微软雅黑,Verdana,Microsoft Yahei,SimSun,sans-serif;font-size:14.0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:22.4px;text-align:start;text-indent:.0px;text-transform:none;widows:1;">The lib/table.c implements some kind of Trie. I guess it is Patricia Trie, am I right? </div><div  style="color:#31353b;font-family:微软雅黑,Verdana,Microsoft Yahei,SimSun,sans-serif;font-size:14.0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:22.4px;text-align:start;text-indent:.0px;text-transform:none;widows:1;">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="color:#31353b;font-family:微软雅黑,Verdana,Microsoft Yahei,SimSun,sans-serif;font-size:14.0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:22.4px;text-align:start;text-indent:.0px;text-transform:none;widows:1;">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="color:#31353b;font-family:微软雅黑,Verdana,Microsoft Yahei,SimSun,sans-serif;font-size:14.0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:22.4px;text-align:start;text-indent:.0px;text-transform:none;widows:1;">The key is stored in a <span  style="line-height:1.6;">prefix_ipv6 structure. </span></div><div  style="color:#31353b;font-family:微软雅黑,Verdana,Microsoft Yahei,SimSun,sans-serif;font-size:14.0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:22.4px;text-align:start;text-indent:.0px;text-transform:none;widows:1;">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="clear:both;"><div  style="color:#31353b;font-family:微软雅黑,Verdana,Microsoft Yahei,SimSun,sans-serif;font-size:14.0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:22.4px;text-align:start;text-indent:.0px;text-transform:none;widows:1;"><br ></div></div><div  style="clear:both;"><div  style="line-height:22.4px;text-align:start;text-indent:.0px;widows:1;"></div><div  style="line-height:22.4px;text-align:start;text-indent:.0px;widows:1;"><em ><span  style="color:#31353b;font-family:微软雅黑,Verdana,Microsoft Yahei,SimSun,sans-serif;font-size:14.0px;font-variant:normal;font-weight:normal;text-transform:none;">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="clear:both;"><div  style="color:#31353b;font-family:微软雅黑,Verdana,Microsoft Yahei,SimSun,sans-serif;font-size:14.0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:22.4px;text-align:start;text-indent:.0px;text-transform:none;widows:1;"><br ></div></div><div  style="clear:both;"><div  style="color:#31353b;font-family:微软雅黑,Verdana,Microsoft Yahei,SimSun,sans-serif;font-size:14.0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:22.4px;text-align:start;text-indent:.0px;text-transform:none;widows:1;"></div><div  style="color:#31353b;font-family:微软雅黑,Verdana,Microsoft Yahei,SimSun,sans-serif;font-size:14.0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:22.4px;text-align:start;text-indent:.0px;text-transform:none;widows:1;">Thanks.</div><div  style="color:#31353b;font-family:微软雅黑,Verdana,Microsoft Yahei,SimSun,sans-serif;font-size:14.0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:22.4px;text-align:start;text-indent:.0px;text-transform:none;widows:1;"><br ></div><div  style="color:#31353b;font-family:微软雅黑,Verdana,Microsoft Yahei,SimSun,sans-serif;font-size:14.0px;font-style:normal;font-variant:normal;font-weight:normal;line-height:22.4px;text-align:start;text-indent:.0px;text-transform:none;widows:1;">York.</div><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div><blockquote  style="margin-right:.0px;margin-top:.0px;margin-bottom:.0px;"><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">------------------------------------------------------------------</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">发件人:yanhc519 via dev <dev@lists.frrouting.org></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">发送时间:2020年6月29日(星期一) 21:48</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">收件人:dev@lists.frrouting.org <dev@lists.frrouting.org></span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;">主 题:[dev] About how the LSA of ospf6d is stored in an LSDB?</span></div><div  style="clear:both;"><span  style="font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><br ></span></div>_______________________________________________<br >dev mailing list<br >dev@lists.frrouting.org<br >https://lists.frrouting.org/listinfo/dev<br ></blockquote><div ><br ></div></div>