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 ()
 
SyncLogicHandlergetSyncLogicHandler ()
 
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)
 
const ndn::time::seconds & getAdjLsaBuildInterval () const
 
SequencingManagergetSequencingManager ()
 
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::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 40 of file lsdb.cpp.

Here is the call graph for this function:

nlsr::Lsdb::~Lsdb ( )

Definition at line 71 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 760 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 381 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller 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 153 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 1309 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 959 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 670 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 402 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 168 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const ndn::time::seconds& nlsr::Lsdb::getAdjLsaBuildInterval ( ) const
inline

Definition at line 195 of file lsdb.hpp.

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

Definition at line 809 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 563 of file lsdb.cpp.

Here is the caller graph for this function:

bool nlsr::Lsdb::getIsBuildAdjLsaSheduled ( )
inline

Definition at line 223 of file lsdb.hpp.

Here is the caller graph for this function:

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

Definition at line 363 of file lsdb.cpp.

Here is the caller graph for this function:

SequencingManager& nlsr::Lsdb::getSequencingManager ( )
inline

Definition at line 201 of file lsdb.hpp.

Here is the call graph for this function:

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

Definition at line 56 of file lsdb.hpp.

Here is the call graph for this function:

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 707 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 444 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 205 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 682 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 414 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 1324 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 180 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 1032 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 779 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 520 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 316 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 581 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 189 of file lsdb.hpp.

void nlsr::Lsdb::writeAdjLsdbLog ( )

Definition at line 1299 of file lsdb.cpp.

Here is the caller graph for this function:

void nlsr::Lsdb::writeCorLsdbLog ( )

Definition at line 554 of file lsdb.cpp.

Here is the caller graph for this function:

void nlsr::Lsdb::writeNameLsdbLog ( )

Definition at line 354 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 390 of file lsdb.hpp.

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

Definition at line 389 of file lsdb.hpp.

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

Definition at line 387 of file lsdb.hpp.