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.
On 6/29/2020 21:48yanhc519 via dev<dev@lists.frrouting.org> wrote:
_______________________________________________
dev mailing list
dev@lists.frrouting.org
https://lists.frrouting.org/listinfo/dev