A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ipv6-global-routing-helper.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 INRIA
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7 */
8#ifndef IPV6_GLOBAL_ROUTING_HELPER_H
9#define IPV6_GLOBAL_ROUTING_HELPER_H
10
11#include "ipv6-routing-helper.h"
12
13#include "ns3/node-container.h"
14
15namespace ns3
16{
17
18/**
19 * @ingroup ipv4Helpers
20 *
21 * @brief Helper class that adds ns3::Ipv4GlobalRouting objects
22 */
24{
25 public:
26 /**
27 * @brief Construct a GlobalRoutingHelper to make life easier for managing
28 * global routing tasks.
29 */
31
32 /**
33 * @brief Construct a GlobalRoutingHelper from another previously initialized
34 * instance (Copy Constructor).
35 * @param o object to be copied
36 */
38
39 // Delete assignment operator to avoid misuse
41
42 /**
43 * @returns pointer to clone of this Ipv4GlobalRoutingHelper
44 *
45 * This method is mainly for internal use by the other helpers;
46 * clients are expected to free the dynamic memory allocated by this method
47 */
48 Ipv6GlobalRoutingHelper* Copy() const override;
49
50 /**
51 * @param node the node on which the routing protocol will run
52 * @returns a newly-created routing protocol
53 *
54 * This method will be called by ns3::InternetStackHelper::Install
55 */
56 Ptr<Ipv6RoutingProtocol> Create(Ptr<Node> node) const override;
57
58 /**
59 * @brief Build a routing database and initialize the routing tables of
60 * the nodes in the simulation. Makes all nodes in the simulation into
61 * routers.
62 *
63 * All this function does is call the functions
64 * BuildGlobalRoutingDatabase () and InitializeRoutes ().
65 *
66 */
67 static void PopulateRoutingTables();
68
69 /**
70 * @brief Remove all routes that were previously installed in a prior call
71 * to either PopulateRoutingTables() or RecomputeRoutingTables(), and
72 * add a new set of routes.
73 *
74 * This method does not change the set of nodes
75 * over which GlobalRouting is being used, but it will dynamically update
76 * its representation of the global topology before recomputing routes.
77 * Users must first call PopulateRoutingTables() and then may subsequently
78 * call RecomputeRoutingTables() at any later time in the simulation.
79 *
80 */
81 static void RecomputeRoutingTables();
82
83 /**
84 * @brief initialize all nodes as routers. this method queries all the nodes in the simulation
85 * and enables ipv6 forwarding on all of them.
86 */
88};
89
90} // namespace ns3
91
92#endif /* IPV6_GLOBAL_ROUTING_HELPER_H */
Ipv6GlobalRoutingHelper * Copy() const override
static void RecomputeRoutingTables()
Remove all routes that were previously installed in a prior call to either PopulateRoutingTables() or...
Ipv6GlobalRoutingHelper & operator=(const Ipv6GlobalRoutingHelper &)=delete
Ipv6GlobalRoutingHelper()
Construct a GlobalRoutingHelper to make life easier for managing global routing tasks.
void InitializeRouters()
initialize all nodes as routers.
Ptr< Ipv6RoutingProtocol > Create(Ptr< Node > node) const override
static void PopulateRoutingTables()
Build a routing database and initialize the routing tables of the nodes in the simulation.
A factory to create ns3::Ipv6RoutingProtocol objects.
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:70
Every class exported by the ns3 library is enclosed in the ns3 namespace.