aggregate IP/TCP/UDP functionality to existing Nodes. More...
#include <internet-stack-helper.h>
Public Member Functions | |
InternetStackHelper (void) | |
InternetStackHelper (const InternetStackHelper &) | |
virtual | ~InternetStackHelper (void) |
int64_t | AssignStreams (NodeContainer c, int64_t stream) |
void | Install (std::string nodeName) const |
void | Install (Ptr< Node > node) const |
void | Install (NodeContainer c) const |
void | InstallAll (void) const |
InternetStackHelper & | operator= (const InternetStackHelper &o) |
void | Reset (void) |
void | SetIpv4StackInstall (bool enable) |
Enable/disable IPv4 stack install. | |
void | SetIpv6StackInstall (bool enable) |
Enable/disable IPv6 stack install. | |
void | SetRoutingHelper (const Ipv4RoutingHelper &routing) |
void | SetRoutingHelper (const Ipv6RoutingHelper &routing) |
Set IPv6 routing helper. | |
void | SetTcp (std::string tid) |
set the Tcp stack which will not need any other parameter. | |
void | SetTcp (std::string tid, std::string attr, const AttributeValue &val) |
This function is used to setup the Network Simulation Cradle stack with library value. | |
![]() | |
PcapHelperForIpv4 () | |
Construct a PcapHelperForIpv4. | |
virtual | ~PcapHelperForIpv4 () |
Destroy a PcapHelperForIpv4. | |
void | EnablePcapIpv4 (std::string prefix, Ptr< Ipv4 > ipv4, uint32_t interface, bool explicitFilename=false) |
Enable pcap output the indicated Ipv4 and interface pair. | |
void | EnablePcapIpv4 (std::string prefix, std::string ipv4Name, uint32_t interface, bool explicitFilename=false) |
Enable pcap output the indicated Ipv4 and interface pair using a Ptr<Ipv4> previously named using the ns-3 object name service. | |
void | EnablePcapIpv4 (std::string prefix, Ipv4InterfaceContainer c) |
Enable pcap output on each Ipv4 and interface pair in the container. | |
void | EnablePcapIpv4 (std::string prefix, NodeContainer n) |
Enable pcap output on all Ipv4 and interface pairs existing in the nodes provided in the container. | |
void | EnablePcapIpv4 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename) |
Enable pcap output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface. Since there can be only one Ipv4 aggregated to a node, the node-id unambiguously determines the Ipv4. | |
void | EnablePcapIpv4All (std::string prefix) |
Enable pcap output on all Ipv4 and interface pairs existing in the set of all nodes created in the simulation. | |
virtual void | EnablePcapIpv4Internal (std::string prefix, Ptr< Ipv4 > ipv4, uint32_t interface, bool explicitFilename)=0 |
Enable pcap output the indicated Ipv4 and interface pair. | |
![]() | |
PcapHelperForIpv6 () | |
Construct a PcapHelperForIpv6. | |
virtual | ~PcapHelperForIpv6 () |
Destroy a PcapHelperForIpv6. | |
void | EnablePcapIpv6 (std::string prefix, Ptr< Ipv6 > ipv6, uint32_t interface, bool explicitFilename=false) |
Enable pcap output the indicated Ipv6 and interface pair. | |
void | EnablePcapIpv6 (std::string prefix, std::string ipv6Name, uint32_t interface, bool explicitFilename=false) |
Enable pcap output the indicated Ipv6 and interface pair using a Ptr<Ipv6> previously named using the ns-3 object name service. | |
void | EnablePcapIpv6 (std::string prefix, Ipv6InterfaceContainer c) |
Enable pcap output on each Ipv6 and interface pair in the container. | |
void | EnablePcapIpv6 (std::string prefix, NodeContainer n) |
Enable pcap output on all Ipv6 and interface pairs existing in the nodes provided in the container. | |
void | EnablePcapIpv6 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename) |
Enable pcap output on the Ipv6 and interface pair specified by a global node-id (of a previously created node) and interface. Since there can be only one Ipv6 aggregated to a node, the node-id unambiguously determines the Ipv6. | |
void | EnablePcapIpv6All (std::string prefix) |
Enable pcap output on all Ipv6 and interface pairs existing in the set of all nodes created in the simulation. | |
virtual void | EnablePcapIpv6Internal (std::string prefix, Ptr< Ipv6 > ipv6, uint32_t interface, bool explicitFilename)=0 |
Enable pcap output the indicated Ipv6 and interface pair. | |
![]() | |
AsciiTraceHelperForIpv4 () | |
Construct an AsciiTraceHelperForIpv4. | |
virtual | ~AsciiTraceHelperForIpv4 () |
Destroy an AsciiTraceHelperForIpv4. | |
void | EnableAsciiIpv4 (std::string prefix, Ptr< Ipv4 > ipv4, uint32_t interface, bool explicitFilename=false) |
Enable ascii trace output on the indicated Ipv4 and interface pair. | |
void | EnableAsciiIpv4 (Ptr< OutputStreamWrapper > stream, Ptr< Ipv4 > ipv4, uint32_t interface) |
Enable ascii trace output on the indicated Ipv4 and interface pair. | |
void | EnableAsciiIpv4 (std::string prefix, std::string ipv4Name, uint32_t interface, bool explicitFilename=false) |
Enable ascii trace output the indicated Ipv4 and interface pair using an Ipv4 previously named using the ns-3 object name service. | |
void | EnableAsciiIpv4 (Ptr< OutputStreamWrapper > stream, std::string ipv4Name, uint32_t interface) |
Enable ascii trace output the indicated net device using a device previously named using the ns-3 object name service. | |
void | EnableAsciiIpv4 (std::string prefix, Ipv4InterfaceContainer c) |
Enable ascii trace output on each Ipv4 and interface pair in the container. | |
void | EnableAsciiIpv4 (Ptr< OutputStreamWrapper > stream, Ipv4InterfaceContainer c) |
Enable ascii trace output on each device in the container which is of the appropriate type. | |
void | EnableAsciiIpv4 (std::string prefix, NodeContainer n) |
Enable ascii trace output on all Ipv4 and interface pairs existing in the nodes provided in the container. | |
void | EnableAsciiIpv4 (Ptr< OutputStreamWrapper > stream, NodeContainer n) |
Enable ascii trace output on all Ipv4 and interface pairs existing in the nodes provided in the container. | |
void | EnableAsciiIpv4 (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool explicitFilename) |
Enable pcap output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface. Since there can be only one Ipv4 aggregated to a node, the node-id unambiguously determines the Ipv4. | |
void | EnableAsciiIpv4 (Ptr< OutputStreamWrapper > stream, uint32_t nodeid, uint32_t interface, bool explicitFilename) |
Enable pcap output on the Ipv4 and interface pair specified by a global node-id (of a previously created node) and interface. Since there can be only one Ipv4 aggregated to a node, the node-id unambiguously determines the Ipv4. | |
void | EnableAsciiIpv4All (std::string prefix) |
Enable ascii trace output on all Ipv4 and interface pairs existing in the set of all nodes created in the simulation. | |
void | EnableAsciiIpv4All (Ptr< OutputStreamWrapper > stream) |
Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes created in the simulation. | |
virtual void | EnableAsciiIpv4Internal (Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< Ipv4 > ipv4, uint32_t interface, bool explicitFilename)=0 |
Enable ascii trace output on the indicated Ipv4 and interface pair. | |
![]() | |
AsciiTraceHelperForIpv6 () | |
Construct an AsciiTraceHelperForIpv6. | |
virtual | ~AsciiTraceHelperForIpv6 () |
Destroy an AsciiTraceHelperForIpv6. | |
void | EnableAsciiIpv6 (std::string prefix, Ptr< Ipv6 > ipv6, uint32_t interface, bool explicitFilename=false) |
Enable ascii trace output on the indicated Ipv6 and interface pair. | |
void | EnableAsciiIpv6 (Ptr< OutputStreamWrapper > stream, Ptr< Ipv6 > ipv6, uint32_t interface) |
Enable ascii trace output on the indicated Ipv6 and interface pair. | |
void | EnableAsciiIpv6 (std::string prefix, std::string ipv6Name, uint32_t interface, bool explicitFilename=false) |
Enable ascii trace output the indicated Ipv6 and interface pair using an Ipv6 previously named using the ns-3 object name service. | |
void | EnableAsciiIpv6 (Ptr< OutputStreamWrapper > stream, std::string ipv6Name, uint32_t interface) |
Enable ascii trace output the indicated net device using a device previously named using the ns-3 object name service. | |
void | EnableAsciiIpv6 (std::string prefix, Ipv6InterfaceContainer c) |
Enable ascii trace output on each Ipv6 and interface pair in the container. | |
void | EnableAsciiIpv6 (Ptr< OutputStreamWrapper > stream, Ipv6InterfaceContainer c) |
Enable ascii trace output on each device in the container which is of the appropriate type. | |
void | EnableAsciiIpv6 (std::string prefix, NodeContainer n) |
Enable ascii trace output on all Ipv6 and interface pairs existing in the nodes provided in the container. | |
void | EnableAsciiIpv6 (Ptr< OutputStreamWrapper > stream, NodeContainer n) |
Enable ascii trace output on all Ipv6 and interface pairs existing in the nodes provided in the container. | |
void | EnableAsciiIpv6 (std::string prefix, uint32_t nodeid, uint32_t interface, bool explicitFilename) |
Enable pcap output on the Ipv6 and interface pair specified by a global node-id (of a previously created node) and interface. Since there can be only one Ipv6 aggregated to a node, the node-id unambiguously determines the Ipv6. | |
void | EnableAsciiIpv6 (Ptr< OutputStreamWrapper > stream, uint32_t nodeid, uint32_t interface) |
Enable pcap output on the Ipv6 and interface pair specified by a global node-id (of a previously created node) and interface. Since there can be only one Ipv6 aggregated to a node, the node-id unambiguously determines the Ipv6. | |
void | EnableAsciiIpv6All (std::string prefix) |
Enable ascii trace output on all Ipv6 and interface pairs existing in the set of all nodes created in the simulation. | |
void | EnableAsciiIpv6All (Ptr< OutputStreamWrapper > stream) |
Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes created in the simulation. | |
virtual void | EnableAsciiIpv6Internal (Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< Ipv6 > ipv6, uint32_t interface, bool explicitFilename)=0 |
Enable ascii trace output on the indicated Ipv6 and interface pair. |
Private Member Functions | |
bool | AsciiHooked (Ptr< Ipv4 > ipv4) |
bool | AsciiHooked (Ptr< Ipv6 > ipv6) |
virtual void | EnableAsciiIpv4Internal (Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< Ipv4 > ipv4, uint32_t interface, bool explicitFilename) |
Enable ascii trace output on the indicated Ipv4 and interface pair. | |
virtual void | EnableAsciiIpv6Internal (Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< Ipv6 > ipv6, uint32_t interface, bool explicitFilename) |
Enable ascii trace output on the indicated Ipv6 and interface pair. | |
virtual void | EnablePcapIpv4Internal (std::string prefix, Ptr< Ipv4 > ipv4, uint32_t interface, bool explicitFilename) |
Enable pcap output the indicated Ipv4 and interface pair. | |
virtual void | EnablePcapIpv6Internal (std::string prefix, Ptr< Ipv6 > ipv6, uint32_t interface, bool explicitFilename) |
Enable pcap output the indicated Ipv6 and interface pair. | |
void | Initialize (void) |
bool | PcapHooked (Ptr< Ipv4 > ipv4) |
bool | PcapHooked (Ptr< Ipv6 > ipv6) |
Static Private Member Functions | |
static void | Cleanup (void) |
static void | CreateAndAggregateObjectFromTypeId (Ptr< Node > node, const std::string typeId) |
Private Attributes | |
bool | m_ipv4Enabled |
IPv4 install state (enabled/disabled) ? | |
bool | m_ipv6Enabled |
IPv6 install state (enabled/disabled) ? | |
const Ipv4RoutingHelper * | m_routing |
const Ipv6RoutingHelper * | m_routingv6 |
IPv6 routing helper. | |
ObjectFactory | m_tcpFactory |
aggregate IP/TCP/UDP functionality to existing Nodes.
This helper enables pcap and ascii tracing of events in the internet stack associated with a node. This is substantially similar to the tracing that happens in device helpers, but the important difference is that, well, there is no device. This means that the creation of output file names will change, and also the user-visible methods will not reference devices and therefore the number of trace enable methods is reduced.
Normally we avoid multiple inheritance in ns-3, however, the classes PcapUserHelperForIpv4 and AsciiTraceUserHelperForIpv4 are treated as "mixins". A mixin is a self-contained class that encapsulates a general attribute or a set of functionality that may be of interest to many other classes.
This class aggregates instances of these objects, by default, to each node:
Definition at line 64 of file internet-stack-helper.h.
ns3::InternetStackHelper::InternetStackHelper | ( | void | ) |
Create a new InternetStackHelper which uses a mix of static routing and global routing by default. The static routing protocol (ns3::Ipv4StaticRouting) and the global routing protocol are stored in an ns3::Ipv4ListRouting protocol with priorities 0, and -10 by default. If you wish to use different priorites and different routing protocols, you need to use an adhoc ns3::Ipv4RoutingHelper, such as ns3::OlsrHelper
Definition at line 232 of file internet-stack-helper.cc.
References Initialize().
|
virtual |
Destroy the InternetStackHelper
Definition at line 258 of file internet-stack-helper.cc.
References m_routing, and m_routingv6.
ns3::InternetStackHelper::InternetStackHelper | ( | const InternetStackHelper & | o | ) |
Definition at line 264 of file internet-stack-helper.cc.
References ns3::Ipv4RoutingHelper::Copy(), ns3::Ipv6RoutingHelper::Copy(), m_ipv4Enabled, m_ipv6Enabled, m_routing, m_routingv6, and m_tcpFactory.
Definition at line 766 of file internet-stack-helper.cc.
References ns3::g_interfaceStreamMapIpv4.
Referenced by EnableAsciiIpv4Internal(), and EnableAsciiIpv6Internal().
Definition at line 1055 of file internet-stack-helper.cc.
References ns3::g_interfaceStreamMapIpv6.
int64_t ns3::InternetStackHelper::AssignStreams | ( | NodeContainer | c, |
int64_t | stream | ||
) |
Assign a fixed random variable stream number to the random variables used by this model. Return the number of streams (possibly zero) that have been assigned. The Install() method should have previously been called by the user.
stream | first stream index to use |
c | NodeContainer of the set of nodes for which the internet models should be modified to use a fixed stream |
Definition at line 323 of file internet-stack-helper.cc.
References ns3::Ipv6Extension::AssignStreams(), ns3::Ipv4GlobalRouting::AssignStreams(), ns3::NodeContainer::Begin(), ns3::NodeContainer::End(), ns3::Ipv6ExtensionFragment::EXT_NUMBER, ns3::Object::GetObject(), and NS_ASSERT.
Referenced by ns3::aodv::ChainRegressionTest::CreateDevices().
|
staticprivate |
|
staticprivate |
Definition at line 378 of file internet-stack-helper.cc.
References ns3::Object::AggregateObject(), ns3::ObjectFactory::Create(), and ns3::ObjectFactory::SetTypeId().
Referenced by Install().
|
privatevirtual |
Enable ascii trace output on the indicated Ipv4 and interface pair.
stream | An OutputStreamWrapper representing an existing file to use when writing trace data. |
prefix | Filename prefix to use for ascii trace files. |
ipv4 | Ptr to the Ipv4 interface on which you want to enable tracing. |
interface | Interface ID on the Ipv4 on which you want to enable tracing. |
explicitFilename | Treat the prefix as an explicit filename if true |
Definition at line 781 of file internet-stack-helper.cc.
References AsciiHooked(), ns3::Config::Connect(), ns3::AsciiTraceHelper::CreateFileStream(), ns3::AsciiTraceHelper::DefaultDropSinkWithContext(), ns3::Packet::EnablePrinting(), ns3::g_interfaceStreamMapIpv4, ns3::AsciiTraceHelper::GetFilenameFromInterfacePair(), ns3::Node::GetId(), ns3::Object::GetObject(), ns3::AsciiTraceHelper::HookDefaultDropSinkWithoutContext(), ns3::Ipv4L3ProtocolDropSinkWithContext(), ns3::Ipv4L3ProtocolDropSinkWithoutContext(), ns3::Ipv4L3ProtocolRxSinkWithContext(), ns3::Ipv4L3ProtocolRxSinkWithoutContext(), ns3::Ipv4L3ProtocolTxSinkWithContext(), ns3::Ipv4L3ProtocolTxSinkWithoutContext(), m_ipv4Enabled, ns3::MakeBoundCallback(), NS_ASSERT_MSG, NS_LOG_INFO, and ns3::ObjectBase::TraceConnectWithoutContext().
|
privatevirtual |
Enable ascii trace output on the indicated Ipv6 and interface pair.
stream | An OutputStreamWrapper representing an existing file to use when writing trace data. |
prefix | Filename prefix to use for ascii trace files. |
ipv6 | Ptr to the Ipv6 interface on which you want to enable tracing. |
interface | Interface ID on the Ipv6 on which you want to enable tracing. |
explicitFilename | Treat the prefix as an explicit filename if true |
Definition at line 1070 of file internet-stack-helper.cc.
References AsciiHooked(), ns3::Config::Connect(), ns3::AsciiTraceHelper::CreateFileStream(), ns3::Packet::EnablePrinting(), ns3::g_interfaceStreamMapIpv6, ns3::AsciiTraceHelper::GetFilenameFromInterfacePair(), ns3::Node::GetId(), ns3::Object::GetObject(), ns3::Ipv6L3ProtocolDropSinkWithContext(), ns3::Ipv6L3ProtocolDropSinkWithoutContext(), ns3::Ipv6L3ProtocolRxSinkWithContext(), ns3::Ipv6L3ProtocolRxSinkWithoutContext(), ns3::Ipv6L3ProtocolTxSinkWithContext(), ns3::Ipv6L3ProtocolTxSinkWithoutContext(), m_ipv6Enabled, ns3::MakeBoundCallback(), NS_ASSERT_MSG, and NS_LOG_INFO.
|
privatevirtual |
Enable pcap output the indicated Ipv4 and interface pair.
prefix | Filename prefix to use for pcap files. |
ipv4 | Ptr to the Ipv4 interface on which you want to enable tracing. |
interface | Interface ID on the Ipv4 on which you want to enable tracing. |
explicitFilename | Treat the prefix as an explicit filename if true |
Definition at line 479 of file internet-stack-helper.cc.
References ns3::PcapHelper::CreateFile(), ns3::PcapHelper::DLT_RAW, ns3::g_interfaceFileMapIpv4, ns3::PcapHelper::GetFilenameFromInterfacePair(), ns3::Object::GetObject(), ns3::Ipv4L3ProtocolRxTxSink(), m_ipv4Enabled, ns3::MakeCallback(), NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_INFO, PcapHooked(), and ns3::ObjectBase::TraceConnectWithoutContext().
|
privatevirtual |
Enable pcap output the indicated Ipv6 and interface pair.
prefix | Filename prefix to use for pcap files. |
ipv6 | Ptr to the Ipv6 interface on which you want to enable tracing. |
interface | Interface ID on the Ipv6 on which you want to enable tracing. |
explicitFilename | Treat the prefix as an explicit filename if true |
Definition at line 571 of file internet-stack-helper.cc.
References ns3::PcapHelper::CreateFile(), ns3::PcapHelper::DLT_RAW, ns3::g_interfaceFileMapIpv6, ns3::PcapHelper::GetFilenameFromInterfacePair(), ns3::Object::GetObject(), ns3::Ipv6L3ProtocolRxTxSink(), m_ipv6Enabled, ns3::MakeCallback(), NS_ASSERT_MSG, NS_LOG_FUNCTION, NS_LOG_INFO, and PcapHooked().
|
private |
Definition at line 243 of file internet-stack-helper.cc.
References ns3::Ipv4ListRoutingHelper::Add(), ns3::Ipv6ListRoutingHelper::Add(), SetRoutingHelper(), and SetTcp().
Referenced by InternetStackHelper(), and Reset().
void ns3::InternetStackHelper::Install | ( | std::string | nodeName | ) | const |
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provided node. This method will assert if called on a node that already has an Ipv4 object aggregated to it.
nodeName | The name of the node on which to install the stack. |
Definition at line 435 of file internet-stack-helper.cc.
Referenced by ns3::EpcHelper::AddEnb(), ns3::aodv::Bug772ChainTest::CreateDevices(), HwmpProactiveRegressionTest::CreateDevices(), FlameRegressionTest::CreateDevices(), HwmpDoRfRegressionTest::CreateDevices(), HwmpSimplestRegressionTest::CreateDevices(), HwmpReactiveRegressionTest::CreateDevices(), ns3::aodv::ChainRegressionTest::CreateDevices(), ns3::olsr::Bug780Test::CreateNodes(), ns3::olsr::HelloRegressionTest::CreateNodes(), ns3::olsr::TcRegressionTest::CreateNodes(), IpAddressHelperTestCasev6::DoRun(), ns3::aodv::LoopbackTestCase::DoRun(), ns3::AnimationInterfaceTestCase::DoRun(), WifiMsduAggregatorThroughputTest::DoRun(), StaticRoutingSlash32TestCase::DoRun(), UdpClientServerTestCase::DoRun(), Ns3WimaxSfCreationTestCase::DoRun(), DynamicGlobalRoutingTestCase::DoRun(), CsmaBridgeTestCase::DoRun(), ns3::EpcS1uDlTestCase::DoRun(), Ns3TcpInteroperabilityTestCase::DoRun(), ns3::LteEpcE2eDataTestCase::DoRun(), UdpTraceClientServerTestCase::DoRun(), CsmaBroadcastTestCase::DoRun(), Ns3TcpCwndTestCase1::DoRun(), UdpEchoClientSetFillTestCase::DoRun(), ns3::EpcS1uUlTestCase::DoRun(), CsmaMulticastTestCase::DoRun(), GlobalRoutingSlash32TestCase::DoRun(), CsmaOneSubnetTestCase::DoRun(), CsmaPingTestCase::DoRun(), CsmaRawIpSocketTestCase::DoRun(), CsmaStarTestCase::DoRun(), Ns3WimaxSchedulingTestCase::DoRunOnce(), Ns3WimaxSFTypeTestCase::DoRunOnce(), ns3::EpcHelper::EpcHelper(), Install(), InstallAll(), AodvExample::InstallInternetStack(), DsdvManetExample::InstallInternetStack(), MeshTest::InstallInternetStack(), ns3::PointToPointGridHelper::InstallStack(), ns3::PointToPointStarHelper::InstallStack(), ns3::CsmaStarHelper::InstallStack(), ns3::PointToPointDumbbellHelper::InstallStack(), main(), RunSimulation(), and WifiInterferenceTestCase::WifiSimpleInterference().
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provided node. This method will assert if called on a node that already has an Ipv4 object aggregated to it.
node | The node on which to install the stack. |
Definition at line 387 of file internet-stack-helper.cc.
References ns3::Object::AggregateObject(), ns3::Ipv4RoutingHelper::Create(), ns3::Ipv6RoutingHelper::Create(), ns3::ObjectFactory::Create(), CreateAndAggregateObjectFromTypeId(), ns3::Object::GetObject(), m_ipv4Enabled, m_ipv6Enabled, m_routing, m_routingv6, m_tcpFactory, NS_FATAL_ERROR, ns3::Ipv6::RegisterExtensions(), ns3::Ipv6::RegisterOptions(), ns3::Ipv4::SetRoutingProtocol(), and ns3::Ipv6::SetRoutingProtocol().
void ns3::InternetStackHelper::Install | ( | NodeContainer | c | ) | const |
For each node in the input container, aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and, ns3::Tcp classes. The program will assert if this method is called on a container with a node that already has an Ipv4 object aggregated to it.
c | NodeContainer that holds the set of nodes on which to install the new stacks. |
Definition at line 363 of file internet-stack-helper.cc.
References ns3::NodeContainer::Begin(), ns3::NodeContainer::End(), and Install().
void ns3::InternetStackHelper::InstallAll | ( | void | ) | const |
Aggregate IPv4, IPv6, UDP, and TCP stacks to all nodes in the simulation
Definition at line 372 of file internet-stack-helper.cc.
References ns3::NodeContainer::GetGlobal(), and Install().
Referenced by Ns3TcpNoDelayTestCase::DoRun(), Ns3TcpSocketTestCase1::DoRun(), NscTcpLossTestCase1::DoRun(), Ns3TcpLossTestCase::DoRun(), Ns3TcpStateTestCase::DoRun(), Ns3TcpSocketTestCase2::DoRun(), NscTcpLossTestCase2::DoRun(), Ns3TcpCwndTestCase2::DoRun(), and main().
InternetStackHelper & ns3::InternetStackHelper::operator= | ( | const InternetStackHelper & | o | ) |
Definition at line 274 of file internet-stack-helper.cc.
References ns3::Ipv4RoutingHelper::Copy(), ns3::Ipv6RoutingHelper::Copy(), m_routing, and m_routingv6.
Definition at line 464 of file internet-stack-helper.cc.
References ns3::g_interfaceFileMapIpv4.
Referenced by EnablePcapIpv4Internal(), and EnablePcapIpv6Internal().
Definition at line 556 of file internet-stack-helper.cc.
References ns3::g_interfaceFileMapIpv6.
void ns3::InternetStackHelper::Reset | ( | void | ) |
Return helper internal state to that of a newly constructed one
Definition at line 286 of file internet-stack-helper.cc.
References Initialize(), m_ipv4Enabled, m_ipv6Enabled, m_routing, and m_routingv6.
void ns3::InternetStackHelper::SetIpv4StackInstall | ( | bool | enable | ) |
Enable/disable IPv4 stack install.
enable | enable state |
Definition at line 312 of file internet-stack-helper.cc.
References m_ipv4Enabled.
Referenced by IpAddressHelperTestCasev6::DoRun().
void ns3::InternetStackHelper::SetIpv6StackInstall | ( | bool | enable | ) |
Enable/disable IPv6 stack install.
enable | enable state |
Definition at line 317 of file internet-stack-helper.cc.
References m_ipv6Enabled.
void ns3::InternetStackHelper::SetRoutingHelper | ( | const Ipv4RoutingHelper & | routing | ) |
routing | a new routing helper |
Set the routing helper to use during Install. The routing helper is really an object factory which is used to create an object of type ns3::Ipv4RoutingProtocol per node. This routing object is then associated to a single ns3::Ipv4 object through its ns3::Ipv4::SetRoutingProtocol.
Definition at line 298 of file internet-stack-helper.cc.
References ns3::Ipv4RoutingHelper::Copy(), and m_routing.
Referenced by ns3::aodv::Bug772ChainTest::CreateDevices(), ns3::aodv::ChainRegressionTest::CreateDevices(), ns3::olsr::Bug780Test::CreateNodes(), ns3::olsr::HelloRegressionTest::CreateNodes(), ns3::olsr::TcRegressionTest::CreateNodes(), ns3::aodv::LoopbackTestCase::DoRun(), Initialize(), AodvExample::InstallInternetStack(), DsdvManetExample::InstallInternetStack(), and main().
void ns3::InternetStackHelper::SetRoutingHelper | ( | const Ipv6RoutingHelper & | routing | ) |
Set IPv6 routing helper.
routing | IPv6 routing helper |
Definition at line 305 of file internet-stack-helper.cc.
References ns3::Ipv6RoutingHelper::Copy(), and m_routingv6.
void ns3::InternetStackHelper::SetTcp | ( | std::string | tid | ) |
set the Tcp stack which will not need any other parameter.
This function sets up the tcp stack to the given TypeId. It should not be used for NSC stack setup because the nsc stack needs the Library attribute to be setup, please use instead the version that requires an attribute and a value. If you choose to use this function anyways to set nsc stack the default value for the linux library will be used: "liblinux2.6.26.so".
tid | the type id, typically it is set to "ns3::TcpL4Protocol" |
Definition at line 350 of file internet-stack-helper.cc.
References m_tcpFactory, and ns3::ObjectFactory::SetTypeId().
Referenced by NscTcpLossTestCase1::DoRun(), Ns3TcpInteroperabilityTestCase::DoRun(), NscTcpLossTestCase2::DoRun(), Ns3TcpCwndTestCase1::DoRun(), and Initialize().
void ns3::InternetStackHelper::SetTcp | ( | std::string | tid, |
std::string | attr, | ||
const AttributeValue & | val | ||
) |
This function is used to setup the Network Simulation Cradle stack with library value.
Give the NSC stack a shared library file name to use when creating the stack implementation. The attr string is actually the attribute name to be setup and val is its value. The attribute is the stack implementation to be used and the value is the shared library name.
tid | The type id, for the case of nsc it would be "ns3::NscTcpL4Protocol" |
attr | The attribute name that must be setup, for example "Library" |
val | The attribute value, which will be in fact the shared library name (example:"liblinux2.6.26.so") |
Definition at line 356 of file internet-stack-helper.cc.
References m_tcpFactory, ns3::ObjectFactory::Set(), and ns3::ObjectFactory::SetTypeId().
|
private |
IPv4 install state (enabled/disabled) ?
Definition at line 300 of file internet-stack-helper.h.
Referenced by EnableAsciiIpv4Internal(), EnablePcapIpv4Internal(), Install(), InternetStackHelper(), Reset(), and SetIpv4StackInstall().
|
private |
IPv6 install state (enabled/disabled) ?
Definition at line 305 of file internet-stack-helper.h.
Referenced by EnableAsciiIpv6Internal(), EnablePcapIpv6Internal(), Install(), InternetStackHelper(), Reset(), and SetIpv6StackInstall().
|
private |
Definition at line 259 of file internet-stack-helper.h.
Referenced by Install(), InternetStackHelper(), operator=(), Reset(), SetRoutingHelper(), and ~InternetStackHelper().
|
private |
IPv6 routing helper.
Definition at line 265 of file internet-stack-helper.h.
Referenced by Install(), InternetStackHelper(), operator=(), Reset(), SetRoutingHelper(), and ~InternetStackHelper().
|
private |
Definition at line 258 of file internet-stack-helper.h.
Referenced by Install(), InternetStackHelper(), and SetTcp().