diff options
author | Antonio Quartulli <antonio@open-mesh.com> | 2013-09-02 12:15:05 +0200 |
---|---|---|
committer | Antonio Quartulli <antonio@meshcoding.com> | 2013-10-23 15:33:11 +0200 |
commit | c43c981e50f47bdd0f1eb400dc30ff13472c7be6 (patch) | |
tree | a824da57cc62888cff0d73203d4d321adf636e0a /net/batman-adv/main.c | |
parent | a3285a8f20dace536ecc6a2f349150ea1d0bb391 (diff) | |
download | lwn-c43c981e50f47bdd0f1eb400dc30ff13472c7be6.tar.gz lwn-c43c981e50f47bdd0f1eb400dc30ff13472c7be6.zip |
batman-adv: add bat_neigh_is_equiv_or_better API function
Each routing protocol has its own metric semantic and
therefore is the protocol itself the only component able to
compare two metrics to check their "similarity".
This new API allows each routing protocol to implement its
own logic and make the external code protocol agnostic.
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/main.c')
-rw-r--r-- | net/batman-adv/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index 1f2f1ac67a4c..c51a5e568f0a 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c @@ -502,7 +502,8 @@ int batadv_algo_register(struct batadv_algo_ops *bat_algo_ops) !bat_algo_ops->bat_primary_iface_set || !bat_algo_ops->bat_ogm_schedule || !bat_algo_ops->bat_ogm_emit || - !bat_algo_ops->bat_neigh_cmp) { + !bat_algo_ops->bat_neigh_cmp || + !bat_algo_ops->bat_neigh_is_equiv_or_better) { pr_info("Routing algo '%s' does not implement required ops\n", bat_algo_ops->name); ret = -EINVAL; |