<div dir="ltr"><div><div><div><div>Hi, <br><br></div>I am looking for the ID of a node in the network. I want to know which node has sent interest or data etc.<br><br></div>I have found following way to get it in <i>ndn-app-link-service.cpp </i>class, and it works fine because this class has <i>m_node</i> private member.<br><br>uint32_t nodeId = m_node->GetId(); //works fine in <i>ndn-app-link-service.cpp</i><br><br></div>But, the problem is, I also need to get Node ID in <i>forwarder.cpp </i>as well as on several other places in whole ndnSIM. I have tried following method to get it in <i>forwarder.cpp</i> but it does not work.<br><br></div>//does not work in forwarder.cpp<br><div>ns3::Ptr<ns3::Application> app = ns3::Ptr<ns3::Application>();<br>ns3::Ptr<ns3::Node> node = app->GetNode();<br>uint32_t nodeId = node->GetId();<br clear="all"><div><div><div><div><br><br></div><div>Please guide me how can I get it in <i>forwarder.cpp</i> as well as give me a general method to get it wherever it is needed in whole ndnSIM for future purposes.<br><br><br></div><div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><span style="font-family:georgia,serif">Regards,<br></span></div><div><span style="font-family:georgia,serif">Mudasir Qazi<br></span></div></div></div></div></div></div></div></div></div>
</div></div></div></div></div></div>