[ndnSIM] [EXT] Safely removing Pit Entries on receiving new interest.

Prajjwal Singh csb17053 at tezu.ac.in
Wed May 5 07:56:19 PDT 2021


Dear Junxiao,
Thank you so much.
Forwarder::setExpiryTimer with 0ms worked like a charm.

Thanking you again,
Prajjwal Singh


On Wed, May 5, 2021 at 7:53 PM Junxiao Shi <shijunxiao at email.arizona.edu>
wrote:

> Hi Prajjwal
>
> You may use Strategy::setExpiryTimer or Forwarder::setExpiryTimer, passing
> zero as timer duration.
> Strategy::rejectPendingInterest is a shorthand of this operation.
> This would cause the PIT entry to be erased when the current packet
> finishes processing.
>
> Yours, Junxiao
>
> On Wed, May 5, 2021 at 10:15 Prajjwal Singh <csb17053 at tezu.ac.in> wrote:
>
>> *External Email*
>> Hello everybody,
>> I am trying to remove a few Pit Entries from the PIT on some basis when a
>> new interest packet arrives.
>>
>> Please guide me which functions can I make use of to remove such entries.
>>
>> Till now I have been doing the following:
>>
>> I have added an extra data structure that keeps (Pit::Entry *) of pit
>> entries.
>> Then I am tweaking forwarder.cpp::onIncomingInterest() function to delete
>> entries.
>> I have tried to use the function m_pit.erase(pit_entry.get());
>> to delete entries.
>> But, at some point the simulation hangs when some other part of the code
>> tries
>> to delete the entry(which i have already deleted by my added code) and
>> gives me the error:
>> void nfd::pit::Pit::erase(nfd::pit::Entry*, bool): Assertion `nte !=
>> nullptr' failed.
>>
>> Thanking you in advance,
>> Prajjwal Singh
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20210505/bd5d65ac/attachment.html>


More information about the ndnSIM mailing list