blob: e64328ccee8911452dfced6dff7c7ca6695d07bc [file] [log] [blame]
akmhoque298385a2014-02-13 14:13:09 -06001#ifndef NLSR_NPTE_HPP
2#define NLSR_NPTE_HPP
3
4#include <list>
5#include <utility>
6#include "nlsr_rte.hpp"
7
akmhoque1fd8c1e2014-02-19 19:41:49 -06008namespace nlsr
akmhoque298385a2014-02-13 14:13:09 -06009{
akmhoque298385a2014-02-13 14:13:09 -060010
akmhoque1fd8c1e2014-02-19 19:41:49 -060011 using namespace std;
akmhoque298385a2014-02-13 14:13:09 -060012
akmhoque1fd8c1e2014-02-19 19:41:49 -060013 class Npte
14 {
15 public:
16 Npte()
17 : namePrefix()
18 , nhl()
19 {
20 }
21 Npte(string np)
22 : nhl()
23 {
24 namePrefix=np;
25 }
akmhoque298385a2014-02-13 14:13:09 -060026
akmhoque1fd8c1e2014-02-19 19:41:49 -060027 string getNamePrefix()
28 {
29 return namePrefix;
30 }
akmhoque298385a2014-02-13 14:13:09 -060031
akmhoque1fd8c1e2014-02-19 19:41:49 -060032 std::list<RoutingTableEntry>& getRteList()
33 {
34 return rteList;
35 }
akmhoque298385a2014-02-13 14:13:09 -060036
akmhoque1fd8c1e2014-02-19 19:41:49 -060037 int getRteListSize()
38 {
39 return rteList.size();
40 }
akmhoque298385a2014-02-13 14:13:09 -060041
akmhoque1fd8c1e2014-02-19 19:41:49 -060042 Nhl& getNhl()
43 {
44 return nhl;
45 }
46 void generateNhlfromRteList();
47 void removeRoutingTableEntry(RoutingTableEntry& rte);
48 void addRoutingTableEntry(RoutingTableEntry &rte);
49
50 private:
51 string namePrefix;
52 std::list<RoutingTableEntry> rteList;
53 Nhl nhl;
54 };
55
56 ostream&
57 operator<<(ostream& os, Npte& npte);
akmhoque298385a2014-02-13 14:13:09 -060058
akmhoqueb1710aa2014-02-19 17:13:36 -060059}//namespace nlsr
60
akmhoque298385a2014-02-13 14:13:09 -060061#endif