[ndnSIM] Access outgoing data pipeline from strategy

Junxiao Shi shijunxiao at email.arizona.edu
Wed Jul 12 13:49:20 PDT 2017


Hi Rakesh

Strategy is not the right place to implement this feature.
As indicated in NFD devguide “Should I Develop a New Strategy” section:
The only purpose of the strategy is to decides how to forward Interests and cannot override any processing steps in the forwarding pipelines. If it is desired to support a new packet type (other than Interest and Data), a new field in Interest or Data packets, or override some actions in the pipelines (e.g., disable ContentStore lookup), it can be only accomplished by modification of the forwarding pipelines. 
Strategy has no access to the Content Store, and strategy cannot inject or intercept any Data packet.

You should implement this feature by modifying forwarding pipelines instead.

Yours, Junxiao

PS: I’m on this list. No need to summon me by CCing. I initially ignored this question because it’s already explained in NFD devguide.


> On Jul 9, 2017, at 10:30 AM, Rakesh Ranjan Jha <rakeshranjan.jha at gmail.com> wrote:
> 
> I'm trying to spontaneously inject a cached data (based on a previously unfulfilled interest present in PIT and so I have an interest handle to fetch data) from content store.
> 
> 1) Derived strategy doesn't seem to have any handle to fowarder although base strategy has a handle and is friend to forwarder to access pipelines. 
> In order to workaround this I added my strategy also as a friend and gave it a reference to forwarder, similar to base strategy. Is there a better way to access pipeline from strategy?
> 
> 2) To access data from CS and feed it to outgoing data pipeline, I follow similar mechanism as done on receiving valid interest from forwarder:
> 


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


More information about the ndnSIM mailing list