QuISP
|
#include <RoutingDaemon.h>
Public Member Functions | |
RoutingDaemon () | |
RoutingDaemon. | |
int | getNumEndNodes () override |
int | findQNicAddrByDestAddr (int destAddr) override |
![]() |
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 |
quisp::modules::routing_daemon::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.
|
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.
|
protected |
|
protected |
|
overridevirtual |
Implements quisp::modules::IRoutingDaemon.
|
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
|
protected |
|
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.
|
overrideprotected |
|
inlineoverrideprotected |
|
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
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |