#include <internet-stack-helper.h>
Public Member Functions | |
InternetStackHelper (void) | |
void | SetRoutingHelper (const Ipv4RoutingHelper &routing) |
void | Install (std::string nodeName) const |
void | Install (Ptr< Node > node) const |
void | Install (NodeContainer c) const |
void | InstallAll (void) const |
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. | |
Static Public Member Functions | |
static void | EnableAscii (std::ostream &os, NodeContainer n) |
static void | EnableAsciiAll (std::ostream &os) |
static void | EnablePcapAll (std::string filename) |
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
static void ns3::InternetStackHelper::EnableAscii | ( | std::ostream & | os, | |
NodeContainer | n | |||
) | [static] |
os | output stream | |
n | node container |
static void ns3::InternetStackHelper::EnableAsciiAll | ( | std::ostream & | os | ) | [static] |
os | output stream |
static void ns3::InternetStackHelper::EnablePcapAll | ( | std::string | filename | ) | [static] |
Enable pcap output on each protocol instance which is of the ns3::Ipv4L3Protocol type. Both Tx and Rx events will be logged.
filename | filename prefix to use for pcap files. |
void ns3::InternetStackHelper::Install | ( | NodeContainer | c | ) | const |
For each node in the input container, aggregate implementations of the ns3::Ipv4, 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. |
Aggregate implementations of the ns3::Ipv4, 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. |
void ns3::InternetStackHelper::Install | ( | std::string | nodeName | ) | const |
Aggregate implementations of the ns3::Ipv4, 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. |
void ns3::InternetStackHelper::InstallAll | ( | void | ) | const |
Aggregate ip, udp, and tcp stacks to all nodes in the simulation
void ns3::InternetStackHelper::SetRoutingHelper | ( | const Ipv4RoutingHelper & | routing | ) |
routing | a new routing helper |
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") |
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" |