[ndnSIM] how to use nfd::scheduler::schedule() to delay PIT deletion
书忆江南
375446972 at qq.com
Wed Jun 6 01:04:39 PDT 2018
Hi all,
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.
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:
void
Forwarder::onIncomingData(Face& inFace, const Data& data)
{
......
// mark PIT satisfied
pitEntry->clearInRecords();
//pitEntry->deleteOutRecord(inFace); //this is the origin method to delete PIT entry(or outRecord)
nfd::scheduler::schedule(time::seconds(1),[&]{pitEntry->deleteOutRecord(inFace);}); //my method to delay PIT entry deletion
......
}
The compilation using ./waf is successful, but when the simulation runs ,it came out the following error:
Command ['/home/yyc/ndnSIM/ns-3/build/src/ndnSIM/examples/ns3-dev-25nodes-debug'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20180606/1226054f/attachment.html>
More information about the ndnSIM
mailing list