akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame^] | 1 | #ifndef NLSR_NPT_HPP |
| 2 | #define NLSR_NPT_HPP |
| 3 | |
| 4 | #include <list> |
| 5 | #include "npte.hpp" |
| 6 | #include "routing-table-entry.hpp" |
| 7 | |
| 8 | namespace nlsr { |
| 9 | class Nlsr; |
| 10 | |
| 11 | class Npt |
| 12 | { |
| 13 | public: |
| 14 | Npt() |
| 15 | { |
| 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 | |
| 29 | private: |
| 30 | void |
| 31 | addNpte(std::string name, RoutingTableEntry& rte, Nlsr& pnlsr); |
| 32 | |
| 33 | void |
| 34 | removeNpte(std::string name, RoutingTableEntry& rte, Nlsr& pnlsr); |
| 35 | |
| 36 | private: |
| 37 | std::list<Npte> m_npteList; |
| 38 | }; |
| 39 | |
| 40 | }//namespace nlsr |
| 41 | |
| 42 | #endif //NLSR_NPT_HPP |