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.h
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
* Authors: Craig Dowell (craigdo@ee.washington.edu)
7
* Tom Henderson (tomhend@u.washington.edu)
8
*/
9
10
#ifndef GLOBAL_ROUTE_MANAGER_H
11
#define GLOBAL_ROUTE_MANAGER_H
12
13
#include <cstdint>
14
15
namespace
ns3
16
{
17
18
/**
19
* @ingroup globalrouting
20
*
21
* @brief A global global router
22
*
23
* This singleton object can query interface each node in the system
24
* for a GlobalRouter interface. For those nodes, it fetches one or
25
* more Link State Advertisements and stores them in a local database.
26
* Then, it can compute shortest paths on a per-node basis to all routers,
27
* and finally configure each of the node's forwarding tables.
28
*
29
* The design is guided by OSPFv2 \RFC{2328} section 16.1.1 and quagga ospfd.
30
*/
31
class
GlobalRouteManager
32
{
33
public
:
34
// Delete copy constructor and assignment operator to avoid misuse
35
GlobalRouteManager
(
const
GlobalRouteManager
&) =
delete
;
36
GlobalRouteManager
&
operator=
(
const
GlobalRouteManager
&) =
delete
;
37
38
/**
39
* @brief Allocate a 32-bit router ID from monotonically increasing counter.
40
* @returns A new new RouterId.
41
*/
42
static
uint32_t
AllocateRouterId
();
43
44
/**
45
* @brief Delete all static routes on all nodes that have a
46
* GlobalRouterInterface
47
*
48
*/
49
static
void
DeleteGlobalRoutes
();
50
51
/**
52
* @brief Build the routing database by gathering Link State Advertisements
53
* from each node exporting a GlobalRouter interface.
54
*/
55
static
void
BuildGlobalRoutingDatabase
();
56
57
/**
58
* @brief Compute routes using a Dijkstra SPF computation and populate
59
* per-node forwarding tables
60
*/
61
static
void
InitializeRoutes
();
62
63
/**
64
* @brief Reset the router ID counter to zero. This should only be called by tests to reset the
65
* router ID counter between simulations within the same program. This function should not be
66
* called In typical simulations or when using the GlobalRouting helper.
67
*/
68
static
void
ResetRouterId
();
69
70
private
:
71
static
uint32_t
routerId
;
//!< Router ID counter
72
};
73
74
}
// namespace ns3
75
76
#endif
/* GLOBAL_ROUTE_MANAGER_H */
ns3::GlobalRouteManager
A global global router.
Definition
global-route-manager.h:32
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::GlobalRouteManager
GlobalRouteManager(const GlobalRouteManager &)=delete
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::GlobalRouteManager::operator=
GlobalRouteManager & operator=(const GlobalRouteManager &)=delete
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet
model
global-route-manager.h
Generated on Tue Jul 22 2025 18:21:57 for ns-3 by
1.11.0