next up previous contents index
Next: 6.3 Node routing interface Up: 6. ns-3 routing Previous: 6.1 Overview   Contents   Index

6.2 RouteManager

This is some type of static or singleton object that performs the following operations. It doesn't have to be particularly efficient or fast (at least initially) because it only executes once (per node) at the beginning of the simulation.

We should try to find applicable code for at least the SP computation sections below. There are plenty of Dijkstra examples on the web. GTNetS RoutingStatic class also probably could be used as a basis for this.

enum AddressFamily {
  Ipv4,
  Ipv6,
  ...
};

enum RouteMetric {
  UnitCost,
  InverseBandwidth,
  ...
};

// public function
bool
RouteManager::ComputeRoutes(Ptr<Node> n, uint8_t addressFamily, uint8_t routeMetric) {
  /*
   walkNodeListToBuildTopology(addressFamily, routeMetric);
   useDijkstraSPToCreateRoutes(n);
   populateNodeTables(n); 
   */
} 

// public (non-member?) function
bool
ComputeAllRoutes(uint8_t addressFamily, uint8_t routeMetric) {
   /* 
   for each Node in the NodeList {
      RouteManager::ComputeRoutes(n, addressFamily, routeMetric);
   }
   */
}



Tom Henderson 2007-06-17