diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2016-07-03 13:31:35 +0200 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2016-08-09 07:54:36 +0200 |
commit | 07a3061e0832fe22932e0fa977581e45b9c42431 (patch) | |
tree | 7ba704ec4c864bc69589ed0e3950aab259b15207 /net/batman-adv/netlink.c | |
parent | batman-adv: Suppress debugfs entries for netns's (diff) | |
download | linux-07a3061e0832fe22932e0fa977581e45b9c42431.tar.xz linux-07a3061e0832fe22932e0fa977581e45b9c42431.zip |
batman-adv: netlink: add routing_algo query
BATADV_CMD_GET_ROUTING_ALGOS is used to get the list of supported routing
algorithms.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
[sven.eckelmann@open-mesh.com: Reduce the number of changes to
BATADV_CMD_GET_ROUTING_ALGOS, fix includes]
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Diffstat (limited to 'net/batman-adv/netlink.c')
-rw-r--r-- | net/batman-adv/netlink.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/batman-adv/netlink.c b/net/batman-adv/netlink.c index 231f8eaf075b..19fb2657e274 100644 --- a/net/batman-adv/netlink.c +++ b/net/batman-adv/netlink.c @@ -32,13 +32,14 @@ #include <net/netlink.h> #include <uapi/linux/batman_adv.h> +#include "bat_algo.h" #include "hard-interface.h" #include "soft-interface.h" #include "tp_meter.h" struct sk_buff; -static struct genl_family batadv_netlink_family = { +struct genl_family batadv_netlink_family = { .id = GENL_ID_GENERATE, .hdrsize = 0, .name = BATADV_NL_NAME, @@ -399,6 +400,12 @@ static struct genl_ops batadv_netlink_ops[] = { .policy = batadv_netlink_policy, .doit = batadv_netlink_tp_meter_cancel, }, + { + .cmd = BATADV_CMD_GET_ROUTING_ALGOS, + .flags = GENL_ADMIN_PERM, + .policy = batadv_netlink_policy, + .dumpit = batadv_algo_dump, + }, }; /** |