forest-net
an overlay networks for large-scale virtual worlds
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
BuildRtables.cpp File Reference
#include <string>
#include <queue>
#include "stdinc.h"
#include "Forest.h"
#include "NetInfo.h"
#include "ComtInfo.h"
#include "IfaceTable.h"
#include "QuManager.h"
#include "LinkTable.h"
#include "ComtreeTable.h"
Include dependency graph for BuildRtables.cpp:

Go to the source code of this file.

Functions

bool buildIfaceTable (int, const NetInfo &, IfaceTable &)
 usage: BuildRtables <netConfigFile More...
 
bool buildLinkTable (int, const NetInfo &, LinkTable &)
 
bool buildComtTable (int, const NetInfo &, ComtInfo &, ComtreeTable &)
 
int main ()
 
int findParentLink (int r, int ctx, const NetInfo &net, const ComtInfo &comtrees)
 Find the link to the parent of a node in a comtree. More...
 

Detailed Description

Author
Jon Turner
Date
2011

This is open source software licensed under the Apache 2.0 license. See http://www.apache.org/licenses/LICENSE-2.0 for details.

Definition in file BuildRtables.cpp.

Function Documentation

bool buildIfaceTable ( int  r,
const NetInfo net,
IfaceTable ift 
)

usage: BuildRtables <netConfigFile

Build router configuration tables from a network configuration file. For each router named in the file build its interface table, its link table and its comtree table. For a router named foo, these tables will be written in files foo/ift, foo/lt and foo/ctt.

Definition at line 104 of file BuildRtables.cpp.

Here is the call graph for this function:

int findParentLink ( int  r,
int  ctx,
const NetInfo net,
const ComtInfo comtrees 
)

Find the link to the parent of a node in a comtree.

Link to parent is found by doing a tree-traversal from the comtree root.

Parameters
ris the node whose parent link we're looking for
ctxis the index of the comtree of interest in the NetInfo object
netis the NetInfo object
Returns
the link number of the link connecting r to its parent, or 0 if r is the root, or -1 on an error

Definition at line 165 of file BuildRtables.cpp.

Here is the call graph for this function: