blob: 49f763ab2d1ed1a53417eba41575b62720998ff5 [file] [log] [blame]
akmhoque62a8e402014-02-08 12:00:27 -06001#ifndef NLSR_NPTE_HPP
2#define NLSR_NPTE_HPP
3
4#include <list>
5#include <utility>
6#include "nlsr_rte.hpp"
7
8using namespace std;
9
10class Npte
11{
12public:
13 Npte()
14 : namePrefix()
15 , nhl()
16 {
17 }
18 Npte(string np)
19 : nhl()
20 {
21 namePrefix=np;
22 }
23
24 string getNamePrefix()
25 {
26 return namePrefix;
27 }
28
29 std::list<RoutingTableEntry>& getRteList()
30 {
31 return rteList;
32 }
33
34 int getRteListSize()
35 {
36 return rteList.size();
37 }
38
39 Nhl& getNhl()
40 {
41 return nhl;
42 }
43 void generateNhlfromRteList();
44 void removeRoutingTableEntry(RoutingTableEntry& rte);
45 void addRoutingTableEntry(RoutingTableEntry &rte);
46
47private:
48 string namePrefix;
49 std::list<RoutingTableEntry> rteList;
50 Nhl nhl;
51};
52
53ostream&
54operator<<(ostream& os, Npte& npte);
55
56#endif