blob: ec5cf96842f3c85ebc51d06afc96645b510188d9 [file] [log] [blame]
akmhoquedfa4a5b2014-02-03 20:12:29 -06001#ifndef NLSR_ADL_HPP
2#define NLSR_ADL_HPP
akmhoque87347a32014-01-31 11:00:44 -06003
4#include <ndn-cpp-dev/face.hpp>
akmhoque204e7542014-01-31 16:08:25 -06005#include "nlsr_adjacent.hpp"
akmhoque87347a32014-01-31 11:00:44 -06006#include<list>
7
akmhoquecd552472014-02-01 21:22:16 -06008class nlsr;
9
akmhoque87347a32014-01-31 11:00:44 -060010using namespace std;
11
12class Adl{
13
14public:
15 Adl();
16 ~Adl();
17 int insert(Adjacent& adj);
18 int updateAdjacentStatus(string adjName, int s);
19 int updateAdjacentLinkCost(string adjName, double lc);
akmhoque79d355f2014-02-04 15:11:16 -060020 std::list<Adjacent>& getAdjList();
akmhoquea8cd6b92014-01-31 20:13:26 -060021 bool isNeighbor(string adjName);
22 void incrementTimedOutInterestCount(string& neighbor);
23 int getTimedOutInterestCount(string& neighbor);
24 int getStatusOfNeighbor(string& neighbor);
25 void setStatusOfNeighbor(string& neighbor, int status);
26 void setTimedOutInterestCount(string& neighbor, int count);
akmhoque87347a32014-01-31 11:00:44 -060027
akmhoquecd552472014-02-01 21:22:16 -060028 bool isAdjLsaBuildable(nlsr& pnlsr);
29 int getNumOfActiveNeighbor();
akmhoquef7c2c7c2014-02-06 11:32:43 -060030 Adjacent getAdjacent(string adjName);
akmhoquecd552472014-02-01 21:22:16 -060031
32 int getAdlSize()
33 {
34 return adjList.size();
35 }
36
akmhoquea8cd6b92014-01-31 20:13:26 -060037 void printAdl();
akmhoque87347a32014-01-31 11:00:44 -060038
39private:
40 std::list< Adjacent > adjList;
41};
42
43#endif