ZeroSDN Controller  1.0
A modular distributed Software-Defined Network Controller
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros
SwitchConnectionUtil::HandshakeResult Struct Reference

#include <SwitchConnectionUtil.h>

Public Types

enum  Status {
  NONE, HELLO_FAILED, WRONG_OPENFLOW_VERSION, FEATURE_REQUEST_FAILED,
  SUCCESS
}
 Possible outcomes of a handshake. More...
 

Public Member Functions

 HandshakeResult (const Status &status, const of_version_t &switchOpenFlowVersion, const uint64_t switchId)
 
std::string versionToString ()
 
std::string toString ()
 

Public Attributes

Status status = NONE
 Outcome of the handshake. More...
 
of_version_t switchOpenFlowVersion = OF_VERSION_UNKNOWN
 version of the switch More...
 
uint64_t switchId = 0
 switchId of the switch More...
 

Detailed Description

Object representing the outcome of a handshake with an OpenFlow switch.

Member Enumeration Documentation

Possible outcomes of a handshake.

Enumerator
NONE 
HELLO_FAILED 
WRONG_OPENFLOW_VERSION 
FEATURE_REQUEST_FAILED 
SUCCESS 

Constructor & Destructor Documentation

SwitchConnectionUtil::HandshakeResult::HandshakeResult ( const Status status,
const of_version_t &  switchOpenFlowVersion,
const uint64_t  switchId 
)
inline

Constructs a HandshakeResult.

Parameters
statusthe outcome of the handshake.
ofVersionthe OpenFlow version of the switch (only if the status is >= FEATURE_REQUEST_FAILED. else OF_VERSION_UNKNOWN)
switchIdthe switchId of the switch (only if the status is SUCCESS. else 0)

Member Function Documentation

std::string SwitchConnectionUtil::HandshakeResult::toString ( )
inline

returns a textual representation of this HandshakeResult.

Returns
a textual representation of this HandshakeResult.
std::string SwitchConnectionUtil::HandshakeResult::versionToString ( )
inline

Enum to string helper.

Returns
the openFlow version of this HandshakeResult, as string.

Member Data Documentation

Status SwitchConnectionUtil::HandshakeResult::status = NONE

Outcome of the handshake.

uint64_t SwitchConnectionUtil::HandshakeResult::switchId = 0

switchId of the switch

of_version_t SwitchConnectionUtil::HandshakeResult::switchOpenFlowVersion = OF_VERSION_UNKNOWN

version of the switch


The documentation for this struct was generated from the following file: