Directory Structuring
diff --git a/src/route/nlsr_fib.hpp b/src/route/nlsr_fib.hpp
new file mode 100644
index 0000000..d93d972
--- /dev/null
+++ b/src/route/nlsr_fib.hpp
@@ -0,0 +1,48 @@
+#ifndef NLSR_FIB_HPP
+#define NLSR_FIB_HPP
+
+#include <list>
+#include "nlsr_fe.hpp"
+
+namespace nlsr
+{
+
+ class Nlsr;
+
+ using namespace std;
+ using namespace ndn;
+
+ class Fib
+ {
+ public:
+ Fib()
+ {
+ }
+
+ void removeFromFib(Nlsr& pnlsr, string name);
+ void updateFib(Nlsr& pnlsr, string name, Nhl& nextHopList,
+ int maxFacesPerPrefix);
+ void cleanFib(Nlsr& pnlsr);
+ void setFibEntryRefreshTime(int fert)
+ {
+ fibEntryRefreshTime=fert;
+ }
+
+ void printFib();
+
+ private:
+ void removeFibEntryHop(Nhl& nl, int doNotRemoveHopFaceId);
+ int getNumberOfFacesForName(Nhl& nextHopList, int maxFacesPerPrefix);
+ ndn::EventId
+ scheduleFibEntryRefreshing(Nlsr& pnlsr, string name, int feSeqNum,
+ int refreshTime);
+ void cancelScheduledFeExpiringEvent(Nlsr& pnlsr, EventId eid);
+ void refreshFibEntry(string name, int feSeqNum);
+
+ private:
+ std::list<FibEntry> fibTable;
+ int fibEntryRefreshTime;
+ };
+
+}//namespace nlsr
+#endif