blob: 10ebb7149bd3093e6e0d649b73df3a0917241b88 [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
akmhoqueb1710aa2014-02-19 17:13:36 -06008namespace nlsr {
9
akmhoque298385a2014-02-13 14:13:09 -060010using namespace std;
11
12class Npte
13{
14public:
15 Npte()
16 : namePrefix()
17 , nhl()
18 {
19 }
20 Npte(string np)
21 : nhl()
22 {
23 namePrefix=np;
24 }
25
26 string getNamePrefix()
27 {
28 return namePrefix;
29 }
30
31 std::list<RoutingTableEntry>& getRteList()
32 {
33 return rteList;
34 }
35
36 int getRteListSize()
37 {
38 return rteList.size();
39 }
40
41 Nhl& getNhl()
42 {
43 return nhl;
44 }
45 void generateNhlfromRteList();
46 void removeRoutingTableEntry(RoutingTableEntry& rte);
47 void addRoutingTableEntry(RoutingTableEntry &rte);
48
49private:
50 string namePrefix;
51 std::list<RoutingTableEntry> rteList;
52 Nhl nhl;
53};
54
55ostream&
56operator<<(ostream& os, Npte& npte);
57
akmhoqueb1710aa2014-02-19 17:13:36 -060058}//namespace nlsr
59
akmhoque298385a2014-02-13 14:13:09 -060060#endif