ns-3 Direct Code Execution
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ns3::LinuxStackHelper Class Reference

aggregate Ipv4Linux to nodes More...

#include <linux-stack-helper.h>

Public Member Functions

void SysctlSet (NodeContainer c, std::string path, std::string value)

Static Public Member Functions

static void Install (std::string nodeName)
static void Install (Ptr< Node > node)
static void Install (NodeContainer c)
static void InstallAll (void)
static void PopulateRoutingTables ()
static void RunIp (Ptr< Node > node, Time at, std::string str)
static void SysctlGet (Ptr< Node > node, Time at, std::string path, void(*callback)(std::string, std::string))

Static Private Member Functions

static void SysctlGetCallback (Ptr< Node > node, std::string path, void(*callback)(std::string, std::string))

Detailed Description

aggregate Ipv4Linux to nodes

Today the first goal of the Ipv4Linux is to be able to use the standards NS-3 Helpers for two tasks: 1 - assign address to devices using Ipv4AddressHelper, 2 - create the static routes using Ipv4GlobalRoutingHelper

Definition at line 40 of file linux-stack-helper.h.

Member Function Documentation

void ns3::LinuxStackHelper::Install ( std::string  nodeName)
static

Aggregate ns3::Ipv4Linux classe onto the provided node. This method will assert if called on a node that already has an Ipv4 object aggregated to it.

Parameters
nodeNameThe name of the node on which to install the stack.

Definition at line 37 of file linux-stack-helper.cc.

Referenced by Install(), and InstallAll().

+ Here is the caller graph for this function:

void ns3::LinuxStackHelper::Install ( Ptr< Node >  node)
static

Aggregate ns3::Ipv4Linux classe onto the provided node. This method will assert if called on a node that already has an Ipv4 object aggregated to it.

Parameters
nodeThe node on which to install the stack.

Definition at line 30 of file linux-stack-helper.cc.

References ns3::Ipv4Linux::InstallNode().

+ Here is the call graph for this function:

void ns3::LinuxStackHelper::Install ( NodeContainer  c)
static

Aggregate ns3::Ipv4Linux class onto the provided node. This method will assert if called on a node that already has an Ipv4 object aggregated to it.

Parameters
cNodeContainer that holds the set of nodes on which to install the new stacks.

Definition at line 45 of file linux-stack-helper.cc.

References Install().

+ Here is the call graph for this function:

void ns3::LinuxStackHelper::InstallAll ( void  )
static

Aggregate ns3::Ipv4Linux to all nodes in the simulation

Definition at line 55 of file linux-stack-helper.cc.

References Install().

+ Here is the call graph for this function:

void ns3::LinuxStackHelper::PopulateRoutingTables ( )
static

Populate routing information to all the nodes in network from GlobalRoutingTable.

Limitation: 1) This method SHOULD call after Ipv4GlobalRoutingHelper::PopulateRoutingTables () so that LinuxStackHelper can obtain the route information. 2) This feature is only available for IPv4 route information. IPv6 is not implemented.

Definition at line 63 of file linux-stack-helper.cc.

References ns3::Ipv4Linux::PopulateRoutingTable().

+ Here is the call graph for this function:

void ns3::LinuxStackHelper::RunIp ( Ptr< Node >  node,
Time  at,
std::string  str 
)
static

Execute "ip" command (of Linux) on a specific node to configure the ip address/route/etc information.

Parameters
nodeThe node pointer Ptr<Node> to configure.
atthe delta from the begining of simulation to execute this command.
stra string for the command line argument of ip command. e.g., "route add 10.0.1.0/24 via 10.0.0.1"

Definition at line 77 of file linux-stack-helper.cc.

References ns3::DceApplicationHelper::Install(), ns3::DceApplicationHelper::ParseArguments(), ns3::DceApplicationHelper::ResetArguments(), ns3::DceApplicationHelper::SetBinary(), and ns3::DceApplicationHelper::SetStackSize().

+ Here is the call graph for this function:

void ns3::LinuxStackHelper::SysctlGet ( Ptr< Node >  node,
Time  at,
std::string  path,
void(*)(std::string, std::string)  callback 
)
static

Obtain Linux kernel state with traditional 'sysctl' interface.

Parameters
nodeThe node pointer Ptr<Node> that will ask the status.
atthe delta from the begining of simulation to ask this query.
patha string value for sysctl parameter. it starts from '.' following the name of parameter. e.g., ".net.ipv4.conf.default.forwarding"
callbacka callback function to parse the result of sysctl query.

Definition at line 112 of file linux-stack-helper.cc.

References ns3::LinuxSocketFdFactory::ScheduleTask(), and SysctlGetCallback().

+ Here is the call graph for this function:

void ns3::LinuxStackHelper::SysctlGetCallback ( Ptr< Node >  node,
std::string  path,
void(*)(std::string, std::string)  callback 
)
staticprivate

Definition at line 92 of file linux-stack-helper.cc.

Referenced by SysctlGet().

+ Here is the caller graph for this function:

void ns3::LinuxStackHelper::SysctlSet ( NodeContainer  c,
std::string  path,
std::string  value 
)

Configure Linux kernel parameters with traditional 'sysctl' interface.

Parameters
cNodeContainer that holds the set of nodes to configure this parameter.
patha string value for sysctl parameter. it starts from '.' following the name of parameter. e.g., ".net.ipv4.conf.default.forwarding"
valuea string value to set for sysctl parameter.

Definition at line 132 of file linux-stack-helper.cc.

References ns3::LinuxSocketFdFactory::Set().

+ Here is the call graph for this function:


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