Node:Tree modules, Next:, Previous:VLANs, Up:Top

Tree modules

List of nodes

The module nodesl.h implements functions dealing with list of nodes. These lists are used to help some tree-related functions. They are typically used to store a list of host_id.

Tree Manipulation

The module tree_traversing.h implements functions dealing with the manipulation of trees. These functions are usefull to implement the module fusion.


This module fusion.h implements functions that builds the fusion of two trees. The function fusion doesn't modify the two trees which you want to merge. It builds a new tree which results of the fusion of thesetwo trees. If there isn't any common node between both trees, or if a buckle appears, the working of fusion has been given up. At the begining, this function copies the first tre given as parameter. By this way, we obtain a new tree. It researches, during the traversing in depth of the first tree, the first node which belongs also to the second tree. It centers the second tree on this node. Finally, it traverses in depth the second tree modified and adds to the new tree the branches which has not yet in the first tree. It 's this new tree the result of the fusion of two trees.

Warning The trees entered can not have yet information about VLANS. In this case, you have to precise the value of the VlAN of each trees thanks to the parameters num_vlan1 and num_vlan2. If the tree entried has information about VLANS, you give the value -1 to the parameter num_vlan.