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

#include <LinkDiscoveryModule.hpp>

Inheritance diagram for LinkDiscoveryModule:

Classes

struct  DiscoverDevice
 
class  LinkDevice
 
struct  LinkDeviceTimestampTupel
 

Public Member Functions

 LinkDiscoveryModule (uint64_t instanceId)
 
 ~LinkDiscoveryModule ()
 
virtual zmf::data::ZmfOutReply handleRequest (const zmf::data::ZmfMessage &message, const zmf::data::ModuleUniqueId &sender) override
 
virtual void disable ()
 

Static Public Attributes

static const uint16_t LINK_DISCOVERY_MESSAGE_PAYLOAD_TYPE = 0x511F
 The own specified Ethernet message type. More...
 

Protected Member Functions

virtual bool enable ()
 

Detailed Description

The LinkDiscoveryModule knows about all links between switches in the SDN-network. These links are directed, meaning that if all switches have working bidirectional links between them, there will be two directed links for each connection.

Author
Matthias Strljic

Constructor & Destructor Documentation

LinkDiscoveryModule::LinkDiscoveryModule ( uint64_t  instanceId)
LinkDiscoveryModule::~LinkDiscoveryModule ( )

Member Function Documentation

void LinkDiscoveryModule::disable ( )
virtual

Deactivates the loop condition of the background thread

bool LinkDiscoveryModule::enable ( )
protectedvirtual

Enables the module out of a disabled state. This will setup the needed subscriptions (OpenFlow::PacketIn + SwitchRegistry::SwitchStateChanged), the database with a call of all existing switches from the SwitchRegistryModule and starts the background Thread for continouse link discovery

Returns
True if all needed elements could be setup correctly (subscriptions + database + background thread)
zmf::data::ZmfOutReply LinkDiscoveryModule::handleRequest ( const zmf::data::ZmfMessage &  message,
const zmf::data::ModuleUniqueId &  sender 
)
overridevirtual

Handles the incoming request messages from the zmf-network and handle accordingly to the received topic. The replies always represent the actual state of discovered links between switch instances. REQUEST.LINK_DISCOVERY_MODULE.GET_ALL_SWITCH_LINKS: Replies all links. REQUEST.LINK_DISCOVERY_MODULE.GET_LINKS_FROM_SWITCH: Replies links where the given switch id acts as source. REQUEST.LINK_DISCOVERY_MODULE.GET_LINKS_TO_SWITCH: Replies links where the given switch id acts as endpoint. REQUEST.LINK_DISCOVERY_MODULE.GET_LINKS_OF_SWITCH: Replies all links where the given switch id act as source or endpoint. REQUEST.LINK_DISCOVERY_MODULE.GET_LINKS_BETWEEN_TWO_SWITCHES Replies all links which contains both id's, one act as source and the other as endpoint.

Parameters
messageThe incoming ZmfMessage which contains information to the correlating Requests
senderis a tuple to identify the instance inside the zmf network
Returns
True if we want to respond on the request, false otherwise

Member Data Documentation

const uint16_t LinkDiscoveryModule::LINK_DISCOVERY_MESSAGE_PAYLOAD_TYPE = 0x511F
static

The own specified Ethernet message type.


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