A Discrete-Event Network Simulator
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 * 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
21
23
24#include "ns3/assert.h"
25#include "ns3/log.h"
26#include "ns3/simulation-singleton.h"
27
28namespace ns3
29{
30
31NS_LOG_COMPONENT_DEFINE("GlobalRouteManager");
32
33// ---------------------------------------------------------------------------
34//
35// GlobalRouteManager Implementation
36//
37// ---------------------------------------------------------------------------
38
39void
41{
44}
45
46void
48{
50 SimulationSingleton<GlobalRouteManagerImpl>::Get()->BuildGlobalRoutingDatabase();
51}
52
53void
55{
58}
59
62{
64 static uint32_t routerId = 0;
65 return routerId++;
66}
67
68} // namespace ns3
static void DeleteGlobalRoutes()
Delete all static routes on all nodes that have a GlobalRouterInterface.
static uint32_t AllocateRouterId()
Allocate a 32-bit router ID from monotonically increasing counter.
static void InitializeRoutes()
Compute routes using a Dijkstra SPF computation and populate per-node forwarding tables.
static void BuildGlobalRoutingDatabase()
Build the routing database by gathering Link State Advertisements from each node exporting a GlobalRo...
static T * Get()
Get a pointer to the singleton instance.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
Every class exported by the ns3 library is enclosed in the ns3 namespace.