[ndnSIM] How to manually set name of Interest and Data

Alex Afanasyev aa at CS.UCLA.EDU
Sun Dec 18 14:22:31 PST 2016

Hi Kengo,

There are a few ways of achieving this.  The simplest one is to modify the existing Produce application to remove the assumption that all requested data exist and only reply the Interests of your choice.

A little bit more complex, but future proof, is to write a second producer applications the implements your behavior.  We will be really happy to merge this code into the ndnSIM.


> On Nov 24, 2016, at 6:14 AM, 白岩善昭 <46rock715 at gmail.com> wrote:
> Dear NDN Research Team,
> Hello. 
> I want to send an Interest for a Data packet that does not exist. For example, if a Producer has two Data packets /prefix/0 and /prefix/1, I want to send an Interest for /prefix/2. In order to achieve this, I would need to be able to set the full name of the Interest and Data packets. 
> When I was working with the the examples on ndnSIM 2.0, I could only find a way to set the prefix.  In ndn-simple.cpp using the Helper "consumerHelper.SetPrefix("/prefix")," it would automatically add 0, 1, ... to the end of /prefix/. Then using the "producerHelper.SetPrefix("/prefix")" the Producer would return the matching Data packet, assuming it exist. 
> I do not want it to be assumed that it exists. Therefore, I would like to know if there is a way to manually set all the names.
> Any help would be greatly appreciated.
> Thank you.
> Best Regards,
> Kengo Kaneda

More information about the ndnSIM mailing list