A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
ipv4-static-routing-helper.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2009 University of Washington
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
19
#ifndef IPV4_STATIC_ROUTING_HELPER_H
20
#define IPV4_STATIC_ROUTING_HELPER_H
21
22
#include "ns3/ipv4.h"
23
#include "ns3/ipv4-static-routing.h"
24
#include "ns3/ptr.h"
25
#include "ns3/ipv4-address.h"
26
#include "ns3/node.h"
27
#include "ns3/net-device.h"
28
#include "ns3/ipv4-routing-helper.h"
29
#include "ns3/node-container.h"
30
#include "ns3/net-device-container.h"
31
32
namespace
ns3
{
33
42
class
Ipv4StaticRoutingHelper
:
public
Ipv4RoutingHelper
43
{
44
public
:
45
/*
46
* Construct an Ipv4StaticRoutingHelper object, used to make configuration
47
* of static routing easier.
48
*/
49
Ipv4StaticRoutingHelper
();
50
56
Ipv4StaticRoutingHelper
(
const
Ipv4StaticRoutingHelper
&o);
57
64
Ipv4StaticRoutingHelper
*
Copy
(
void
)
const
;
65
72
virtual
Ptr<Ipv4RoutingProtocol>
Create
(
Ptr<Node>
node)
const
;
73
82
Ptr<Ipv4StaticRouting>
GetStaticRouting
(
Ptr<Ipv4>
ipv4)
const
;
83
94
void
AddMulticastRoute
(
Ptr<Node>
n,
Ipv4Address
source,
Ipv4Address
group,
95
Ptr<NetDevice>
input,
NetDeviceContainer
output);
96
108
void
AddMulticastRoute
(std::string n,
Ipv4Address
source,
Ipv4Address
group,
109
Ptr<NetDevice>
input,
NetDeviceContainer
output);
110
121
void
AddMulticastRoute
(
Ptr<Node>
n,
Ipv4Address
source,
Ipv4Address
group,
122
std::string inputName,
NetDeviceContainer
output);
123
135
void
AddMulticastRoute
(std::string nName,
Ipv4Address
source,
Ipv4Address
group,
136
std::string inputName,
NetDeviceContainer
output);
137
147
void
SetDefaultMulticastRoute
(
Ptr<Node>
n,
Ptr<NetDevice>
nd);
148
159
void
SetDefaultMulticastRoute
(
Ptr<Node>
n, std::string ndName);
160
171
void
SetDefaultMulticastRoute
(std::string nName,
Ptr<NetDevice>
nd);
172
184
void
SetDefaultMulticastRoute
(std::string nName, std::string ndName);
185
private
:
191
Ipv4StaticRoutingHelper
&
operator =
(
const
Ipv4StaticRoutingHelper
&);
192
};
193
194
}
// namespace ns3
195
196
#endif
/* IPV4_STATIC_ROUTING_HELPER_H */
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition:
ipv4-address.h:41
ns3::Ipv4RoutingHelper
a factory to create ns3::Ipv4RoutingProtocol objects
Definition:
ipv4-routing-helper.h:46
ns3::Ipv4StaticRoutingHelper
Helper class that adds ns3::Ipv4StaticRouting objects.
Definition:
ipv4-static-routing-helper.h:43
ns3::Ipv4StaticRoutingHelper::GetStaticRouting
Ptr< Ipv4StaticRouting > GetStaticRouting(Ptr< Ipv4 > ipv4) const
Try and find the static routing protocol as either the main routing protocol or in the list of routin...
Definition:
ipv4-static-routing-helper.cc:58
ns3::Ipv4StaticRoutingHelper::Copy
Ipv4StaticRoutingHelper * Copy(void) const
Definition:
ipv4-static-routing-helper.cc:45
ns3::Ipv4StaticRoutingHelper::Create
virtual Ptr< Ipv4RoutingProtocol > Create(Ptr< Node > node) const
Definition:
ipv4-static-routing-helper.cc:51
ns3::Ipv4StaticRoutingHelper::operator=
Ipv4StaticRoutingHelper & operator=(const Ipv4StaticRoutingHelper &)
Assignment operator declared private and not implemented to disallow assignment and prevent the compi...
ns3::Ipv4StaticRoutingHelper::Ipv4StaticRoutingHelper
Ipv4StaticRoutingHelper()
Definition:
ipv4-static-routing-helper.cc:36
ns3::Ipv4StaticRoutingHelper::AddMulticastRoute
void AddMulticastRoute(Ptr< Node > n, Ipv4Address source, Ipv4Address group, Ptr< NetDevice > input, NetDeviceContainer output)
Add a multicast route to a node and net device using explicit Ptr<Node> and Ptr<NetDevice>
Definition:
ipv4-static-routing-helper.cc:88
ns3::Ipv4StaticRoutingHelper::SetDefaultMulticastRoute
void SetDefaultMulticastRoute(Ptr< Node > n, Ptr< NetDevice > nd)
Add a default route to the static routing protocol to forward packets out a particular interface.
Definition:
ipv4-static-routing-helper.cc:163
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition:
net-device-container.h:42
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:74
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet
helper
ipv4-static-routing-helper.h
Generated on Tue Feb 6 2024 19:21:18 for ns-3 by
1.9.1