|
QuISP
|
Represents the database that holds link-state advertisements of nodes. Effectively, link_state_database is the topology information of a network. This class holds several public methods that enable easy execution of OSPF. More...
#include <Ospf.h>
Classes | |
| struct | Vertex |
| struct | VertexMinPriority |
Public Member Functions | |
| void | updateLinkStateDatabase (LinkStateAdvertisement &lsa) |
| Adds new lsa or updated lsa to link_state_database As a sideffect, this function clears lsdb_summary. | |
| LinkStateDatabaseSummary | getLinkStateDatabaseSummary () |
| Get the Link State Database Summary object. | |
| std::map< NodeAddr, int > | generateRoutingTableFromGraph (NodeAddr source) const |
| RouterIds | identifyMissingLinkStateAdvertisementId (const LinkStateDatabaseSummary &lsdb_summary_from_neighbor) const |
| virtual bool | needsFullLinkStateAdvertisementOf (const SummaryLinkStateAdvertisement &summary_lsa) const |
| LinkStateUpdate | getLinkStateUpdatesFor (const RouterIds &requests, int my_address) const |
| virtual LinkStateAdvertisement | getLinkStateAdvertisementOf (NodeAddr router) const |
| bool | hasLinkStateAdvertisementOf (NodeAddr router) const |
Protected Types | |
| using | VertexSharedPtr = std::shared_ptr<Vertex> |
| using | VertexMap = std::map<NodeAddr, VertexSharedPtr> |
| using | PriorityQueue = std::priority_queue<VertexSharedPtr, std::vector<VertexSharedPtr>, VertexMinPriority> |
Protected Member Functions | |
| int | getHopAddressToNeighbor (NodeAddr src, NodeAddr neighbor) const |
| NodeAddr | getSecondNodeInPathToDestNode (NodeAddr source_id, NodeAddr dst_id, const VertexMap &vertices) const |
| virtual const VertexMap | dijkstraAlgorithm (NodeAddr source_id) const |
| Dijkstra's Algorithm Reference: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. 2009. Introduction to Algorithms, Third Edition (3rd. ed.). The MIT Press. | |
| VertexMap | generateVerticesFromLsdb () const |
| double | weight (NodeAddr node1, NodeAddr node2) const |
| VertexSharedPtr | popMinDistanceNode (PriorityQueue &q) const |
Protected Attributes | |
| std::map< NodeAddr, LinkStateAdvertisement > | link_state_database |
| LinkStateDatabaseSummary | lsdb_summary |
Represents the database that holds link-state advertisements of nodes. Effectively, link_state_database is the topology information of a network. This class holds several public methods that enable easy execution of OSPF.
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
Dijkstra's Algorithm Reference: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. 2009. Introduction to Algorithms, Third Edition (3rd. ed.). The MIT Press.
| source_id |
| std::map< NodeAddr, int > quisp::modules::ospf::LinkStateDatabase::generateRoutingTableFromGraph | ( | NodeAddr | source | ) | const |
|
protected |
|
protected |
|
virtual |
| LinkStateDatabaseSummary quisp::modules::ospf::LinkStateDatabase::getLinkStateDatabaseSummary | ( | ) |
Get the Link State Database Summary object.
This function also takes care of generating lsdb_summary when needed This is to prevent unnecessary lsdb_summary update, as lsdb_summary is not needed until a router receives LsrPacket
| LinkStateUpdate quisp::modules::ospf::LinkStateDatabase::getLinkStateUpdatesFor | ( | const RouterIds & | requests, |
| int | my_address ) const |
|
protected |
| bool quisp::modules::ospf::LinkStateDatabase::hasLinkStateAdvertisementOf | ( | NodeAddr | router | ) | const |
| RouterIds quisp::modules::ospf::LinkStateDatabase::identifyMissingLinkStateAdvertisementId | ( | const LinkStateDatabaseSummary & | lsdb_summary_from_neighbor | ) | const |
|
virtual |
|
protected |
| void quisp::modules::ospf::LinkStateDatabase::updateLinkStateDatabase | ( | LinkStateAdvertisement & | lsa | ) |
Adds new lsa or updated lsa to link_state_database As a sideffect, this function clears lsdb_summary.
|
protected |
|
protected |
|
protected |