blob: c85e045e24feb88a2bfa26f7e884dd2cbde82445 [file] [log] [blame]
akmhoqueba094742014-02-28 11:47:21 -06001#ifndef NLSR_FE_HPP
2#define NLSR_FE_HPP
3
4#include<list>
5#include <iostream>
6#include <ndn-cpp-dev/util/scheduler.hpp>
7
8#include "nlsr_nexthop.hpp"
9#include "nlsr_nhl.hpp"
10
11namespace nlsr
12{
13
14 using namespace std;
15
16 class FibEntry
17 {
18 public:
19 FibEntry()
20 : name()
21 , timeToRefresh(0)
22 , feSeqNo(0)
23 {
24 }
25
26 FibEntry(string n)
27 {
28 name=n;
29 }
30
31 string getName()
32 {
33 return name;
34 }
35
36 Nhl& getNhl()
37 {
38 return nhl;
39 }
40
41 int getTimeToRefresh()
42 {
43 return timeToRefresh;
44 }
45
46 void setTimeToRefresh(int ttr)
47 {
48 timeToRefresh=ttr;
49 }
50
51 void setFeExpiringEventId(ndn::EventId feid)
52 {
53 feExpiringEventId=feid;
54 }
55
56 ndn::EventId getFeExpiringEventId()
57 {
58 return feExpiringEventId;
59 }
60
61 void setFeSeqNo(int fsn)
62 {
63 feSeqNo=fsn;
64 }
65
66 int getFeSeqNo()
67 {
68 return feSeqNo;
69 }
70
71 bool isEqualNextHops(Nhl &nhlOther);
72
73 private:
74 string name;
75 int timeToRefresh;
76 ndn::EventId feExpiringEventId;
77 int feSeqNo;
78 Nhl nhl;
79 };
80
81 ostream& operator<<(ostream& os, FibEntry& fe);
82
83} //namespace nlsr
84
85#endif