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
rip-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016 Universita' di Firenze, Italy
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: Tommaso Pecorella <tommaso.pecorella@unifi.it>
18
*/
19
20
#ifndef RIP_HELPER_H
21
#define RIP_HELPER_H
22
23
#include "ns3/ipv4-routing-helper.h"
24
#include "ns3/node-container.h"
25
#include "ns3/node.h"
26
#include "ns3/object-factory.h"
27
28
namespace
ns3
29
{
30
40
class
RipHelper
:
public
Ipv4RoutingHelper
41
{
42
public
:
43
/*
44
* Construct an RipHelper to make life easier while adding RIP
45
* routing to nodes.
46
*/
47
RipHelper
();
48
54
RipHelper
(
const
RipHelper
& o);
55
56
~RipHelper
()
override
;
57
58
// Delete assignment operator to avoid misuse
59
RipHelper
&
operator=
(
const
RipHelper
&) =
delete
;
60
67
RipHelper
*
Copy
()
const override
;
68
75
Ptr<Ipv4RoutingProtocol>
Create
(
Ptr<Node>
node)
const override
;
76
83
void
Set
(std::string name,
const
AttributeValue
& value);
84
96
int64_t
AssignStreams
(
NodeContainer
c, int64_t stream);
97
108
void
SetDefaultRouter
(
Ptr<Node>
node,
Ipv4Address
nextHop,
uint32_t
interface);
109
121
void
ExcludeInterface
(
Ptr<Node>
node,
uint32_t
interface);
122
135
void
SetInterfaceMetric
(
Ptr<Node>
node,
uint32_t
interface, uint8_t metric);
136
137
private
:
138
ObjectFactory
m_factory
;
139
140
std::map<Ptr<Node>, std::set<uint32_t>>
m_interfaceExclusions
;
141
std::map<Ptr<Node>, std::map<uint32_t, uint8_t>>
m_interfaceMetrics
;
142
};
143
144
}
// namespace ns3
145
146
#endif
/* RIP_HELPER_H */
ns3::AttributeValue
Hold a value for an Attribute.
Definition:
attribute.h:70
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition:
ipv4-address.h:42
ns3::Ipv4RoutingHelper
a factory to create ns3::Ipv4RoutingProtocol objects
Definition:
ipv4-routing-helper.h:46
ns3::NodeContainer
keep track of a set of node pointers.
Definition:
node-container.h:40
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition:
object-factory.h:48
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:78
ns3::RipHelper
Helper class that adds RIP routing to nodes.
Definition:
rip-helper.h:41
ns3::RipHelper::m_interfaceMetrics
std::map< Ptr< Node >, std::map< uint32_t, uint8_t > > m_interfaceMetrics
Interface Metric set.
Definition:
rip-helper.h:141
ns3::RipHelper::~RipHelper
~RipHelper() override
Definition:
rip-helper.cc:42
ns3::RipHelper::Create
Ptr< Ipv4RoutingProtocol > Create(Ptr< Node > node) const override
Definition:
rip-helper.cc:55
ns3::RipHelper::Copy
RipHelper * Copy() const override
Definition:
rip-helper.cc:49
ns3::RipHelper::Set
void Set(std::string name, const AttributeValue &value)
Definition:
rip-helper.cc:83
ns3::RipHelper::operator=
RipHelper & operator=(const RipHelper &)=delete
ns3::RipHelper::ExcludeInterface
void ExcludeInterface(Ptr< Node > node, uint32_t interface)
Exclude an interface from RIP protocol.
Definition:
rip-helper.cc:161
ns3::RipHelper::SetDefaultRouter
void SetDefaultRouter(Ptr< Node > node, Ipv4Address nextHop, uint32_t interface)
Install a default route in the node.
Definition:
rip-helper.cc:129
ns3::RipHelper::AssignStreams
int64_t AssignStreams(NodeContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
Definition:
rip-helper.cc:89
ns3::RipHelper::SetInterfaceMetric
void SetInterfaceMetric(Ptr< Node > node, uint32_t interface, uint8_t metric)
Set a metric for an interface.
Definition:
rip-helper.cc:179
ns3::RipHelper::m_factory
ObjectFactory m_factory
Object Factory.
Definition:
rip-helper.h:138
ns3::RipHelper::m_interfaceExclusions
std::map< Ptr< Node >, std::set< uint32_t > > m_interfaceExclusions
Interface Exclusion set.
Definition:
rip-helper.h:140
ns3::RipHelper::RipHelper
RipHelper()
Definition:
rip-helper.cc:30
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet
helper
rip-helper.h
Generated on Sun Jul 2 2023 18:21:38 for ns-3 by
1.9.6