<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Oct 13, 2018, at 6:15 AM, Kamrul Morshed <<a href="mailto:shohanmk@yahoo.com" class="">shohanmk@yahoo.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: 'times new roman', 'new york', times, serif; font-size: 16px;" class=""><div id="yiv8219500573" class=""><div id="yui_3_16_0_ym19_1_1539435642661_3055" class=""><div style="background-color: rgb(255, 255, 255);" id="yui_3_16_0_ym19_1_1539435642661_3054" class=""><div id="yiv8219500573yui_3_16_0_ym19_1_1539435005654_4101" style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px;" class=""><span id="yui_3_16_0_ym19_1_1539435642661_3702" class="">Greetings ndnSIMers,</span></div><div id="yiv8219500573yui_3_16_0_ym19_1_1539435005654_4101" style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px;" class=""><br class=""></div><div id="yiv8219500573yui_3_16_0_ym19_1_1539435005654_4101" style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px;" dir="ltr" class="">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. </div><div id="yiv8219500573yui_3_16_0_ym19_1_1539435005654_4101" style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px;" dir="ltr" class="">My principal aim is to collect packets from consumer and store them as a database table or something. </div><div id="yiv8219500573yui_3_16_0_ym19_1_1539435005654_4101" style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px;" dir="ltr" class="">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.<br class=""></div><div id="yiv8219500573yui_3_16_0_ym19_1_1539435005654_4101" style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px;" dir="ltr" class=""><br class=""></div><div id="yiv8219500573yui_3_16_0_ym19_1_1539435005654_4101" style="" class=""><div style="" id="yui_3_16_0_ym19_1_1539435642661_3524" class="">#include "hijacker.hpp"</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3525" class=""><br id="yui_3_16_0_ym19_1_1539435642661_3526" class=""></div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3527" class="">#include "ns3/log.h"</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3528" class=""><br id="yui_3_16_0_ym19_1_1539435642661_3529" class=""></div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3530" class="">#include "ns3/ndnSIM/helper/ndn-fib-helper.hpp"</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3531" class=""><br id="yui_3_16_0_ym19_1_1539435642661_3532" class=""></div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3533" class="">NS_LOG_COMPONENT_DEFINE("Hijacker");</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3534" class=""><br id="yui_3_16_0_ym19_1_1539435642661_3535" class=""></div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3536" class="">namespace ns3 {</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3537" class=""><br id="yui_3_16_0_ym19_1_1539435642661_3538" class=""></div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3539" class="">// Necessary if you are planning to use ndn::AppHelper</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3540" class="">NS_OBJECT_ENSURE_REGISTERED(Hijacker);</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3541" class=""><br id="yui_3_16_0_ym19_1_1539435642661_3542" class=""></div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3543" class="">TypeId</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3544" class="">Hijacker::GetTypeId()</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3545" class="">{</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3546" class="">  static TypeId tid = TypeId("Hijacker").SetParent<ndn::App>().AddConstructor<Hijacker>();</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3547" class=""><br id="yui_3_16_0_ym19_1_1539435642661_3548" class=""></div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3549" class="">  return tid;</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3550" class="">}</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3551" class=""><br id="yui_3_16_0_ym19_1_1539435642661_3552" class=""></div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3553" class="">Hijacker::Hijacker()</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3554" class="">{</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3555" class="">}</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3556" class=""><br id="yui_3_16_0_ym19_1_1539435642661_3557" class=""></div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3558" class="">void</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3559" class="">Hijacker::OnInterest(std::shared_ptr<const ndn::Interest> interest)</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3560" class="">{</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3561" class="">  ndn::App::OnInterest(interest); // forward call to perform app-level tracing</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3562" class="">  // do nothing else (hijack interest)</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3563" class=""><br id="yui_3_16_0_ym19_1_1539435642661_3564" class=""></div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3565" class="">  NS_LOG_DEBUG("Do nothing for incoming interest for" << interest->getName());</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3566" class="">}</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3567" class=""><br id="yui_3_16_0_ym19_1_1539435642661_3568" class=""></div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3569" class="">void</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3570" class="">Hijacker::StartApplication()</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3571" class="">{</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3572" class="">  App::StartApplication();</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3573" class=""><br id="yui_3_16_0_ym19_1_1539435642661_3574" class=""></div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3575" class="">  // equivalent to setting interest filter for "/prefix" prefix</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3576" class="">  ndn::FibHelper::AddRoute(GetNode(), "/prefix/sub", m_face, 0);</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3577" class="">}</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3578" class=""><br id="yui_3_16_0_ym19_1_1539435642661_3579" class=""></div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3580" class="">void</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3581" class="">Hijacker::StopApplication()</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3582" class="">{</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3583" class="">  App::StopApplication();</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3584" class="">}</div><div style="" id="yui_3_16_0_ym19_1_1539435642661_3585" class=""><br id="yui_3_16_0_ym19_1_1539435642661_3586" class=""></div><div style="" dir="ltr" id="yui_3_16_0_ym19_1_1539435642661_3587" class="">} // namespace ns3</div></div><div id="yiv8219500573yui_3_16_0_ym19_1_1539435005654_4101" style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px;" class=""><br class=""></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px;" class=""></div><div id="yiv8219500573yui_3_16_0_ym19_1_1539435005654_4102" style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px;" class=""> </div><div class="yiv8219500573signature" id="yiv8219500573yui_3_16_0_ym19_1_1539435005654_4103" style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px;">Kamrul Morshed<div id="yiv8219500573yui_3_16_0_ym19_1_1539435005654_4104" class="">MS Student</div><div id="yiv8219500573yui_3_16_0_ym19_1_1539435005654_4105" class=""><br class=""></div></div></div></div></div></div></div></div></blockquote></div><br class=""></div></body></html>