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