[ndnSIM] Resending Interest from forwarding strategy using a PIT entry
Spyridon (Spyros) Mastorakis
mastorakis at cs.ucla.edu
Thu Oct 5 12:15:03 PDT 2017
Do you think you could try std::ref then?
http://en.cppreference.com/w/cpp/utility/functional/ref <http://en.cppreference.com/w/cpp/utility/functional/ref>
Thanks,
Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA
> On Oct 4, 2017, at 9:22 PM, Susmit <susmit at cs.colostate.edu> wrote:
>
> 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 <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 <mailto: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/ <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 <mailto: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 <http://www.cs.colostate.edu/%7Esusmit>
>> ====================================
>>
>
>
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu <mailto:ndnSIM at lists.cs.ucla.edu>
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim <http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>
>
>
>
>
> --
>
> ====================================
> http://www.cs.colostate.edu/~susmit <http://www.cs.colostate.edu/~susmit>
> ====================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20171005/ebf52f63/attachment.html>
More information about the ndnSIM
mailing list