blob: c150e8f3afccef11417346da4f9efab9e5e0afed [file] [log] [blame]
akmhoqueba094742014-02-28 11:47:21 -06001#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{
10
akmhoque5a44dd42014-03-12 18:11:32 -050011 using namespace ndn;
12 using namespace std;
akmhoqueba094742014-02-28 11:47:21 -060013
akmhoque5a44dd42014-03-12 18:11:32 -050014 class Nlsr;
akmhoqueba094742014-02-28 11:47:21 -060015
akmhoque5a44dd42014-03-12 18:11:32 -050016 class interestManager
17 {
18 public:
19 interestManager()
akmhoqueba094742014-02-28 11:47:21 -060020 {
akmhoque5a44dd42014-03-12 18:11:32 -050021 }
22 void processInterest(Nlsr& pnlsr, const ndn::Name &name,
23 const ndn::Interest &interest);
24 void processInterestInfo(Nlsr& pnlsr, string& neighbor,
akmhoqueba094742014-02-28 11:47:21 -060025 const ndn::Interest &interest);
akmhoque5a44dd42014-03-12 18:11:32 -050026 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);
akmhoqueba094742014-02-28 11:47:21 -060033
akmhoque5a44dd42014-03-12 18:11:32 -050034 void processInterestKeys(Nlsr& pnlsr,const ndn::Interest &interest);
akmhoqueba094742014-02-28 11:47:21 -060035
akmhoque5a44dd42014-03-12 18:11:32 -050036 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);
akmhoqueba094742014-02-28 11:47:21 -060044
akmhoque5a44dd42014-03-12 18:11:32 -050045 private:
akmhoqueba094742014-02-28 11:47:21 -060046
47
akmhoque5a44dd42014-03-12 18:11:32 -050048 };
akmhoqueba094742014-02-28 11:47:21 -060049
50}//namespace nlsr
51
52#endif