A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::TapBridgeHelper Class Reference

build TapBridge to allow ns-3 simulations to interact with Linux tap devices and processes on the Linux host. More...

#include "tap-bridge-helper.h"

+ Collaboration diagram for ns3::TapBridgeHelper:

Public Member Functions

 TapBridgeHelper ()
 Construct a TapBridgeHelper to make life easier for people wanting to have their simulations interact with Linux tap devices and processes on the Linux host.
 
 TapBridgeHelper (Ipv4Address gateway)
 Construct a TapBridgeHelper to make life easier for people wanting to have their simulations interact with Linux tap devices and processes on the Linux host.
 
Ptr< NetDeviceInstall (Ptr< Node > node, Ptr< NetDevice > nd)
 This method installs a TapBridge on the specified Node and forms the bridge with the NetDevice specified.
 
Ptr< NetDeviceInstall (Ptr< Node > node, Ptr< NetDevice > nd, const AttributeValue &bridgeType)
 This method installs a TapBridge on the specified Node and forms the bridge with the NetDevice specified.
 
Ptr< NetDeviceInstall (Ptr< Node > node, std::string ndName)
 This method installs a TapBridge on the specified Node and forms the bridge with the NetDevice specified.
 
Ptr< NetDeviceInstall (std::string nodeName, Ptr< NetDevice > nd)
 This method installs a TapBridge on the specified Node and forms the bridge with the NetDevice specified.
 
Ptr< NetDeviceInstall (std::string nodeName, std::string ndName)
 This method installs a TapBridge on the specified Node and forms the bridge with the NetDevice specified.
 
void SetAttribute (std::string n1, const AttributeValue &v1)
 Set an attribute in the underlying TapBridge net device when these devices are automatically created.
 

Private Attributes

ObjectFactory m_deviceFactory
 Object factory.
 

Detailed Description

build TapBridge to allow ns-3 simulations to interact with Linux tap devices and processes on the Linux host.

Definition at line 26 of file tap-bridge-helper.h.

Constructor & Destructor Documentation

◆ TapBridgeHelper() [1/2]

ns3::TapBridgeHelper::TapBridgeHelper ( )

Construct a TapBridgeHelper to make life easier for people wanting to have their simulations interact with Linux tap devices and processes on the Linux host.

Definition at line 20 of file tap-bridge-helper.cc.

References m_deviceFactory, NS_LOG_FUNCTION_NOARGS, and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

◆ TapBridgeHelper() [2/2]

ns3::TapBridgeHelper::TapBridgeHelper ( Ipv4Address gateway)

Construct a TapBridgeHelper to make life easier for people wanting to have their simulations interact with Linux tap devices and processes on the Linux host.

Parameters
gatewayAn Ipv4Address to be used as the default gateway for the created bridges,

Definition at line 26 of file tap-bridge-helper.cc.

References ns3::TapBridge::CONFIGURE_LOCAL, m_deviceFactory, NS_LOG_FUNCTION_NOARGS, SetAttribute(), and ns3::ObjectFactory::SetTypeId().

+ Here is the call graph for this function:

Member Function Documentation

◆ Install() [1/5]

Ptr< NetDevice > ns3::TapBridgeHelper::Install ( Ptr< Node > node,
Ptr< NetDevice > nd )

This method installs a TapBridge on the specified Node and forms the bridge with the NetDevice specified.

The Node is specified using a Ptr<Node> and the NetDevice is specified using a Ptr<NetDevice>

Parameters
nodeThe Ptr<Node> to install the TapBridge in
ndThe Ptr<NetDevice> to attach to the bridge.
Returns
A pointer to the new TapBridge NetDevice.

Definition at line 50 of file tap-bridge-helper.cc.

References ns3::ObjectFactory::Create(), m_deviceFactory, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

Referenced by Install(), Install(), Install(), and Install().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Install() [2/5]

Ptr< NetDevice > ns3::TapBridgeHelper::Install ( Ptr< Node > node,
Ptr< NetDevice > nd,
const AttributeValue & bridgeType )

This method installs a TapBridge on the specified Node and forms the bridge with the NetDevice specified.

The Node is specified using a Ptr<Node> and the NetDevice is specified using a Ptr<NetDevice>. The type of the actual Bridge device is specified with the provided AttributeValue (typically "ns3::TapBridge").

Parameters
nodeThe Ptr<Node> to install the TapBridge in
ndThe Ptr<NetDevice> to attach to the bridge.
bridgeTypeThe TypeId of the bridge that will be automatically created.
Returns
A pointer to the new TapBridge NetDevice.

Definition at line 42 of file tap-bridge-helper.cc.

References Install(), m_deviceFactory, NS_LOG_FUNCTION, and ns3::ObjectFactory::Set().

+ Here is the call graph for this function:

◆ Install() [3/5]

Ptr< NetDevice > ns3::TapBridgeHelper::Install ( Ptr< Node > node,
std::string ndName )

This method installs a TapBridge on the specified Node and forms the bridge with the NetDevice specified.

The NetDevice is specified by a name string that has previously been associated with the NetDevice using the Object Name Service.

Parameters
nodeThe Ptr<Node> to install the TapBridge in
ndNameThe name of the NetDevice to attach to the bridge.
Returns
A pointer to the new TapBridge NetDevice.

Definition at line 70 of file tap-bridge-helper.cc.

References ns3::Names::Find(), and Install().

+ Here is the call graph for this function:

◆ Install() [4/5]

Ptr< NetDevice > ns3::TapBridgeHelper::Install ( std::string nodeName,
Ptr< NetDevice > nd )

This method installs a TapBridge on the specified Node and forms the bridge with the NetDevice specified.

The node is specified by a name string that has previously been associated with the Node using the Object Name Service. The NetDevice is specified by a Ptr<NetDevice>.

Parameters
nodeNameThe name of the Node to install the TapBridge in
ndThe Ptr<NetDevice> to attach to the bridge.
Returns
A pointer to the new TapBridge NetDevice.

Definition at line 63 of file tap-bridge-helper.cc.

References ns3::Names::Find(), and Install().

+ Here is the call graph for this function:

◆ Install() [5/5]

Ptr< NetDevice > ns3::TapBridgeHelper::Install ( std::string nodeName,
std::string ndName )

This method installs a TapBridge on the specified Node and forms the bridge with the NetDevice specified.

The node is specified by a name string that has previously been associated with the Node using the Object Name Service. The NetDevice is specified by a name string that has previously been associated with the Object Name Service.

Parameters
nodeNameThe name of the Node to install the TapBridge in
ndNameThe name of the NetDevice to attach to the bridge.
Returns
A pointer to the new TapBridge NetDevice.

Definition at line 77 of file tap-bridge-helper.cc.

References ns3::Names::Find(), and Install().

+ Here is the call graph for this function:

◆ SetAttribute()

void ns3::TapBridgeHelper::SetAttribute ( std::string n1,
const AttributeValue & v1 )

Set an attribute in the underlying TapBridge net device when these devices are automatically created.

Parameters
n1the name of the attribute to set
v1the value of the attribute to set

Definition at line 35 of file tap-bridge-helper.cc.

References m_deviceFactory, NS_LOG_FUNCTION, and ns3::ObjectFactory::Set().

Referenced by TapBridgeHelper().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_deviceFactory

ObjectFactory ns3::TapBridgeHelper::m_deviceFactory
private

Object factory.

Definition at line 120 of file tap-bridge-helper.h.

Referenced by TapBridgeHelper(), TapBridgeHelper(), Install(), Install(), and SetAttribute().


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