nlsr::Lsdb Class Reference

#include <lsdb.hpp>

Collaboration diagram for nlsr::Lsdb:
[legend]

Public Member Functions

 Lsdb (Nlsr &nlsr, ndn::Scheduler &scheduler)
 
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 ()
 
LsaSegmentStoragegetLsaStorage ()
 
void writeAdjLsdbLog ()
 
void setLsaRefreshTime (const ndn::time::seconds &lsaRefreshTime)
 
void setThisRouterPrefix (std::string trp)
 
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)
 

Data Fields

ndn::util::signal::Signal< Lsdb, Statistics::PacketTypelsaIncrementSignal
 

Static Public Attributes

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

Detailed Description

Definition at line 43 of file lsdb.hpp.

Constructor & Destructor Documentation

nlsr::Lsdb::Lsdb ( Nlsr nlsr,
ndn::Scheduler &  scheduler 
)

Definition at line 67 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 772 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 398 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 164 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 1334 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 981 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 681 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 419 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 179 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 188 of file lsdb.hpp.

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

Definition at line 819 of file lsdb.cpp.

Here is the caller graph for this function:

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

Definition at line 581 of file lsdb.cpp.

Here is the caller graph for this function:

LsaSegmentStorage& nlsr::Lsdb::getLsaStorage ( )
inline

Definition at line 200 of file lsdb.hpp.

Here is the call graph for this function:

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

Definition at line 380 of file lsdb.cpp.

Here is the caller graph for this function:

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

Definition at line 194 of file lsdb.hpp.

Here is the caller graph for this function:

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

Definition at line 49 of file lsdb.hpp.

Here is the call graph for this function:

Here is the caller 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 718 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 461 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 216 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 693 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 431 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 1349 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 191 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 1041 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 791 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 537 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 331 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 599 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 182 of file lsdb.hpp.

Here is the caller graph for this function:

void nlsr::Lsdb::setLsaRefreshTime ( const ndn::time::seconds &  lsaRefreshTime)

Definition at line 825 of file lsdb.cpp.

Here is the caller graph for this function:

void nlsr::Lsdb::setThisRouterPrefix ( std::string  trp)

Definition at line 831 of file lsdb.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nlsr::Lsdb::writeAdjLsdbLog ( )

Definition at line 1323 of file lsdb.cpp.

Here is the caller graph for this function:

void nlsr::Lsdb::writeCorLsdbLog ( )

Definition at line 571 of file lsdb.cpp.

Here is the caller graph for this function:

void nlsr::Lsdb::writeNameLsdbLog ( )

Definition at line 370 of file lsdb.cpp.

Here is the caller graph for this function:

Field Documentation

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

Definition at line 385 of file lsdb.hpp.

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

Definition at line 383 of file lsdb.hpp.