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

qhsong ndn at sqh.me
Thu Apr 7 19:46:27 PDT 2016


Hi,
Oops, I didn't mention that. it helps me a lot.

I can use it to got interest and data class hop count , thanks a lot.

qhsong



2016-04-08 3:04 GMT+08:00 Spyridon (Spyros) Mastorakis <
mastorakis at cs.ucla.edu>:

> 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
>
> Would that work for you?
>
> Spyridon (Spyros) Mastorakis
> Personal Website: 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/20160408/69b71a8b/attachment.html>


More information about the ndnSIM mailing list