[ndnSIM] Calculate metric for a prefix

Muhammad Hosain Abdollahi Sabet mhasabet at gmail.com
Wed May 25 00:11:20 PDT 2016


Actually I don't want to update entries. I just want to set a calculated
metric at the time of using FIBHelper::AddRoute

Thanks,
Sabet

خندان باشید
با تشکر

On Wed, May 25, 2016 at 4:26 AM, Spyridon (Spyros) Mastorakis <
mastorakis at cs.ucla.edu> wrote:

> 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/
> Internet Research Laboratory
> Computer Science Department
> UCLA
>
> 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?
>
> Regards,
> Sabet
>
> خندان باشید
> با تشکر
>
> On Tue, May 24, 2016 at 6:23 AM, Spyridon (Spyros) Mastorakis <
> 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
>>
>> 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/
>> 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/20160525/26fd70dd/attachment.html>


More information about the ndnSIM mailing list