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 | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame] | 16 | class InterestManager |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 17 | { |
| 18 | public: |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame] | 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 | } |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame] | 22 | void processInterest(Nlsr& pnlsr, const ndn::Name& name, |
| 23 | const ndn::Interest& interest); |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 24 | void processInterestInfo(Nlsr& pnlsr, string& neighbor, |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame] | 25 | const ndn::Interest& interest); |
| 26 | void processInterestLsa(Nlsr& pnlsr,const ndn::Interest& interest); |
| 27 | void processInterestForNameLsa(Nlsr& pnlsr, const ndn::Interest& interest, |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 28 | string lsaKey, uint32_t interestedlsSeqNo); |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame] | 29 | void processInterestForAdjLsa(Nlsr& pnlsr, const ndn::Interest& interest, |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 30 | string lsaKey, uint32_t interestedlsSeqNo); |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame] | 31 | void processInterestForCorLsa(Nlsr& pnlsr, const ndn::Interest& interest, |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 32 | string lsaKey, uint32_t interestedlsSeqNo); |
akmhoque | ba09474 | 2014-02-28 11:47:21 -0600 | [diff] [blame] | 33 | |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -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 | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame] | 36 | void processInterestTimedOut(Nlsr& pnlsr, const ndn::Interest& interest); |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 37 | void processInterestTimedOutInfo(Nlsr& pnlsr, string& neighbor, |
akmhoque | 05d5fcf | 2014-04-15 14:58:45 -0500 | [diff] [blame] | 38 | const ndn::Interest& interest); |
| 39 | void processInterestTimedOutLsa(Nlsr& pnlsr,const ndn::Interest& interest); |
akmhoque | 5a44dd4 | 2014-03-12 18:11:32 -0500 | [diff] [blame] | 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 |