[ndnSIM] How to record the number of times the data was requested

Spyridon (Spyros) Mastorakis mastorakis at cs.ucla.edu
Sun Apr 30 18:13:48 PDT 2017


you could add a new TLV field to the Data packet and increment it every time that this data packet is requested.

Then, you will have to modify the incoming data packet processing in the Forwarder class, so that the data packet is cached based on the value of this field. Your changes should be somewhere around here:

https://github.com/named-data-ndnSIM/NFD/blob/NFD-0.5.0-30-g934f505-ndnSIM/daemon/fw/forwarder.cpp#L343-L351 <https://github.com/named-data-ndnSIM/NFD/blob/NFD-0.5.0-30-g934f505-ndnSIM/daemon/fw/forwarder.cpp#L343-L351>

Hope that this helps,

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

> On Apr 28, 2017, at 8:28 AM, Ru Jia <rujia721 at gmail.com> wrote:
> Hello,
> If I want to record the number of times the data was requested and  determine whether the data is to be cached on the node based on this value. What's the best way to do this?
> Thanks advanced for your response.
> Ru Jia  

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

More information about the ndnSIM mailing list