internet: (fixes #1232) Make routerId a static private member of GlobalRouteManager

This commit is contained in:
shashwat
2025-06-06 16:20:56 +05:30
committed by shashwat
parent 9231d8bf04
commit 851e8b37cc
2 changed files with 5 additions and 1 deletions

View File

@@ -25,6 +25,8 @@ NS_LOG_COMPONENT_DEFINE("GlobalRouteManager");
//
// ---------------------------------------------------------------------------
uint32_t GlobalRouteManager::routerId = 0;
void
GlobalRouteManager::DeleteGlobalRoutes()
{
@@ -50,7 +52,6 @@ uint32_t
GlobalRouteManager::AllocateRouterId()
{
NS_LOG_FUNCTION_NOARGS();
static uint32_t routerId = 0;
return routerId++;
}

View File

@@ -59,6 +59,9 @@ class GlobalRouteManager
* per-node forwarding tables
*/
static void InitializeRoutes();
private:
static uint32_t routerId; //!< Router ID counter
};
} // namespace ns3