<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">you can use the FibHelper to add/remove/update routes to/from NFD:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/master/helper/ndn-fib-helper.cpp" class="">https://github.com/named-data-ndnSIM/ndnSIM/blob/master/helper/ndn-fib-helper.cpp</a></div><div class=""><br class=""></div><div class="">Hope that this helps,</div><div class=""><br class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div></div></div><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Mar 5, 2017, at 5:53 AM, Mahsa Aghajani <<a href="mailto:mahsa.aghajani@gmail.com" class="">mahsa.aghajani@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Dear ndnSIM users<div class=""><br class=""></div><div class="">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 class="">If so, how can I use these functions in ndnSIM-NLSR? I have written this code in </div><div class="">ndn-nlsr-exec.cpp file, but I got some errors relating to sending interest from face :</div><div class=""> </div><div class=""><div class="">void</div><div class="">Nlsr::withdraw()</div><div class="">{</div><div class="">  m_nlsr.getPrefixUpdateProcessor().updateProcessor.enable();</div><div class=""><br class=""></div><div class="">  ndn::nfd::ControlParameters parameters;</div><div class="">  parameters.setName("/prefix/to/advertise/");</div><div class=""><br class=""></div><div class="">  ndn::Name withdrawCommand("/localhost/nlsr/prefix-update/withdraw");</div><div class="">  withdrawCommand.append(parameters.wireEncode());</div><div class=""><br class=""></div><div class="">  shared_ptr<Interest> withdrawInterest = make_shared<Interest>(withdrawCommand);</div><div class="">  keyChain.signByIdentity(*withdrawInterest, opIdentity);</div><div class=""><br class=""></div><div class="">  face->receive(*withdrawInterest);</div><div class="">  face->processEvents(ndn::time::milliseconds(1));</div><div class="">}</div><div class=""><br class=""></div><div class="">Thanks and regards.</div><br class=""><div class="gmail_signature"><div dir="ltr" class=""><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;" class=""><font size="2" class="">Mahsa Aghajani
M.Sc. Student
Department of Computer Engineering
Sharif University of Technology</font></pre></div></div>
</div></div><br class=""></div></blockquote></div><br class=""></div></body></html>