akmhoque | 298385a | 2014-02-13 14:13:09 -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 | |||||
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 8 | namespace nlsr |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 9 | { |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 10 | |
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 11 | using namespace std; |
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 12 | |
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 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 | } | ||||
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 26 | |
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 27 | string getNamePrefix() |
28 | { | ||||
29 | return namePrefix; | ||||
30 | } | ||||
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 31 | |
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 32 | std::list<RoutingTableEntry>& getRteList() |
33 | { | ||||
34 | return rteList; | ||||
35 | } | ||||
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 36 | |
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 37 | int getRteListSize() |
38 | { | ||||
39 | return rteList.size(); | ||||
40 | } | ||||
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 41 | |
akmhoque | 1fd8c1e | 2014-02-19 19:41:49 -0600 | [diff] [blame] | 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); | ||||
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 58 | |
akmhoque | b1710aa | 2014-02-19 17:13:36 -0600 | [diff] [blame] | 59 | }//namespace nlsr |
60 | |||||
akmhoque | 298385a | 2014-02-13 14:13:09 -0600 | [diff] [blame] | 61 | #endif |