The Link State DataBase (LSDB) of the Global Route Manager. More...
#include <global-route-manager-impl.h>
Public Member Functions | |
GlobalRouteManagerLSDB () | |
Construct an empty Global Router Manager Link State Database. | |
~GlobalRouteManagerLSDB () | |
Destroy an empty Global Router Manager Link State Database. | |
void | Insert (Ipv4Address addr, GlobalRoutingLSA *lsa) |
Insert an IP address / Link State Advertisement pair into the Link State Database. | |
GlobalRoutingLSA * | GetLSA (Ipv4Address addr) const |
Look up the Link State Advertisement associated with the given link state ID (address). | |
GlobalRoutingLSA * | GetLSAByLinkData (Ipv4Address addr) const |
Look up the Link State Advertisement associated with the given link state ID (address). This is a variation of the GetLSA call to allow the LSA to be found by matching addr with the LinkData field of the TransitNetwork link record. | |
void | Initialize () |
Set all LSA flags to an initialized state, for SPF computation. | |
Private Types | |
typedef std::map< Ipv4Address, GlobalRoutingLSA * > | LSDBMap_t |
typedef std::pair< Ipv4Address, GlobalRoutingLSA * > | LSDBPair_t |
Private Member Functions | |
GlobalRouteManagerLSDB (GlobalRouteManagerLSDB &lsdb) | |
GlobalRouteManagerLSDB copy construction is disallowed. There's no need for it and a compiler provided shallow copy would be wrong. | |
GlobalRouteManagerLSDB & | operator= (GlobalRouteManagerLSDB &lsdb) |
The SPFVertex copy assignment operator is disallowed. There's no need for it and a compiler provided shallow copy would be wrong. | |
Private Attributes | |
LSDBMap_t | m_database |
The Link State DataBase (LSDB) of the Global Route Manager.
Each node in the simulation participating in global routing has a GlobalRouter interface. The primary job of this interface is to export Global Router Link State Advertisements (LSAs). These advertisements in turn contain a number of Global Router Link Records that describe the point to point links from the underlying node to other nodes (that will also export their own LSAs.
This class implements a searchable database of LSAs gathered from every router in the simulation.
Definition at line 605 of file global-route-manager-impl.h.
typedef std::map<Ipv4Address, GlobalRoutingLSA*> ns3::GlobalRouteManagerLSDB::LSDBMap_t [private] |
Definition at line 689 of file global-route-manager-impl.h.
typedef std::pair<Ipv4Address, GlobalRoutingLSA*> ns3::GlobalRouteManagerLSDB::LSDBPair_t [private] |
Definition at line 690 of file global-route-manager-impl.h.
ns3::GlobalRouteManagerLSDB::GlobalRouteManagerLSDB | ( | ) |
Construct an empty Global Router Manager Link State Database.
Definition at line 251 of file global-route-manager-impl.cc.
References NS_LOG_FUNCTION_NOARGS.
ns3::GlobalRouteManagerLSDB::~GlobalRouteManagerLSDB | ( | ) |
Destroy an empty Global Router Manager Link State Database.
Definition at line 258 of file global-route-manager-impl.cc.
References m_database, NS_LOG_FUNCTION_NOARGS, and NS_LOG_LOGIC.
ns3::GlobalRouteManagerLSDB::GlobalRouteManagerLSDB | ( | GlobalRouteManagerLSDB & | lsdb | ) | [private] |
GlobalRouteManagerLSDB copy construction is disallowed. There's no need for it and a compiler provided shallow copy would be wrong.
GlobalRoutingLSA * ns3::GlobalRouteManagerLSDB::GetLSA | ( | Ipv4Address | addr | ) | const |
Look up the Link State Advertisement associated with the given link state ID (address).
Definition at line 292 of file global-route-manager-impl.cc.
References m_database, and NS_LOG_FUNCTION.
Referenced by ns3::GlobalRouteManagerImplTest::RunTests(), ns3::GlobalRouteManagerImpl::SPFCalculate(), and ns3::GlobalRouteManagerImpl::SPFNext().
GlobalRoutingLSA * ns3::GlobalRouteManagerLSDB::GetLSAByLinkData | ( | Ipv4Address | addr | ) | const |
Look up the Link State Advertisement associated with the given link state ID (address). This is a variation of the GetLSA call to allow the LSA to be found by matching addr with the LinkData field of the TransitNetwork link record.
Definition at line 310 of file global-route-manager-impl.cc.
References ns3::GlobalRoutingLinkRecord::GetLinkData(), ns3::GlobalRoutingLSA::GetLinkRecord(), ns3::GlobalRoutingLinkRecord::GetLinkType(), ns3::GlobalRoutingLSA::GetNLinkRecords(), m_database, NS_LOG_FUNCTION, and ns3::GlobalRoutingLinkRecord::TransitNetwork.
Referenced by ns3::GlobalRouteManagerImpl::SPFNext().
void ns3::GlobalRouteManagerLSDB::Initialize | ( | ) |
Set all LSA flags to an initialized state, for SPF computation.
Definition at line 273 of file global-route-manager-impl.cc.
References ns3::GlobalRoutingLSA::LSA_SPF_NOT_EXPLORED, m_database, NS_LOG_FUNCTION_NOARGS, and ns3::GlobalRoutingLSA::SetStatus().
Referenced by ns3::GlobalRouteManagerImpl::SPFCalculate().
void ns3::GlobalRouteManagerLSDB::Insert | ( | Ipv4Address | addr, | |
GlobalRoutingLSA * | lsa | |||
) |
Insert an IP address / Link State Advertisement pair into the Link State Database.
Definition at line 285 of file global-route-manager-impl.cc.
References m_database, and NS_LOG_FUNCTION.
Referenced by ns3::GlobalRouteManagerImpl::BuildGlobalRoutingDatabase(), and ns3::GlobalRouteManagerImplTest::RunTests().
GlobalRouteManagerLSDB& ns3::GlobalRouteManagerLSDB::operator= | ( | GlobalRouteManagerLSDB & | lsdb | ) | [private] |
The SPFVertex copy assignment operator is disallowed. There's no need for it and a compiler provided shallow copy would be wrong.
Definition at line 692 of file global-route-manager-impl.h.
Referenced by GetLSA(), GetLSAByLinkData(), Initialize(), Insert(), and ~GlobalRouteManagerLSDB().