Helper class that adds ns3::Ipv4StaticRouting objects. More...
#include "ipv4-static-routing-helper.h"
Public Member Functions | |
Ipv4StaticRoutingHelper () | |
Ipv4StaticRoutingHelper (const Ipv4StaticRoutingHelper &o) | |
Construct an Ipv4StaticRoutingHelper from another previously initialized instance (Copy Constructor). More... | |
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> More... | |
void | AddMulticastRoute (Ptr< Node > n, Ipv4Address source, Ipv4Address group, std::string inputName, NetDeviceContainer output) |
Add a multicast route to a node and device using a Ptr<Node> and a name string previously associated to the device using the Object Name Service. More... | |
void | AddMulticastRoute (std::string n, Ipv4Address source, Ipv4Address group, Ptr< NetDevice > input, NetDeviceContainer output) |
Add a multicast route to a node and device using a name string previously associated to the node using the Object Name Service and a Ptr<NetDevice> More... | |
void | AddMulticastRoute (std::string nName, Ipv4Address source, Ipv4Address group, std::string inputName, NetDeviceContainer output) |
Add a multicast route to a node and device using name strings previously associated to both the node and device using the Object Name Service. More... | |
Ipv4StaticRoutingHelper * | Copy (void) const |
virtual Ptr< Ipv4RoutingProtocol > | Create (Ptr< Node > node) const |
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 routing protocols associated with the Ipv4 provided. More... | |
void | SetDefaultMulticastRoute (Ptr< Node > n, Ptr< NetDevice > nd) |
Add a default route to the static routing protocol to forward packets out a particular interface. More... | |
void | SetDefaultMulticastRoute (Ptr< Node > n, std::string ndName) |
Add a default route to the static routing protocol to forward packets out a particular interface. More... | |
void | SetDefaultMulticastRoute (std::string nName, Ptr< NetDevice > nd) |
Add a default route to the static routing protocol to forward packets out a particular interface. More... | |
void | SetDefaultMulticastRoute (std::string nName, std::string ndName) |
Add a default route to the static routing protocol to forward packets out a particular interface. More... | |
Public Member Functions inherited from ns3::Ipv4RoutingHelper | |
virtual | ~Ipv4RoutingHelper () |
Private Member Functions | |
Ipv4StaticRoutingHelper & | operator= (const Ipv4StaticRoutingHelper &) |
Assignment operator declared private and not implemented to disallow assignment and prevent the compiler from happily inserting its own. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from ns3::Ipv4RoutingHelper | |
template<class T > | |
static Ptr< T > | GetRouting (Ptr< Ipv4RoutingProtocol > protocol) |
Request a specified routing protocol <T> from Ipv4RoutingProtocol protocol. More... | |
static void | PrintNeighborCacheAllAt (Time printTime, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) |
prints the neighbor cache of all nodes at a particular time. More... | |
static void | PrintNeighborCacheAllEvery (Time printInterval, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) |
prints the neighbor cache of all nodes at regular intervals specified by user. More... | |
static void | PrintNeighborCacheAt (Time printTime, Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) |
prints the neighbor cache of a node at a particular time. More... | |
static void | PrintNeighborCacheEvery (Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) |
prints the neighbor cache of a node at regular intervals specified by user. More... | |
static void | PrintRoutingTableAllAt (Time printTime, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) |
prints the routing tables of all nodes at a particular time. More... | |
static void | PrintRoutingTableAllEvery (Time printInterval, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) |
prints the routing tables of all nodes at regular intervals specified by user. More... | |
static void | PrintRoutingTableAt (Time printTime, Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) |
prints the routing tables of a node at a particular time. More... | |
static void | PrintRoutingTableEvery (Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S) |
prints the routing tables of a node at regular intervals specified by user. More... | |
Helper class that adds ns3::Ipv4StaticRouting objects.
This class is expected to be used in conjunction with ns3::InternetStackHelper::SetRoutingHelper
Definition at line 42 of file ipv4-static-routing-helper.h.
ns3::Ipv4StaticRoutingHelper::Ipv4StaticRoutingHelper | ( | ) |
Definition at line 36 of file ipv4-static-routing-helper.cc.
Referenced by Copy().
ns3::Ipv4StaticRoutingHelper::Ipv4StaticRoutingHelper | ( | const Ipv4StaticRoutingHelper & | o | ) |
Construct an Ipv4StaticRoutingHelper from another previously initialized instance (Copy Constructor).
o | object to be copied |
Definition at line 40 of file ipv4-static-routing-helper.cc.
void ns3::Ipv4StaticRoutingHelper::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>
n | The node. |
source | Source address. |
group | Multicast group. |
input | Input NetDevice. |
output | Output NetDevices. |
Definition at line 88 of file ipv4-static-routing-helper.cc.
References ns3::NetDeviceContainer::Begin(), ns3::NetDeviceContainer::End(), ns3::Object::GetObject(), GetStaticRouting(), and NS_ASSERT_MSG.
Referenced by AddMulticastRoute(), Ipv4DeduplicationTest::DoRun(), Ipv4DeduplicationPerformanceTest::DoRun(), and CsmaMulticastTestCase::DoRun().
void ns3::Ipv4StaticRoutingHelper::AddMulticastRoute | ( | Ptr< Node > | n, |
Ipv4Address | source, | ||
Ipv4Address | group, | ||
std::string | inputName, | ||
NetDeviceContainer | output | ||
) |
Add a multicast route to a node and device using a Ptr<Node> and a name string previously associated to the device using the Object Name Service.
n | The node. |
source | Source address. |
group | Multicast group. |
inputName | Input NetDevice. |
output | Output NetDevices. |
Definition at line 126 of file ipv4-static-routing-helper.cc.
References AddMulticastRoute().
void ns3::Ipv4StaticRoutingHelper::AddMulticastRoute | ( | std::string | n, |
Ipv4Address | source, | ||
Ipv4Address | group, | ||
Ptr< NetDevice > | input, | ||
NetDeviceContainer | output | ||
) |
Add a multicast route to a node and device using a name string previously associated to the node using the Object Name Service and a Ptr<NetDevice>
n | The node. |
source | Source address. |
group | Multicast group. |
input | Input NetDevice. |
output | Output NetDevices. |
Definition at line 138 of file ipv4-static-routing-helper.cc.
References AddMulticastRoute().
void ns3::Ipv4StaticRoutingHelper::AddMulticastRoute | ( | std::string | nName, |
Ipv4Address | source, | ||
Ipv4Address | group, | ||
std::string | inputName, | ||
NetDeviceContainer | output | ||
) |
Add a multicast route to a node and device using name strings previously associated to both the node and device using the Object Name Service.
nName | The node. |
source | Source address. |
group | Multicast group. |
inputName | Input NetDevice. |
output | Output NetDevices. |
Definition at line 150 of file ipv4-static-routing-helper.cc.
References AddMulticastRoute().
|
virtual |
This method is mainly for internal use by the other helpers; clients are expected to free the dynamic memory allocated by this method
Implements ns3::Ipv4RoutingHelper.
Definition at line 45 of file ipv4-static-routing-helper.cc.
References Ipv4StaticRoutingHelper().
|
virtual |
node | the node on which the routing protocol will run |
This method will be called by ns3::InternetStackHelper::Install
Implements ns3::Ipv4RoutingHelper.
Definition at line 51 of file ipv4-static-routing-helper.cc.
Ptr< Ipv4StaticRouting > ns3::Ipv4StaticRoutingHelper::GetStaticRouting | ( | Ptr< Ipv4 > | ipv4 | ) | const |
Try and find the static routing protocol as either the main routing protocol or in the list of routing protocols associated with the Ipv4 provided.
ipv4 | the Ptr<Ipv4> to search for the static routing protocol |
Definition at line 58 of file ipv4-static-routing-helper.cc.
References NS_ASSERT_MSG, NS_LOG_FUNCTION, and NS_LOG_LOGIC.
Referenced by ns3::DhcpClient::AcceptAck(), AddMulticastRoute(), LteCellSelectionTestCase::DoRun(), LteRadioLinkFailureTestCase::DoRun(), LteUeMeasurementsHandoverTestCase::DoRun(), LteHandoverTargetTestCase::DoRun(), Ipv4DeduplicationTest::DoRun(), Ipv4DeduplicationPerformanceTest::DoRun(), Ipv4StaticRoutingSlash32TestCase::DoRun(), EpcS1uDlTestCase::DoRun(), EpcS1uUlTestCase::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), LteEpcE2eDataTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), LteX2HandoverTestCase::DoRun(), LteAggregationThroughputScaleTestCase::GetThroughput(), ns3::DhcpClient::LinkStateHandler(), ns3::DhcpClient::RemoveAndStart(), and SetDefaultMulticastRoute().
|
private |
Assignment operator declared private and not implemented to disallow assignment and prevent the compiler from happily inserting its own.
Add a default route to the static routing protocol to forward packets out a particular interface.
Functionally equivalent to: route add 224.0.0.0 netmask 240.0.0.0 dev nd
n | node |
nd | device of the node to add default route |
Definition at line 163 of file ipv4-static-routing-helper.cc.
References ns3::Object::GetObject(), GetStaticRouting(), and NS_ASSERT_MSG.
Referenced by CsmaMulticastTestCase::DoRun(), and SetDefaultMulticastRoute().
Add a default route to the static routing protocol to forward packets out a particular interface.
Functionally equivalent to: route add 224.0.0.0 netmask 240.0.0.0 dev nd
n | node |
ndName | string with name previously associated to device using the Object Name Service |
Definition at line 184 of file ipv4-static-routing-helper.cc.
References SetDefaultMulticastRoute().
void ns3::Ipv4StaticRoutingHelper::SetDefaultMulticastRoute | ( | std::string | nName, |
Ptr< NetDevice > | nd | ||
) |
Add a default route to the static routing protocol to forward packets out a particular interface.
Functionally equivalent to: route add 224.0.0.0 netmask 240.0.0.0 dev nd
nName | string with name previously associated to node using the Object Name Service |
nd | device of the node to add default route |
Definition at line 193 of file ipv4-static-routing-helper.cc.
References SetDefaultMulticastRoute().
void ns3::Ipv4StaticRoutingHelper::SetDefaultMulticastRoute | ( | std::string | nName, |
std::string | ndName | ||
) |
Add a default route to the static routing protocol to forward packets out a particular interface.
Functionally equivalent to: route add 224.0.0.0 netmask 240.0.0.0 dev nd
nName | string with name previously associated to node using the Object Name Service |
ndName | string with name previously associated to device using the Object Name Service |
Definition at line 202 of file ipv4-static-routing-helper.cc.
References SetDefaultMulticastRoute().