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,
79 , m_sequencingManager()
80 , m_onNewLsaConnection(m_sync.
onNewLsa->connect(
81 [
this] (
const ndn::Name& updateName,
const uint64_t& sequenceNumber) {
82 ndn::Name lsaInterest{updateName};
83 lsaInterest.appendNumber(sequenceNumber);
90 Lsdb::onFetchLsaError(uint32_t errorCode,
91 const std::string& msg,
92 ndn::Name& interestName,
93 uint32_t retransmitNo,
94 const ndn::time::steady_clock::TimePoint& deadline,
98 NLSR_LOG_DEBUG(
"Failed to fetch LSA: " << lsaName <<
", Error code: " << errorCode
99 <<
", Message: " << msg);
101 if (ndn::time::steady_clock::now() < deadline) {
102 SequenceNumberMap::const_iterator it = m_highestSeqNo.find(lsaName);
104 if (it != m_highestSeqNo.end() && it->second == seqNo) {
111 if (errorCode == ndn::util::SegmentFetcher::ErrorCode::INTEREST_TIMEOUT) {
112 delay = ndn::time::seconds(0);
116 interestName, retransmitNo + 1, deadline));
122 Lsdb::afterFetchLsa(
const ndn::ConstBufferPtr& bufferPtr, ndn::Name& interestName)
124 std::shared_ptr<ndn::Data> data = std::make_shared<ndn::Data>(ndn::Name(interestName));
125 data->setContent(bufferPtr);
127 NLSR_LOG_DEBUG(
"Received data for LSA(name): " << data->getName());
129 ndn::Name lsaName = interestName.getSubName(0, interestName.size()-1);
130 uint64_t seqNo = interestName[-1].toNumber();
132 if (m_highestSeqNo.find(lsaName) == m_highestSeqNo.end()) {
133 m_highestSeqNo[lsaName] = seqNo;
135 else if (seqNo > m_highestSeqNo[lsaName]) {
136 m_highestSeqNo[lsaName] = seqNo;
137 NLSR_LOG_TRACE(
"SeqNo for LSA(name): " << data->getName() <<
" updated");
139 else if (seqNo < m_highestSeqNo[lsaName]) {
143 onContentValidated(data);
147 Lsdb::cancelScheduleLsaExpiringEvent(ndn::EventId eid)
149 m_scheduler.cancelEvent(eid);
160 return nlsa1.
getKey() == key;
168 getLsaExpirationTimePoint(),
181 std::list<NameLsa>::iterator it = std::find_if(m_nameLsdb.begin(),
184 if (it != m_nameLsdb.end()) {
195 if (nameLsaCheck != 0) {
208 Lsdb::scheduleNameLsaExpiration(
const ndn::Name& key,
int seqNo,
209 const ndn::time::seconds& expTime)
211 return m_scheduler.scheduleEvent(expTime + GRACE_PERIOD,
212 std::bind(&Lsdb::expireOrRefreshNameLsa,
this, key, seqNo));
219 ndn::time::seconds timeToExpire = m_lsaRefreshTime;
222 if (chkNameLsa == 0) {
237 for (std::list<ndn::Name>::iterator it = nameList.begin(); it != nameList.end();
246 ndn::time::system_clock::now();
247 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
270 std::list<ndn::Name> namesToAdd;
271 std::set_difference(newNames.begin(), newNames.end(), oldNames.begin(), oldNames.end(),
272 std::inserter(namesToAdd, namesToAdd.begin()));
273 for (std::list<ndn::Name>::iterator it = namesToAdd.begin();
274 it != namesToAdd.end(); ++it) {
286 std::list<ndn::Name> namesToRemove;
287 std::set_difference(oldNames.begin(), oldNames.end(), newNames.begin(), newNames.end(),
288 std::inserter(namesToRemove, namesToRemove.begin()));
289 for (std::list<ndn::Name>::iterator it = namesToRemove.begin();
290 it != namesToRemove.end(); ++it) {
291 NLSR_LOG_DEBUG(
"Removing name LSA no longer advertised: " << (*it).toUri());
302 ndn::time::system_clock::now();
303 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
317 Lsdb::addNameLsa(
NameLsa& nlsa)
319 std::list<NameLsa>::iterator it = std::find_if(m_nameLsdb.begin(),
323 if (it == m_nameLsdb.end()) {
324 m_nameLsdb.push_back(nlsa);
333 std::list<NameLsa>::iterator it = std::find_if(m_nameLsdb.begin(),
336 if (it != m_nameLsdb.end()) {
341 if ((*it).getOrigRouter() !=
344 (*it).getOrigRouter());
345 for (
const auto& name : it->getNpl().getNames()) {
351 m_nameLsdb.erase(it);
358 Lsdb::doesNameLsaExist(
const ndn::Name& key)
360 std::list<NameLsa>::iterator it = std::find_if(m_nameLsdb.begin(),
363 if (it == m_nameLsdb.end()) {
373 for (std::list<NameLsa>::iterator it = m_nameLsdb.begin();
374 it != m_nameLsdb.end() ; it++) {
379 const std::list<NameLsa>&
394 return clsa.
getKey() == key;
402 getLsaExpirationTimePoint(),
421 std::list<CoordinateLsa>::iterator it = std::find_if(m_corLsdb.begin(),
424 if (it != m_corLsdb.end()) {
452 Lsdb::scheduleCoordinateLsaExpiration(
const ndn::Name& key,
int seqNo,
453 const ndn::time::seconds& expTime)
455 return m_scheduler.scheduleEvent(expTime + GRACE_PERIOD,
456 std::bind(&Lsdb::expireOrRefreshCoordinateLsa,
463 ndn::time::seconds timeToExpire = m_lsaRefreshTime;
466 if (chkCorLsa == 0) {
470 addCoordinateLsa(clsa);
483 ndn::time::system_clock::now();
484 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
486 scheduleCoordinateLsaExpiration(clsa.
getKey(),
508 ndn::time::system_clock::now();
509 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
525 std::list<CoordinateLsa>::iterator it = std::find_if(m_corLsdb.begin(),
529 if (it == m_corLsdb.end()) {
530 m_corLsdb.push_back(clsa);
539 std::list<CoordinateLsa>::iterator it = std::find_if(m_corLsdb.begin(),
543 if (it != m_corLsdb.end()) {
558 Lsdb::doesCoordinateLsaExist(
const ndn::Name& key)
560 std::list<CoordinateLsa>::iterator it = std::find_if(m_corLsdb.begin(),
564 if (it == m_corLsdb.end()) {
574 for (std::list<CoordinateLsa>::iterator it = m_corLsdb.begin();
575 it != m_corLsdb.end() ; it++) {
580 const std::list<CoordinateLsa>&
595 return alsa.
getKey() == key;
605 NLSR_LOG_DEBUG(
"Adjacency LSA not built. Currently in hyperbolic routing state.");
610 NLSR_LOG_DEBUG(
"Scheduling Adjacency LSA build in " << m_adjLsaBuildInterval);
612 m_scheduler.scheduleEvent(m_adjLsaBuildInterval, std::bind(&Lsdb::buildAdjLsa,
this));
628 if (adjBuildCount > 0) {
661 m_scheduler.scheduleEvent(ndn::time::seconds(schedulingTime),
662 std::bind(&Lsdb::buildAdjLsa,
this));
667 Lsdb::addAdjLsa(
AdjLsa& alsa)
669 std::list<AdjLsa>::iterator it = std::find_if(m_adjLsdb.begin(),
673 if (it == m_adjLsdb.end()) {
674 m_adjLsdb.push_back(alsa);
683 std::list<AdjLsa>::iterator it = std::find_if(m_adjLsdb.begin(),
686 if (it != m_adjLsdb.end()) {
697 if (adjLsaCheck != 0) {
710 Lsdb::scheduleAdjLsaExpiration(
const ndn::Name& key,
int seqNo,
711 const ndn::time::seconds& expTime)
713 return m_scheduler.scheduleEvent(expTime + GRACE_PERIOD,
714 std::bind(&Lsdb::expireOrRefreshAdjLsa,
this, key, seqNo));
720 ndn::time::seconds timeToExpire = m_lsaRefreshTime;
723 if (chkAdjLsa == 0) {
733 ndn::time::system_clock::now();
734 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
736 scheduleAdjLsaExpiration(alsa.
getKey(),
757 ndn::time::system_clock::now();
758 timeToExpire = ndn::time::duration_cast<ndn::time::seconds>(duration);
776 getLsaExpirationTimePoint(),
793 std::list<AdjLsa>::iterator it = std::find_if(m_adjLsdb.begin(),
796 if (it != m_adjLsdb.end()) {
799 (*it).removeNptEntries(m_nlsr);
807 Lsdb::doesAdjLsaExist(
const ndn::Name& key)
809 std::list<AdjLsa>::iterator it = std::find_if(m_adjLsdb.begin(),
812 if (it == m_adjLsdb.end()) {
818 const std::list<AdjLsa>&
827 m_lsaRefreshTime = lsaRefreshTime;
833 m_thisRouterPrefix = trp;
844 Lsdb::expireOrRefreshNameLsa(
const ndn::Name& lsaKey, uint64_t seqNo)
850 if (chkNameLsa != 0) {
887 Lsdb::expireOrRefreshAdjLsa(
const ndn::Name& lsaKey, uint64_t seqNo)
893 if (chkAdjLsa != 0) {
934 Lsdb::expireOrRefreshCoordinateLsa(
const ndn::Name& lsaKey,
941 if (chkCorLsa != 0) {
982 ndn::time::steady_clock::TimePoint deadline)
987 if (deadline == DEFAULT_LSA_RETRIEVAL_DEADLINE) {
988 deadline = ndn::time::steady_clock::now() + ndn::time::seconds(static_cast<int>(
LSA_REFRESH_TIME_MAX));
991 ndn::Name lsaName = interestName.getSubName(0, interestName.size()-1);
993 uint64_t seqNo = interestName[-1].toNumber();
996 if (m_highestSeqNo.find(lsaName) == m_highestSeqNo.end()) {
997 m_highestSeqNo[lsaName] = seqNo;
1000 else if (seqNo > m_highestSeqNo[lsaName]) {
1001 m_highestSeqNo[lsaName] = seqNo;
1004 else if (seqNo < m_highestSeqNo[lsaName]) {
1008 ndn::Interest interest(interestName);
1011 NLSR_LOG_DEBUG(
"Fetching Data for LSA: " << interestName <<
" Seq number: " << seqNo);
1012 shared_ptr<ndn::util::SegmentFetcher> fetcher =
1013 ndn::util::SegmentFetcher::fetch(m_nlsr.
getNlsrFace(), interest,
1015 std::bind(&Lsdb::afterFetchLsa,
this, _1, interestName),
1016 std::bind(&Lsdb::onFetchLsaError,
this, _1, _2, interestName,
1017 timeoutCount, deadline, lsaName, seqNo));
1024 std::istringstream(interestName[-2].toUri()) >> lsaType;
1036 NLSR_LOG_ERROR(
"lsaType " << lsaType <<
" not recognized; failed Statistics::PacketType conversion");
1046 const ndn::Name& interestName(interest.getName());
1049 std::string chkString(
"LSA");
1054 originRouter.append(interestName.getSubName(lsaPosition + 1,
1055 interest.getName().size() - lsaPosition - 3));
1060 if (lsaPosition >= 0) {
1062 uint64_t seqNo = interestName[-1].toNumber();
1066 std::istringstream(interestName[-2].toUri()) >> interestedLsType;
1069 processInterestForNameLsa(interest, originRouter.append(std::to_string(interestedLsType)),
1073 processInterestForAdjacencyLsa(interest, originRouter.append(std::to_string(interestedLsType)),
1077 processInterestForCoordinateLsa(interest, originRouter.append(std::to_string(interestedLsType)),
1081 NLSR_LOG_WARN(
"Received unrecognized LSA type: " << interestedLsType);
1087 const ndn::Data* lsaSegment = m_lsaStorage.
getLsaSegment(interest);
1088 if (lsaSegment !=
nullptr) {
1089 NLSR_LOG_TRACE(
"Found data in lsa storage. Sending the data for " << interest.getName());
1093 NLSR_LOG_TRACE(interest <<
" was not found in this lsa storage.");
1102 Lsdb::putLsaData(
const ndn::Interest& interest,
const std::string& content)
1109 NLSR_LOG_DEBUG(
"Sending requested data ( " << content <<
") for interest (" << interest
1110 <<
") to be published and added to face.");
1111 publisher.publish(interest.getName());
1120 Lsdb::processInterestForNameLsa(
const ndn::Interest& interest,
1121 const ndn::Name& lsaKey,
1128 if (nameLsa !=
nullptr) {
1129 NLSR_LOG_TRACE(
"Verifying SeqNo for NameLsa is same as requested.");
1132 std::string content = nameLsa->
serialize();
1133 putLsaData(interest,content);
1155 Lsdb::processInterestForAdjacencyLsa(
const ndn::Interest& interest,
1156 const ndn::Name& lsaKey,
1160 NLSR_LOG_ERROR(
"Received interest for an adjacency LSA when hyperbolic routing is enabled");
1167 if (adjLsa !=
nullptr) {
1168 NLSR_LOG_TRACE(
"Verifying SeqNo for AdjLsa is same as requested.");
1170 std::string content = adjLsa->
serialize();
1171 putLsaData(interest,content);
1190 Lsdb::processInterestForCoordinateLsa(
const ndn::Interest& interest,
1191 const ndn::Name& lsaKey,
1195 NLSR_LOG_ERROR(
"Received Interest for a coordinate LSA when link-state routing is enabled");
1200 NLSR_LOG_DEBUG(
"CoordinateLsa interest " << interest <<
" received");
1202 if (corLsa !=
nullptr) {
1203 NLSR_LOG_TRACE(
"Verifying SeqNo for CoordinateLsa is same as requested.");
1205 std::string content = corLsa->
serialize();
1206 putLsaData(interest,content);
1220 Lsdb::onContentValidated(
const std::shared_ptr<const ndn::Data>& data)
1222 const ndn::Name& dataName = data->getName();
1223 NLSR_LOG_DEBUG(
"Data validation successful for LSA: " << dataName);
1225 std::string chkString(
"LSA");
1228 if (lsaPosition >= 0) {
1232 originRouter.append(dataName.getSubName(lsaPosition + 1, dataName.size() - lsaPosition - 3));
1234 uint64_t seqNo = dataName[-1].toNumber();
1235 std::string dataContent(reinterpret_cast<const char*>(data->getContent().value()),
1236 data->getContent().value_size());
1239 std::istringstream(dataName[-2].toUri()) >> interestedLsType;
1242 processContentNameLsa(originRouter.append(std::to_string(interestedLsType)), seqNo,
1246 processContentAdjacencyLsa(originRouter.append(std::to_string(interestedLsType)), seqNo,
1250 processContentCoordinateLsa(originRouter.append(std::to_string(interestedLsType)), seqNo,
1254 NLSR_LOG_WARN(
"Received unrecognized LSA Type: " << interestedLsType);
1263 Lsdb::processContentNameLsa(
const ndn::Name& lsaKey,
1264 uint64_t lsSeqNo, std::string& dataContent)
1280 Lsdb::processContentAdjacencyLsa(
const ndn::Name& lsaKey,
1281 uint64_t lsSeqNo, std::string& dataContent)
1297 Lsdb::processContentCoordinateLsa(
const ndn::Name& lsaKey,
1298 uint64_t lsSeqNo, std::string& dataContent)
1313 ndn::time::system_clock::TimePoint
1314 Lsdb::getLsaExpirationTimePoint()
1316 ndn::time::system_clock::TimePoint expirationTimePoint = ndn::time::system_clock::now();
1317 expirationTimePoint = expirationTimePoint +
1319 return expirationTimePoint;
1326 for (std::list<AdjLsa>::iterator it = m_adjLsdb.begin();
1327 it != m_adjLsdb.end() ; it++) {
1338 return doesAdjLsaExist(key);
1340 return doesCoordinateLsaExist(key);
1342 return doesNameLsaExist(key);
1350 const uint64_t& sequenceNumber) {
1351 ndn::Name lsaKey = routerName;
1352 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()
bool isEqualContent(AdjLsa &alsa)
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)
uint32_t getLsaRefreshTime() const
bool doesLsaExist(const ndn::Name &key, const Lsa::Type &lsType)
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)
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.