A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ipv4-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 IPV4_GLOBAL_ROUTING_HELPER_H
9#define IPV4_GLOBAL_ROUTING_HELPER_H
10
11#include "ipv4-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 Ipv4GlobalRoutingHelper* 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<Ipv4RoutingProtocol> 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 * \brief Remove all routes that were previously installed in a prior call
70 * to either PopulateRoutingTables() or RecomputeRoutingTables(), and
71 * add a new set of routes.
72 *
73 * This method does not change the set of nodes
74 * over which GlobalRouting is being used, but it will dynamically update
75 * its representation of the global topology before recomputing routes.
76 * Users must first call PopulateRoutingTables() and then may subsequently
77 * call RecomputeRoutingTables() at any later time in the simulation.
78 *
79 */
80 static void RecomputeRoutingTables();
81};
82
83} // namespace ns3
84
85#endif /* IPV4_GLOBAL_ROUTING_HELPER_H */
Helper class that adds ns3::Ipv4GlobalRouting objects.
static void PopulateRoutingTables()
Build a routing database and initialize the routing tables of the nodes in the simulation.
Ipv4GlobalRoutingHelper & operator=(const Ipv4GlobalRoutingHelper &)=delete
static void RecomputeRoutingTables()
Remove all routes that were previously installed in a prior call to either PopulateRoutingTables() or...
Ptr< Ipv4RoutingProtocol > Create(Ptr< Node > node) const override
Ipv4GlobalRoutingHelper()
Construct a GlobalRoutingHelper to make life easier for managing global routing tasks.
Ipv4GlobalRoutingHelper * Copy() const override
a factory to create ns3::Ipv4RoutingProtocol objects
Smart pointer class similar to boost::intrusive_ptr.
Every class exported by the ns3 library is enclosed in the ns3 namespace.