71 return m_lsdb.get<
byName>().find(std::make_tuple(router, lsaType)) != m_lsdb.end();
83 buildAndInstallOwnCoordinateLsa();
105 return m_isBuildAdjLsaScheduled;
118 return std::static_pointer_cast<T>(
findLsa(router, T::type()));
135 return std::hash<ndn::Name>{}(name);
143 return static_cast<int>(t);
151 std::shared_ptr<Lsa>,
158 bmi::const_mem_fun<Lsa, Lsa::Type, &Lsa::getType>
160 bmi::composite_key_hash<name_hash, enum_class_hash>
162 bmi::hashed_non_unique<
164 bmi::const_mem_fun<Lsa, Lsa::Type, &Lsa::getType>,
171 std::pair<LsaContainer::index<Lsdb::byType>::type::iterator,
172 LsaContainer::index<Lsdb::byType>::type::iterator>
175 return m_lsdb.get<
byType>().equal_range(T::type());
182 auto it = m_lsdb.get<byName>().find(std::make_tuple(router, lsaType));
183 return it != m_lsdb.end() ? *it :
nullptr;
187 incrementDataSentStats(
Lsa::Type lsaType)
201 incrementInterestRcvdStats(
Lsa::Type lsaType)
215 incrementInterestSentStats(
Lsa::Type lsaType)
234 isLsaNew(
const ndn::Name& originRouter,
Lsa::Type lsaType, uint64_t seqNo)
const
237 auto lsaPtr =
findLsa(originRouter, lsaType);
238 return lsaPtr ? lsaPtr->getSeqNo() < seqNo :
true;
242 installLsa(std::shared_ptr<Lsa> lsa);
253 removeLsa(
const ndn::Name& router,
Lsa::Type lsaType);
256 removeLsa(
const LsaContainer::index<Lsdb::byName>::type::iterator& lsaIt);
270 buildAndInstallOwnAdjLsa();
276 ndn::scheduler::EventId
277 scheduleLsaExpiration(std::shared_ptr<Lsa> lsa, ndn::time::seconds expTime);
283 expireOrRefreshLsa(std::shared_ptr<Lsa> lsa);
286 processInterestForLsa(
const ndn::Interest& interest,
const ndn::Name& originRouter,
290 expressInterest(
const ndn::Name& interestName, uint32_t timeoutCount, uint64_t incomingFaceId,
291 ndn::time::steady_clock::time_point deadline = DEFAULT_LSA_RETRIEVAL_DEADLINE);
308 onFetchLsaError(uint32_t errorCode,
const std::string& msg,
309 const ndn::Name& interestName, uint32_t retransmitNo,
310 const ndn::time::steady_clock::time_point& deadline,
311 ndn::Name lsaName, uint64_t seqNo);
320 afterFetchLsa(
const ndn::ConstBufferPtr& bufferPtr,
const ndn::Name& interestName);
323 emitSegmentValidatedSignal(
const ndn::Data& data)
328 ndn::time::system_clock::time_point
329 getLsaExpirationTimePoint()
const
338 std::list<nlsr::PrefixInfo>, std::list<nlsr::PrefixInfo>>;
343 ndn::Scheduler m_scheduler;
350 ndn::time::seconds m_lsaRefreshTime;
351 ndn::time::seconds m_adjLsaBuildInterval;
352 const ndn::Name& m_thisRouterPrefix;
356 std::map<ndn::Name, uint64_t> m_highestSeqNo;
360 ndn::signal::ScopedConnection m_onNewLsaConnection;
362 std::set<std::shared_ptr<ndn::SegmentFetcher>> m_fetchers;
363 ndn::Segmenter m_segmenter;
364 ndn::InMemoryStorageFifo m_segmentFifo;
366 bool m_isBuildAdjLsaScheduled;
367 int64_t m_adjBuildCount;
368 ndn::scheduler::ScopedEventId m_scheduledAdjLsaBuild;
370 ndn::InMemoryStoragePersistent m_lsaStorage;
372 static inline const ndn::time::steady_clock::time_point DEFAULT_LSA_RETRIEVAL_DEADLINE =
373 ndn::time::steady_clock::time_point::min();
boost::multi_index_container< std::shared_ptr< Lsa >, bmi::indexed_by< bmi::hashed_unique< bmi::tag< byName >, bmi::composite_key< Lsa, ExtractOriginRouter, bmi::const_mem_fun< Lsa, Lsa::Type, &Lsa::getType > >, bmi::composite_key_hash< name_hash, enum_class_hash > >, bmi::hashed_non_unique< bmi::tag< byType >, bmi::const_mem_fun< Lsa, Lsa::Type, &Lsa::getType >, enum_class_hash > > > LsaContainer