#include <lsdb.hpp>
Public Member Functions | |
Lsdb (ndn::Face &face, ndn::KeyChain &keyChain, ndn::security::SigningInfo &signingInfo, ConfParameter &confParam, NamePrefixTable &namePrefixTable, RoutingTable &routingTable) | |
~Lsdb () | |
SyncLogicHandler & | getSyncLogicHandler () |
bool | isLsaNew (const ndn::Name &routerName, const Lsa::Type &lsaType, const uint64_t &sequenceNumber) |
bool | doesLsaExist (const ndn::Name &key, const Lsa::Type &lsType) |
bool | buildAndInstallOwnNameLsa () |
Builds a name LSA for this router and then installs it into the LSDB. More... | |
NameLsa * | findNameLsa (const ndn::Name &key) |
Returns the name LSA with the given key. More... | |
bool | installNameLsa (NameLsa &nlsa) |
Installs a name LSA into the LSDB. More... | |
bool | removeNameLsa (const ndn::Name &key) |
Remove a name LSA from the LSDB. More... | |
bool | isNameLsaNew (const ndn::Name &key, uint64_t seqNo) |
void | writeNameLsdbLog () |
const std::list< NameLsa > & | getNameLsdb () const |
bool | buildAndInstallOwnCoordinateLsa () |
Builds a cor. LSA for this router and installs it into the LSDB. More... | |
CoordinateLsa * | findCoordinateLsa (const ndn::Name &key) |
Finds a cor. LSA in the LSDB. More... | |
bool | installCoordinateLsa (CoordinateLsa &clsa) |
Installs a cor. LSA into the LSDB. More... | |
bool | removeCoordinateLsa (const ndn::Name &key) |
Removes a cor. LSA from the LSDB. More... | |
bool | isCoordinateLsaNew (const ndn::Name &key, uint64_t seqNo) |
Returns whether a cor. LSA from a router is new or not. More... | |
void | writeCorLsdbLog () |
const std::list< CoordinateLsa > & | getCoordinateLsdb () const |
void | scheduleAdjLsaBuild () |
Schedules a build of this router's LSA. More... | |
bool | buildAndInstallOwnAdjLsa () |
Wrapper event to build and install an adj. LSA for this router. More... | |
bool | removeAdjLsa (const ndn::Name &key) |
Removes an adj. LSA from the LSDB. More... | |
bool | isAdjLsaNew (const ndn::Name &key, uint64_t seqNo) |
Returns whether an LSA is new. More... | |
bool | installAdjLsa (AdjLsa &alsa) |
Installs an adj. LSA into the LSDB. More... | |
AdjLsa * | findAdjLsa (const ndn::Name &key) |
Finds an adj. LSA in the LSDB. More... | |
const std::list< AdjLsa > & | getAdjLsdb () const |
void | setAdjLsaBuildInterval (uint32_t interval) |
const ndn::time::seconds & | getAdjLsaBuildInterval () const |
SequencingManager & | getSequencingManager () |
void | writeAdjLsdbLog () |
void | expressInterest (const ndn::Name &interestName, uint32_t timeoutCount, ndn::time::steady_clock::TimePoint deadline=DEFAULT_LSA_RETRIEVAL_DEADLINE) |
void | processInterest (const ndn::Name &name, const ndn::Interest &interest) |
bool | getIsBuildAdjLsaSheduled () |
Data Fields | |
ndn::util::signal::Signal< Lsdb, Statistics::PacketType > | lsaIncrementSignal |
ndn::util::signal::Signal< Lsdb, const ndn::Data & > | afterSegmentValidatedSignal |
Static Public Attributes | |
static const ndn::Name::Component | NAME_COMPONENT = ndn::Name::Component("lsdb") |
nlsr::Lsdb::Lsdb | ( | ndn::Face & | face, |
ndn::KeyChain & | keyChain, | ||
ndn::security::SigningInfo & | signingInfo, | ||
ConfParameter & | confParam, | ||
NamePrefixTable & | namePrefixTable, | ||
RoutingTable & | routingTable | ||
) |
nlsr::Lsdb::~Lsdb | ( | ) |
bool nlsr::Lsdb::buildAndInstallOwnAdjLsa | ( | ) |
bool nlsr::Lsdb::buildAndInstallOwnCoordinateLsa | ( | ) |
bool nlsr::Lsdb::buildAndInstallOwnNameLsa | ( | ) |
bool nlsr::Lsdb::doesLsaExist | ( | const ndn::Name & | key, |
const Lsa::Type & | lsType | ||
) |
void nlsr::Lsdb::expressInterest | ( | const ndn::Name & | interestName, |
uint32_t | timeoutCount, | ||
ndn::time::steady_clock::TimePoint | deadline = DEFAULT_LSA_RETRIEVAL_DEADLINE |
||
) |
AdjLsa * nlsr::Lsdb::findAdjLsa | ( | const ndn::Name & | key | ) |
CoordinateLsa * nlsr::Lsdb::findCoordinateLsa | ( | const ndn::Name & | key | ) |
NameLsa * nlsr::Lsdb::findNameLsa | ( | const ndn::Name & | key | ) |
|
inline |
const std::list< AdjLsa > & nlsr::Lsdb::getAdjLsdb | ( | ) | const |
const std::list< CoordinateLsa > & nlsr::Lsdb::getCoordinateLsdb | ( | ) | const |
|
inline |
const std::list< NameLsa > & nlsr::Lsdb::getNameLsdb | ( | ) | const |
|
inline |
|
inline |
bool nlsr::Lsdb::installAdjLsa | ( | AdjLsa & | alsa | ) |
bool nlsr::Lsdb::installCoordinateLsa | ( | CoordinateLsa & | clsa | ) |
bool nlsr::Lsdb::installNameLsa | ( | NameLsa & | nlsa | ) |
bool nlsr::Lsdb::isAdjLsaNew | ( | const ndn::Name & | key, |
uint64_t | seqNo | ||
) |
Returns whether an LSA is new.
key | The name of the publishing router. |
seqNo | The seq. no. of the candidate LSA. |
This function determines whether the LSA with the name key and seq. no. seqNo would be new to this LSDB.
Definition at line 682 of file lsdb.cpp.
bool nlsr::Lsdb::isCoordinateLsaNew | ( | const ndn::Name & | key, |
uint64_t | seqNo | ||
) |
bool nlsr::Lsdb::isLsaNew | ( | const ndn::Name & | routerName, |
const Lsa::Type & | lsaType, | ||
const uint64_t & | sequenceNumber | ||
) |
bool nlsr::Lsdb::isNameLsaNew | ( | const ndn::Name & | key, |
uint64_t | seqNo | ||
) |
void nlsr::Lsdb::processInterest | ( | const ndn::Name & | name, |
const ndn::Interest & | interest | ||
) |
bool nlsr::Lsdb::removeAdjLsa | ( | const ndn::Name & | key | ) |
bool nlsr::Lsdb::removeCoordinateLsa | ( | const ndn::Name & | key | ) |
Removes a cor. LSA from the LSDB.
key | The name of the router that published the LSA to remove. |
Removes the coordinate LSA whose origin router name matches that given by key. Additionally, ask the NPT to remove the prefix, which will occur if no other LSAs point there.
Definition at line 520 of file lsdb.cpp.
bool nlsr::Lsdb::removeNameLsa | ( | const ndn::Name & | key | ) |
Remove a name LSA from the LSDB.
key | The name of the router that published the LSA to remove. |
This function will remove a name LSA from the LSDB by finding an LSA whose name matches key. This removal also causes the NPT to remove those name prefixes if no more LSAs advertise them.
Definition at line 316 of file lsdb.cpp.
void nlsr::Lsdb::scheduleAdjLsaBuild | ( | ) |
|
inline |
void nlsr::Lsdb::writeAdjLsdbLog | ( | ) |
void nlsr::Lsdb::writeCorLsdbLog | ( | ) |
void nlsr::Lsdb::writeNameLsdbLog | ( | ) |
ndn::util::signal::Signal<Lsdb, const ndn::Data&> nlsr::Lsdb::afterSegmentValidatedSignal |
ndn::util::signal::Signal<Lsdb, Statistics::PacketType> nlsr::Lsdb::lsaIncrementSignal |