akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame^] | 1 | #ifndef NLSR_NPTE_HPP |
| 2 | #define NLSR_NPTE_HPP |
| 3 | |
| 4 | #include <list> |
| 5 | #include <utility> |
| 6 | #include "nlsr_rte.hpp" |
| 7 | |
| 8 | namespace nlsr |
| 9 | { |
| 10 | |
| 11 | using namespace std; |
| 12 | |
| 13 | class Npte |
| 14 | { |
| 15 | public: |
| 16 | Npte() |
| 17 | : namePrefix() |
| 18 | , nhl() |
| 19 | { |
| 20 | } |
| 21 | Npte(string np) |
| 22 | : nhl() |
| 23 | { |
| 24 | namePrefix=np; |
| 25 | } |
| 26 | |
| 27 | string getNamePrefix() |
| 28 | { |
| 29 | return namePrefix; |
| 30 | } |
| 31 | |
| 32 | std::list<RoutingTableEntry>& getRteList() |
| 33 | { |
| 34 | return rteList; |
| 35 | } |
| 36 | |
| 37 | int getRteListSize() |
| 38 | { |
| 39 | return rteList.size(); |
| 40 | } |
| 41 | |
| 42 | 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); |
| 58 | |
| 59 | }//namespace nlsr |
| 60 | |
| 61 | #endif |