[Olsr-dev] Custom Routing Metrics

Henning Rogge (spam-protected)
Thu Jul 23 11:06:16 CEST 2015

On Thu, Jul 23, 2015 at 4:58 AM, Shane Melton <(spam-protected)> wrote:
> Working with olsrd2 sounds great if it will be less tricky to implement new
> routing metrics and I would greatly appreciate your help; however I am less
> familiar with it than the original olsrd, so please forgive any
> misconceptions I might have.
> I see that olsrd2 is very modular, being comprised of many plugins one of
> which is a route modifier plugin; would the first step in creating a new
> routing metric be extending from or modifying this plugin?
> Also, I assume that I will likely need to have nodes send custom messages
> with their own new metric values to their neighbors in order for those
> neighbors to accurately calculate their routes. Would/Could this be
> accomplished with modification to the route modifier plugin? Or am I
> completely off base here?

The current metric of olsrd2 is the "DAT metric"... which is
implemented in the "ff_dat_metric" plugin.

It uses a few NHDP API functions to do its job:

- nhdp_domain_metric_add() to register the metric with the core
- nhdp_domain_set_incoming_metric() to set the incoming metric of a nhdp_link
- nhdp_domain_neighborhood_changed() to trigger a recomputation of the
neighborhood (important when you work with MPRs)

everything else is "window dressing".

a link metric in NHDP/OLSRv2 is just an interger between 1 and 2^24.
As a routing metric it is just your job to calculate the incoming
metric for every link in the NHDP link database. The rest
(distribution of the data, recalculation of the routes) is done by the
generic NHDP and OLSRv2 core.


More information about the Olsr-dev mailing list