Re: [mpls-linux-general] What does the RADIX_* do?
Status: Beta
Brought to you by:
jleu
From: James R. L. <jl...@mi...> - 2002-01-21 18:11:22
|
On Mon, Jan 21, 2002 at 04:34:44AM -0800, Cheng Zhengchao wrote: > Hi,All, > > When I read the codes of mpls*.c in the > /usr/src/linux/net/mpls,I find I can not catch what > the RADIX_* do.Can anyone help me to understand The corect name is a radix trie. Which is basically a tree (binary or otherwise) that can support variable length keys. I wrote the RADIX* macros when I was studying differnt way to optimize the storage of the internet routing table. I use it now because I'm lazy :-) It provides a pretty speedy look up, but I never fully take advantage of the trie, the keys I store in it are always 32 bits in length. Someday I'll replace RADIX* with some sort of multilevel hash. You don't need to understand RADIX* to understand the MPLS implementation. Just think of them as easy ways to save and retireve info by a 32 bit key. > it?What do them to do? > At the same time,mpls_label2key() is used to get the > key,but I wonder how can it get the mark?and what is The structure mpls_key is a union. If you understand how a union works it becomes quit evident how I get 'mark' from it. > the role of key in the RADIX_*? > Thanks for your help in advance. > > Yours Sincerely > Cheng > > __________________________________________________ > Do You Yahoo!? > Send FREE video emails in Yahoo! Mail! > http://promo.yahoo.com/videomail/ > > _______________________________________________ > mpls-linux-general mailing list > mpl...@li... > https://lists.sourceforge.net/lists/listinfo/mpls-linux-general -- James R. Leu |