On Wed, Jul 31, 2013 at 10:47:37PM +0200, Antonio Quartulli wrote:
with this RFC I'd like to introduce some new routing API functions meant to improve the routing protocol abstraction.
This changes have been written while developing batman V. The latter helped me in understanding what batman iv and v have in common and what not.
The main problem was the metric: the two protocols use different metric domains and different semantics. Therefore all the functions handling/printing the metric needed to be generalised and rearranged to let the protocols decide what to do.
Another issue was the way routing protocols handle the orig and neigh node structures. Also these two have been changed and some small APIs have been provided as well.
Moreover, after Simon's RFC about the new multi-interface optimisation, we saw the need for a better abstraction so that mechanisms like that could easily be re-used by new algorithms (like batman v) with little effort.
This is the second version of this RFC where I introduced some changes to the names of some functions and some other minor changes discussed in the previous RFC thread.
The new API functions are the following:
- metric related: - bat_metric_get - bat_metric_is_similar
copy + paste?! :P
- orig_node related: - bat_orig_print: print the originator table - bat_orig_add_if - bat_orig_del_if - bat_orig_free
Any feedback will surely be welcome :-)
Looks pretty good to me, see a few questions inline of the patches for detail. I'd love to see the real patches soon. :)