[ndnSIM] Calculate metric for a prefix

Spyridon (Spyros) Mastorakis mastorakis at CS.UCLA.EDU
Mon May 23 18:53:20 PDT 2016


Hi Sabet,

the cost has to do with the overall routing/forwarding administration and policies. I do not think that we have a standardized way to calculated the cost for the next hop of a FIB entry. If you think about it, the adaptive forwarding plane and the forwarding strategy can override the routing plane, set/reset the cost for each next hop and change the face ranking on each node.

To access the cost, you will have to access the FIB of a node and then use the FIB look up API:

https://github.com/named-data-ndnSIM/NFD/blob/NFD-0.3.4-ndnSIM/daemon/table/fib.hpp#L57-L69

The highlighted methods will return a shared_ptr to a fib entry. Then you can use the fib entry API to get the next-hops for this fib entry:

https://github.com/named-data-ndnSIM/NFD/blob/NFD-0.3.4-ndnSIM/daemon/table/fib-entry.hpp#L62-L63

Finally, you will use the next-hop API to get the cost of each next hop:

https://github.com/named-data-ndnSIM/NFD/blob/NFD-0.3.4-ndnSIM/daemon/table/fib-nexthop.hpp#L50-L51 

Hope that this helps,

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA

> On May 22, 2016, at 6:17 AM, Muhammad Hosain Abdollahi Sabet <mhasabet at gmail.com> wrote:
> 
> Hi everyone,
> 
> In my custom application, based on the received interest I want to create a FIB entry for a prefix - which is retrieved by processing the interest's name. For using FIBHelper::AddRoute in need to have the metric for prefix. How can I calculate it? Is there any method some where which you(in a node) can give it prefix and it gives you back the metric for that prefix?
> 
> Thanks,
> Sabet

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160523/1aab6e8d/attachment.html>


More information about the ndnSIM mailing list