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

Spyridon (Spyros) Mastorakis mastorakis at cs.ucla.edu
Sun Oct 14 11:33:12 PDT 2018


Hi,

the intermediate node has to register the prefix of the Interests with the local NFD just like the producer application does. After receiving and storing the Interest, the intermediate node will have to let them go. It seems that you should be looking at an application that combines both the functionality of a consumer and a producer and should be installed at the intermediate nodes.

Thanks,

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA

> On Oct 13, 2018, at 6:15 AM, Kamrul Morshed <shohanmk at yahoo.com> wrote:
> 
> 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::AppHelper
> NS_OBJECT_ENSURE_REGISTERED(Hijacker);
> 
> TypeId
> Hijacker::GetTypeId()
> {
>   static TypeId tid = TypeId("Hijacker").SetParent<ndn::App>().AddConstructor<Hijacker>();
> 
>   return tid;
> }
> 
> Hijacker::Hijacker()
> {
> }
> 
> void
> Hijacker::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());
> }
> 
> void
> Hijacker::StartApplication()
> {
>   App::StartApplication();
> 
>   // equivalent to setting interest filter for "/prefix" prefix
>   ndn::FibHelper::AddRoute(GetNode(), "/prefix/sub", m_face, 0);
> }
> 
> void
> Hijacker::StopApplication()
> {
>   App::StopApplication();
> }
> 
> } // namespace ns3
> 
>  
> Kamrul Morshed
> MS Student
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20181014/bae0c7dc/attachment.html>


More information about the ndnSIM mailing list