<p dir="ltr">Ashlesh,</p>
<p dir="ltr">How about using expressInterest? Does nlsr respond to interest of local scope like nfd? If so, there is no need to have a receive, right?</p>
<p dir="ltr">Thanks,<br>
Sabet</p>
<div class="gmail_quote">On Mar 6, 2017 10:48 PM, "Ashlesh Gawande (agawande)" <<a href="mailto:agawande@memphis.edu">agawande@memphis.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div id="m_3560829579670701776divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<div id="m_3560829579670701776divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<p>face->receive is for the unit tests (written for testing purpose). Remove it.</p>
<p>After that call whatever the equivalent of face->processEvents is in ndnSIM (<span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">I
 am not familiar with ndnSIM</span>).</p>
<p><br>
</p>
<p>Also look at nlsrc tools - which is a real application to send advertise/withdraw command and would be closer to what you want than the test (however, one thing missing in nlsrc is that it will sign the interest with default identity - so you have to make
 sure that default identity is set to operator to do the advertise/withdraw request This should not matter if security is turned off in nlsr.conf file - iirc ndnSIM-NLSR has it turned off).</p>
<p>(<a href="https://github.com/named-data/NLSR/tree/master/tools" class="m_3560829579670701776OWAAutoLink" id="m_3560829579670701776LPlnk208479" target="_blank">https://github.com/named-<wbr>data/NLSR/tree/master/tools</a>)</p>
<p>But yes, to advertise/withdraw prefix this is the functionality you would use.</p>
<p><br>
</p>
<p>Ashlesh</p>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_3560829579670701776divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Mahsa Aghajani <<a href="mailto:mahsa.aghajani@gmail.com" target="_blank">mahsa.aghajani@gmail.com</a>><br>
<b>Sent:</b> Monday, March 6, 2017 12:47:00 PM<br>
<b>To:</b> Alex Afanasyev<br>
<b>Cc:</b> Ashlesh Gawande (agawande); ndnsim; Anil Jangam<br>
<b>Subject:</b> Re: [ndnSIM] Question about updating name prefix list of the routers</font>
<div> </div>
</div>
<div>
<div dir="auto">The error I got is that face class does not have a member receive().
<div dir="auto">I do not know exactly how to send the cammand advertise/withdraw.</div>
<div dir="auto">Thank you a lot dear Alex for your attention. </div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mar 6, 2017 22:11, "Alex Afanasyev" <<a href="mailto:aa@cs.ucla.edu" target="_blank">aa@cs.ucla.edu</a>> wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Dear Mahsa,
<div><br>
</div>
<div>Can you give a bit more details on what errors you're getting?  What exactly is not working when you trying to send the command?</div>
<div><br>
</div>
<div>--</div>
<div>Alex</div>
<div><br>
<div>
<blockquote type="cite">
<div>On Mar 5, 2017, at 5:53 AM, Mahsa Aghajani <<a href="mailto:mahsa.aghajani@gmail.com" target="_blank">mahsa.aghajani@gmail.com</a>> wrote:</div>
<br class="m_3560829579670701776m_-6200904518323209016Apple-interchange-newline">
<div>
<div dir="ltr">Dear ndnSIM users
<div><br>
</div>
<div>I want to update name prefix lists of routers during a simulation including adding/removing some name  prefixes to/from a router. Should I use advertise or withdraw functions of NLSR for doing this?</div>
<div>If so, how can I use these functions in ndnSIM-NLSR? I have written this code in </div>
<div>ndn-nlsr-exec.cpp file, but I got some errors relating to sending interest from face :</div>
<div> </div>
<div>
<div>void</div>
<div>Nlsr::withdraw()</div>
<div>{</div>
<div>  m_nlsr.getPrefixUpdateProcesso<wbr>r().updateProcessor.enable();</div>
<div><br>
</div>
<div>  ndn::nfd::ControlParameters parameters;</div>
<div>  parameters.setName("/prefix/to<wbr>/advertise/");</div>
<div><br>
</div>
<div>  ndn::Name withdrawCommand("/localhost/nl<wbr>sr/prefix-update/withdraw");</div>
<div>  withdrawCommand.append(paramet<wbr>ers.wireEncode());</div>
<div><br>
</div>
<div>  shared_ptr<Interest> withdrawInterest = make_shared<Interest>(withdraw<wbr>Command);</div>
<div>  keyChain.signByIdentity(*withd<wbr>rawInterest, opIdentity);</div>
<div><br>
</div>
<div>  face->receive(*withdrawInteres<wbr>t);</div>
<div>  face->processEvents(ndn::time:<wbr>:milliseconds(1));</div>
<div>}</div>
<div><br>
</div>
<div>Thanks and regards.</div>
<br>
<div class="m_3560829579670701776m_-6200904518323209016gmail_signature">
<div dir="ltr">
<pre style="font-family:'lucida grande',verdana,arial,helvetica,sans-serif;margin-top:0px;margin-bottom:0px;padding:0px;word-wrap:break-word;white-space:pre-wrap"><font size="2">Mahsa Aghajani
M.Sc. Student
Department of Computer Engineering
Sharif University of Technology</font></pre>
</div>
</div>
</div>
</div>
______________________________<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" target="_blank">http://www.lists.cs.ucla.edu/m<wbr>ailman/listinfo/ndnsim</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
</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>