[ndnSIM] how to use nfd::scheduler::schedule() to delay PIT deletion
Spyridon (Spyros) Mastorakis
mastorakis at cs.ucla.edu
Thu Jun 7 08:12:21 PDT 2018
Hi,
a suggestion would be to use the NS-3 scheduler directly:
https://www.nsnam.org/doxygen/classns3_1_1_simulator.html#a81c1ade622b5266d81908b2a99a330d2 <https://www.nsnam.org/doxygen/classns3_1_1_simulator.html#a81c1ade622b5266d81908b2a99a330d2>
The NFD scheduler has been redirected to the NS-3 scheduler in any case.
Thanks,
Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA
> On Jun 6, 2018, at 1:04 AM, 书忆江南 <375446972 at qq.com> wrote:
>
> 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/20180607/4a6ac1ae/attachment.html>
More information about the ndnSIM
mailing list