[ndnSIM] Resending Interest from forwarding strategy using a PIT entry

Susmit susmit at cs.colostate.edu
Wed Oct 11 11:47:18 PDT 2017


To close this out, the following code works for resending pending
Interests from strategy:

    ns3::Ptr<ns3::ndn::L3Protocol> node0 =
ns3::ndn::L3Protocol::getL3Protocol(ns3::NodeList::GetNode(0));
    nfd::Pit& pit = node0->getForwarder()->getPit();

    for (nfd::pit::Iterator pitEntry = pit.begin(); pitEntry !=
pit.end(); pitEntry++ ){ //auto will also work
        if (boost::algorithm::contains(pitEntry->getName().toUri(),
"/ndnSIM") && hasPendingOutRecords(*pitEntry)) {
          std::cout<< "Resending Interest " <<
pitEntry->getInterest().getName() <<std::endl;
          auto convPitEntry = pit.find(pitEntry->getInterest());
          auto interest = convPitEntry->getInterest();
          this->sendInterest(convPitEntry, *newFace, interest);
        }
    }

On Thu, Oct 5, 2017 at 6:59 PM, Spyridon (Spyros) Mastorakis
<mastorakis at cs.ucla.edu> wrote:
> The sendInterest method calls the onOutgoingInterest method of the forwarder
> class, where insertOrUpdateInRecord is called, so I do not think you should
> set something explicitly.
>
> Have you tried to request a new Nonce for the Interest that you re-send?
>
> Thanks,
>
> Spyridon (Spyros) Mastorakis
> Personal Website: http://cs.ucla.edu/~mastorakis/
> Internet Research Laboratory
> Computer Science Department
> UCLA
>
> On Oct 5, 2017, at 4:22 PM, Susmit <susmit at cs.colostate.edu> wrote:
>
> sendInterest
>
>
>
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>



-- 

====================================
http://www.cs.colostate.edu/~susmit
====================================


More information about the ndnSIM mailing list