src: Expiration time change for LSA and Fib entry
Changed lifetime of LSA and FIB Entry to ndn::time::system_clock::TimePoint
type expiration timepoint. And refreshing event is scheduled at that timepoint
Refs: #1594
Change-Id: Ib31fe7ca79e79174eb3a5a4956ed5334da093b1b
diff --git a/src/lsdb.hpp b/src/lsdb.hpp
index ff7450a..752b52b 100644
--- a/src/lsdb.hpp
+++ b/src/lsdb.hpp
@@ -4,6 +4,7 @@
#include <utility>
#include <boost/cstdint.hpp>
#include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/util/time.hpp>
#include "lsa.hpp"
@@ -115,20 +116,22 @@
doesAdjLsaExist(const ndn::Name& key);
ndn::EventId
- scheduleNameLsaExpiration(const ndn::Name& key, int seqNo, int expTime);
+ scheduleNameLsaExpiration(const ndn::Name& key, int seqNo,
+ const ndn::time::seconds& expTime);
void
exprireOrRefreshNameLsa(const ndn::Name& lsaKey, uint64_t seqNo);
ndn::EventId
- scheduleAdjLsaExpiration(const ndn::Name& key, int seqNo, int expTime);
+ scheduleAdjLsaExpiration(const ndn::Name& key, int seqNo,
+ const ndn::time::seconds& expTime);
void
exprireOrRefreshAdjLsa(const ndn::Name& lsaKey, uint64_t seqNo);
ndn::EventId
scheduleCoordinateLsaExpiration(const ndn::Name& key, int seqNo,
- int expTime);
+ const ndn::time::seconds& expTime);
void
exprireOrRefreshCoordinateLsa(const ndn::Name& lsaKey,
@@ -174,6 +177,9 @@
void
processInterestTimedOut(const ndn::Interest& interest);
+ ndn::time::system_clock::TimePoint
+ getLsaExpirationTimePoint();
+
private:
void
cancelScheduleLsaExpiringEvent(ndn::EventId eid);