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

Junxiao Shi shijunxiao at email.arizona.edu
Wed May 5 07:23:01 PDT 2021


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/51270849/attachment-0001.html>


More information about the ndnSIM mailing list