[Olsr-dev] SPTree edges
Sun Aug 8 12:57:09 CEST 2010
Am Samstag 07 August 2010, 23:57:13 schrieb Saulo Jorge Queiroz:
> Hi all,
> I've worked on incremental procedures for shortest path computation. One
> question I have in this context is:
> based on current spf/routingtable data structures could one give me a point
> about the best (or at least a good) way of checking whether a given edge
> "is in" the shortest path tree whether not?
At the moment I'm not sure OLSRd stores this value. The whole SPF calculation
is done in olsr_spf.c.
If you look at the function olsr_spf_relax(), you will find the code that
overwrite a "shortest path to a node" decission. At this point you might set
up an additional pointer from the tc_node to the tc_edge_node which points to
the next step back towards the root node of the tree. You just have to make
sure to erase that pointer when you remove an edge (see tc_set.c).
To check if an edge is "used" for the SPF-tree, just check if it's used by one
of it's two tc_nodes as a way towards the root.
1) You can't win.
2) You can't break even.
3) You can't leave the game.
— The Laws of Thermodynamics, summarized
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: This is a digitally signed message part.
More information about the Olsr-dev