A Discrete-Event Network Simulator
API
ipv4-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 IPV4_STATIC_ROUTING_HELPER_H
19 #define IPV4_STATIC_ROUTING_HELPER_H
20 
21 #include "ns3/ipv4-address.h"
22 #include "ns3/ipv4-routing-helper.h"
23 #include "ns3/ipv4-static-routing.h"
24 #include "ns3/ipv4.h"
25 #include "ns3/net-device-container.h"
26 #include "ns3/net-device.h"
27 #include "ns3/node-container.h"
28 #include "ns3/node.h"
29 #include "ns3/ptr.h"
30 
31 namespace ns3
32 {
33 
43 {
44  public:
45  /*
46  * Construct an Ipv4StaticRoutingHelper object, used to make configuration
47  * of static routing easier.
48  */
50 
57 
58  // Delete assignment operator to avoid misuse
60 
67  Ipv4StaticRoutingHelper* Copy() const override;
68 
75  Ptr<Ipv4RoutingProtocol> Create(Ptr<Node> node) const override;
76 
86 
98  Ipv4Address source,
99  Ipv4Address group,
100  Ptr<NetDevice> input,
101  NetDeviceContainer output);
102 
114  void AddMulticastRoute(std::string n,
115  Ipv4Address source,
116  Ipv4Address group,
117  Ptr<NetDevice> input,
118  NetDeviceContainer output);
119 
131  Ipv4Address source,
132  Ipv4Address group,
133  std::string inputName,
134  NetDeviceContainer output);
135 
147  void AddMulticastRoute(std::string nName,
148  Ipv4Address source,
149  Ipv4Address group,
150  std::string inputName,
151  NetDeviceContainer output);
152 
163 
174  void SetDefaultMulticastRoute(Ptr<Node> n, std::string ndName);
175 
186  void SetDefaultMulticastRoute(std::string nName, Ptr<NetDevice> nd);
187 
199  void SetDefaultMulticastRoute(std::string nName, std::string ndName);
200 };
201 
202 } // namespace ns3
203 
204 #endif /* IPV4_STATIC_ROUTING_HELPER_H */
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:43
a factory to create ns3::Ipv4RoutingProtocol objects
Helper class that adds ns3::Ipv4StaticRouting objects.
Ipv4StaticRoutingHelper * Copy() const override
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...
Ipv4StaticRoutingHelper & operator=(const Ipv4StaticRoutingHelper &)=delete
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>
void SetDefaultMulticastRoute(Ptr< Node > n, Ptr< NetDevice > nd)
Add a default route to the static routing protocol to forward packets out a particular interface.
Ptr< Ipv4RoutingProtocol > Create(Ptr< Node > node) const override
holds a vector of ns3::NetDevice pointers
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
Every class exported by the ns3 library is enclosed in the ns3 namespace.