<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">why this onData function would not work?</div><div class=""><br class=""></div><div class="">If you are not receiving data packets, enable the nfd.Forwarder logging component to see what is going on.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div 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 class=""><br class=""></div></div></div></div><div><blockquote type="cite" class=""><div class="">On Mar 1, 2019, at 11:57 AM, Kamrul Morshed via ndnSIM <<a href="mailto:ndnsim@lists.cs.ucla.edu" class="">ndnsim@lists.cs.ucla.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div class="ydpdf34ec82yahoo-style-wrap" style="font-family: times new roman, new york, times, serif; font-size: 16px;"><div class="">Greetings ndnSIMers,</div><div class=""><br class=""></div><div class="">Using the following function, I can receive the name of the interest from the consumer node</div><div class=""><br class=""></div><div class=""><span class=""><div class="">void</div><div class="">CustomApp::OnInterest(std::shared_ptr<const ndn::Interest> interest)</div><div class="">{</div><div class="">  ndn::App::OnInterest(interest); // forward call to perform app-level tracing</div><div class="">  // do nothing else (receive interest from consumer)</div><div class="">  NS_LOG_DEBUG("Requesting Interest from Consumer" << interest->getName());  </div><div class="">}</div><div class=""><br class=""></div><div class="">Similarly,  I would like to receive the name of Data packets, </div><div class="">however, defining a similar function would not work. </div><div class=""><br class=""></div><div class=""><span class=""><div class="">For example,</div><div class=""><br class=""></div><div class="">void</div><div class="">CustomApp::OnData(std::shared_ptr<const ndn::Data> data)</div><div class="">{</div><div class="">  ndn::App::OnData(data); // forward call to perform app-level tracing </div><div class="">  // do nothing else (receive data from producer)</div><div class="">  NS_LOG_DEBUG("Requesting Data from Producer" << data->getName());  </div><div class="">}</div></span></div></span><br class=""></div><div class="">What would be the correct approach to retrieve the name of the data packet ?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Sincerely,</div><div class="ydpdf34ec82signature">Kamrul Morshed<div class=""><br class=""></div><div class=""><br class=""></div></div></div></div>_______________________________________________<br class="">ndnSIM mailing list<br class=""><a href="mailto:ndnSIM@lists.cs.ucla.edu" class="">ndnSIM@lists.cs.ucla.edu</a><br class="">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim<br class=""></div></blockquote></div><br class=""></div></body></html>