blob: 8392dfb7ee18bd7acd9a94f6ab5ec8187fef5da2 [file] [log] [blame]
akmhoque298385a2014-02-13 14:13:09 -06001#ifndef NLSR_FE_HPP
2#define NLSR_FE_HPP
3
4#include<list>
5#include <iostream>
6
7#include "nlsr_nexthop.hpp"
8#include "nlsr_nhl.hpp"
9
10using namespace std;
11
12class FibEntry
13{
14public:
15 FibEntry()
16 : name()
17 , timeToRefresh(0)
18 {
19 }
20
21 FibEntry(string n)
22 {
23 name=n;
24 }
25
26 string getName()
27 {
28 return name;
29 }
30
31 Nhl& getNhl()
32 {
33 return nhl;
34 }
35
36 int getTimeToRefresh()
37 {
38 return timeToRefresh;
39 }
40
41 void setTimeToRefresh(int ttr)
42 {
43 timeToRefresh=ttr;
44 }
45
46 bool isEqualNextHops(Nhl &nhlOther);
47
48private:
49 string name;
50 int timeToRefresh;
51 Nhl nhl;
52};
53
54ostream& operator<<(ostream& os, FibEntry& fe);
55
56#endif