Repository : ssh://git@diktynna/batctl
On branch : master
commit 4b67ab08eee49980d20199cbb9ea9f4cb0072093 Author: Sven Eckelmann sven@narfation.org Date: Fri May 14 16:23:03 2021 +0200
batctl: Add bla_claim_json command
Signed-off-by: Sven Eckelmann sven@narfation.org
4b67ab08eee49980d20199cbb9ea9f4cb0072093 Makefile | 1 + README.rst | 40 +++++++++++++++++++++++++++++++++ bla_backbone_json.c => bla_claim_json.c | 8 +++---- man/batctl.8 | 3 +++ 4 files changed, 48 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile index 944e985..6c57055 100755 --- a/Makefile +++ b/Makefile @@ -41,6 +41,7 @@ $(eval $(call add_command,ap_isolation,y)) $(eval $(call add_command,backbonetable,y)) $(eval $(call add_command,bisect_iv,$(CONFIG_BATCTL_BISECT))) $(eval $(call add_command,bla_backbone_json,y)) +$(eval $(call add_command,bla_claim_json,y)) $(eval $(call add_command,bonding,y)) $(eval $(call add_command,bridge_loop_avoidance,y)) $(eval $(call add_command,claimtable,y)) diff --git a/README.rst b/README.rst index cd708c3..4129ddd 100644 --- a/README.rst +++ b/README.rst @@ -737,6 +737,46 @@ Example:: ]
+batctl bla_claim_json +--------------------- + +Query batman-adv for the entries in the known claims table of +bridge loop avoidance. Only claims from the current node will have have the +key-value ``"bla_own": true``. + +Usage:: + + batctl meshif <netdev> bla_claim_json|clj + +Example:: + + $ batctl meshif bat0 bla_claim_json | json_pp + [ + { + "bla_address": "a2:30:36:05:e6:32", + "bla_backbone": "02:ba:de:af:fe:01", + "bla_crc": 60445, + "bla_own": true, + "bla_vid": -1 + }, + { + "bla_address": "24:18:1d:1c:d2:13", + "bla_backbone": "02:ba:de:af:fe:01", + "bla_crc": 60445, + "bla_own": true, + "bla_vid": -1 + }, + { + "bla_address": "68:72:51:68:67:7a", + "bla_backbone": "02:ba:de:af:fe:01", + "bla_crc": 60445, + "bla_own": true, + "bla_vid": -1 + }, + [...] + ] + + Advanced Analytics ==================
diff --git a/bla_backbone_json.c b/bla_claim_json.c similarity index 58% copy from bla_backbone_json.c copy to bla_claim_json.c index 5d50a9b..4ff3fff 100644 --- a/bla_backbone_json.c +++ b/bla_claim_json.c @@ -10,11 +10,11 @@
#include "genl_json.h"
-static struct json_query_data batctl_json_query_bla_backbone = { +static struct json_query_data batctl_json_query_bla_claim = { .nlm_flags = NLM_F_DUMP, - .cmd = BATADV_CMD_GET_BLA_BACKBONE, + .cmd = BATADV_CMD_GET_BLA_CLAIM, };
-COMMAND_NAMED(JSON_MIF, bla_backbone_json, "bbj", handle_json_query, +COMMAND_NAMED(JSON_MIF, bla_claim_json, "clj", handle_json_query, COMMAND_FLAG_MESH_IFACE | COMMAND_FLAG_NETLINK, - &batctl_json_query_bla_backbone, ""); + &batctl_json_query_bla_claim, ""); diff --git a/man/batctl.8 b/man/batctl.8 index b4fef27..1ee8933 100644 --- a/man/batctl.8 +++ b/man/batctl.8 @@ -308,6 +308,9 @@ List of available JSON queries: .RS 10 - bla_backbone_json|bbj .RE +.RS 10 +- bla_claim_json|clj +.RE .RE .br .IP "[\fBmeshif <netdev>\fP] \fBtranslate\fP|\fBt\fP \fBMAC_address\fP|\fBbat-host_name\fP|\fBhost_name\fP|\fBIP_address\fP"