| #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 |