[ndnSIM] How can I get PIT list in Forwarder?

ohnishi.ryota at jp.panasonic.com ohnishi.ryota at jp.panasonic.com
Sun Jun 28 21:34:47 PDT 2015

Hello Spyridon,

Thank you for your suggestion to move PIT log code to the other line.
I moved my lines to just below these lines and it worked fine!


So that I can now get PIT list in Forwarder.

Thank you again for your advice.

Ryota Ohnishi

-----Original Message-----
From: Spyridon (Spyros) Mastorakis [mailto:spiros.mastorakis at gmail.com] 
Sent: Friday, June 26, 2015 11:09 PM
To: Ohnishi, Ryota (大西 遼太)
Cc: ndnsim at lists.cs.ucla.edu
Subject: Re: [ndnSIM] How can I get PIT list in Forwarder?


if you add these two lines of code at the beginning of the onIncomingData method, you will get a segmentation fault.

I added these two lines at the end of the method and it worked fine. I am not sure why this happens, I will need to take a closer look at it.

As a quick work-around, I would suggest the following:

In order to get the PIT entries that are going to be satisfied by the particular data packet, you can use the following code line (forwarder.cpp:279):

pit::DataMatchResult pitMatches = m_pit.findAllDataMatches(data);


Afterwards, you can use the two lines of code that you mentioned at the end of the method to get the remaining PIT entries.

Please let me know shall you need anything else.


Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ Internet Research Laboratory PhD Computer Science UCLA

> On Jun 26, 2015, at 1:36 PM, ohnishi.ryota at jp.panasonic.com wrote:
> const nfd::Pit::const_iterator pit_iterator = m_pit.begin();  const 
> pit::InRecordCollection& inRecords = (*pit_iterator).getInRecords();

More information about the ndnSIM mailing list