single populate call

This commit is contained in:
Craig Dowell
2007-07-23 15:53:37 -07:00
parent bb8c8e5fa8
commit 2f682ca9f8
3 changed files with 24 additions and 5 deletions

View File

@@ -143,8 +143,7 @@ int main (int argc, char *argv[])
if (RoutingEnvironment::StaticRoutingEnabled ())
{
StaticRouteManager::BuildStaticRoutingDatabase ();
StaticRouteManager::InitializeRoutes ();
StaticRouteManager::PopulateRoutingTables ();
}
// Create the OnOff application to send UDP datagrams of size

View File

@@ -28,6 +28,13 @@ namespace ns3 {
//
// ---------------------------------------------------------------------------
void
StaticRouteManager::PopulateRoutingTables ()
{
BuildStaticRoutingDatabase ();
InitializeRoutes ();
}
void
StaticRouteManager::BuildStaticRoutingDatabase ()
{

View File

@@ -33,18 +33,31 @@ namespace ns3 {
class StaticRouteManager
{
public:
/**
* @brief Build a routing database and initialize the routing tables of
* the nodes in the simulation.
*
* All this function does is call BuildStaticRoutingDatabase () and
* InitializeRoutes (). There's no reason to export the two-step process
* since a high-level caller has no need to know how we're implementing the
* process.
*
* @see BuildStaticRoutingDatabase ();
* @see InitializeRoutes ();
*/
static void PopulateRoutingTables ();
private:
/**
* @brief Build the routing database by gathering Link State Advertisements
* from each node exporting a StaticRouter interface.
*
*/
static void BuildStaticRoutingDatabase();
static void BuildStaticRoutingDatabase ();
/**
* @brief Compute routes using a Dijkstra SPF computation and populate
* per-node forwarding tables
*/
static void InitializeRoutes();
private:
static void InitializeRoutes ();
/**
* @brief Static Route Manager copy construction is disallowed. There's no
* need for it and a compiler provided shallow copy would be hopelessly wrong.