summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/types.h
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@open-mesh.com>2015-03-01 00:50:17 +0800
committerAntonio Quartulli <antonio@meshcoding.com>2015-06-07 17:07:18 +0200
commitbcef1f3c49daee2829cf58e30310427c63038cff (patch)
treee5be48bf313b97c3cdc98e54b47b9f50a9f1f487 /net/batman-adv/types.h
parent6f70eb7552abc73584f43b701d71c1c377887af0 (diff)
downloadlinux-bcef1f3c49daee2829cf58e30310427c63038cff.tar.bz2
batman-adv: add bat_neigh_free API
This API has to be used to let any routing protocol free neighbor specific allocated resources Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Diffstat (limited to 'net/batman-adv/types.h')
-rw-r--r--net/batman-adv/types.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index c1000c0d6b0d..336f94bba558 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -1121,6 +1121,8 @@ struct batadv_forw_packet {
* @bat_neigh_is_equiv_or_better: check if neigh1 is equally good or better
* than neigh2 for their respective outgoing interface from the metric
* prospective
+ * @bat_neigh_free: free the resources allocated by the routing algorithm for a
+ * neigh_node object
* @bat_orig_print: print the originator table (optional)
* @bat_orig_free: free the resources allocated by the routing algorithm for an
* orig_node object
@@ -1138,6 +1140,7 @@ 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);
+ /* neigh_node handling API */
int (*bat_neigh_cmp)(struct batadv_neigh_node *neigh1,
struct batadv_hard_iface *if_outgoing1,
struct batadv_neigh_node *neigh2,
@@ -1147,6 +1150,7 @@ struct batadv_algo_ops {
struct batadv_hard_iface *if_outgoing1,
struct batadv_neigh_node *neigh2,
struct batadv_hard_iface *if_outgoing2);
+ void (*bat_neigh_free)(struct batadv_neigh_node *neigh);
/* orig_node handling API */
void (*bat_orig_print)(struct batadv_priv *priv, struct seq_file *seq,
struct batadv_hard_iface *hard_iface);