[ndnSIM] [help] query about ndnSim
Spyridon (Spyros) Mastorakis
spiros.mastorakis at gmail.com
Thu Aug 27 20:31:07 PDT 2015
Hi,
> 1. why don't intermediate nodes (one's that isn't directly connected to the consumer node) don't call
> "" lookup(typename parent_trie::iterator item)"" function written in the X-policy.hpp(fifo,Lru,lfu etc). ???
By taking a quick look at our API, I think that this method is called by every simulated node in order to implement the configured cache replacement policy. Am I missing anything?
> 2. There is a virtual function definition like ""virtual shared_ptr<Data>Lookup(shared_ptr<const Interest> interest) = 0;"" why it is needed ???
This is a virtual method of a base class. This method is designed to perform a lookup for cached data on a simulated node. The ContentStoreImpl class inherits this base class and the corresponding method of this class overrides this method.
>
> 3.From which point of simulator the "lookup()" is called ??? means i didn't find the function calling.
It is called from the forwarder class of NFD:
https://github.com/named-data-ndnSIM/ndnSIM/blob/f8bf3f4c4c6f0ee38a285a7933d676ceba90ccdb/NFD/daemon/fw/forwarder.cpp#L106
> 4. If i want to check weather an arrived data is already cached in it's neighboring nodes or not before insertion how can i do that ???
You need to have access to the context of the neighboring node and call the lookup method for this node.
--
Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/
Internet Research Laboratory
PhD Computer Science
UCLA
More information about the ndnSIM
mailing list