QuISP
Loading...
Searching...
No Matches
quisp::modules::routing_daemon::RoutingDaemon Class Reference

#include <RoutingDaemon.h>

Inheritance diagram for quisp::modules::routing_daemon::RoutingDaemon:
Collaboration diagram for quisp::modules::routing_daemon::RoutingDaemon:

Public Member Functions

 RoutingDaemon ()
 RoutingDaemon.
 
int getNumEndNodes () override
 
int findQNicAddrByDestAddr (int destAddr) override
 
- Public Member Functions inherited from quisp::modules::IRoutingDaemon

Protected Member Functions

void generateRoutingTable ()
 
void generateRoutingTable (cTopology *topo)
 
int getQNicAddr (const cGate *const parentModuleGate)
 
void initialize (int stage) override
 
void handleMessage (cMessage *msg) override
 
int numInitStages () const override
 
size_t getNumNeighbors ()
 returns the number of neighbors of this node
 
void ospfHandleHelloPacket (const OspfHelloPacket *const pk)
 
void ospfInitializeRoutingDaemon ()
 
void ospfSendHelloPacketToNeighbor (NodeAddr neighbor)
 
bool ospfMyAddressIsRecognizedByNeighbor (const OspfHelloPacket *const msg)
 
void ospfRegisterNeighbor (const OspfPacket *const pk, OspfState state)
 
bool ospfNeighborIsRegistered (NodeAddr address) const
 
void ospfHandleDbdPacket (const OspfDbdPacket *const pk)
 
void ospfExStartState (const OspfDbdPacket *const pk)
 Exchange packets to decide who the master or slave is.
 
void ospfSendExstartDbdPacket (NodeAddr neighbor)
 
void ospfSlaveInitiateExchangeState (NodeAddr dest)
 
void ospfMasterEnterExchangeState (NodeAddr dest)
 
void ospfSendLsdbSummary (NodeAddr destination, bool i_am_master=false)
 
void ospfSendLinkStateRequest (NodeAddr dst, const RouterIds &missing_lsa_ids)
 
void ospfHandleLinkStateRequest (const OspfLsrPacket *const pk)
 
void ospfHandleLinkStateUpdate (const OspfLsuPacket *const pk)
 
void ospfUpdateLinkStateDatabase (const OspfLsuPacket *const msg)
 
void ospfSendUpdatedLsdbToNeighboringRouters (NodeAddr source_of_updated_lsdb)
 
void ospfUpdateMyAddressLsaInLsdb ()
 

Protected Attributes

NodeAddr my_address
 
RoutingTable qrtable
 
utils::ComponentProvider provider
 
ospf::NeighborTable neighbor_table
 
LinkStateDatabase link_state_database
 

Private Attributes

bool run_ospf
 

Constructor & Destructor Documentation

◆ RoutingDaemon()

quisp::modules::routing_daemon::RoutingDaemon::RoutingDaemon ( )

RoutingDaemon.

The RoutingDaemon is one of the five key modules in the software for a quantum repeater/router (qrsa). It will be responsible for running dynamic routing protocols, such as qOSPF, qBGP, etc.

It communicates with other RoutingDaemons, in other nodes on the network, as in the classical Internet. Internally, its role is to keep track of the QNICs and the links by communicating with the HardwareMonitor, and to provide information to the ConnectionManager when requested. (There is also one place where the RuleEngine needs access to information maintained by the RD.)

The above is the intended design.

TODO In fact, the RoutingDaemon as it exists today uses special, internal OMNeT++ magic to directly access the network topology, as stored in the simulator, rather than dynamically discovering it. That should be corrected.

At the moment, the RD is independent of the end-to-end reservation of resources, as dictated by the multiplexing (muxing) discpline in use. This means that it always returns a single, best path to connect to the requested node. A consequence is that ConnectionSetupRequest can fail if the resource management discipline is fully blocking, as in circuit switching, which is the first discipline we are implementing.

TODO Also, this code is built as a Module, via the Define_Module call; the other important modules are classes. That distinction needs to be addressed.

Member Function Documentation

◆ findQNicAddrByDestAddr()

int quisp::modules::routing_daemon::RoutingDaemon::findQNicAddrByDestAddr ( int destAddr)
overridevirtual

This is the only routine, at the moment, with any outside contact. Rather than exchanging a message with those who need this information (ConnectionManager, mainly, and in one case RuleEngine), this is a direct call that they make.

Implements quisp::modules::IRoutingDaemon.

◆ generateRoutingTable() [1/2]

void RoutingDaemon::generateRoutingTable ( )
protected

◆ generateRoutingTable() [2/2]

void RoutingDaemon::generateRoutingTable ( cTopology * topo)
protected

◆ getNumEndNodes()

int RoutingDaemon::getNumEndNodes ( )
overridevirtual

◆ getNumNeighbors()

size_t quisp::modules::routing_daemon::RoutingDaemon::getNumNeighbors ( )
protected

returns the number of neighbors of this node

we are assuming two nodes are connected by quantum channel if and only if they are connected by classical channel TODO: we need to change this function if above assumption no longer holds

Returns
size_t

◆ getQNicAddr()

int RoutingDaemon::getQNicAddr ( const cGate *const parentModuleGate)
protected

◆ handleMessage()

void quisp::modules::routing_daemon::RoutingDaemon::handleMessage ( cMessage * msg)
overrideprotected

Once we begin using dynamic routing protocols, this is where the messages will be handled. This perhaps will also be how we communicate with the other important daemons in the qrsa. TODO Handle dynamic routing protocol messages.

◆ initialize()

void RoutingDaemon::initialize ( int stage)
overrideprotected

◆ numInitStages()

int quisp::modules::routing_daemon::RoutingDaemon::numInitStages ( ) const
inlineoverrideprotected

◆ ospfExStartState()

void quisp::modules::routing_daemon::RoutingDaemon::ospfExStartState ( const OspfDbdPacket *const pk)
protected

Exchange packets to decide who the master or slave is.

Master/slave is decided based on the number of router address/ID. Whichever that has the bigger router address becomes the master Slave sends its Summary LSDB to Master Master send empty DBD packet until it receives Summary LSDB from Slave

◆ ospfHandleDbdPacket()

void RoutingDaemon::ospfHandleDbdPacket ( const OspfDbdPacket *const pk)
protected

◆ ospfHandleHelloPacket()

void RoutingDaemon::ospfHandleHelloPacket ( const OspfHelloPacket *const pk)
protected

◆ ospfHandleLinkStateRequest()

void RoutingDaemon::ospfHandleLinkStateRequest ( const OspfLsrPacket *const pk)
protected

◆ ospfHandleLinkStateUpdate()

void RoutingDaemon::ospfHandleLinkStateUpdate ( const OspfLsuPacket *const pk)
protected

◆ ospfInitializeRoutingDaemon()

void RoutingDaemon::ospfInitializeRoutingDaemon ( )
protected

◆ ospfMasterEnterExchangeState()

void RoutingDaemon::ospfMasterEnterExchangeState ( NodeAddr dest)
protected

◆ ospfMyAddressIsRecognizedByNeighbor()

bool RoutingDaemon::ospfMyAddressIsRecognizedByNeighbor ( const OspfHelloPacket *const msg)
protected

◆ ospfNeighborIsRegistered()

bool RoutingDaemon::ospfNeighborIsRegistered ( NodeAddr address) const
protected

◆ ospfRegisterNeighbor()

void RoutingDaemon::ospfRegisterNeighbor ( const OspfPacket *const pk,
OspfState state )
protected

◆ ospfSendExstartDbdPacket()

void RoutingDaemon::ospfSendExstartDbdPacket ( NodeAddr neighbor)
protected

◆ ospfSendHelloPacketToNeighbor()

void RoutingDaemon::ospfSendHelloPacketToNeighbor ( NodeAddr neighbor)
protected

◆ ospfSendLinkStateRequest()

void RoutingDaemon::ospfSendLinkStateRequest ( NodeAddr dst,
const RouterIds & missing_lsa_ids )
protected

◆ ospfSendLsdbSummary()

void RoutingDaemon::ospfSendLsdbSummary ( NodeAddr destination,
bool i_am_master = false )
protected

◆ ospfSendUpdatedLsdbToNeighboringRouters()

void RoutingDaemon::ospfSendUpdatedLsdbToNeighboringRouters ( NodeAddr source_of_updated_lsdb)
protected

◆ ospfSlaveInitiateExchangeState()

void RoutingDaemon::ospfSlaveInitiateExchangeState ( NodeAddr dest)
protected

◆ ospfUpdateLinkStateDatabase()

void RoutingDaemon::ospfUpdateLinkStateDatabase ( const OspfLsuPacket *const msg)
protected

◆ ospfUpdateMyAddressLsaInLsdb()

void RoutingDaemon::ospfUpdateMyAddressLsaInLsdb ( )
protected

Member Data Documentation

◆ link_state_database

LinkStateDatabase quisp::modules::routing_daemon::RoutingDaemon::link_state_database
protected

◆ my_address

NodeAddr quisp::modules::routing_daemon::RoutingDaemon::my_address
protected

◆ neighbor_table

ospf::NeighborTable quisp::modules::routing_daemon::RoutingDaemon::neighbor_table
protected

◆ provider

utils::ComponentProvider quisp::modules::routing_daemon::RoutingDaemon::provider
protected

◆ qrtable

RoutingTable quisp::modules::routing_daemon::RoutingDaemon::qrtable
protected

◆ run_ospf

bool quisp::modules::routing_daemon::RoutingDaemon::run_ospf
private

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