回复:[dev] About how the LSA of ospf6d is stored in an LSDB?

yanhc519 yanhc519 at aliyun.com
Mon Jun 29 14:27:51 UTC 2020


Hi, all.

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?

The lib/table.c implements some kind of Trie. I guess it is Patricia Trie, am I right? 
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. 
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)
The key is stored in a prefix_ipv6 structure. 
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? 

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.

Thanks.

York.



------------------------------------------------------------------
发件人:yanhc519 via dev <dev at lists.frrouting.org>
发送时间:2020年6月29日(星期一) 21:48
收件人:dev at lists.frrouting.org <dev at lists.frrouting.org>
主 题:[dev] About how the LSA of ospf6d is stored in an LSDB?

_______________________________________________
dev mailing list
dev at lists.frrouting.org
https://lists.frrouting.org/listinfo/dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.frrouting.org/pipermail/dev/attachments/20200629/617008f2/attachment.htm>


More information about the dev mailing list