A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
ripng-helper.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2014 Universita' di Firenze, Italy
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Tommaso Pecorella <tommaso.pecorella@unifi.it>
19
*/
20
21
#ifndef RIPNG_HELPER_H
22
#define RIPNG_HELPER_H
23
24
#include "ns3/object-factory.h"
25
#include "ns3/ipv6-routing-helper.h"
26
#include "ns3/node-container.h"
27
#include "ns3/node.h"
28
29
namespace
ns3
{
30
40
class
RipNgHelper
:
public
Ipv6RoutingHelper
41
{
42
public
:
43
/*
44
* Construct an RipNgHelper to make life easier while adding RIPng
45
* routing to nodes.
46
*/
47
RipNgHelper
();
48
54
RipNgHelper
(
const
RipNgHelper
&o);
55
56
virtual
~RipNgHelper
();
57
64
RipNgHelper
*
Copy
(
void
)
const
;
65
72
virtual
Ptr<Ipv6RoutingProtocol>
Create
(
Ptr<Node>
node)
const
;
73
80
void
Set
(std::string name,
const
AttributeValue
&value);
81
93
int64_t
AssignStreams
(
NodeContainer
c, int64_t stream);
94
105
void
SetDefaultRouter
(
Ptr<Node>
node,
Ipv6Address
nextHop, uint32_t interface);
106
118
void
ExcludeInterface
(
Ptr<Node>
node, uint32_t interface);
119
132
void
SetInterfaceMetric
(
Ptr<Node>
node, uint32_t interface, uint8_t metric);
133
134
private
:
142
RipNgHelper
&
operator =
(
const
RipNgHelper
&o);
143
144
ObjectFactory
m_factory
;
145
146
std::map< Ptr<Node>, std::set<uint32_t> >
m_interfaceExclusions
;
147
std::map< Ptr<Node>, std::map<uint32_t, uint8_t> >
m_interfaceMetrics
;
148
};
149
150
}
// namespace ns3
151
152
153
#endif
/* RIPNG_HELPER_H */
154
ns3::RipNgHelper::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:
ripng-helper.cc:88
ns3::RipNgHelper::SetDefaultRouter
void SetDefaultRouter(Ptr< Node > node, Ipv6Address nextHop, uint32_t interface)
Install a default route in the node.
Definition:
ripng-helper.cc:127
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::RipNgHelper::m_interfaceMetrics
std::map< Ptr< Node >, std::map< uint32_t, uint8_t > > m_interfaceMetrics
Interface Metric set.
Definition:
ripng-helper.h:147
ns3::AttributeValue
Hold a value for an Attribute.
Definition:
attribute.h:69
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:50
ns3::RipNgHelper::ExcludeInterface
void ExcludeInterface(Ptr< Node > node, uint32_t interface)
Exclude an interface from RIPng protocol.
Definition:
ripng-helper.cc:159
ns3::Ipv6RoutingHelper
A factory to create ns3::Ipv6RoutingProtocol objects.
Definition:
ipv6-routing-helper.h:46
ns3::RipNgHelper::~RipNgHelper
virtual ~RipNgHelper()
Definition:
ripng-helper.cc:41
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:74
ns3::RipNgHelper::Create
virtual Ptr< Ipv6RoutingProtocol > Create(Ptr< Node > node) const
Definition:
ripng-helper.cc:54
ns3::RipNgHelper::RipNgHelper
RipNgHelper()
Definition:
ripng-helper.cc:29
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition:
object-factory.h:48
ns3::RipNgHelper::m_interfaceExclusions
std::map< Ptr< Node >, std::set< uint32_t > > m_interfaceExclusions
Interface Exclusion set.
Definition:
ripng-helper.h:146
ns3::RipNgHelper::operator=
RipNgHelper & operator=(const RipNgHelper &o)
Assignment operator declared private and not implemented to disallow assignment and prevent the compi...
ns3::RipNgHelper::Copy
RipNgHelper * Copy(void) const
Definition:
ripng-helper.cc:48
ns3::NodeContainer
keep track of a set of node pointers.
Definition:
node-container.h:39
ns3::RipNgHelper::SetInterfaceMetric
void SetInterfaceMetric(Ptr< Node > node, uint32_t interface, uint8_t metric)
Set a metric for an interface.
Definition:
ripng-helper.cc:176
ns3::RipNgHelper::Set
void Set(std::string name, const AttributeValue &value)
Definition:
ripng-helper.cc:81
ns3::RipNgHelper::m_factory
ObjectFactory m_factory
Object Factory.
Definition:
ripng-helper.h:144
ns3::RipNgHelper
Helper class that adds RIPng routing to nodes.
Definition:
ripng-helper.h:41
src
internet
helper
ripng-helper.h
Generated on Fri Oct 1 2021 17:03:04 for ns-3 by
1.8.20