blob: 1a59af210228c0351695d18cf3baadd77e549eda [file] [log] [blame]
akmhoque53353462014-04-22 08:43:45 -05001#ifndef NLSR_NPT_HPP
2#define NLSR_NPT_HPP
3
4#include <list>
akmhoquec8a10f72014-04-25 18:42:55 -05005#include "name-prefix-table-entry.hpp"
akmhoque53353462014-04-22 08:43:45 -05006#include "routing-table-entry.hpp"
7
8namespace nlsr {
9class Nlsr;
10
akmhoquec8a10f72014-04-25 18:42:55 -050011class NamePrefixTable
akmhoque53353462014-04-22 08:43:45 -050012{
13public:
akmhoquec8a10f72014-04-25 18:42:55 -050014 NamePrefixTable()
akmhoque53353462014-04-22 08:43:45 -050015 {
16 }
17 void
18 addNpteByDestName(std::string name, std::string destRouter, Nlsr& pnlsr);
19
20 void
21 removeNpte(std::string name, std::string destRouter, Nlsr& pnlsr);
22
23 void
24 updateWithNewRoute(Nlsr& pnlsr);
25
26 void
27 print();
28
29private:
30 void
31 addNpte(std::string name, RoutingTableEntry& rte, Nlsr& pnlsr);
32
33 void
34 removeNpte(std::string name, RoutingTableEntry& rte, Nlsr& pnlsr);
35
36private:
akmhoquec8a10f72014-04-25 18:42:55 -050037 std::list<NamePrefixTableEntry> m_npteList;
akmhoque53353462014-04-22 08:43:45 -050038};
39
40}//namespace nlsr
41
42#endif //NLSR_NPT_HPP