28 #include <ndn-cxx/security/signing-helpers.hpp> 35 const ndn::time::seconds Lsdb::GRACE_PERIOD = ndn::time::seconds(10);
36 const ndn::time::steady_clock::TimePoint Lsdb::DEFAULT_LSA_RETRIEVAL_DEADLINE =
37 ndn::time::steady_clock::TimePoint::min();
40 ndn::security::SigningInfo& signingInfo,
ConfParameter& confParam,
43 , m_scheduler(face.getIoService())
44 , m_signingInfo(signingInfo)
45 , m_confParam(confParam)
46 , m_namePrefixTable(namePrefixTable)
47 , m_routingTable(routingTable)
49 [this] (const
ndn::Name& routerName, const
Lsa::Type& lsaType,
50 const uint64_t& sequenceNumber) {
51 return isLsaNew(routerName, lsaType, sequenceNumber);
57 , m_onNewLsaConnection(m_sync.
onNewLsa->connect(
58 [
this] (
const ndn::Name& updateName, uint64_t sequenceNumber,
59 const ndn::Name& originRouter) {
60 ndn::Name lsaInterest{updateName};
61 lsaInterest.appendNumber(sequenceNumber);
64 , m_segmentPublisher(m_face, keyChain)
65 , m_isBuildAdjLsaSheduled(
false)
72 for (
const auto& sp : m_fetchers) {
78 Lsdb::onFetchLsaError(uint32_t errorCode,
79 const std::string& msg,
80 const ndn::Name& interestName,
81 uint32_t retransmitNo,
82 const ndn::time::steady_clock::TimePoint& deadline,
86 NLSR_LOG_DEBUG(
"Failed to fetch LSA: " << lsaName <<
", Error code: " << errorCode
87 <<
", Message: " << msg);
89 if (ndn::time::steady_clock::now() < deadline) {
90 auto it = m_highestSeqNo.find(lsaName);
91 if (it != m_highestSeqNo.end() && it->second == seqNo) {
98 if (errorCode == ndn::util::SegmentFetcher::ErrorCode::INTEREST_TIMEOUT) {
99 delay = ndn::time::seconds(0);
103 interestName, retransmitNo + 1, deadline));
109 Lsdb::afterFetchLsa(
const ndn::ConstBufferPtr& bufferPtr,
const ndn::Name& interestName)
111 std::shared_ptr<ndn::Data> data = std::make_shared<ndn::Data>(ndn::Name(interestName));
112 data->setContent(ndn::Block(bufferPtr));
114 NLSR_LOG_DEBUG(
"Received data for LSA(name): " << data->getName());
116 ndn::Name lsaName = interestName.getSubName(0, interestName.size()-1);
117 uint64_t seqNo = interestName[-1].toNumber();
119 if (m_highestSeqNo.find(lsaName) == m_highestSeqNo.end()) {
120 m_highestSeqNo[lsaName] = seqNo;
122 else if (seqNo > m_highestSeqNo[lsaName]) {
123 m_highestSeqNo[lsaName] = seqNo;
124 NLSR_LOG_TRACE(
"SeqNo for LSA(name): " << data->getName() <<
" updated");
126 else if (seqNo < m_highestSeqNo[lsaName]) {
130 onContentValidated(data);
141 return nlsa1.
getKey() == key;
149 getLsaExpirationTimePoint(),
162 auto it = std::find_if(m_nameLsdb.begin(), m_nameLsdb.end(),
164 if (it != m_nameLsdb.end()) {
175 if (nameLsaCheck !=
nullptr) {
187 ndn::scheduler::EventId
188 Lsdb::scheduleNameLsaExpiration(
const ndn::Name& key,
int seqNo,
189 const ndn::time::seconds& expTime)
191 return m_scheduler.schedule(expTime + GRACE_PERIOD,
192 std::bind(&Lsdb::expireOrRefreshNameLsa,
this, key, seqNo));
199 ndn::time::seconds timeToExpire = m_lsaRefreshTime;
202 if (chkNameLsa ==
nullptr) {
224 ndn::time::system_clock::now();
225 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
248 std::list<ndn::Name> namesToAdd;
249 std::set_difference(newNames.begin(), newNames.end(), oldNames.begin(), oldNames.end(),
250 std::inserter(namesToAdd, namesToAdd.begin()));
251 for (
const auto& name : namesToAdd) {
263 std::list<ndn::Name> namesToRemove;
264 std::set_difference(oldNames.begin(), oldNames.end(), newNames.begin(), newNames.end(),
265 std::inserter(namesToRemove, namesToRemove.begin()));
266 for (
const auto& name : namesToRemove) {
267 NLSR_LOG_DEBUG(
"Removing name LSA no longer advertised: " << name);
278 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
292 Lsdb::addNameLsa(
NameLsa& nlsa)
294 auto it = std::find_if(m_nameLsdb.begin(), m_nameLsdb.end(),
296 if (it == m_nameLsdb.end()) {
297 m_nameLsdb.push_back(nlsa);
306 auto it = std::find_if(m_nameLsdb.begin(), m_nameLsdb.end(),
308 if (it != m_nameLsdb.end()) {
314 m_namePrefixTable.
removeEntry(it->getOrigRouter(), it->getOrigRouter());
316 for (
const auto& name : it->getNpl().getNames()) {
318 m_namePrefixTable.
removeEntry(name, it->getOrigRouter());
322 m_nameLsdb.erase(it);
329 Lsdb::doesNameLsaExist(
const ndn::Name& key)
331 auto it = std::find_if(m_nameLsdb.begin(), m_nameLsdb.end(),
333 return it != m_nameLsdb.end();
340 for (
const auto& nlsa : m_nameLsdb) {
345 const std::list<NameLsa>&
360 return clsa.
getKey() == key;
368 getLsaExpirationTimePoint(),
387 auto it = std::find_if(m_corLsdb.begin(), m_corLsdb.end(),
389 if (it != m_corLsdb.end()) {
400 if (clsa !=
nullptr) {
416 ndn::scheduler::EventId
417 Lsdb::scheduleCoordinateLsaExpiration(
const ndn::Name& key,
int seqNo,
418 const ndn::time::seconds& expTime)
420 return m_scheduler.schedule(expTime + GRACE_PERIOD,
421 std::bind(&Lsdb::expireOrRefreshCoordinateLsa,
this, key, seqNo));
427 ndn::time::seconds timeToExpire = m_lsaRefreshTime;
430 if (chkCorLsa ==
nullptr) {
434 addCoordinateLsa(clsa);
447 ndn::time::system_clock::now();
448 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
450 scheduleCoordinateLsaExpiration(clsa.
getKey(),
472 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
488 auto it = std::find_if(m_corLsdb.begin(), m_corLsdb.end(),
490 if (it == m_corLsdb.end()) {
491 m_corLsdb.push_back(clsa);
500 auto it = std::find_if(m_corLsdb.begin(), m_corLsdb.end(),
503 if (it != m_corLsdb.end()) {
508 m_namePrefixTable.
removeEntry(it->getOrigRouter(), it->getOrigRouter());
518 Lsdb::doesCoordinateLsaExist(
const ndn::Name& key)
520 auto it = std::find_if(m_corLsdb.begin(), m_corLsdb.end(),
522 return it != m_corLsdb.end();
529 for (
const auto& corLsa : m_corLsdb) {
534 const std::list<CoordinateLsa>&
549 return alsa.
getKey() == key;
559 NLSR_LOG_DEBUG(
"Adjacency LSA not built. Currently in hyperbolic routing state.");
563 if (m_isBuildAdjLsaSheduled ==
false) {
564 NLSR_LOG_DEBUG(
"Scheduling Adjacency LSA build in " << m_adjLsaBuildInterval);
566 m_scheduler.schedule(m_adjLsaBuildInterval, [
this] { buildAdjLsa(); });
567 m_isBuildAdjLsaSheduled =
true;
576 m_isBuildAdjLsaSheduled =
false;
580 int adjBuildCount = m_adjBuildCount;
582 if (adjBuildCount > 0) {
605 m_adjBuildCount = m_adjBuildCount - adjBuildCount;
612 m_isBuildAdjLsaSheduled =
true;
615 m_scheduler.schedule(ndn::time::seconds(schedulingTime), [
this] { buildAdjLsa(); });
620 Lsdb::addAdjLsa(
AdjLsa& alsa)
622 auto it = std::find_if(m_adjLsdb.begin(), m_adjLsdb.end(),
624 if (it == m_adjLsdb.end()) {
625 m_adjLsdb.push_back(alsa);
641 auto it = std::find_if(m_adjLsdb.begin(), m_adjLsdb.end(),
643 if (it != m_adjLsdb.end()) {
654 if (adjLsaCheck !=
nullptr) {
666 ndn::scheduler::EventId
667 Lsdb::scheduleAdjLsaExpiration(
const ndn::Name& key,
int seqNo,
668 const ndn::time::seconds& expTime)
670 return m_scheduler.schedule(expTime + GRACE_PERIOD,
671 std::bind(&Lsdb::expireOrRefreshAdjLsa,
this, key, seqNo));
677 ndn::time::seconds timeToExpire = m_lsaRefreshTime;
680 if (chkAdjLsa ==
nullptr) {
689 ndn::time::system_clock::now();
690 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
712 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
730 getLsaExpirationTimePoint(),
747 auto it = std::find_if(m_adjLsdb.begin(), m_adjLsdb.end(),
749 if (it != m_adjLsdb.end()) {
753 m_namePrefixTable.
removeEntry(it->getOrigRouter(), it->getOrigRouter());
762 Lsdb::doesAdjLsaExist(
const ndn::Name& key)
764 auto it = std::find_if(m_adjLsdb.begin(), m_adjLsdb.end(),
766 return it != m_adjLsdb.end();
769 const std::list<AdjLsa>&
783 Lsdb::expireOrRefreshNameLsa(
const ndn::Name& lsaKey, uint64_t seqNo)
789 if (chkNameLsa !=
nullptr) {
826 Lsdb::expireOrRefreshAdjLsa(
const ndn::Name& lsaKey, uint64_t seqNo)
832 if (chkAdjLsa !=
nullptr) {
873 Lsdb::expireOrRefreshCoordinateLsa(
const ndn::Name& lsaKey,
880 if (chkCorLsa !=
nullptr) {
921 ndn::time::steady_clock::TimePoint deadline)
926 if (deadline == DEFAULT_LSA_RETRIEVAL_DEADLINE) {
927 deadline = ndn::time::steady_clock::now() + ndn::time::seconds(static_cast<int>(
LSA_REFRESH_TIME_MAX));
930 ndn::Name lsaName = interestName.getSubName(0, interestName.size()-1);
932 uint64_t seqNo = interestName[-1].toNumber();
935 if (m_highestSeqNo.find(lsaName) == m_highestSeqNo.end()) {
936 m_highestSeqNo[lsaName] = seqNo;
939 else if (seqNo > m_highestSeqNo[lsaName]) {
940 m_highestSeqNo[lsaName] = seqNo;
943 else if (seqNo < m_highestSeqNo[lsaName]) {
947 ndn::Interest interest(interestName);
948 ndn::util::SegmentFetcher::Options options;
951 NLSR_LOG_DEBUG(
"Fetching Data for LSA: " << interestName <<
" Seq number: " << seqNo);
952 auto fetcher = ndn::util::SegmentFetcher::start(m_face, interest,
955 auto it = m_fetchers.insert(fetcher).first;
957 fetcher->afterSegmentValidated.connect([
this] (
const ndn::Data& data) {
962 auto lsaSegment = std::make_shared<const ndn::Data>(data);
963 m_lsaStorage.insert(*lsaSegment);
964 const ndn::Name& segmentName = lsaSegment->getName();
967 [
this, segmentName] { m_lsaStorage.erase(segmentName); });
970 fetcher->onComplete.connect([=] (
const ndn::ConstBufferPtr& bufferPtr) {
971 m_lsaStorage.erase(ndn::Name(lsaName).appendNumber(seqNo - 1));
972 afterFetchLsa(bufferPtr, interestName);
973 m_fetchers.erase(it);
976 fetcher->onError.connect([=] (uint32_t errorCode,
const std::string& msg) {
977 onFetchLsaError(errorCode, msg, interestName, timeoutCount, deadline, lsaName, seqNo);
978 m_fetchers.erase(it);
983 std::istringstream(interestName[-2].toUri()) >> lsaType;
995 NLSR_LOG_ERROR(
"lsaType " << lsaType <<
" not recognized; failed Statistics::PacketType conversion");
1002 ndn::Name interestName(interest.getName());
1005 if (interestName[-2].isVersion()) {
1007 if (m_segmentPublisher.replyFromStore(interestName)) {
1012 interestName = interestName.getSubName(0, interestName.size() - 2);
1013 NLSR_LOG_TRACE(
"Interest w/o segment and version: " << interestName);
1019 std::string chkString(
"LSA");
1023 ndn::Name originRouter = m_confParam.
getNetwork();
1024 originRouter.append(interestName.getSubName(lsaPosition + 1,
1025 interestName.size() - lsaPosition - 3));
1028 if (originRouter == m_confParam.
getRouterPrefix() && lsaPosition >= 0) {
1029 uint64_t seqNo = interestName[-1].toNumber();
1032 std::string lsaType = interestName[-2].toUri();
1034 std::istringstream(lsaType) >> interestedLsType;
1037 processInterestForNameLsa(interest, originRouter.append(lsaType), seqNo);
1040 processInterestForAdjacencyLsa(interest, originRouter.append(lsaType), seqNo);
1043 processInterestForCoordinateLsa(interest, originRouter.append(lsaType), seqNo);
1046 NLSR_LOG_WARN(
"Received unrecognized LSA type: " << interestedLsType);
1051 std::shared_ptr<const ndn::Data> lsaSegment = m_lsaStorage.find(interest);
1053 NLSR_LOG_TRACE(
"Found data in lsa storage. Sending the data for " << interest.getName());
1054 m_face.put(*lsaSegment);
1057 NLSR_LOG_TRACE(interest <<
" was not found in this lsa storage.");
1068 Lsdb::processInterestForNameLsa(
const ndn::Interest& interest,
1069 const ndn::Name& lsaKey,
1076 if (nameLsa !=
nullptr) {
1077 NLSR_LOG_TRACE(
"Verifying SeqNo for NameLsa is same as requested.");
1079 std::string content = nameLsa->
serialize();
1080 m_segmentPublisher.publish(interest.getName(), interest.getName(),
1081 ndn::encoding::makeStringBlock(ndn::tlv::Content, content),
1082 m_lsaRefreshTime, m_signingInfo);
1101 Lsdb::processInterestForAdjacencyLsa(
const ndn::Interest& interest,
1102 const ndn::Name& lsaKey,
1106 NLSR_LOG_ERROR(
"Received interest for an adjacency LSA when hyperbolic routing is enabled");
1112 if (adjLsa !=
nullptr) {
1113 NLSR_LOG_TRACE(
"Verifying SeqNo for AdjLsa is same as requested.");
1115 std::string content = adjLsa->
serialize();
1116 m_segmentPublisher.publish(interest.getName(), interest.getName(),
1117 ndn::encoding::makeStringBlock(ndn::tlv::Content, content),
1118 m_lsaRefreshTime, m_signingInfo);
1137 Lsdb::processInterestForCoordinateLsa(
const ndn::Interest& interest,
1138 const ndn::Name& lsaKey,
1142 NLSR_LOG_ERROR(
"Received Interest for a coordinate LSA when link-state routing is enabled");
1146 NLSR_LOG_DEBUG(
"CoordinateLsa interest " << interest <<
" received");
1148 if (corLsa !=
nullptr) {
1149 NLSR_LOG_TRACE(
"Verifying SeqNo for CoordinateLsa is same as requested.");
1151 std::string content = corLsa->
serialize();
1152 m_segmentPublisher.publish(interest.getName(), interest.getName(),
1153 ndn::encoding::makeStringBlock(ndn::tlv::Content, content),
1154 m_lsaRefreshTime, m_signingInfo);
1168 Lsdb::onContentValidated(
const std::shared_ptr<const ndn::Data>& data)
1170 const ndn::Name& dataName = data->getName();
1171 NLSR_LOG_DEBUG(
"Data validation successful for LSA: " << dataName);
1173 std::string chkString(
"LSA");
1176 if (lsaPosition >= 0) {
1179 ndn::Name originRouter = m_confParam.
getNetwork();
1180 originRouter.append(dataName.getSubName(lsaPosition + 1, dataName.size() - lsaPosition - 3));
1182 uint64_t seqNo = dataName[-1].toNumber();
1183 std::string dataContent(reinterpret_cast<const char*>(data->getContent().value()),
1184 data->getContent().value_size());
1187 std::istringstream(dataName[-2].toUri()) >> interestedLsType;
1190 processContentNameLsa(originRouter.append(std::to_string(interestedLsType)), seqNo,
1194 processContentAdjacencyLsa(originRouter.append(std::to_string(interestedLsType)), seqNo,
1198 processContentCoordinateLsa(originRouter.append(std::to_string(interestedLsType)), seqNo,
1202 NLSR_LOG_WARN(
"Received unrecognized LSA Type: " << interestedLsType);
1210 Lsdb::processContentNameLsa(
const ndn::Name& lsaKey,
1211 uint64_t lsSeqNo, std::string& dataContent)
1226 Lsdb::processContentAdjacencyLsa(
const ndn::Name& lsaKey,
1227 uint64_t lsSeqNo, std::string& dataContent)
1242 Lsdb::processContentCoordinateLsa(
const ndn::Name& lsaKey,
1243 uint64_t lsSeqNo, std::string& dataContent)
1257 ndn::time::system_clock::TimePoint
1258 Lsdb::getLsaExpirationTimePoint()
1260 ndn::time::system_clock::TimePoint expirationTimePoint = ndn::time::system_clock::now();
1261 expirationTimePoint = expirationTimePoint +
1263 return expirationTimePoint;
1270 for (
const auto& adj : m_adjLsdb) {
1281 return doesAdjLsaExist(key);
1283 return doesCoordinateLsaExist(key);
1285 return doesNameLsaExist(key);
1293 const uint64_t& sequenceNumber) {
1294 ndn::Name lsaKey = routerName;
1295 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
ndn::security::ValidatorConfig & getValidator()
A class to house all the configuration parameters for NLSR.
void setAdjLsaSeq(uint64_t alsn)
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.
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
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 scheduleRoutingTableCalculation()
Schedules a calculation event in the event scheduler only if one isn't already scheduled.
void writeLog() const override
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()
AdjacencyList & getAdjacencyList()
uint64_t getAdjLsaSeq() const
#define NLSR_LOG_DEBUG(x)
const ndn::Name & getRouterPrefix() const
uint64_t getNameLsaSeq() const
void writeLog() const override
bool deserialize(const std::string &content) noexceptoverride
Initializes this adj. LSA from the supplied content.
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 <)
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
uint32_t getInterestRetryNumber() const
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
const std::string & getStateFileDir() const
ndn::scheduler::EventId getExpiringEventId() const
CoordinateLsa * findCoordinateLsa(const ndn::Name &key)
Finds a cor. LSA in the LSDB.
ndn::util::signal::Signal< Lsdb, const ndn::Data & > afterSegmentValidatedSignal
bool isNameLsaNew(const ndn::Name &key, uint64_t seqNo)
Lsdb(ndn::Face &face, ndn::KeyChain &keyChain, ndn::security::SigningInfo &signingInfo, ConfParameter &confParam, NamePrefixTable &namePrefixTable, RoutingTable &routingTable)
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)
uint32_t getLsaRefreshTime() const
bool doesLsaExist(const ndn::Name &key, const Lsa::Type &lsType)
bool isEqualContent(const AdjLsa &alsa) const
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)
bool isEqualContent(const CoordinateLsa &clsa) const
void setExpiringEventId(ndn::scheduler::EventId eid)
void setCorTheta(std::vector< double > ct)
#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.
uint32_t getAdjLsaBuildInterval() const
NamePrefixList & getNamePrefixList()
ndn::util::signal::Signal< Lsdb, Statistics::PacketType > lsaIncrementSignal
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
const ndn::Name & getNetwork() const
void writeSeqNoToFile() const
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 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.