[ndnSIM] Acquire Interests from Consumer using Intermediate node and Store those interests as a multi-dimensional array or sql entries

Kamrul Morshed shohanmk at yahoo.com
Sat Oct 13 06:15:10 PDT 2018


Greetings ndnSIMers,
I would like to know whether it would be possible for an intermediate node to collect interest packets from the consumer and store them as a multi-dimensional array. My principal aim is to collect packets from consumer and store them as a database table or something. As far as I have reviewed several examples, I felt that modifying hijacker app can be a good start but I may have to add new functions that can collect those interests. Any idea or advice would be greatly appreciated.

#include "hijacker.hpp"
#include "ns3/log.h"
#include "ns3/ndnSIM/helper/ndn-fib-helper.hpp"
NS_LOG_COMPONENT_DEFINE("Hijacker");
namespace ns3 {
// Necessary if you are planning to use ndn::AppHelperNS_OBJECT_ENSURE_REGISTERED(Hijacker);
TypeIdHijacker::GetTypeId(){  static TypeId tid = TypeId("Hijacker").SetParent<ndn::App>().AddConstructor<Hijacker>();
  return tid;}
Hijacker::Hijacker(){}
voidHijacker::OnInterest(std::shared_ptr<const ndn::Interest> interest){  ndn::App::OnInterest(interest); // forward call to perform app-level tracing  // do nothing else (hijack interest)
  NS_LOG_DEBUG("Do nothing for incoming interest for" << interest->getName());}
voidHijacker::StartApplication(){  App::StartApplication();
  // equivalent to setting interest filter for "/prefix" prefix  ndn::FibHelper::AddRoute(GetNode(), "/prefix/sub", m_face, 0);}
voidHijacker::StopApplication(){  App::StopApplication();}
} // namespace ns3
 Kamrul MorshedMS Student
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20181013/0884db85/attachment.html>


More information about the ndnSIM mailing list