blob: 2297315bf34c7faf1ebd0c7d926b81e0e6310ac4 [file] [log] [blame]
#ifndef NLSR_FE_HPP
#define NLSR_FE_HPP
#include<list>
#include <iostream>
#include <ndn-cpp-dev/util/scheduler.hpp>
#include "nlsr_nexthop.hpp"
#include "nlsr_nhl.hpp"
using namespace std;
class FibEntry
{
public:
FibEntry()
: name()
, timeToRefresh(0)
, feSeqNo(0)
{
}
FibEntry(string n)
{
name=n;
}
string getName()
{
return name;
}
Nhl& getNhl()
{
return nhl;
}
int getTimeToRefresh()
{
return timeToRefresh;
}
void setTimeToRefresh(int ttr)
{
timeToRefresh=ttr;
}
void setFeExpiringEventId(ndn::EventId feid)
{
feExpiringEventId=feid;
}
ndn::EventId getFeExpiringEventId()
{
return feExpiringEventId;
}
void setFeSeqNo(int fsn)
{
feSeqNo=fsn;
}
int getFeSeqNo()
{
return feSeqNo;
}
bool isEqualNextHops(Nhl &nhlOther);
private:
string name;
int timeToRefresh;
ndn::EventId feExpiringEventId;
int feSeqNo;
Nhl nhl;
};
ostream& operator<<(ostream& os, FibEntry& fe);
#endif