akmhoque | 62a8e40 | 2014-02-08 12:00:27 -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 | using namespace std; |
| 9 | |
| 10 | class Npte |
| 11 | { |
| 12 | public: |
| 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 | |
| 47 | private: |
| 48 | string namePrefix; |
| 49 | std::list<RoutingTableEntry> rteList; |
| 50 | Nhl nhl; |
| 51 | }; |
| 52 | |
| 53 | ostream& |
| 54 | operator<<(ostream& os, Npte& npte); |
| 55 | |
| 56 | #endif |