ZeroSDN Controller  1.0
A modular distributed Software-Defined Network Controller
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros
SwitchAdapterRunner Class Reference

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 ()
 

Detailed Description

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.

Author
Andre Kutzleb
Alexander Kicherer
Matthias Hoppe
Date
13.07.2015
Remarks
Refactored / rewritten by Andre Kutzleb on 18.07.2015

Constructor & Destructor Documentation

SwitchAdapterRunner::SwitchAdapterRunner ( const of_version_t &  openFlowVersion,
const uint16_t  serverPort,
const std::string &  configFile 
)

Constructs (but does not start) a SwitchAdapterRunner.

Parameters
openFlowVersionthe OpenFlow version this runner and the spawned SwitchAdapters will speak with the switches.
serverPortthe 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.

Member Function Documentation

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.

Returns
true if started successfully, false else (could not bind ServerSocket)
void SwitchAdapterRunner::stop ( )

closes the serverSocket, shuts down all child SwitchAdapter modules.


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