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

Xiao yan Hu xhbreezehu at gmail.com
Tue Apr 9 21:56:35 PDT 2013


Hi Alex,

That is exactly what I want.
Really appreciate that.

Thanks,
Xiaoyan


On Wed, Apr 10, 2013 at 12:15 PM, Alex Afanasyev <
alexander.afanasyev at ucla.edu> wrote:

> 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);
>
> ---
> Alex
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20130410/c4676d81/attachment.html>


More information about the ndnSIM mailing list