A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
global-route-manager.cc
Go to the documentation of this file.
1
/*
2
* Copyright 2007 University of Washington
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Tom Henderson (tomhend@u.washington.edu)
18
*/
19
20
#include "
global-route-manager.h
"
21
22
#include "
global-route-manager-impl.h
"
23
24
#include "ns3/assert.h"
25
#include "ns3/log.h"
26
#include "ns3/simulation-singleton.h"
27
28
namespace
ns3
29
{
30
31
NS_LOG_COMPONENT_DEFINE
(
"GlobalRouteManager"
);
32
33
// ---------------------------------------------------------------------------
34
//
35
// GlobalRouteManager Implementation
36
//
37
// ---------------------------------------------------------------------------
38
39
void
40
GlobalRouteManager::DeleteGlobalRoutes
()
41
{
42
NS_LOG_FUNCTION_NOARGS
();
43
SimulationSingleton<GlobalRouteManagerImpl>::Get
()->DeleteGlobalRoutes();
44
}
45
46
void
47
GlobalRouteManager::BuildGlobalRoutingDatabase
()
48
{
49
NS_LOG_FUNCTION_NOARGS
();
50
SimulationSingleton<GlobalRouteManagerImpl>::Get
()->BuildGlobalRoutingDatabase();
51
}
52
53
void
54
GlobalRouteManager::InitializeRoutes
()
55
{
56
NS_LOG_FUNCTION_NOARGS
();
57
SimulationSingleton<GlobalRouteManagerImpl>::Get
()->InitializeRoutes();
58
}
59
60
uint32_t
61
GlobalRouteManager::AllocateRouterId
()
62
{
63
NS_LOG_FUNCTION_NOARGS
();
64
static
uint32_t routerId = 0;
65
return
routerId++;
66
}
67
68
}
// namespace ns3
ns3::GlobalRouteManager::DeleteGlobalRoutes
static void DeleteGlobalRoutes()
Delete all static routes on all nodes that have a GlobalRouterInterface.
Definition:
global-route-manager.cc:40
ns3::GlobalRouteManager::AllocateRouterId
static uint32_t AllocateRouterId()
Allocate a 32-bit router ID from monotonically increasing counter.
Definition:
global-route-manager.cc:61
ns3::GlobalRouteManager::InitializeRoutes
static void InitializeRoutes()
Compute routes using a Dijkstra SPF computation and populate per-node forwarding tables.
Definition:
global-route-manager.cc:54
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:47
ns3::SimulationSingleton::Get
static T * Get()
Get a pointer to the singleton instance.
Definition:
simulation-singleton.h:90
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:202
NS_LOG_FUNCTION_NOARGS
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
Definition:
log-macros-enabled.h:206
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet
model
global-route-manager.cc
Generated on Sun Mar 3 2024 17:10:58 for ns-3 by
1.9.1