A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
global-route-manager.cc
Go to the documentation of this file.
1
/*
2
* Copyright 2007 University of Washington
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Tom Henderson (tomhend@u.washington.edu)
7
*/
8
9
#include "
global-route-manager.h
"
10
11
#include "
global-route-manager-impl.h
"
12
13
#include "ns3/assert.h"
14
#include "ns3/log.h"
15
#include "ns3/simulation-singleton.h"
16
17
namespace
ns3
18
{
19
20
NS_LOG_COMPONENT_DEFINE
(
"GlobalRouteManager"
);
21
22
// ---------------------------------------------------------------------------
23
//
24
// GlobalRouteManager Implementation
25
//
26
// ---------------------------------------------------------------------------
27
28
uint32_t
GlobalRouteManager::routerId
= 0;
29
30
void
31
GlobalRouteManager::DeleteGlobalRoutes
()
32
{
33
NS_LOG_FUNCTION_NOARGS
();
34
SimulationSingleton<GlobalRouteManagerImpl>::Get
()->DeleteGlobalRoutes();
35
}
36
37
void
38
GlobalRouteManager::BuildGlobalRoutingDatabase
()
39
{
40
NS_LOG_FUNCTION_NOARGS
();
41
SimulationSingleton<GlobalRouteManagerImpl>::Get
()->BuildGlobalRoutingDatabase();
42
}
43
44
void
45
GlobalRouteManager::InitializeRoutes
()
46
{
47
NS_LOG_FUNCTION_NOARGS
();
48
SimulationSingleton<GlobalRouteManagerImpl>::Get
()->InitializeRoutes();
49
}
50
51
uint32_t
52
GlobalRouteManager::AllocateRouterId
()
53
{
54
NS_LOG_FUNCTION_NOARGS
();
55
return
routerId
++;
56
}
57
58
void
59
GlobalRouteManager::ResetRouterId
()
60
{
61
routerId
= 0;
62
}
63
64
}
// namespace ns3
ns3::GlobalRouteManager::DeleteGlobalRoutes
static void DeleteGlobalRoutes()
Delete all static routes on all nodes that have a GlobalRouterInterface.
Definition
global-route-manager.cc:31
ns3::GlobalRouteManager::routerId
static uint32_t routerId
Router ID counter.
Definition
global-route-manager.h:71
ns3::GlobalRouteManager::ResetRouterId
static void ResetRouterId()
Reset the router ID counter to zero.
Definition
global-route-manager.cc:59
ns3::GlobalRouteManager::AllocateRouterId
static uint32_t AllocateRouterId()
Allocate a 32-bit router ID from monotonically increasing counter.
Definition
global-route-manager.cc:52
ns3::GlobalRouteManager::InitializeRoutes
static void InitializeRoutes()
Compute routes using a Dijkstra SPF computation and populate per-node forwarding tables.
Definition
global-route-manager.cc:45
ns3::GlobalRouteManager::BuildGlobalRoutingDatabase
static void BuildGlobalRoutingDatabase()
Build the routing database by gathering Link State Advertisements from each node exporting a GlobalRo...
Definition
global-route-manager.cc:38
ns3::SimulationSingleton::Get
static T * Get()
Get a pointer to the singleton instance.
Definition
simulation-singleton.h:79
uint32_t
global-route-manager-impl.h
global-route-manager.h
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition
log.h:191
NS_LOG_FUNCTION_NOARGS
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
Definition
log-macros-enabled.h:195
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet
model
global-route-manager.cc
Generated on Wed Jul 23 2025 11:06:55 for ns-3 by
1.11.0