[ndnSIM] How to add a hop-count number in interest?

Spyridon (Spyros) Mastorakis mastorakis at CS.UCLA.EDU
Thu Apr 7 12:04:01 PDT 2016


Hi,

since the Interest hop count is the same with the hop count of the corresponding Data packet, you could use the hop count attached to a received Data packet:

https://github.com/named-data-ndnSIM/ndnSIM/blob/a4915caa0c4121f2dd87fd3d7cc3b6eb91632f16/apps/ndn-consumer.cpp#L226-L234 <https://github.com/named-data-ndnSIM/ndnSIM/blob/a4915caa0c4121f2dd87fd3d7cc3b6eb91632f16/apps/ndn-consumer.cpp#L226-L234>

Would that work for you?

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA




> On Apr 7, 2016, at 1:45 AM, ndn ndn <ndn at sqh.me> wrote:
> 
> Hi,
> Recently, I want to add a hop-count number in interest class and when interest pass a node, this number will increase one.
>  so I define a mutable int in interest class, init it in construct function, and increase it in Forward::onIncomingInterest(). But I try it failed, I found every time when Forward got a interest in onIncomingInterest, the number always zero.
> 
> I didn't found any function to make this interest got zero, and How to increase it one by one ?
> 
> Thanks for your help?
> 
> qhsong
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160407/da9062b4/attachment.html>


More information about the ndnSIM mailing list