[ndnSIM] how forwarding strategy can get the local node name?

Alex Afanasyev alexander.afanasyev at ucla.edu
Tue Apr 9 21:15:14 PDT 2013

Hi Xiaoyan,

Do you mean node id or name that has been associated using topology reader (=Names class)?

You can always get a reference to node object from the forwarding strategy object by doing the following (assuming you're in the forwarding strategy method):

Ptr<Node> node = this->GetObject<Node> ();

>From here to get node id:
node->GetId ();

to get associated name:
Names::FindName (node);


On Apr 9, 2013, at 8:53 PM, Xiao yan Hu <xhbreezehu at gmail.com> wrote:

> Hi, 
> Do you guys know how applications can get the local node name?
> Thanks in advance!
> Best regards,
> Xiaoyan
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim

More information about the ndnSIM mailing list