[ndnSIM] Question about updating name prefix list of the routers

Mahsa Aghajani mahsa.aghajani at gmail.com
Sun Mar 5 11:55:44 PST 2017


Actually I want to add/remove name prefixes in a router, so nlsr routing
messages became generated and disseminated toward other routers.
I appreciate your suggestion dear Spyridon but I think FibHelper will not
do this in the way I need.

On Mar 5, 2017 22:55, "Spyridon (Spyros) Mastorakis" <mastorakis at cs.ucla.edu>
wrote:

> Hi,
>
> you can use the FibHelper to add/remove/update routes to/from NFD:
>
> https://github.com/named-data-ndnSIM/ndnSIM/blob/master/
> helper/ndn-fib-helper.cpp
>
> Hope that this helps,
>
> Spyridon (Spyros) Mastorakis
> Personal Website: http://cs.ucla.edu/~mastorakis/
> Internet Research Laboratory
> Computer Science Department
> UCLA
>
>
> On Mar 5, 2017, at 5:53 AM, Mahsa Aghajani <mahsa.aghajani at gmail.com>
> wrote:
>
> Dear ndnSIM users
>
> 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?
> If so, how can I use these functions in ndnSIM-NLSR? I have written this
> code in
> ndn-nlsr-exec.cpp file, but I got some errors relating to sending interest
> from face :
>
> void
> Nlsr::withdraw()
> {
>   m_nlsr.getPrefixUpdateProcessor().updateProcessor.enable();
>
>   ndn::nfd::ControlParameters parameters;
>   parameters.setName("/prefix/to/advertise/");
>
>   ndn::Name withdrawCommand("/localhost/nlsr/prefix-update/withdraw");
>   withdrawCommand.append(parameters.wireEncode());
>
>   shared_ptr<Interest> withdrawInterest = make_shared<Interest>(
> withdrawCommand);
>   keyChain.signByIdentity(*withdrawInterest, opIdentity);
>
>   face->receive(*withdrawInterest);
>   face->processEvents(ndn::time::milliseconds(1));
> }
>
> Thanks and regards.
>
> Mahsa Aghajani
> M.Sc. Student
> Department of Computer Engineering
> Sharif University of Technology
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170305/c9c946af/attachment.html>


More information about the ndnSIM mailing list