aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/main.h
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@open-mesh.com>2013-09-02 12:15:05 +0200
committerAntonio Quartulli <antonio@meshcoding.com>2013-10-23 15:33:11 +0200
commitc43c981e50f47bdd0f1eb400dc30ff13472c7be6 (patch)
treea824da57cc62888cff0d73203d4d321adf636e0a /net/batman-adv/main.h
parentbatman-adv: add bat_neigh_cmp API function (diff)
downloadlinux-dev-c43c981e50f47bdd0f1eb400dc30ff13472c7be6.tar.xz
linux-dev-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.h')
-rw-r--r--net/batman-adv/main.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
index d7dfafe45f29..773301a7923f 100644
--- a/net/batman-adv/main.h
+++ b/net/batman-adv/main.h
@@ -86,6 +86,12 @@
/* numbers of originator to contact for any PUT/GET DHT operation */
#define BATADV_DAT_CANDIDATES_NUM 3
+/**
+ * BATADV_TQ_SIMILARITY_THRESHOLD - TQ points that a secondary metric can differ
+ * at most from the primary one in order to be still considered acceptable
+ */
+#define BATADV_TQ_SIMILARITY_THRESHOLD 50
+
/* how much worse secondary interfaces may be to be considered as bonding
* candidates
*/