internet: (fixes #1232) Add a function to reset routerId in GlobalRouteManager
This commit is contained in:
@@ -55,4 +55,10 @@ GlobalRouteManager::AllocateRouterId()
|
|||||||
return routerId++;
|
return routerId++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
GlobalRouteManager::ResetRouterId()
|
||||||
|
{
|
||||||
|
routerId = 0;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace ns3
|
} // namespace ns3
|
||||||
|
|||||||
@@ -60,6 +60,13 @@ class GlobalRouteManager
|
|||||||
*/
|
*/
|
||||||
static void InitializeRoutes();
|
static void InitializeRoutes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Reset the router ID counter to zero. This should only be called by tests to reset the
|
||||||
|
* router ID counter between simulations within the same program. This function should not be
|
||||||
|
* called In typical simulations or when using the GlobalRouting helper.
|
||||||
|
*/
|
||||||
|
static void ResetRouterId();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static uint32_t routerId; //!< Router ID counter
|
static uint32_t routerId; //!< Router ID counter
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user