[ndnSIM] Can I create multiple PIT entries for one Interest?

Hiroya Okuma okuma at stu.kobe-u.ac.jp
Sat Dec 14 00:36:24 PST 2019

Dear Lixia Zhang

As you said, the router does not know the relationship between "/prefix/A" and "/prefix/A+B".  Therefore, I want to add a process to make the router divide Interest Name and create PIT entries for the number of requested files.  (For ease of division, it is assumed that each file names are the same size.)

It is only necessary to temporarily create an Interest for creating PIT entries for multiple request file names.  

Currently, the onIncomingInterest method of the Forwarder class of ndnSIM is being modified.
I think there are two ways.

1.Multiple request file names obtained by dividing are stored in an array, and processing for setting each file name in Interest and creating a PIT entry is repeated.
→ According to your advice, routers cannot set interest names

2.Prepare an instance of Interest class to create PIT entry in onIncomingInterest method (?)
Forwarder::onIncomingInterest(Face& inFace, const Interest& interest)
...// Divide file name and store in array "nameVec"
 for (unsigned int i=0; i<nameVec.size(); i++){
   Interest interestForPIT = interest;
   shared_ptr<pit::Entry> pitEntry = m_pit.insert(interestForPIT).first;
→ error 
terminate called after throwing an instance of 'std::bad_weak_ptr'
 what(): bad_weak_ptr

I don't have much experience with ndnSIM, so it may be a rudimentary question.

Please let me know if there are any good methods other than the above two methods.

Best Wishes,

Hiroya Okuma

2019/12/14 12:46、Lixia Zhang <lixia at cs.ucla.edu>のメール:

> In the above you developed an interesting scenario.
> Here is my view: we need to clarify the assumption here.
> Although NDN uses app names to fetch data, one needs to keep in mind that routers/forwarders do not understand the name semantics, they forward interests and data packets by matching the binary strings of the names.
> for example the prefixes /prefix/A, /prefix/B, and /prefix/A+B are independent ones; a router would not know their relations.
> So a router wont be able to perform any function based on its semantic understanding of the name "/prefix/A/%FE%00/prefix/A+B/%FE%00"
> I believe you need to write your own application to do that

More information about the ndnSIM mailing list