ns3::InternetStackHelper Class Reference

aggregate IP/TCP/UDP functionality to existing Nodes. More...

#include <internet-stack-helper.h>

Collaboration diagram for ns3::InternetStackHelper:

Collaboration graph
[legend]

List of all members.

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)


Detailed Description

aggregate IP/TCP/UDP functionality to existing Nodes.

Constructor & Destructor Documentation

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


Member Function Documentation

static void ns3::InternetStackHelper::EnableAscii ( std::ostream &  os,
NodeContainer  n 
) [static]

Parameters:
os output stream
n node container
Enable ascii output on these drop traces, for each node in the NodeContainer.. /NodeList/[i]/$ns3ArpL3Protocol/Drop /NodeList/[i]/$ns3Ipv4L3Protocol/Drop

static void ns3::InternetStackHelper::EnableAsciiAll ( std::ostream &  os  )  [static]

Parameters:
os output stream
Enable ascii output on these drop traces, for all nodes. /NodeList/[i]/$ns3ArpL3Protocol/Drop /NodeList/[i]/$ns3Ipv4L3Protocol/Drop

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.

Parameters:
filename filename prefix to use for pcap files.
Warning:
If you perform multiple simulations in a single script, each iteration of the simulation will result in the trace files being overwritten. We don't attempt to anticipate what a user might actually want to do, so we leave it up to them. If you want to save any particular data, do so manually at inter-simulation time.

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.

Parameters:
c NodeContainer that holds the set of nodes on which to install the new stacks.

void ns3::InternetStackHelper::Install ( Ptr< Node node  )  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.

Parameters:
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.

Parameters:
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  ) 

Parameters:
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.

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.

Parameters:
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".

Parameters:
tid the type id, typically it is set to "ns3::TcpL4Protocol"


The documentation for this class was generated from the following file:

Generated on Fri Apr 9 15:01:10 2010 for NS-3 by  doxygen 1.5.8