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

Susmit susmit at cs.colostate.edu
Wed Oct 4 21:22:16 PDT 2017


Hi Spyros,

Yes, I have. Unfortunately, that does not work either.

this->sendInterest(*(*pitEntry), *addFace, pitEntry->getInterest());

"error: no match for ‘operator*’ (operand type is ‘const nfd::pit::Entry’)
             this->sendInterest(*(*pitEntry), *addFace,
pitEntry->getInterest());"


Full error log is here:
https://paste.fedoraproject.org/paste/G9FfAct-CMa8bIq~-z4OWg

Thanks.

On Wed, Oct 4, 2017 at 9:54 PM, Spyridon (Spyros) Mastorakis <
mastorakis at cs.ucla.edu> wrote:

> Hi Susmit,
>
> have you tried to pass something like *(*pitEntry)?
>
> Thanks,
>
> Spyridon (Spyros) Mastorakis
> Personal Website: http://cs.ucla.edu/~mastorakis/
> Internet Research Laboratory
> Computer Science Department
> UCLA
>
> On Oct 4, 2017, at 8:18 PM, Susmit <susmit at cs.colostate.edu> wrote:
>
> Hi All,
>
> I am trying to resend an Interest from a strategy. I am having trouble
> using the pit entry, not sure if I am missing something trivial.
>
> Below is the code snippets I tried:
>
> nfd::Pit& pit = node0->getForwarder()->getPit();
> std::cout << pit.size() << std::endl; //works
>
> for (auto pitEntry = pit.begin(); pitEntry != pit.end(); pitEntry++ ){
>       if (boost::algorithm::contains(pitEntry->getName().toUri(),
> "/ndnSIM")) {
>           this->sendInterest(*pitEntry, *addFace,
> pitEntry->getInterest());
>       }
> This returns "no known conversion for argument 1 from ‘const
> nfd::pit::Entry’ to ‘const std::shared_ptr<nfd::pit::Entry>&".
>
>
> If I change the last line to :
>             this->sendInterest(make_shared<pit::Entry>(*pitEntry),
> *addFace, pitEntry->getInterest());
> I get an error: : "nfd::pit::Entry::Entry(const nfd::pit::Entry&)’ is
> implicitly deleted because the default definition would be ill-formed".
>
> I did not find a method in the pit.hpp or pit-entry.hpp that returns a
> shared_ptr for a pit entry.
> So, how do I send out an Interest from the strategy? Any help is
> appreciated.
>
> Thanks.
>
>
>
> --
>
> ====================================
> http://www.cs.colostate.edu/~susmit
> ====================================
>
>
>
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>
>


-- 

====================================
http://www.cs.colostate.edu/~susmit
====================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20171004/31a1b44e/attachment-0001.html>


More information about the ndnSIM mailing list