|
ZeroSDN Controller
1.0
A modular distributed Software-Defined Network Controller
|
Class Managing a ServerSocket for incoming switch connections. More...
#include <SwitchAdapterRunner.h>
Public Member Functions | |
| SwitchAdapterRunner (const of_version_t &openFlowVersion, const uint16_t serverPort, const std::string &configFile) | |
| ~SwitchAdapterRunner () | |
| bool | start () |
| void | stop () |
Class Managing a ServerSocket for incoming switch connections.
For each incoming connection, an OpenFlow handshake is attempted. If the handshake is successful, a SwitchAdapter is started for the connection.
| SwitchAdapterRunner::SwitchAdapterRunner | ( | const of_version_t & | openFlowVersion, |
| const uint16_t | serverPort, | ||
| const std::string & | configFile | ||
| ) |
Constructs (but does not start) a SwitchAdapterRunner.
| openFlowVersion | the OpenFlow version this runner and the spawned SwitchAdapters will speak with the switches. |
| serverPort | the port of the address on which a ServerSocket will be listening for switches. |
| configFile | (optional) a path to the config file to use (instead of the default location) |
| SwitchAdapterRunner::~SwitchAdapterRunner | ( | ) |
Destructor. Stops all SwitchAdapters and closes the ServerSocket.
| bool SwitchAdapterRunner::start | ( | ) |
starts a ServerSocket listening for incoming switchConnections. For each incoming connection, an OpenFlow handshake is attempted. If the handshake is successful, a SwitchAdapter(Module) is started.
| void SwitchAdapterRunner::stop | ( | ) |
closes the serverSocket, shuts down all child SwitchAdapter modules.