nlsr::Lsdb Class Reference

#include <lsdb.hpp>

Collaboration diagram for nlsr::Lsdb:
[legend]

Public Member Functions

 Lsdb (ndn::Face &face, ndn::KeyChain &keyChain, ndn::security::SigningInfo &signingInfo, 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

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

Definition at line 39 of file lsdb.cpp.

Here is the call graph for this function:

nlsr::Lsdb::~Lsdb ( )

Definition at line 70 of file lsdb.cpp.

Here is the call graph for this function:

Member Function Documentation

bool nlsr::Lsdb::buildAndInstallOwnAdjLsa ( )

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

Definition at line 730 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool nlsr::Lsdb::buildAndInstallOwnCoordinateLsa ( )

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

Definition at line 362 of file lsdb.cpp.

Here is the call graph for this function:

bool nlsr::Lsdb::buildAndInstallOwnNameLsa ( )

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

Definition at line 145 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 1285 of file lsdb.cpp.

Here is the caller graph for this function:

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

Definition at line 924 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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 643 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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 383 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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 160 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 774 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 537 of file lsdb.cpp.

Here is the caller graph for this function:

bool nlsr::Lsdb::getIsBuildAdjLsaSheduled ( )
inline

Definition at line 205 of file lsdb.hpp.

Here is the caller graph for this function:

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

Definition at line 344 of file lsdb.cpp.

Here is the caller graph for this function:

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

Definition at line 211 of file lsdb.hpp.

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 679 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Installs a cor. LSA into the LSDB.

Parameters
clsaThe cor. LSA to install.

Definition at line 423 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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 196 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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 654 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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 394 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 1300 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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 171 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 1004 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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 749 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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 496 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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 302 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nlsr::Lsdb::scheduleAdjLsaBuild ( )

Schedules a build of this router's LSA.

Definition at line 555 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 183 of file lsdb.hpp.

Here is the call graph for this function:

void nlsr::Lsdb::writeAdjLsdbLog ( )

Definition at line 1271 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nlsr::Lsdb::writeCorLsdbLog ( )

Definition at line 524 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nlsr::Lsdb::writeNameLsdbLog ( )

Definition at line 335 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Field Documentation

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

Definition at line 371 of file lsdb.hpp.

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

Definition at line 370 of file lsdb.hpp.

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

Definition at line 368 of file lsdb.hpp.