blob: 8392dfb7ee18bd7acd9a94f6ab5ec8187fef5da2 [file] [log] [blame]
akmhoque62a8e402014-02-08 12:00:27 -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()
akmhoquee77d8142014-02-11 11:59:57 -060017 , timeToRefresh(0)
akmhoque62a8e402014-02-08 12:00:27 -060018 {
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
akmhoquee77d8142014-02-11 11:59:57 -060036 int getTimeToRefresh()
37 {
38 return timeToRefresh;
39 }
40
41 void setTimeToRefresh(int ttr)
42 {
43 timeToRefresh=ttr;
44 }
45
akmhoque62a8e402014-02-08 12:00:27 -060046 bool isEqualNextHops(Nhl &nhlOther);
47
48private:
49 string name;
akmhoquee77d8142014-02-11 11:59:57 -060050 int timeToRefresh;
akmhoque62a8e402014-02-08 12:00:27 -060051 Nhl nhl;
52};
53
54ostream& operator<<(ostream& os, FibEntry& fe);
55
56#endif