30 #include <ndn-cxx/security/signing-helpers.hpp> 31 #include <ndn-cxx/util/segment-fetcher.hpp> 41 ndn::KeyChain& keyChain,
42 const ndn::security::SigningInfo& signingInfo,
43 const ndn::time::milliseconds& freshnessPeriod,
44 const std::string& content)
52 size_t totalLength = 0;
53 totalLength += outBuffer.prependByteArray(reinterpret_cast<const uint8_t*>(m_content.c_str()),
59 const std::string m_content;
63 const ndn::time::seconds Lsdb::GRACE_PERIOD = ndn::time::seconds(10);
64 const ndn::time::steady_clock::TimePoint Lsdb::DEFAULT_LSA_RETRIEVAL_DEADLINE =
65 ndn::time::steady_clock::TimePoint::min();
69 , m_scheduler(scheduler)
70 , m_sync(m_nlsr.getNlsrFace(),
71 [this] (const
ndn::Name& routerName, const
Lsa::Type& lsaType,
72 const uint64_t& sequenceNumber) {
73 return isLsaNew(routerName, lsaType, sequenceNumber);
75 , m_lsaStorage(scheduler)
78 , m_sequencingManager()
79 , m_onNewLsaConnection(m_sync.
onNewLsa->connect(
80 [
this] (
const ndn::Name& updateName,
const uint64_t& sequenceNumber) {
81 ndn::Name lsaInterest{updateName};
82 lsaInterest.appendNumber(sequenceNumber);
89 Lsdb::onFetchLsaError(uint32_t errorCode,
90 const std::string& msg,
91 ndn::Name& interestName,
92 uint32_t retransmitNo,
93 const ndn::time::steady_clock::TimePoint& deadline,
97 NLSR_LOG_DEBUG(
"Failed to fetch LSA: " << lsaName <<
", Error code: " << errorCode
98 <<
", Message: " << msg);
100 if (ndn::time::steady_clock::now() < deadline) {
101 SequenceNumberMap::const_iterator it = m_highestSeqNo.find(lsaName);
103 if (it != m_highestSeqNo.end() && it->second == seqNo) {
110 if (errorCode == ndn::util::SegmentFetcher::ErrorCode::INTEREST_TIMEOUT) {
111 delay = ndn::time::seconds(0);
115 interestName, retransmitNo + 1, deadline));
121 Lsdb::afterFetchLsa(
const ndn::ConstBufferPtr& bufferPtr, ndn::Name& interestName)
123 std::shared_ptr<ndn::Data> data = std::make_shared<ndn::Data>(ndn::Name(interestName));
124 data->setContent(bufferPtr);
126 NLSR_LOG_DEBUG(
"Received data for LSA(name): " << data->getName());
128 ndn::Name lsaName = interestName.getSubName(0, interestName.size()-1);
129 uint64_t seqNo = interestName[-1].toNumber();
131 if (m_highestSeqNo.find(lsaName) == m_highestSeqNo.end()) {
132 m_highestSeqNo[lsaName] = seqNo;
134 else if (seqNo > m_highestSeqNo[lsaName]) {
135 m_highestSeqNo[lsaName] = seqNo;
136 NLSR_LOG_TRACE(
"SeqNo for LSA(name): " << data->getName() <<
" updated");
138 else if (seqNo < m_highestSeqNo[lsaName]) {
142 onContentValidated(data);
146 Lsdb::cancelScheduleLsaExpiringEvent(ndn::EventId eid)
148 m_scheduler.cancelEvent(eid);
159 return nlsa1.
getKey() == key;
167 getLsaExpirationTimePoint(),
180 std::list<NameLsa>::iterator it = std::find_if(m_nameLsdb.begin(),
183 if (it != m_nameLsdb.end()) {
194 if (nameLsaCheck != 0) {
207 Lsdb::scheduleNameLsaExpiration(
const ndn::Name& key,
int seqNo,
208 const ndn::time::seconds& expTime)
210 return m_scheduler.scheduleEvent(expTime + GRACE_PERIOD,
211 std::bind(&Lsdb::expireOrRefreshNameLsa,
this, key, seqNo));
218 ndn::time::seconds timeToExpire = m_lsaRefreshTime;
221 if (chkNameLsa == 0) {
236 for (std::list<ndn::Name>::iterator it = nameList.begin(); it != nameList.end();
245 ndn::time::system_clock::now();
246 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
269 std::list<ndn::Name> namesToAdd;
270 std::set_difference(newNames.begin(), newNames.end(), oldNames.begin(), oldNames.end(),
271 std::inserter(namesToAdd, namesToAdd.begin()));
272 for (std::list<ndn::Name>::iterator it = namesToAdd.begin();
273 it != namesToAdd.end(); ++it) {
285 std::list<ndn::Name> namesToRemove;
286 std::set_difference(oldNames.begin(), oldNames.end(), newNames.begin(), newNames.end(),
287 std::inserter(namesToRemove, namesToRemove.begin()));
288 for (std::list<ndn::Name>::iterator it = namesToRemove.begin();
289 it != namesToRemove.end(); ++it) {
290 NLSR_LOG_DEBUG(
"Removing name LSA no longer advertised: " << (*it).toUri());
301 ndn::time::system_clock::now();
302 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
316 Lsdb::addNameLsa(
NameLsa& nlsa)
318 std::list<NameLsa>::iterator it = std::find_if(m_nameLsdb.begin(),
322 if (it == m_nameLsdb.end()) {
323 m_nameLsdb.push_back(nlsa);
332 std::list<NameLsa>::iterator it = std::find_if(m_nameLsdb.begin(),
335 if (it != m_nameLsdb.end()) {
340 if ((*it).getOrigRouter() !=
343 (*it).getOrigRouter());
344 for (
const auto& name : it->getNpl().getNames()) {
350 m_nameLsdb.erase(it);
357 Lsdb::doesNameLsaExist(
const ndn::Name& key)
359 std::list<NameLsa>::iterator it = std::find_if(m_nameLsdb.begin(),
362 if (it == m_nameLsdb.end()) {
372 for (std::list<NameLsa>::iterator it = m_nameLsdb.begin();
373 it != m_nameLsdb.end() ; it++) {
378 const std::list<NameLsa>&
393 return clsa.
getKey() == key;
401 getLsaExpirationTimePoint(),
420 std::list<CoordinateLsa>::iterator it = std::find_if(m_corLsdb.begin(),
423 if (it != m_corLsdb.end()) {
451 Lsdb::scheduleCoordinateLsaExpiration(
const ndn::Name& key,
int seqNo,
452 const ndn::time::seconds& expTime)
454 return m_scheduler.scheduleEvent(expTime + GRACE_PERIOD,
455 std::bind(&Lsdb::expireOrRefreshCoordinateLsa,
462 ndn::time::seconds timeToExpire = m_lsaRefreshTime;
465 if (chkCorLsa == 0) {
469 addCoordinateLsa(clsa);
482 ndn::time::system_clock::now();
483 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
485 scheduleCoordinateLsaExpiration(clsa.
getKey(),
507 ndn::time::system_clock::now();
508 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
524 std::list<CoordinateLsa>::iterator it = std::find_if(m_corLsdb.begin(),
528 if (it == m_corLsdb.end()) {
529 m_corLsdb.push_back(clsa);
538 std::list<CoordinateLsa>::iterator it = std::find_if(m_corLsdb.begin(),
542 if (it != m_corLsdb.end()) {
557 Lsdb::doesCoordinateLsaExist(
const ndn::Name& key)
559 std::list<CoordinateLsa>::iterator it = std::find_if(m_corLsdb.begin(),
563 if (it == m_corLsdb.end()) {
573 for (std::list<CoordinateLsa>::iterator it = m_corLsdb.begin();
574 it != m_corLsdb.end() ; it++) {
579 const std::list<CoordinateLsa>&
594 return alsa.
getKey() == key;
604 NLSR_LOG_DEBUG(
"Adjacency LSA not built. Currently in hyperbolic routing state.");
609 NLSR_LOG_DEBUG(
"Scheduling Adjacency LSA build in " << m_adjLsaBuildInterval);
611 m_scheduler.scheduleEvent(m_adjLsaBuildInterval, std::bind(&Lsdb::buildAdjLsa,
this));
627 if (adjBuildCount > 0) {
660 m_scheduler.scheduleEvent(ndn::time::seconds(schedulingTime),
661 std::bind(&Lsdb::buildAdjLsa,
this));
666 Lsdb::addAdjLsa(
AdjLsa& alsa)
668 std::list<AdjLsa>::iterator it = std::find_if(m_adjLsdb.begin(),
672 if (it == m_adjLsdb.end()) {
673 m_adjLsdb.push_back(alsa);
682 std::list<AdjLsa>::iterator it = std::find_if(m_adjLsdb.begin(),
685 if (it != m_adjLsdb.end()) {
696 if (adjLsaCheck != 0) {
709 Lsdb::scheduleAdjLsaExpiration(
const ndn::Name& key,
int seqNo,
710 const ndn::time::seconds& expTime)
712 return m_scheduler.scheduleEvent(expTime + GRACE_PERIOD,
713 std::bind(&Lsdb::expireOrRefreshAdjLsa,
this, key, seqNo));
719 ndn::time::seconds timeToExpire = m_lsaRefreshTime;
722 if (chkAdjLsa == 0) {
732 ndn::time::system_clock::now();
733 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
735 scheduleAdjLsaExpiration(alsa.
getKey(),
756 ndn::time::system_clock::now();
757 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
775 getLsaExpirationTimePoint(),
792 std::list<AdjLsa>::iterator it = std::find_if(m_adjLsdb.begin(),
795 if (it != m_adjLsdb.end()) {
798 (*it).removeNptEntries(m_nlsr);
806 Lsdb::doesAdjLsaExist(
const ndn::Name& key)
808 std::list<AdjLsa>::iterator it = std::find_if(m_adjLsdb.begin(),
811 if (it == m_adjLsdb.end()) {
817 const std::list<AdjLsa>&
826 m_lsaRefreshTime = lsaRefreshTime;
832 m_thisRouterPrefix = trp;
843 Lsdb::expireOrRefreshNameLsa(
const ndn::Name& lsaKey, uint64_t seqNo)
849 if (chkNameLsa != 0) {
886 Lsdb::expireOrRefreshAdjLsa(
const ndn::Name& lsaKey, uint64_t seqNo)
892 if (chkAdjLsa != 0) {
933 Lsdb::expireOrRefreshCoordinateLsa(
const ndn::Name& lsaKey,
940 if (chkCorLsa != 0) {
981 ndn::time::steady_clock::TimePoint deadline)
986 if (deadline == DEFAULT_LSA_RETRIEVAL_DEADLINE) {
987 deadline = ndn::time::steady_clock::now() + ndn::time::seconds(static_cast<int>(
LSA_REFRESH_TIME_MAX));
990 ndn::Name lsaName = interestName.getSubName(0, interestName.size()-1);
992 uint64_t seqNo = interestName[-1].toNumber();
995 if (m_highestSeqNo.find(lsaName) == m_highestSeqNo.end()) {
996 m_highestSeqNo[lsaName] = seqNo;
999 else if (seqNo > m_highestSeqNo[lsaName]) {
1000 m_highestSeqNo[lsaName] = seqNo;
1003 else if (seqNo < m_highestSeqNo[lsaName]) {
1007 ndn::Interest interest(interestName);
1010 NLSR_LOG_DEBUG(
"Fetching Data for LSA: " << interestName <<
" Seq number: " << seqNo);
1011 shared_ptr<ndn::util::SegmentFetcher> fetcher =
1012 ndn::util::SegmentFetcher::fetch(m_nlsr.
getNlsrFace(), interest,
1014 std::bind(&Lsdb::afterFetchLsa,
this, _1, interestName),
1015 std::bind(&Lsdb::onFetchLsaError,
this, _1, _2, interestName,
1016 timeoutCount, deadline, lsaName, seqNo));
1023 std::istringstream(interestName[-2].toUri()) >> lsaType;
1035 NLSR_LOG_ERROR(
"lsaType " << lsaType <<
" not recognized; failed Statistics::PacketType conversion");
1045 const ndn::Name& interestName(interest.getName());
1048 std::string chkString(
"LSA");
1053 originRouter.append(interestName.getSubName(lsaPosition + 1,
1054 interest.getName().size() - lsaPosition - 3));
1059 if (lsaPosition >= 0) {
1061 uint64_t seqNo = interestName[-1].toNumber();
1065 std::istringstream(interestName[-2].toUri()) >> interestedLsType;
1068 processInterestForNameLsa(interest, originRouter.append(std::to_string(interestedLsType)),
1072 processInterestForAdjacencyLsa(interest, originRouter.append(std::to_string(interestedLsType)),
1076 processInterestForCoordinateLsa(interest, originRouter.append(std::to_string(interestedLsType)),
1080 NLSR_LOG_WARN(
"Received unrecognized LSA type: " << interestedLsType);
1086 const ndn::Data* lsaSegment = m_lsaStorage.
getLsaSegment(interest);
1087 if (lsaSegment !=
nullptr) {
1088 NLSR_LOG_TRACE(
"Found data in lsa storage. Sending the data for " << interest.getName());
1092 NLSR_LOG_TRACE(interest <<
" was not found in this lsa storage.");
1101 Lsdb::putLsaData(
const ndn::Interest& interest,
const std::string& content)
1108 NLSR_LOG_DEBUG(
"Sending requested data ( " << content <<
") for interest (" << interest
1109 <<
") to be published and added to face.");
1110 publisher.publish(interest.getName());
1119 Lsdb::processInterestForNameLsa(
const ndn::Interest& interest,
1120 const ndn::Name& lsaKey,
1127 if (nameLsa !=
nullptr) {
1128 NLSR_LOG_TRACE(
"Verifying SeqNo for NameLsa is same as requested.");
1131 std::string content = nameLsa->
serialize();
1132 putLsaData(interest,content);
1154 Lsdb::processInterestForAdjacencyLsa(
const ndn::Interest& interest,
1155 const ndn::Name& lsaKey,
1159 NLSR_LOG_ERROR(
"Received interest for an adjacency LSA when hyperbolic routing is enabled");
1166 if (adjLsa !=
nullptr) {
1167 NLSR_LOG_TRACE(
"Verifying SeqNo for AdjLsa is same as requested.");
1169 std::string content = adjLsa->
serialize();
1170 putLsaData(interest,content);
1189 Lsdb::processInterestForCoordinateLsa(
const ndn::Interest& interest,
1190 const ndn::Name& lsaKey,
1194 NLSR_LOG_ERROR(
"Received Interest for a coordinate LSA when link-state routing is enabled");
1199 NLSR_LOG_DEBUG(
"CoordinateLsa interest " << interest <<
" received");
1201 if (corLsa !=
nullptr) {
1202 NLSR_LOG_TRACE(
"Verifying SeqNo for CoordinateLsa is same as requested.");
1204 std::string content = corLsa->
serialize();
1205 putLsaData(interest,content);
1219 Lsdb::onContentValidated(
const std::shared_ptr<const ndn::Data>& data)
1221 const ndn::Name& dataName = data->getName();
1222 NLSR_LOG_DEBUG(
"Data validation successful for LSA: " << dataName);
1224 std::string chkString(
"LSA");
1227 if (lsaPosition >= 0) {
1231 originRouter.append(dataName.getSubName(lsaPosition + 1, dataName.size() - lsaPosition - 3));
1233 uint64_t seqNo = dataName[-1].toNumber();
1234 std::string dataContent(reinterpret_cast<const char*>(data->getContent().value()),
1235 data->getContent().value_size());
1238 std::istringstream(dataName[-2].toUri()) >> interestedLsType;
1241 processContentNameLsa(originRouter.append(std::to_string(interestedLsType)), seqNo,
1245 processContentAdjacencyLsa(originRouter.append(std::to_string(interestedLsType)), seqNo,
1249 processContentCoordinateLsa(originRouter.append(std::to_string(interestedLsType)), seqNo,
1253 NLSR_LOG_WARN(
"Received unrecognized LSA Type: " << interestedLsType);
1262 Lsdb::processContentNameLsa(
const ndn::Name& lsaKey,
1263 uint64_t lsSeqNo, std::string& dataContent)
1279 Lsdb::processContentAdjacencyLsa(
const ndn::Name& lsaKey,
1280 uint64_t lsSeqNo, std::string& dataContent)
1296 Lsdb::processContentCoordinateLsa(
const ndn::Name& lsaKey,
1297 uint64_t lsSeqNo, std::string& dataContent)
1312 ndn::time::system_clock::TimePoint
1313 Lsdb::getLsaExpirationTimePoint()
1315 ndn::time::system_clock::TimePoint expirationTimePoint = ndn::time::system_clock::now();
1316 expirationTimePoint = expirationTimePoint +
1318 return expirationTimePoint;
1325 for (std::list<AdjLsa>::iterator it = m_adjLsdb.begin();
1326 it != m_adjLsdb.end() ; it++) {
1337 return doesAdjLsaExist(key);
1339 return doesCoordinateLsaExist(key);
1341 return doesNameLsaExist(key);
1349 const uint64_t& sequenceNumber) {
1350 ndn::Name lsaKey = routerName;
1351 lsaKey.append(std::to_string(lsaType));
bool installAdjLsa(AdjLsa &alsa)
Installs an adj. LSA into the LSDB.
const std::list< NameLsa > & getNameLsdb() const
uint32_t getInterestResendTime() const
void setAdjLsaSeq(uint64_t alsn)
bool getIsBuildAdjLsaSheduled()
Copyright (c) 2014-2018, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
void scheduleAdjLsaBuild()
Schedules a build of this router's LSA.
bool removeNameLsa(const ndn::Name &key)
Remove a name LSA from the LSDB.
ConfParameter & getConfParameter()
static bool corLsaCompareByKey(const CoordinateLsa &clsa, const ndn::Name &key)
Compares whether an LSA object is the same as a key.
const ndn::time::system_clock::TimePoint & getExpirationTimePoint() const
std::string serialize() const override
Returns the data this adjacency LSA has.
std::list< ndn::Name > getNames() const
Lsdb(Nlsr &nlsr, ndn::Scheduler &scheduler)
bool isLsaNew(const ndn::Name &routerName, const Lsa::Type &lsaType, const uint64_t &sequenceNumber)
void setLsSeqNo(uint32_t lsn)
uint64_t getCorLsaSeq() const
bool deserialize(const std::string &content) noexceptoverride
Initializes this LSA object with content's data.
void writeLog() const override
NamePrefixTable & getNamePrefixTable()
std::unique_ptr< OnNewLsa > onNewLsa
static bool nameLsaCompareByKey(const NameLsa &nlsa1, const ndn::Name &key)
Compares if a name LSA is the same as the one specified by key.
NamePrefixList & getNpl()
uint64_t getAdjLsaSeq() const
ndn::EventId getExpiringEventId() const
void connectToFetcher(ndn::util::SegmentFetcher &fetcher)
#define NLSR_LOG_DEBUG(x)
const ndn::Name & getRouterPrefix() const
void incrementAdjBuildCount()
uint64_t getNameLsaSeq() const
void writeLog() const override
bool deserialize(const std::string &content) noexceptoverride
Initializes this adj. LSA from the supplied content.
RoutingTable & getRoutingTable()
Copyright (c) 2014-2018, The University of Memphis, Regents of the University of California.
bool isAdjLsaBuildable(const uint32_t interestRetryNo) const
Determines whether this list can be used to build an adj. LSA.
void setExpirationTimePoint(const ndn::time::system_clock::TimePoint <)
virtual size_t generate(ndn::EncodingBuffer &outBuffer)
In a derived class, write the octets into outBuffer.
const ndn::time::seconds & getLsaInterestLifetime() const
#define INIT_LOGGER(name)
void removeEntry(const ndn::Name &name, const ndn::Name &destRouter)
Removes a destination from a name prefix table entry.
const std::list< CoordinateLsa > & getCoordinateLsdb() const
const ndn::Name & getOrigRouter() const
LsaContentPublisher(ndn::Face &face, ndn::KeyChain &keyChain, const ndn::security::SigningInfo &signingInfo, const ndn::time::milliseconds &freshnessPeriod, const std::string &content)
uint32_t getInterestRetryNumber() const
AdjacencyList & getAdjacencyList()
bool isCoordinateLsaNew(const ndn::Name &key, uint64_t seqNo)
Returns whether a cor. LSA from a router is new or not.
uint32_t getLsSeqNo() const
std::vector< double > getCorTheta() const
void writeLog() const override
CoordinateLsa * findCoordinateLsa(const ndn::Name &key)
Finds a cor. LSA in the LSDB.
void setAdjBuildCount(int64_t abc)
void setLsaRefreshTime(const ndn::time::seconds &lsaRefreshTime)
bool isNameLsaNew(const ndn::Name &key, uint64_t seqNo)
void scheduleRoutingTableCalculation(Nlsr &pnlsr)
Schedules a calculation event in the event scheduler only if one isn't already scheduled.
ndn::security::v2::KeyChain & getKeyChain()
void connectToFetcher(ndn::util::SegmentFetcher &fetcher)
Get connected to the signal emitted by SegmentFetcher.
bool installCoordinateLsa(CoordinateLsa &clsa)
Installs a cor. LSA into the LSDB.
NameLsa * findNameLsa(const ndn::Name &key)
Returns the name LSA with the given key.
void processInterest(const ndn::Name &name, const ndn::Interest &interest)
void expressInterest(const ndn::Name &interestName, uint32_t timeoutCount, ndn::time::steady_clock::TimePoint deadline=DEFAULT_LSA_RETRIEVAL_DEADLINE)
bool doesLsaExist(const ndn::Name &key, const Lsa::Type &lsType)
bool isEqualContent(const AdjLsa &alsa) const
void setIsBuildAdjLsaSheduled(bool iabls)
static int32_t getNameComponentPosition(const ndn::Name &name, const std::string &searchString)
search a name component in ndn::Name and return the position of the component
std::string serialize() const override
Returns the data that this name LSA has.
bool isAdjLsaNew(const ndn::Name &key, uint64_t seqNo)
Returns whether an LSA is new.
bool removeAdjLsa(const ndn::Name &key)
Removes an adj. LSA from the LSDB.
void setNameLsaSeq(uint64_t nlsn)
void setExpiringEventId(const ndn::EventId leei)
bool isEqualContent(const CoordinateLsa &clsa) const
void setCorTheta(std::vector< double > ct)
const ndn::Data * getLsaSegment(const ndn::Interest &interest)
Returns an LSA segment for an interest from LsaSegmentStorage.
#define NLSR_LOG_ERROR(x)
static const ndn::Name::Component NAME_COMPONENT
void removeName(const ndn::Name &name)
Copyright (c) 2014-2018, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
NamePrefixList & getNamePrefixList()
ndn::util::signal::Signal< Lsdb, Statistics::PacketType > lsaIncrementSignal
void setThisRouterPrefix(std::string trp)
bool installNameLsa(NameLsa &nlsa)
Installs a name LSA into the LSDB.
void setCorRadius(double cr)
const std::vector< double > getCorTheta() const
int32_t getNumOfActiveNeighbor() const
void addNptEntries(Nlsr &pnlsr)
Installs this LSA's name prefixes into the NPT.
const ndn::Name & getNetwork() const
long int getAdjBuildCount()
void writeSeqNoToFile() const
ndn::Face & getNlsrFace()
static bool adjLsaCompareByKey(AdjLsa &alsa, const ndn::Name &key)
Returns whether an adj. LSA object is from some router.
void setCorLsaSeq(uint64_t clsn)
const ndn::Name getKey() const
Gets the key for this LSA.
bool buildAndInstallOwnNameLsa()
Builds a name LSA for this router and then installs it into the LSDB.
bool buildAndInstallOwnCoordinateLsa()
Builds a cor. LSA for this router and installs it into the LSDB.
void addName(const ndn::Name &name)
int32_t getHyperbolicState() const
bool deserialize(const std::string &content) noexceptoverride
Initializes this coordinate LSA with the data in content.
void addAdjacents(AdjacencyList &adl)
Copies the adjacencies in a list to this one.
std::string serialize() const override
Returns the data that this coordinate LSA represents.
const ndn::security::SigningInfo & getSigningInfo()
provides a publisher of Status Dataset or other segmented octet stream
ndn::security::ValidatorConfig & getValidator()
const std::list< AdjLsa > & getAdjLsdb() const
AdjLsa * findAdjLsa(const ndn::Name &key)
Finds an adj. LSA in the LSDB.
uint32_t getRouterDeadInterval() const
bool buildAndInstallOwnAdjLsa()
Wrapper event to build and install an adj. LSA for this router.
bool removeCoordinateLsa(const ndn::Name &key)
Removes a cor. LSA from the LSDB.
#define NLSR_LOG_TRACE(x)
void increaseNameLsaSeq()
void publishRoutingUpdate(const Lsa::Type &type, const uint64_t &seqNo)
Instruct ChronoSync to publish an update.
double getCorRadius() const
void addEntry(const ndn::Name &name, const ndn::Name &destRouter)
Adds a destination to the specified name prefix.