blob: 5b74174af9ff252d031b449a4b64ff7191b46ef9 [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
akmhoque05d5fcf2014-04-15 14:58:45 -050016 class InterestManager
akmhoque5a44dd42014-03-12 18:11:32 -050017 {
18 public:
akmhoque05d5fcf2014-04-15 14:58:45 -050019 InterestManager()
akmhoqueba094742014-02-28 11:47:21 -060020 {
akmhoque5a44dd42014-03-12 18:11:32 -050021 }
akmhoque05d5fcf2014-04-15 14:58:45 -050022 void processInterest(Nlsr& pnlsr, const ndn::Name& name,
23 const ndn::Interest& interest);
akmhoque5a44dd42014-03-12 18:11:32 -050024 void processInterestInfo(Nlsr& pnlsr, string& neighbor,
akmhoque05d5fcf2014-04-15 14:58:45 -050025 const ndn::Interest& interest);
26 void processInterestLsa(Nlsr& pnlsr,const ndn::Interest& interest);
27 void processInterestForNameLsa(Nlsr& pnlsr, const ndn::Interest& interest,
akmhoque5a44dd42014-03-12 18:11:32 -050028 string lsaKey, uint32_t interestedlsSeqNo);
akmhoque05d5fcf2014-04-15 14:58:45 -050029 void processInterestForAdjLsa(Nlsr& pnlsr, const ndn::Interest& interest,
akmhoque5a44dd42014-03-12 18:11:32 -050030 string lsaKey, uint32_t interestedlsSeqNo);
akmhoque05d5fcf2014-04-15 14:58:45 -050031 void processInterestForCorLsa(Nlsr& pnlsr, const ndn::Interest& interest,
akmhoque5a44dd42014-03-12 18:11:32 -050032 string lsaKey, uint32_t interestedlsSeqNo);
akmhoqueba094742014-02-28 11:47:21 -060033
akmhoque05d5fcf2014-04-15 14:58:45 -050034 void processInterestKeys(Nlsr& pnlsr,const ndn::Interest& interest);
akmhoqueba094742014-02-28 11:47:21 -060035
akmhoque05d5fcf2014-04-15 14:58:45 -050036 void processInterestTimedOut(Nlsr& pnlsr, const ndn::Interest& interest);
akmhoque5a44dd42014-03-12 18:11:32 -050037 void processInterestTimedOutInfo(Nlsr& pnlsr, string& neighbor,
akmhoque05d5fcf2014-04-15 14:58:45 -050038 const ndn::Interest& interest);
39 void processInterestTimedOutLsa(Nlsr& pnlsr,const ndn::Interest& interest);
akmhoque5a44dd42014-03-12 18:11:32 -050040 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