#include <LinkDiscoveryModule.hpp>
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
| LinkDiscoveryModule::LinkDiscoveryModule |
( |
uint64_t |
instanceId | ) |
|
| LinkDiscoveryModule::~LinkDiscoveryModule |
( |
| ) |
|
| 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
-
| message | The incoming ZmfMessage which contains information to the correlating Requests |
| sender | is a tuple to identify the instance inside the zmf network |
- Returns
- True if we want to respond on the request, false otherwise
| 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: