<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<div id="divtagdefaultwrapper" 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="OWAAutoLink" id="LPlnk208479" previewremoved="true">https://github.com/named-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%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Mahsa Aghajani <mahsa.aghajani@gmail.com><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">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_-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.<wbr>getPrefixUpdateProcessor().<wbr>updateProcessor.enable();</div>
<div><br>
</div>
<div>  ndn::nfd::ControlParameters parameters;</div>
<div>  parameters.setName("/prefix/<wbr>to/advertise/");</div>
<div><br>
</div>
<div>  ndn::Name withdrawCommand("/localhost/<wbr>nlsr/prefix-update/withdraw");</div>
<div>  withdrawCommand.append(<wbr>parameters.wireEncode());</div>
<div><br>
</div>
<div>  shared_ptr<Interest> withdrawInterest = make_shared<Interest>(<wbr>withdrawCommand);</div>
<div>  keyChain.signByIdentity(*<wbr>withdrawInterest, opIdentity);</div>
<div><br>
</div>
<div>  face->receive(*<wbr>withdrawInterest);</div>
<div>  face->processEvents(ndn::time:<wbr>:milliseconds(1));</div>
<div>}</div>
<div><br>
</div>
<div>Thanks and regards.</div>
<br>
<div class="m_-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/<wbr>mailman/listinfo/ndnsim</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>