Add capability to switch multiple LAN segments (IEEE 802.1D bridging) More...
#include "openflow-switch-helper.h"
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. More... | |
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. More... | |
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. More... | |
void | SetDeviceAttribute (std::string n1, const AttributeValue &v1) |
Set an attribute on each ns3::OpenFlowSwitchNetDevice created by OpenFlowSwitchHelper::Install. More... | |
Private Attributes | |
ObjectFactory | m_deviceFactory |
Object factory. More... | |
Add capability to switch multiple LAN segments (IEEE 802.1D bridging)
Definition at line 38 of file openflow-switch-helper.h.
ns3::OpenFlowSwitchHelper::OpenFlowSwitchHelper | ( | ) |
Definition at line 33 of file openflow-switch-helper.cc.
References m_deviceFactory, NS_LOG_FUNCTION_NOARGS, and ns3::ObjectFactory::SetTypeId().
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.
node | The node to install the device in |
c | Container of NetDevices to add as switch ports |
Definition at line 71 of file openflow-switch-helper.cc.
References ns3::NetDeviceContainer::Add(), ns3::Node::AddDevice(), ns3::OpenFlowSwitchNetDevice::AddSwitchPort(), ns3::NetDeviceContainer::Begin(), ns3::ObjectFactory::Create(), ns3::NetDeviceContainer::End(), ns3::Node::GetId(), m_deviceFactory, NS_LOG_FUNCTION_NOARGS, and NS_LOG_INFO.
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.
node | The node to install the device in |
c | Container of NetDevices to add as switch ports |
controller | The controller connection. |
Definition at line 47 of file openflow-switch-helper.cc.
References ns3::NetDeviceContainer::Add(), ns3::Node::AddDevice(), ns3::OpenFlowSwitchNetDevice::AddSwitchPort(), ns3::NetDeviceContainer::Begin(), openflow-switch::controller, ns3::ObjectFactory::Create(), ns3::NetDeviceContainer::End(), ns3::Node::GetId(), m_deviceFactory, NS_LOG_FUNCTION_NOARGS, NS_LOG_INFO, and ns3::OpenFlowSwitchNetDevice::SetController().
Referenced by Install().
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.
nodeName | The name of the node to install the device in |
c | Container of NetDevices to add as switch ports |
Definition at line 90 of file openflow-switch-helper.cc.
References Install(), and NS_LOG_FUNCTION_NOARGS.
void ns3::OpenFlowSwitchHelper::SetDeviceAttribute | ( | std::string | n1, |
const AttributeValue & | v1 | ||
) |
Set an attribute on each ns3::OpenFlowSwitchNetDevice created by OpenFlowSwitchHelper::Install.
n1 | the name of the attribute to set |
v1 | the 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().
|
private |
Object factory.
Definition at line 96 of file openflow-switch-helper.h.
Referenced by OpenFlowSwitchHelper(), Install(), and SetDeviceAttribute().