batman-adv: add infrastructure to change routing algorithm at runtime
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 3402fa5..1847efa 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -29,6 +29,7 @@
#include "gateway_client.h"
#include "hard-interface.h"
#include "send.h"
+#include "bat_algo.h"
void bat_ogm_init(struct hard_iface *hard_iface)
{
@@ -1172,3 +1173,12 @@
} while (bat_ogm_aggr_packet(buff_pos, packet_len,
batman_ogm_packet->tt_num_changes));
}
+
+static struct bat_algo_ops batman_iv __read_mostly = {
+ .name = "BATMAN IV",
+};
+
+int __init bat_iv_init(void)
+{
+ return bat_algo_register(&batman_iv);
+}