<div dir="ltr"><div><div>I ended up using the following code. This is a hack and there is probably a better way of doing this.</div><div></div><div>It works for resending the Interests but incoming data is silently dropped at the node.</div><div><br></div><div>I printed the InRecords before sending the Interests - some of them are empty. <br></div><div>I am not sure why this would be but I think this is why incoming data is getting dropped.<br></div><div></div><div></div><div><br></div>Do you know if I need to set them explicitly before resending the Interests (insertOrUpdateInRecord)?<br>Thanks.<br><br></div>==<br><div><div><br>    for (auto pitEntry = pit.begin(); pitEntry != pit.end(); pitEntry++ ){<br>        if (boost::algorithm::contains(pitEntry->getName().toUri(), "/ndnSIM")) {<br>          std::cout<< "Resending Interest " <<  pitEntry->getInterest().getName() <<std::endl;<br>          auto convPitEntry = pit.find(pitEntry->getInterest());<br>          this->sendInterest(convPitEntry, *addFace, convPitEntry->getInterest());<br>        }</div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 5, 2017 at 1:15 PM, Spyridon (Spyros) Mastorakis <span dir="ltr"><<a href="mailto:mastorakis@cs.ucla.edu" target="_blank">mastorakis@cs.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Do you think you could try std::ref then?<div><br></div><div><a href="http://en.cppreference.com/w/cpp/utility/functional/ref" target="_blank">http://en.cppreference.com/w/<wbr>cpp/utility/functional/ref</a></div><div><br></div><div>Thanks,</div><div><span class=""><br><div>
<div><div><div><span style="float:none;display:inline!important">Spyridon (Spyros) Mastorakis</span><br><span style="float:none;display:inline!important">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank">http://cs.ucla.edu/~<wbr>mastorakis/</a><br><span style="float:none;display:inline!important">Internet Research Laboratory</span><br><span style="float:none;display:inline!important">Computer Science Department</span><br><span style="float:none;display:inline!important">UCLA</span></div><div><br></div></div></div></div></span><div><div class="h5"><div><blockquote type="cite"><div>On Oct 4, 2017, at 9:22 PM, Susmit <<a href="mailto:susmit@cs.colostate.edu" target="_blank">susmit@cs.colostate.edu</a>> wrote:</div><br class="m_3659151078458834215Apple-interchange-newline"><div><div dir="ltr"><div><div><div>Hi Spyros,<br><br></div>Yes, I have. Unfortunately, that does not work either.<br><br>this->sendInterest(*(*<wbr>pitEntry), *addFace, pitEntry->getInterest());<br></div><div><br></div><div>"error: no match for ‘operator*’ (operand type is ‘const nfd::pit::Entry’)<br>             this->sendInterest(*(*<wbr>pitEntry), *addFace, pitEntry->getInterest());"<br><br><br></div>Full error log is here: <a href="https://paste.fedoraproject.org/paste/G9FfAct-CMa8bIq~-z4OWg" target="_blank">https://paste.fedoraproject.<wbr>org/paste/G9FfAct-CMa8bIq~-<wbr>z4OWg</a><br><br></div>Thanks.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 4, 2017 at 9:54 PM, Spyridon (Spyros) Mastorakis <span dir="ltr"><<a href="mailto:mastorakis@cs.ucla.edu" target="_blank">mastorakis@cs.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Susmit,<div><br></div><div>have you tried to pass something like *(*pitEntry)?</div><div><br></div><div>Thanks,</div><div><br></div><div><div>
<div><div><div><span style="float:none;display:inline!important">Spyridon (Spyros) Mastorakis</span><br><span style="float:none;display:inline!important">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank">http://cs.ucla.edu/~m<wbr>astorakis/</a><br><span style="float:none;display:inline!important">Internet Research Laboratory</span><br><span style="float:none;display:inline!important">Computer Science Department</span><br><span style="float:none;display:inline!important">UCLA</span></div><div><br></div></div></div></div><div><div class="m_3659151078458834215h5"><div><blockquote type="cite"><div>On Oct 4, 2017, at 8:18 PM, Susmit <<a href="mailto:susmit@cs.colostate.edu" target="_blank">susmit@cs.colostate.edu</a>> wrote:</div><br class="m_3659151078458834215m_4066673517029098553Apple-interchange-newline"><div><div dir="ltr"><div>Hi All,<br><br></div>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.<br><div><div><br></div><div>Below is the code snippets I tried:</div><div><br></div><div>nfd::Pit& pit = node0->getForwarder()->getPit(<wbr>);<br>std::cout << pit.size() << std::endl; //works<br></div><div><br></div><div>for (auto pitEntry = pit.begin(); pitEntry != pit.end(); pitEntry++ ){<br>      if (boost::algorithm::contains(pi<wbr>tEntry->getName().toUri(), "/ndnSIM")) {<br>          this->sendInterest(*pitEntry, *addFace, pitEntry->getInterest());  <br></div><div>      }</div><div></div><div></div><div>This returns "no known conversion for argument 1 from ‘const nfd::pit::Entry’ to ‘const std::shared_ptr<nfd::pit::Entr<wbr>y>&".</div><div><br></div><div><br></div><div>If I change the last line to :<br></div><div>            this->sendInterest(make_shared<wbr><pit::Entry>(*pitEntry), *addFace, pitEntry->getInterest());</div><div></div><div>I get an error: : "nfd::pit::Entry::Entry(const nfd::pit::Entry&)’ is implicitly deleted because the default definition would be ill-formed".</div><div><br></div><div>I did not find a method in the pit.hpp or pit-entry.hpp that returns a shared_ptr for a pit entry.</div><div>So, how do I send out an Interest from the strategy? Any help is appreciated. <br></div><div><br></div><div>Thanks.<br></div><div><br></div><div><br clear="all"><br>-- <br><div class="m_3659151078458834215m_4066673517029098553gmail_signature"><br>==============================<wbr>======<br><a href="http://www.cs.colostate.edu/%7Esusmit" target="_blank">http://www.cs.colostate.edu/~s<wbr>usmit</a><br>==============================<wbr>======</div></div></div></div><br></div></blockquote></div><br></div></div></div></div><br>______________________________<wbr>_________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/m<wbr>ailman/listinfo/ndnsim</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="m_3659151078458834215gmail_signature" data-smartmail="gmail_signature"><br>==============================<wbr>======<br><a href="http://www.cs.colostate.edu/~susmit" target="_blank">http://www.cs.colostate.edu/~<wbr>susmit</a><br>==============================<wbr>======</div>
</div>
</div></blockquote></div><br></div></div></div></div><br>______________________________<wbr>_________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/<wbr>mailman/listinfo/ndnsim</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><br>====================================<br><a href="http://www.cs.colostate.edu/~susmit" target="_blank">http://www.cs.colostate.edu/~susmit</a><br>====================================</div>
</div>