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
ipv6-static-routing-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 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
18
#ifndef IPV6_STATIC_ROUTING_HELPER_H
19
#define IPV6_STATIC_ROUTING_HELPER_H
20
21
#include "
ipv6-routing-helper.h
"
22
23
#include "ns3/ipv6-address.h"
24
#include "ns3/ipv6-static-routing.h"
25
#include "ns3/ipv6.h"
26
#include "ns3/net-device-container.h"
27
#include "ns3/net-device.h"
28
#include "ns3/node-container.h"
29
#include "ns3/node.h"
30
#include "ns3/ptr.h"
31
32
namespace
ns3
33
{
34
35
/**
36
* \ingroup ipv6Helpers
37
*
38
* \brief Helper class that adds ns3::Ipv6StaticRouting objects
39
*
40
* This class is expected to be used in conjunction with
41
* ns3::InternetStackHelper::SetRoutingHelper
42
*/
43
class
Ipv6StaticRoutingHelper
:
public
Ipv6RoutingHelper
44
{
45
public
:
46
/**
47
* \brief Constructor.
48
*/
49
Ipv6StaticRoutingHelper
();
50
51
/**
52
* \brief Construct an Ipv6ListRoutingHelper from another previously
53
* initialized instance (Copy Constructor).
54
* \param o object to be copied
55
*/
56
Ipv6StaticRoutingHelper
(
const
Ipv6StaticRoutingHelper
& o);
57
58
// Delete assignment operator to avoid misuse
59
Ipv6StaticRoutingHelper
&
operator=
(
const
Ipv6StaticRoutingHelper
&) =
delete
;
60
61
/**
62
* \returns pointer to clone of this Ipv6StaticRoutingHelper
63
*
64
* This method is mainly for internal use by the other helpers;
65
* clients are expected to free the dynamic memory allocated by this method
66
*/
67
Ipv6StaticRoutingHelper
*
Copy
()
const override
;
68
69
/**
70
* \param node the node on which the routing protocol will run
71
* \returns a newly-created routing protocol
72
*
73
* This method will be called by ns3::InternetStackHelper::Install
74
*/
75
Ptr<Ipv6RoutingProtocol>
Create
(
Ptr<Node>
node)
const override
;
76
77
/**
78
* \brief Get Ipv6StaticRouting pointer from IPv6 stack.
79
* \param ipv6 Ipv6 pointer
80
* \return Ipv6StaticRouting pointer or 0 if not found
81
*/
82
Ptr<Ipv6StaticRouting>
GetStaticRouting
(
Ptr<Ipv6>
ipv6)
const
;
83
84
/**
85
* \brief Add a multicast route to a node and net device using explicit
86
* Ptr<Node> and Ptr<NetDevice>
87
*
88
* \param n The node.
89
* \param source Source address.
90
* \param group Multicast group.
91
* \param input Input NetDevice.
92
* \param output Output NetDevices.
93
*/
94
void
AddMulticastRoute
(
Ptr<Node>
n,
95
Ipv6Address
source,
96
Ipv6Address
group,
97
Ptr<NetDevice>
input,
98
NetDeviceContainer
output);
99
100
/**
101
* \brief Add a multicast route to a node and device using a name string
102
* previously associated to the node using the Object Name Service and a
103
* Ptr<NetDevice>
104
*
105
* \param n The node.
106
* \param source Source address.
107
* \param group Multicast group.
108
* \param input Input NetDevice.
109
* \param output Output NetDevices.
110
*/
111
void
AddMulticastRoute
(std::string n,
112
Ipv6Address
source,
113
Ipv6Address
group,
114
Ptr<NetDevice>
input,
115
NetDeviceContainer
output);
116
117
/**
118
* \brief Add a multicast route to a node and device using a Ptr<Node> and a
119
* name string previously associated to the device using the Object Name Service.
120
*
121
* \param n The node.
122
* \param source Source address.
123
* \param group Multicast group.
124
* \param inputName Input NetDevice.
125
* \param output Output NetDevices.
126
*/
127
void
AddMulticastRoute
(
Ptr<Node>
n,
128
Ipv6Address
source,
129
Ipv6Address
group,
130
std::string inputName,
131
NetDeviceContainer
output);
132
133
/**
134
* \brief Add a multicast route to a node and device using name strings
135
* previously associated to both the node and device using the Object Name
136
* Service.
137
*
138
* \param nName The node.
139
* \param source Source address.
140
* \param group Multicast group.
141
* \param inputName Input NetDevice.
142
* \param output Output NetDevices.
143
*/
144
void
AddMulticastRoute
(std::string nName,
145
Ipv6Address
source,
146
Ipv6Address
group,
147
std::string inputName,
148
NetDeviceContainer
output);
149
150
#if 0
151
/**
152
* \brief Add a default route to the static routing protocol to forward
153
* packets out a particular interface
154
*/
155
void
SetDefaultMulticastRoute (
Ptr<Node>
n,
Ptr<NetDevice>
nd);
156
void
SetDefaultMulticastRoute (
Ptr<Node>
n, std::string ndName);
157
void
SetDefaultMulticastRoute (std::string nName,
Ptr<NetDevice>
nd);
158
void
SetDefaultMulticastRoute (std::string nName, std::string ndName);
159
#endif
160
};
161
162
}
// namespace ns3
163
164
#endif
/* IPV6_STATIC_ROUTING_HELPER_H */
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:49
ns3::Ipv6RoutingHelper
A factory to create ns3::Ipv6RoutingProtocol objects.
Definition:
ipv6-routing-helper.h:46
ns3::Ipv6StaticRoutingHelper
Helper class that adds ns3::Ipv6StaticRouting objects.
Definition:
ipv6-static-routing-helper.h:44
ns3::Ipv6StaticRoutingHelper::Create
Ptr< Ipv6RoutingProtocol > Create(Ptr< Node > node) const override
Definition:
ipv6-static-routing-helper.cc:53
ns3::Ipv6StaticRoutingHelper::GetStaticRouting
Ptr< Ipv6StaticRouting > GetStaticRouting(Ptr< Ipv6 > ipv6) const
Get Ipv6StaticRouting pointer from IPv6 stack.
Definition:
ipv6-static-routing-helper.cc:59
ns3::Ipv6StaticRoutingHelper::AddMulticastRoute
void AddMulticastRoute(Ptr< Node > n, Ipv6Address source, Ipv6Address group, Ptr< NetDevice > input, NetDeviceContainer output)
Add a multicast route to a node and net device using explicit Ptr<Node> and Ptr<NetDevice>
Definition:
ipv6-static-routing-helper.cc:89
ns3::Ipv6StaticRoutingHelper::Copy
Ipv6StaticRoutingHelper * Copy() const override
Definition:
ipv6-static-routing-helper.cc:47
ns3::Ipv6StaticRoutingHelper::operator=
Ipv6StaticRoutingHelper & operator=(const Ipv6StaticRoutingHelper &)=delete
ns3::Ipv6StaticRoutingHelper::Ipv6StaticRoutingHelper
Ipv6StaticRoutingHelper()
Constructor.
Definition:
ipv6-static-routing-helper.cc:38
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition:
net-device-container.h:43
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ipv6-routing-helper.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet
helper
ipv6-static-routing-helper.h
Generated on Tue May 28 2024 23:35:39 for ns-3 by
1.9.6