LSA refreshing/Expiration, Fib Refreshing Added
diff --git a/nlsr_lsdb.hpp b/nlsr_lsdb.hpp
index 9ba0729..62c91ee 100644
--- a/nlsr_lsdb.hpp
+++ b/nlsr_lsdb.hpp
@@ -11,6 +11,7 @@
class Lsdb{
public:
Lsdb()
+ : lsaRefreshTime(0)
{
}
@@ -38,6 +39,10 @@
std::pair<AdjLsa& , bool> getAdjLsa(string key);
std::list<AdjLsa>& getAdjLsdb();
void printAdjLsdb();
+
+ //void scheduleRefreshLsdb(nlsr& pnlsr, int interval);
+ void setLsaRefreshTime(int lrt);
+ void setThisRouterPrefix(string trp);
private:
bool addNameLsa(NameLsa &nlsa);
@@ -49,6 +54,13 @@
bool addAdjLsa(AdjLsa &alsa);
bool doesAdjLsaExist(string key);
+
+ void scheduleNameLsaExpiration(nlsr& pnlsr, string key, int seqNo, int expTime);
+ void exprireOrRefreshNameLsa(nlsr& pnlsr, string lsaKey, int seqNo);
+ void scheduleAdjLsaExpiration(nlsr& pnlsr, string key, int seqNo, int expTime);
+ void exprireOrRefreshAdjLsa(nlsr& pnlsr, string lsaKey, int seqNo);
+ void scheduleCorLsaExpiration(nlsr& pnlsr, string key, int seqNo, int expTime);
+ void exprireOrRefreshCorLsa(nlsr& pnlsr, string lsaKey, int seqNo);
private:
@@ -56,6 +68,9 @@
std::list<AdjLsa> adjLsdb;
std::list<CorLsa> corLsdb;
+ int lsaRefreshTime;
+ string thisRouterPrefix;
+
};
#endif