[ndnSIM] Calculate metric for a prefix
Spyridon (Spyros) Mastorakis
mastorakis at CS.UCLA.EDU
Tue May 24 16:56:41 PDT 2016
The first one has been designed to facilitate the creation of the ndnSIM unit-tests. The second one can add and potentially update a FIB entry (if it already exists). I do not see how you could access the entries this way and get the cost of each next hop.
Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
> On May 24, 2016, at 12:27 AM, Muhammad Hosain Abdollahi Sabet <mhasabet at gmail.com> wrote:
> You mean ScenarioHelper::Routeinfo and ScenarioHelper::addRoutes cannot help?
> خندان باشید
> با تشکر
> On Tue, May 24, 2016 at 6:23 AM, Spyridon (Spyros) Mastorakis <mastorakis at cs.ucla.edu <mailto:mastorakis at cs.ucla.edu>> wrote:
> 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 <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 <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 <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
>> On May 22, 2016, at 6:17 AM, Muhammad Hosain Abdollahi Sabet <mhasabet at gmail.com <mailto: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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ndnSIM