A Discrete-Event Network Simulator
API
ofswitch13-external-helper.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 University of Campinas (Unicamp)
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Luciano Jerez Chaves <ljerezchaves@gmail.com>
18  */
19 
20 #ifndef OFSWITCH13_EXTERNAL_HELPER_H
21 #define OFSWITCH13_EXTERNAL_HELPER_H
22 
23 #include <ns3/ofswitch13-helper.h>
24 
25 namespace ns3
26 {
27 
28 class Node;
29 class AttributeValue;
30 class OFSwitch13Controller;
31 class OFSwitch13LearningController;
32 
43 {
44  public:
47 
52  static TypeId GetTypeId();
53 
54  // Inherited from OFSwitch13Helper.
56  void SetChannelDataRate(DataRate rate) override;
57  void CreateOpenFlowChannels() override;
58 
70 
71  protected:
73  void DoDispose() override;
74 
75  private:
78  uint16_t m_controlPort;
80 };
81 
82 } // namespace ns3
83 #endif /* OFSWITCH13_EXTERNAL_HELPER_H */
Class for representing data rates.
Definition: data-rate.h:90
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:43
This helper extends the base class and can be instantiated to create and configure an OpenFlow 1....
void CreateOpenFlowChannels() override
This virtual method must interconnect all switches to all controllers installed by this helper and st...
Ptr< NetDevice > InstallExternalController(Ptr< Node > cNode)
This method prepares the controller node so it can be used to connect internal simulated switches to ...
uint16_t m_controlPort
OF controller TCP port.
~OFSwitch13ExternalHelper() override
Dummy destructor, see DoDispose.
Ptr< CsmaChannel > m_csmaChannel
Common CSMA channel.
static TypeId GetTypeId()
Register this type.
void SetChannelType(ChannelType type) override
Set the OpenFlow channel type used to create the connections between switches and controllers.
Ipv4Address m_controlAddr
OF IP controller addr.
Ptr< Node > m_controlNode
OF controller node.
void SetChannelDataRate(DataRate rate) override
Set the OpenFlow channel data rate used to create the connections between switches and controllers.
void DoDispose() override
Destructor implementation.
OFSwitch13ExternalHelper()
Default constructor.
This is a base class that must be extended to create and configure an OpenFlow 1.3 network domain com...
ChannelType
OpenFlow channel type, used to create the connections.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
a unique identifier for an interface.
Definition: type-id.h:60
Every class exported by the ns3 library is enclosed in the ns3 namespace.