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)) |
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.
|
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.
nodeName | The 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().
|
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.
node | The node on which to install the stack. |
Definition at line 30 of file linux-stack-helper.cc.
References ns3::Ipv4Linux::InstallNode().
|
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.
c | NodeContainer 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().
|
static |
Aggregate ns3::Ipv4Linux to all nodes in the simulation
Definition at line 55 of file linux-stack-helper.cc.
References Install().
|
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().
|
static |
Execute "ip" command (of Linux) on a specific node to configure the ip address/route/etc information.
node | The node pointer Ptr<Node> to configure. |
at | the delta from the begining of simulation to execute this command. |
str | a 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().
|
static |
Obtain Linux kernel state with traditional 'sysctl' interface.
node | The node pointer Ptr<Node> that will ask the status. |
at | the delta from the begining of simulation to ask this query. |
path | a string value for sysctl parameter. it starts from '.' following the name of parameter. e.g., ".net.ipv4.conf.default.forwarding" |
callback | a 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().
|
staticprivate |
Definition at line 92 of file linux-stack-helper.cc.
Referenced by SysctlGet().
void ns3::LinuxStackHelper::SysctlSet | ( | NodeContainer | c, |
std::string | path, | ||
std::string | value | ||
) |
Configure Linux kernel parameters with traditional 'sysctl' interface.
c | NodeContainer that holds the set of nodes to configure this parameter. |
path | a string value for sysctl parameter. it starts from '.' following the name of parameter. e.g., ".net.ipv4.conf.default.forwarding" |
value | a string value to set for sysctl parameter. |
Definition at line 132 of file linux-stack-helper.cc.
References ns3::LinuxSocketFdFactory::Set().