akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame] | 1 | #ifndef NLSR_NAME_PREFIX_TABLE_HPP |
2 | #define NLSR_NAME_PREFIX_TABLE_HPP | ||||
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 3 | |
4 | #include <list> | ||||
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame] | 5 | #include <boost/cstdint.hpp> |
6 | |||||
akmhoque | c8a10f7 | 2014-04-25 18:42:55 -0500 | [diff] [blame] | 7 | #include "name-prefix-table-entry.hpp" |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 8 | #include "routing-table-entry.hpp" |
9 | |||||
10 | namespace nlsr { | ||||
11 | class Nlsr; | ||||
12 | |||||
akmhoque | c8a10f7 | 2014-04-25 18:42:55 -0500 | [diff] [blame] | 13 | class NamePrefixTable |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 14 | { |
15 | public: | ||||
akmhoque | 31d1d4b | 2014-05-05 22:08:14 -0500 | [diff] [blame^] | 16 | NamePrefixTable(Nlsr& nlsr) |
17 | : m_nlsr(nlsr) | ||||
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 18 | { |
19 | } | ||||
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 20 | |
21 | void | ||||
akmhoque | 31d1d4b | 2014-05-05 22:08:14 -0500 | [diff] [blame^] | 22 | addEntry(const ndn::Name& name, const ndn::Name& destRouter); |
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame] | 23 | |
24 | void | ||||
akmhoque | 31d1d4b | 2014-05-05 22:08:14 -0500 | [diff] [blame^] | 25 | removeEntry(const ndn::Name& name, const ndn::Name& destRouter); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 26 | |
27 | void | ||||
akmhoque | 31d1d4b | 2014-05-05 22:08:14 -0500 | [diff] [blame^] | 28 | updateWithNewRoute(); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 29 | |
30 | void | ||||
31 | print(); | ||||
32 | |||||
33 | private: | ||||
34 | void | ||||
akmhoque | 31d1d4b | 2014-05-05 22:08:14 -0500 | [diff] [blame^] | 35 | addEntry(const ndn::Name& name, RoutingTableEntry& rte); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 36 | |
37 | void | ||||
akmhoque | 31d1d4b | 2014-05-05 22:08:14 -0500 | [diff] [blame^] | 38 | removeEntry(const ndn::Name& name, RoutingTableEntry& rte); |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 39 | |
40 | private: | ||||
akmhoque | 31d1d4b | 2014-05-05 22:08:14 -0500 | [diff] [blame^] | 41 | Nlsr& m_nlsr; |
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame] | 42 | std::list<NamePrefixTableEntry> m_table; |
akmhoque | 5335346 | 2014-04-22 08:43:45 -0500 | [diff] [blame] | 43 | }; |
44 | |||||
45 | }//namespace nlsr | ||||
46 | |||||
akmhoque | fdbddb1 | 2014-05-02 18:35:19 -0500 | [diff] [blame] | 47 | #endif //NLSR_NAME_PREFIX_TABLE_HPP |