akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 1 | #ifndef NLSR_IM_HPP |
| 2 | #define NLSR_IM_HPP |
| 3 | |
| 4 | #include <ndn-cpp-dev/face.hpp> |
| 5 | #include <ndn-cpp-dev/security/key-chain.hpp> |
| 6 | #include <ndn-cpp-dev/util/scheduler.hpp> |
| 7 | |
| 8 | namespace nlsr |
| 9 | { |
| 10 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 11 | using namespace ndn; |
| 12 | using namespace std; |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 13 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 14 | class Nlsr; |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 15 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 16 | class interestManager |
| 17 | { |
| 18 | public: |
| 19 | interestManager() |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 20 | { |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 21 | } |
| 22 | void processInterest(Nlsr& pnlsr, const ndn::Name &name, |
| 23 | const ndn::Interest &interest); |
| 24 | void processInterestInfo(Nlsr& pnlsr, string& neighbor, |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 25 | const ndn::Interest &interest); |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 26 | void processInterestLsa(Nlsr& pnlsr,const ndn::Interest &interest); |
| 27 | void processInterestForNameLsa(Nlsr& pnlsr, const ndn::Interest &interest, |
| 28 | string lsaKey, uint32_t interestedlsSeqNo); |
| 29 | void processInterestForAdjLsa(Nlsr& pnlsr, const ndn::Interest &interest, |
| 30 | string lsaKey, uint32_t interestedlsSeqNo); |
| 31 | void processInterestForCorLsa(Nlsr& pnlsr, const ndn::Interest &interest, |
| 32 | string lsaKey, uint32_t interestedlsSeqNo); |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 33 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 34 | void processInterestKeys(Nlsr& pnlsr,const ndn::Interest &interest); |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 35 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 36 | void processInterestTimedOut(Nlsr& pnlsr, const ndn::Interest &interest); |
| 37 | void processInterestTimedOutInfo(Nlsr& pnlsr, string& neighbor, |
| 38 | const ndn::Interest &interest); |
| 39 | void processInterestTimedOutLsa(Nlsr& pnlsr,const ndn::Interest &interest); |
| 40 | void expressInterest(Nlsr& pnlsr,const string& interestNamePrefix, int scope, |
| 41 | int seconds); |
| 42 | void sendScheduledInfoInterest(Nlsr& pnlsr, int seconds); |
| 43 | void scheduleInfoInterest(Nlsr& pnlsr, int seconds); |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 44 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 45 | private: |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 46 | |
| 47 | |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 48 | }; |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 49 | |
| 50 | }//namespace nlsr |
| 51 | |
| 52 | #endif |