[ndnSIM] question about ndnSIM code

Alex Afanasyev alexander.afanasyev at ucla.edu
Tue Dec 11 12:54:04 PST 2012

Hi Ren,

Each Interest for a unique name requests a unique Data packet.  So answer to your question is no, each interest is for its own unique data packet. 

For many simulations it is enough to assume for ndn::Producer that it has unlimited number of Data packets available, all of them from "/prefix" namespace.  Every time a consumer expresses an Interests starting with "/prefix" (e.g., /prefix/19283) and this interests reaches the Producer, the producer will answer with a unique Data packet, matching the name, specified in the Interest (e.g., the same /prefix/19283).  You can check out how it is done in apps/ndn-producer.cc in Producer::OnInterest method (lines 105-140). 

If you have some other assumption/simulations in mind, you can implement your own Data producer, which replies to only to specific Interests.


On Dec 11, 2012, at 3:41 AM, 12111027 <12111027 at bjtu.edu.cn> wrote:

> Mr Alexander,
> Thanks to your contribution to the ndnSIM. I have read the code recently and there is one question:
> The consumer sent the "interest" packet with "/prefix/" to the producer. There is one "data" retrieved for each "interest", but the sequence numbers of "interest" are "/prefix/0" "/prefix/1" "/prefix/2"......"/prefix/n". There is no end until the consumer stops the request. I want to know whether the "/prefix/1" "/prefix/2" ......"/prefix/n" interests are all for one "data" packet with "/prefix/"? And I could not find the space where the code is defined. Could you give me some references? 
> I will look forward to your response. Thank you!
> Best regards,
> Ren Fei

More information about the ndnSIM mailing list