Hello list,
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 - bat_metric_compare
+ 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 :-)
Cheers,
Antonio Quartulli (10): batman-adv: make struct batadv_neigh_node algorithm agnostic batman-adv: make struct batadv_orig_node algorithm agnostic batman-adv: add bat_orig_print function API batman-adv: add bat_metric_get API function batman-adv: add bat_metric_is_equiv_or_better API function batman-adv: add bat_metric_compare API function batman-adv: adapt bonding to use the new API functions batman-adv: adapt the neighbor purging routine to use the new API functions batman-adv: provide orig_node routing API batman-adv: adapt the TT component to use the new API functions
bat_iv_ogm.c | 359 +++++++++++++++++++++++++++++++++++++++++++--------- gateway_client.c | 16 +-- main.c | 5 +- main.h | 6 + network-coding.c | 8 +- originator.c | 230 +++++++-------------------------- originator.h | 5 +- routing.c | 37 ++++-- routing.h | 3 +- translation-table.c | 31 +++-- types.h | 86 +++++++++---- 11 files changed, 480 insertions(+), 306 deletions(-)