RouteManager
provides a unified interface to adding and deleting routes between nodes in the simulated topology.
More...
#include <routedb.h>
Public Member Functions | |
void | addRoute (u_int src, u_int dest, u_int rtSize, int *rt) |
Add a route to the specified node's database. | |
int * | getRoute (u_int src, u_int dest) |
Search the route tables for any existing route between the source and destination. | |
u_int | getRouteSize (u_int src, u_int dest) |
Get the route size for the existing route between the source and destination. | |
RouteManager (u_int size) | |
Construct a new RouteManager object of the provided size. | |
Static Public Member Functions | |
void | parseRouteFile (RouteManager *rm, std::string filename) |
Parse an input route file and populate the route manager. | |
Protected Attributes | |
Routedb * | _rdb |
An instance of the route database. | |
u_int | _size |
Size of the route database - one for every node. |
RouteManager
provides a unified interface to adding and deleting routes between nodes in the simulated topology.
The class is essentially an implementation of a simple heirarchical database of all routes between a node and other possible destinations. Output from a routing process can store the computed routes in this database.
|
Construct a new
|
|
Add a route to the specified node's database.
|
|
Search the route tables for any existing route between the source and destination.
|
|
Get the route size for the existing route between the source and destination.
|
|
Parse an input route file and populate the route manager. An example format of the route file is as follows (For example, a route between 0 and 8 between 5 and 3 0 8 4 4 0 5 3 8
|
|
An instance of the route database.
|
|
Size of the route database - one for every node.
|