<div dir="auto">Actually I want to add/remove name prefixes in a router, so nlsr routing messages became generated and disseminated toward other routers.<div dir="auto">I appreciate your suggestion dear Spyridon but I think FibHelper will not do this in the way I need.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mar 5, 2017 22:55, "Spyridon (Spyros) Mastorakis" <<a href="mailto:mastorakis@cs.ucla.edu">mastorakis@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">Hi,<div><br></div><div>you can use the FibHelper to add/remove/update routes to/from NFD:</div><div><br></div><div><a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/master/helper/ndn-fib-helper.cpp" target="_blank">https://github.com/named-data-<wbr>ndnSIM/ndnSIM/blob/master/<wbr>helper/ndn-fib-helper.cpp</a></div><div><br></div><div>Hope that this helps,</div><div><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></div><br class="m_-4420228252067198790Apple-interchange-newline">
</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_-4420228252067198790Apple-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_-4420228252067198790gmail_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><br></div></blockquote></div><br></div></div></blockquote></div></div>