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

Add capability to switch multiple LAN segments (IEEE 802.1D bridging) More...

#include "openflow-switch-helper.h"

+ Collaboration diagram for ns3::OpenFlowSwitchHelper:

Public Member Functions

 OpenFlowSwitchHelper ()
 
NetDeviceContainer Install (Ptr< Node > node, NetDeviceContainer c)
 This method creates an ns3::OpenFlowSwitchNetDevice with the attributes configured by OpenFlowSwitchHelper::SetDeviceAttribute, adds the device to the node, and attaches the given NetDevices as ports of the switch.
 
NetDeviceContainer Install (Ptr< Node > node, NetDeviceContainer c, Ptr< ns3::ofi::Controller > controller)
 This method creates an ns3::OpenFlowSwitchNetDevice with the attributes configured by OpenFlowSwitchHelper::SetDeviceAttribute, adds the device to the node, attaches the given NetDevices as ports of the switch, and sets up a controller connection using the provided Controller.
 
NetDeviceContainer Install (std::string nodeName, NetDeviceContainer c)
 This method creates an ns3::OpenFlowSwitchNetDevice with the attributes configured by OpenFlowSwitchHelper::SetDeviceAttribute, adds the device to the node, and attaches the given NetDevices as ports of the switch.
 
void SetDeviceAttribute (std::string n1, const AttributeValue &v1)
 Set an attribute on each ns3::OpenFlowSwitchNetDevice created by OpenFlowSwitchHelper::Install.
 

Private Attributes

ObjectFactory m_deviceFactory
 Object factory.
 

Detailed Description

Add capability to switch multiple LAN segments (IEEE 802.1D bridging)

Definition at line 38 of file openflow-switch-helper.h.

Constructor & Destructor Documentation

◆ OpenFlowSwitchHelper()

ns3::OpenFlowSwitchHelper::OpenFlowSwitchHelper ( )

Definition at line 33 of file openflow-switch-helper.cc.

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

+ Here is the call graph for this function:

Member Function Documentation

◆ Install() [1/3]

NetDeviceContainer ns3::OpenFlowSwitchHelper::Install ( Ptr< Node node,
NetDeviceContainer  c 
)

This method creates an ns3::OpenFlowSwitchNetDevice with the attributes configured by OpenFlowSwitchHelper::SetDeviceAttribute, adds the device to the node, and attaches the given NetDevices as ports of the switch.

Parameters
nodeThe node to install the device in
cContainer of NetDevices to add as switch ports
Returns
A container holding the added net device.

Definition at line 71 of file openflow-switch-helper.cc.

References ns3::NetDeviceContainer::Add(), ns3::NetDeviceContainer::Begin(), ns3::ObjectFactory::Create(), ns3::NetDeviceContainer::End(), m_deviceFactory, NS_LOG_FUNCTION_NOARGS, and NS_LOG_INFO.

+ Here is the call graph for this function:

◆ Install() [2/3]

NetDeviceContainer ns3::OpenFlowSwitchHelper::Install ( Ptr< Node node,
NetDeviceContainer  c,
Ptr< ns3::ofi::Controller controller 
)

This method creates an ns3::OpenFlowSwitchNetDevice with the attributes configured by OpenFlowSwitchHelper::SetDeviceAttribute, adds the device to the node, attaches the given NetDevices as ports of the switch, and sets up a controller connection using the provided Controller.

Parameters
nodeThe node to install the device in
cContainer of NetDevices to add as switch ports
controllerThe controller connection.
Returns
A container holding the added net device.

Definition at line 47 of file openflow-switch-helper.cc.

References ns3::NetDeviceContainer::Add(), ns3::NetDeviceContainer::Begin(), ns3::ObjectFactory::Create(), ns3::NetDeviceContainer::End(), m_deviceFactory, NS_LOG_FUNCTION_NOARGS, and NS_LOG_INFO.

Referenced by Install().

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

◆ Install() [3/3]

NetDeviceContainer ns3::OpenFlowSwitchHelper::Install ( std::string  nodeName,
NetDeviceContainer  c 
)

This method creates an ns3::OpenFlowSwitchNetDevice with the attributes configured by OpenFlowSwitchHelper::SetDeviceAttribute, adds the device to the node, and attaches the given NetDevices as ports of the switch.

Parameters
nodeNameThe name of the node to install the device in
cContainer of NetDevices to add as switch ports
Returns
A container holding the added net device.

Definition at line 90 of file openflow-switch-helper.cc.

References Install(), and NS_LOG_FUNCTION_NOARGS.

+ Here is the call graph for this function:

◆ SetDeviceAttribute()

void ns3::OpenFlowSwitchHelper::SetDeviceAttribute ( std::string  n1,
const AttributeValue v1 
)

Set an attribute on each ns3::OpenFlowSwitchNetDevice created by OpenFlowSwitchHelper::Install.

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

Definition at line 40 of file openflow-switch-helper.cc.

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

+ Here is the call graph for this function:

Member Data Documentation

◆ m_deviceFactory

ObjectFactory ns3::OpenFlowSwitchHelper::m_deviceFactory
private

Object factory.

Definition at line 96 of file openflow-switch-helper.h.

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


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