nlsr::Lsdb Class Reference

#include <lsdb.hpp>

Collaboration diagram for nlsr::Lsdb:
[legend]

Public Member Functions

 Lsdb (ndn::Face &face, ndn::KeyChain &keyChain, ConfParameter &confParam, NamePrefixTable &namePrefixTable, RoutingTable &routingTable)
 
 ~Lsdb ()
 
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...
 
NameLsafindNameLsa (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...
 
CoordinateLsafindCoordinateLsa (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...
 
AdjLsafindAdjLsa (const ndn::Name &key)
 Finds an adj. LSA in the LSDB. More...
 
const std::list< AdjLsa > & getAdjLsdb () const
 
void setAdjLsaBuildInterval (uint32_t interval)
 
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 ()
 
SyncLogicHandlergetSync ()
 

Data Fields

ndn::util::signal::Signal< Lsdb, Statistics::PacketTypelsaIncrementSignal
 
ndn::util::signal::Signal< Lsdb, const ndn::Data & > afterSegmentValidatedSignal
 

Static Public Attributes

static const ndn::Name::Component NAME_COMPONENT = ndn::Name::Component("lsdb")
 

Detailed Description

Definition at line 46 of file lsdb.hpp.

Constructor & Destructor Documentation

◆ Lsdb()

nlsr::Lsdb::Lsdb ( ndn::Face &  face,
ndn::KeyChain &  keyChain,
ConfParameter confParam,
NamePrefixTable namePrefixTable,
RoutingTable routingTable 
)

Definition at line 39 of file lsdb.cpp.

Here is the call graph for this function:

◆ ~Lsdb()

nlsr::Lsdb::~Lsdb ( )

Definition at line 68 of file lsdb.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ buildAndInstallOwnAdjLsa()

bool nlsr::Lsdb::buildAndInstallOwnAdjLsa ( )

Wrapper event to build and install an adj. LSA for this router.

Definition at line 734 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildAndInstallOwnCoordinateLsa()

bool nlsr::Lsdb::buildAndInstallOwnCoordinateLsa ( )

Builds a cor. LSA for this router and installs it into the LSDB.

Definition at line 366 of file lsdb.cpp.

Here is the call graph for this function:

◆ buildAndInstallOwnNameLsa()

bool nlsr::Lsdb::buildAndInstallOwnNameLsa ( )

Builds a name LSA for this router and then installs it into the LSDB.

Definition at line 149 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ doesLsaExist()

bool nlsr::Lsdb::doesLsaExist ( const ndn::Name &  key,
const Lsa::Type lsType 
)

Definition at line 1289 of file lsdb.cpp.

Here is the caller graph for this function:

◆ expressInterest()

void nlsr::Lsdb::expressInterest ( const ndn::Name &  interestName,
uint32_t  timeoutCount,
ndn::time::steady_clock::TimePoint  deadline = DEFAULT_LSA_RETRIEVAL_DEADLINE 
)

Definition at line 928 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findAdjLsa()

AdjLsa * nlsr::Lsdb::findAdjLsa ( const ndn::Name &  key)

Finds an adj. LSA in the LSDB.

Parameters
keyThe name of the publishing router whose LSA to find.

Definition at line 647 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findCoordinateLsa()

CoordinateLsa * nlsr::Lsdb::findCoordinateLsa ( const ndn::Name &  key)

Finds a cor. LSA in the LSDB.

Parameters
keyThe name of the originating router that published the LSA.

Definition at line 387 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findNameLsa()

NameLsa * nlsr::Lsdb::findNameLsa ( const ndn::Name &  key)

Returns the name LSA with the given key.

Parameters
keyThe name of the router that the desired LSA comes from.

Definition at line 164 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAdjLsdb()

const std::list< AdjLsa > & nlsr::Lsdb::getAdjLsdb ( ) const

Definition at line 778 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCoordinateLsdb()

const std::list< CoordinateLsa > & nlsr::Lsdb::getCoordinateLsdb ( ) const

Definition at line 541 of file lsdb.cpp.

Here is the caller graph for this function:

◆ getIsBuildAdjLsaSheduled()

bool nlsr::Lsdb::getIsBuildAdjLsaSheduled ( )
inline

Definition at line 204 of file lsdb.hpp.

Here is the caller graph for this function:

◆ getNameLsdb()

const std::list< NameLsa > & nlsr::Lsdb::getNameLsdb ( ) const

Definition at line 348 of file lsdb.cpp.

Here is the caller graph for this function:

◆ getSync()

SyncLogicHandler& nlsr::Lsdb::getSync ( )
inline

Definition at line 210 of file lsdb.hpp.

◆ installAdjLsa()

bool nlsr::Lsdb::installAdjLsa ( AdjLsa alsa)

Installs an adj. LSA into the LSDB.

Parameters
alsaThe adj. LSA to add to the LSDB.

Definition at line 683 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ installCoordinateLsa()

bool nlsr::Lsdb::installCoordinateLsa ( CoordinateLsa clsa)

Installs a cor. LSA into the LSDB.

Parameters
clsaThe cor. LSA to install.

Definition at line 427 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ installNameLsa()

bool nlsr::Lsdb::installNameLsa ( NameLsa nlsa)

Installs a name LSA into the LSDB.

Parameters
nlsaThe name LSA to install into the LSDB.

Definition at line 200 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isAdjLsaNew()

bool nlsr::Lsdb::isAdjLsaNew ( const ndn::Name &  key,
uint64_t  seqNo 
)

Returns whether an LSA is new.

Parameters
keyThe name of the publishing router.
seqNoThe 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 658 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isCoordinateLsaNew()

bool nlsr::Lsdb::isCoordinateLsaNew ( const ndn::Name &  key,
uint64_t  seqNo 
)

Returns whether a cor. LSA from a router is new or not.

Parameters
keyThe name prefix of the originating router.
seqNoThe sequence number of the candidate LSA.

Definition at line 398 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isLsaNew()

bool nlsr::Lsdb::isLsaNew ( const ndn::Name &  routerName,
const Lsa::Type lsaType,
const uint64_t &  sequenceNumber 
)

Definition at line 1304 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isNameLsaNew()

bool nlsr::Lsdb::isNameLsaNew ( const ndn::Name &  key,
uint64_t  seqNo 
)

Returns whether a seq. no. from a certain router signals a new LSA.

Parameters
keyThe name of the originating router.
seqNoThe sequence number to check.

Definition at line 175 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ processInterest()

void nlsr::Lsdb::processInterest ( const ndn::Name &  name,
const ndn::Interest &  interest 
)

Definition at line 1008 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeAdjLsa()

bool nlsr::Lsdb::removeAdjLsa ( const ndn::Name &  key)

Removes an adj. LSA from the LSDB.

Parameters
keyThe name of the publishing router whose LSA to remove.

Definition at line 753 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeCoordinateLsa()

bool nlsr::Lsdb::removeCoordinateLsa ( const ndn::Name &  key)

Removes a cor. LSA from the LSDB.

Parameters
keyThe 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 500 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeNameLsa()

bool nlsr::Lsdb::removeNameLsa ( const ndn::Name &  key)

Remove a name LSA from the LSDB.

Parameters
keyThe 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 306 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scheduleAdjLsaBuild()

void nlsr::Lsdb::scheduleAdjLsaBuild ( )

Schedules a build of this router's LSA.

Definition at line 559 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAdjLsaBuildInterval()

void nlsr::Lsdb::setAdjLsaBuildInterval ( uint32_t  interval)
inline

Definition at line 182 of file lsdb.hpp.

Here is the call graph for this function:

◆ writeAdjLsdbLog()

void nlsr::Lsdb::writeAdjLsdbLog ( )

Definition at line 1275 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeCorLsdbLog()

void nlsr::Lsdb::writeCorLsdbLog ( )

Definition at line 528 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeNameLsdbLog()

void nlsr::Lsdb::writeNameLsdbLog ( )

Definition at line 339 of file lsdb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ afterSegmentValidatedSignal

ndn::util::signal::Signal<Lsdb, const ndn::Data&> nlsr::Lsdb::afterSegmentValidatedSignal

Definition at line 376 of file lsdb.hpp.

◆ lsaIncrementSignal

ndn::util::signal::Signal<Lsdb, Statistics::PacketType> nlsr::Lsdb::lsaIncrementSignal

Definition at line 375 of file lsdb.hpp.

◆ NAME_COMPONENT

const ndn::Name::Component nlsr::Lsdb::NAME_COMPONENT = ndn::Name::Component("lsdb")
static

Definition at line 373 of file lsdb.hpp.