blob: 453b7db15ac7c3e8ae536306c0bac7b40aa3b88f [file] [log] [blame]
akmhoque298385a2014-02-13 14:13:09 -06001#ifndef NLSR_FIB_HPP
2#define NLSR_FIB_HPP
3
4#include <list>
5#include "nlsr_fe.hpp"
6
7class nlsr;
8
9using namespace std;
10
11class Fib
12{
13public:
14 Fib()
15 {
16 }
17
18 void removeFromFib(string name);
19 void updateFib(string name, Nhl& nextHopList, int maxFacesPerPrefix);
20 void scheduleFibRefreshing(nlsr& pnlsr, int refreshTime);
21 void cleanFib();
22 void setFibEntryRefreshTime(int fert)
23 {
24 fibEntryRefreshTime=fert;
25 }
26
27 void printFib();
28
29private:
30 void removeFibEntryHop(Nhl& nl, int doNotRemoveHopFaceId);
31 int getNumberOfFacesForName(Nhl& nextHopList, int maxFacesPerPrefix);
32 void refreshFib(nlsr& pnlsr);
33
34private:
35 std::list<FibEntry> fibTable;
36 int fibEntryRefreshTime;
37};
38
39#endif