[ndnSIM] Cache according to hopcount
alexander.afanasyev at ucla.edu
Sun Jul 21 10:39:24 PDT 2013
ndnSIM tracks the hop count in complimentary packet tag structure FwHopCountTag. To create a policy, you will need to create a new "policy" header file (e.g., similar to lru-policy) and in insert method put something like this:
insert (typename parent_trie::iterator item)
Ptr<const Packet> pkt = item->payload ()->GetPacket ();
if (tag.Get () == 3)
On Jul 21, 2013, at 2:19 AM, 陈胜蓝 <blindeafer at 163.com> wrote:
> Hi All,
> I would like to implement a hopcount-based cache policy,it is that each node will cache a content with a particular hopcount number,such as 3.Before a content is going to be sent,the hopcount of a content will be set to be 0 if it is cached,
> If I would modify the OnData() function?How can I implement the policy?
> Thank you
> Beat regards.
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ndnSIM