Repository : ssh://git@open-mesh.org/batctl
On branch : master
commit 071c16c512e35f6a4c8bcb6d78c2ef1149ac1912 Author: Sven Eckelmann sven.eckelmann@open-mesh.com Date: Wed May 11 11:35:31 2016 +0200
batctl: Add attributes/command for BATADV_CMD_GET_MESH_INFO
BATADV_CMD_GET_MESH_INFO will be used as common function to retrieve information from the kernel. This information can be used to display a header for debugfs tables.
Signed-off-by: Sven Eckelmann sven.eckelmann@open-mesh.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
071c16c512e35f6a4c8bcb6d78c2ef1149ac1912 netlink.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/netlink.c b/netlink.c index 409953a..74d7566 100644 --- a/netlink.c +++ b/netlink.c @@ -22,7 +22,23 @@ #include "netlink.h" #include "main.h"
+#include <net/ethernet.h> + #include "batman_adv.h"
struct nla_policy batadv_netlink_policy[NUM_BATADV_ATTR] = { + [BATADV_ATTR_VERSION] = { .type = NLA_STRING }, + [BATADV_ATTR_ALGO_NAME] = { .type = NLA_STRING }, + [BATADV_ATTR_MESH_IFINDEX] = { .type = NLA_U32 }, + [BATADV_ATTR_MESH_IFNAME] = { .type = NLA_STRING, + .maxlen = IFNAMSIZ }, + [BATADV_ATTR_MESH_ADDRESS] = { .type = NLA_UNSPEC, + .minlen = ETH_ALEN, + .maxlen = ETH_ALEN }, + [BATADV_ATTR_HARD_IFINDEX] = { .type = NLA_U32 }, + [BATADV_ATTR_HARD_IFNAME] = { .type = NLA_STRING, + .maxlen = IFNAMSIZ }, + [BATADV_ATTR_HARD_ADDRESS] = { .type = NLA_UNSPEC, + .minlen = ETH_ALEN, + .maxlen = ETH_ALEN }, };