<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Hi 书忆江南</div><div><br></div><div>NFD allows a forwarding strategy to extend PIT entry lifetime for strategy measurements purpose.</div><div>You may do so in <a href="https://github.com/named-data/NFD/blob/c0822fa4a5a302d1c68f7da51e9f1a36542b861d/daemon/fw/strategy.hpp#L175-L200">afterReceiveData</a> trigger of your custom strategy class. Call <a href="https://github.com/named-data/NFD/blob/c0822fa4a5a302d1c68f7da51e9f1a36542b861d/daemon/fw/strategy.hpp#L306">setExpiryTimer</a> to set the new PIT entry lifetime.</div><div><br></div><div>You shouldn't change forwarder.cpp: doing that is unsupported and will void your warranty.</div><div><br></div><div>Yours, Junxiao</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><blockquote type="cite"><div>On Jun 6, 2018, at 1:04 AM, 书忆江南 <<a href="mailto:375446972@qq.com" target="_blank">375446972@qq.com</a>> wrote:</div><br class="m_-6709884761775272020Apple-interchange-newline"><div><div>Hi all, </div><div>We all know that when a data packet satisfies a interest, the PIT entry will be deleted immediately, but i want to delay the PIT entry deletion, when first data packet satisfies a interest in Incomming Data pipeline, do not delete the PIT entry(or outRecord in NFD) immediately, let the PIT entry stay for a while, so that second and third data packet will find this PIT entry and satisfy the same interest. </div><div>Instead of one interest for one data packet, I want a mechanisim like sending one interest to retrieve multi data packets. I came up with a method but it comes out a error, I modified the file NFD/daemon/fw/forwarder.cpp, in the onIncomingData() method, my code is shown below:</div><div><br></div><div><div>void</div><div>Forwarder::onIncomingData(<wbr>Face& inFace, const Data& data)</div><div>{</div></div><div>   ......</div><div>   // mark PIT satisfied</div><div>    pitEntry->clearInRecords();</div><div>    //pitEntry->deleteOutRecord(<wbr>inFace);  //this is the origin method to delete PIT entry(or outRecord)</div><div>    nfd::scheduler::schedule(time:<wbr>:seconds(1),[&]{pitEntry-><wbr>deleteOutRecord(inFace);});  //my method to delay PIT entry deletion</div><div>   ......</div><div>}</div><div><br></div><div>The compilation using ./waf is successful, but when the simulation runs ,it came out the following error:</div><div><br></div><div><div>Command ['/home/yyc/ndnSIM/ns-3/build/<wbr>src/ndnSIM/examples/ns3-dev-<wbr>25nodes-debug'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").</div></div><div><br></div><div>I don't know if my method is wrong, or the parameter i wrote in the parenthesis of schedule() is wrong. Can anyone helps? I will be grateful for your help. </div></div></blockquote></div></div></div></blockquote></div><br></div></div>