[ndnSIM] How to print FIB table?

Muhammad Hosain Abdollahi Sabet mhasabet at gmail.com
Mon Feb 20 10:52:52 PST 2017


Alex,

I have coded ndn-grid.py like this:

void
> printFIB(Ptr<Node> node)
> {
>     auto fib =
> node->GetObject<ndn::L3Protocol>()->getForwarder()->getFib();
>     cout<<std::endl<<fib.size()<<std::endl;
> }
>

and called it in scenario:

> Simulator::Schedule(Seconds(0.0), printFIB, nodes.Get(0));
>

Compiler says:

> error: use of deleted function ‘nfd::Fib::Fib(const nfd::Fib&)’
> note: ‘nfd::Fib::Fib(const nfd::Fib&)’ is implicitly deleted because the
> default definition would be ill-formed:
>  class Fib : noncopyable
>

Could you refer my to the correct example of correct C++ cunstructs?

Thanks,
Sabet


On Fri, Jan 22, 2016 at 10:40 AM, Alex Afanasyev <aa at cs.ucla.edu> wrote:

> In theory, you can send interests /localhost/nfd/fib/list and process the
> result (you can check how it is done in nfd-status implementation).
>
> More practically, in the simulation you can simply enumerate FIB entries.
> There is a commented out example in `examples/ndn-grid.py` how to do it in
> python.  In C++ it is essentially the same thing, you just need to change
> to C++ constructs (check mailing list history, I think I showed an example
> before).
>
> --
> Alex
>
> > On Jan 21, 2016, at 10:49 PM, Anil Jangam <anilj.mailing at gmail.com>
> wrote:
> >
> > Hi,
> >
> > Is it possible to print the content of FIB table at run time to check
> what prefixes are configured and on which faces?
> >
> > What command is to be used towards NFD to display this information?
> >
> > /anil.
> >
> > _______________________________________________
> > ndnSIM mailing list
> > ndnSIM at lists.cs.ucla.edu
> > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>
>
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170220/a794771b/attachment.html>


More information about the ndnSIM mailing list