summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/types.h
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@open-mesh.com>2013-09-02 12:15:04 +0200
committerAntonio Quartulli <antonio@meshcoding.com>2013-10-23 15:33:10 +0200
commita3285a8f20dace536ecc6a2f349150ea1d0bb391 (patch)
treed4cd1de827c780d4226d5f9b2f5018d5edd6a4ed /net/batman-adv/types.h
parent737a2a229774ef983ef783149384bae3e3aa38ac (diff)
downloadlinux-a3285a8f20dace536ecc6a2f349150ea1d0bb391.tar.bz2
batman-adv: add bat_neigh_cmp API function
This new API allows to compare the two neighbours based on the metric avoiding the user to deal with any routing algorithm specific detail Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/types.h')
-rw-r--r--net/batman-adv/types.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index 72fd617b2e73..7a00932a55bd 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -992,6 +992,7 @@ struct batadv_forw_packet {
* @bat_primary_iface_set: called when primary interface is selected / changed
* @bat_ogm_schedule: prepare a new outgoing OGM for the send queue
* @bat_ogm_emit: send scheduled OGM
+ * @bat_neigh_cmp: compare the metrics of two neighbors
* @bat_orig_print: print the originator table (optional)
*/
struct batadv_algo_ops {
@@ -1003,6 +1004,8 @@ struct batadv_algo_ops {
void (*bat_primary_iface_set)(struct batadv_hard_iface *hard_iface);
void (*bat_ogm_schedule)(struct batadv_hard_iface *hard_iface);
void (*bat_ogm_emit)(struct batadv_forw_packet *forw_packet);
+ int (*bat_neigh_cmp)(struct batadv_neigh_node *neigh1,
+ struct batadv_neigh_node *neigh2);
/* orig_node handling API */
void (*bat_orig_print)(struct batadv_priv *priv, struct seq_file *seq);
};