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
void
29
GlobalRouteManager::DeleteGlobalRoutes
()
30
{
31
NS_LOG_FUNCTION_NOARGS
();
32
SimulationSingleton<GlobalRouteManagerImpl>::Get
()->DeleteGlobalRoutes();
33
}
34
35
void
36
GlobalRouteManager::BuildGlobalRoutingDatabase
()
37
{
38
NS_LOG_FUNCTION_NOARGS
();
39
SimulationSingleton<GlobalRouteManagerImpl>::Get
()->BuildGlobalRoutingDatabase();
40
}
41
42
void
43
GlobalRouteManager::InitializeRoutes
()
44
{
45
NS_LOG_FUNCTION_NOARGS
();
46
SimulationSingleton<GlobalRouteManagerImpl>::Get
()->InitializeRoutes();
47
}
48
49
uint32_t
50
GlobalRouteManager::AllocateRouterId
()
51
{
52
NS_LOG_FUNCTION_NOARGS
();
53
static
uint32_t
routerId = 0;
54
return
routerId++;
55
}
56
57
}
// namespace ns3
ns3::GlobalRouteManager::DeleteGlobalRoutes
static void DeleteGlobalRoutes()
Delete all static routes on all nodes that have a GlobalRouterInterface.
Definition
global-route-manager.cc:29
ns3::GlobalRouteManager::AllocateRouterId
static uint32_t AllocateRouterId()
Allocate a 32-bit router ID from monotonically increasing counter.
Definition
global-route-manager.cc:50
ns3::GlobalRouteManager::InitializeRoutes
static void InitializeRoutes()
Compute routes using a Dijkstra SPF computation and populate per-node forwarding tables.
Definition
global-route-manager.cc:43
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:36
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 Dec 11 2024 09:20:49 for ns-3 by
1.11.0