[ndnSIM] Questions related to content store and attack scenarios

shijunxiao at email.arizona.edu shijunxiao at email.arizona.edu
Sun Oct 30 07:23:53 PDT 2016


Hi John

I’m answering about NFD 0.5.0.
1. The NFD developer documentation makes mention of admission policy related to the content store.  Is this the CachePolicy?
No. CachePolicy belongs to NDNLPv2.
In ContentStore, there is only one policy: nfd::cs::Policy. This type serves as both admission policy and eviction policy.
To implement an admission policy, override doAfterInsert method, check the newly inserted data, and evict it right away if the policy decides not the admit the data. Although the data is already inserted to the lookup index when doAfterInsert is invoked, evicting it immediately is equivalent to not admitting it.
The rationale of not having a “before insert” API is to reduce the number of virtual functions a policy must override.
2. In order to customize how data (perhaps, rather what data) makes it in to the CS and what is removed when, do I subclass CachePolicy?
No. You should subclass nfd::cs::Policy.
o Once you create such a subclass, where do you put it so "the system" will recognize it when you use a CS::setPolicy call?
For now, nfd::cs::makeDefaultPolicy function.
In #3148 we’ll allow configuration. Runtime changes of the policy will still be disallowed.

Yours, Junxiao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20161030/4bcedfb6/attachment.html>


More information about the ndnSIM mailing list