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.
The new API functions are the following:
+ metric related:
+ orig_node related:
- bat_orig_print: print the originator table
Any feedback will surely be welcome :-)
p.s. there are some small "checkpatch glitches" but they will be removed before
this RFC becomes a real patchset :)
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_similar API function
batman-adv: add bat_metric_compare API function
batman-adv: adapt bonding to use the new API functions
batman-adv: adapt the gateway feature to use the new API functions
batman-adv: adapt the neighbor purging routine to use the new API
batman-adv: provide orig_node routing API
bat_iv_ogm.c | 373 +++++++++++++++++++++++++++++++++++++++++++---------
gateway_client.c | 74 ++++++-----
main.c | 5 +-
main.h | 7 +
network-coding.c | 8 +-
originator.c | 238 ++++++++-------------------------
originator.h | 5 +-
routing.c | 37 ++++--
routing.h | 3 +-
translation-table.c | 4 +-
types.h | 106 +++++++++------
11 files changed, 518 insertions(+), 342 deletions(-)