blob: 725103d354a21fc47eae53c0a2c7f19d9a3c4a1a [file] [log] [blame]
akmhoque53353462014-04-22 08:43:45 -05001#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
8namespace nlsr {
9
10class Nlsr;
11
12class InterestManager
13{
14public:
akmhoqueb6450b12014-04-24 00:01:03 -050015 InterestManager(Nlsr& nlsr)
16 : m_nlsr(nlsr)
akmhoque53353462014-04-22 08:43:45 -050017 {
18 }
19 void
akmhoqueb6450b12014-04-24 00:01:03 -050020 processInterest(const ndn::Name& name, const ndn::Interest& interest);
akmhoque53353462014-04-22 08:43:45 -050021
22 void
akmhoqueb6450b12014-04-24 00:01:03 -050023 processInterestInfo(const std::string& neighbor, const ndn::Interest& interest);
akmhoque53353462014-04-22 08:43:45 -050024
25 void
akmhoqueb6450b12014-04-24 00:01:03 -050026 processInterestLsa(const ndn::Interest& interest);
akmhoque53353462014-04-22 08:43:45 -050027
28 void
akmhoqueb6450b12014-04-24 00:01:03 -050029 processInterestForNameLsa(const ndn::Interest& interest,
30 const std::string& lsaKey, uint32_t interestedlsSeqNo);
akmhoque53353462014-04-22 08:43:45 -050031
32 void
akmhoqueb6450b12014-04-24 00:01:03 -050033 processInterestForAdjLsa(const ndn::Interest& interest,
34 const std::string& lsaKey, uint32_t interestedlsSeqNo);
akmhoque53353462014-04-22 08:43:45 -050035
36 void
akmhoqueb6450b12014-04-24 00:01:03 -050037 processInterestForCorLsa(const ndn::Interest& interest,
38 const std::string& lsaKey, uint32_t interestedlsSeqNo);
akmhoque53353462014-04-22 08:43:45 -050039
40 void
akmhoqueb6450b12014-04-24 00:01:03 -050041 processInterestKeys(const ndn::Interest& interest);
akmhoque53353462014-04-22 08:43:45 -050042
43 void
akmhoqueb6450b12014-04-24 00:01:03 -050044 processInterestTimedOut(const ndn::Interest& interest);
akmhoque53353462014-04-22 08:43:45 -050045
46 void
akmhoqueb6450b12014-04-24 00:01:03 -050047 processInterestTimedOutInfo(const std::string& neighbor,
akmhoque53353462014-04-22 08:43:45 -050048 const ndn::Interest& interest);
49
50 void
akmhoqueb6450b12014-04-24 00:01:03 -050051 processInterestTimedOutLsa(const ndn::Interest& interest);
akmhoque53353462014-04-22 08:43:45 -050052
53 void
akmhoqueb6450b12014-04-24 00:01:03 -050054 expressInterest(const std::string& interestNamePrefix, int scope, int seconds);
akmhoque53353462014-04-22 08:43:45 -050055
56 void
akmhoqueb6450b12014-04-24 00:01:03 -050057 sendScheduledInfoInterest(int seconds);
akmhoque53353462014-04-22 08:43:45 -050058
59 void
akmhoqueb6450b12014-04-24 00:01:03 -050060 scheduleInfoInterest(int seconds);
akmhoque53353462014-04-22 08:43:45 -050061
62private:
akmhoqueb6450b12014-04-24 00:01:03 -050063 Nlsr& m_nlsr;
akmhoque53353462014-04-22 08:43:45 -050064
Yingdi Yu0c217822014-04-24 14:22:42 -070065 ndn::KeyChain m_keyChain;
akmhoque53353462014-04-22 08:43:45 -050066};
67
68}//namespace nlsr
69
70#endif //NLSR_IM_HPP