akmhoque | 62a8e40 | 2014-02-08 12:00:27 -0600 | [diff] [blame] | 1 | #ifndef NLSR_FIB_HPP |
| 2 | #define NLSR_FIB_HPP |
| 3 | |
| 4 | #include <list> |
| 5 | #include "nlsr_fe.hpp" |
| 6 | |
| 7 | class nlsr; |
| 8 | |
| 9 | using namespace std; |
| 10 | |
| 11 | class Fib |
| 12 | { |
| 13 | public: |
| 14 | Fib() |
| 15 | { |
| 16 | } |
| 17 | |
| 18 | void removeFromFib(string name); |
| 19 | void updateFib(string name, Nhl& nextHopList, int maxFacesPerPrefix); |
| 20 | void cleanFib(); |
| 21 | void printFib(); |
| 22 | |
| 23 | private: |
| 24 | void removeFibEntryHop(Nhl& nl, int doNotRemoveHop); |
| 25 | int getNumberOfFacesForName(Nhl& nextHopList, int maxFacesPerPrefix); |
| 26 | |
| 27 | private: |
| 28 | std::list<FibEntry> fibTable; |
| 29 | }; |
| 30 | |
| 31 | #endif |