<html><head></head><body><div class="ydpdf34ec82yahoo-style-wrap" style="font-family: times new roman, new york, times, serif; font-size: 16px;"><div>Greetings ndnSIMers,</div><div><br></div><div>Using the following function, I can receive the name of the interest from the consumer node</div><div><br></div><div><span><div>void</div><div>CustomApp::OnInterest(std::shared_ptr<const ndn::Interest> interest)</div><div>{</div><div>  ndn::App::OnInterest(interest); // forward call to perform app-level tracing</div><div>  // do nothing else (receive interest from consumer)</div><div>  NS_LOG_DEBUG("Requesting Interest from Consumer" << interest->getName());  </div><div>}</div><div><br></div><div>Similarly,  I would like to receive the name of Data packets, </div><div>however, defining a similar function would not work. </div><div><br></div><div><span><div>For example,</div><div><br></div><div>void</div><div>CustomApp::OnData(std::shared_ptr<const ndn::Data> data)</div><div>{</div><div>  ndn::App::OnData(data); // forward call to perform app-level tracing </div><div>  // do nothing else (receive data from producer)</div><div>  NS_LOG_DEBUG("Requesting Data from Producer" << data->getName());  </div><div>}</div></span></div></span><br></div><div>What would be the correct approach to retrieve the name of the data packet ?</div><div><br></div><div><br></div><div>Sincerely,</div><div class="ydpdf34ec82signature">Kamrul Morshed<div><br></div><div><br></div></div></div></body></html>