[v2] batctl: add support for the bla backbone table in debugfs
Commit Message
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
---
[EDITv2: add manpage entry]
---
debug.c | 10 ++++++++++
debug.h | 2 ++
main.c | 6 ++++++
man/batctl.8 | 3 +++
4 files changed, 21 insertions(+)
Comments
On Monday, June 18, 2012 12:21:31 Simon Wunderlich wrote:
> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
> ---
> [EDITv2: add manpage entry]
> ---
> debug.c | 10 ++++++++++
> debug.h | 2 ++
> main.c | 6 ++++++
> man/batctl.8 | 3 +++
> 4 files changed, 21 insertions(+)
Applied in revision a738c35.
Thanks,
Marek
@@ -70,6 +70,16 @@ void bla_claim_table_usage(void)
printf(" \t -w [interval] watch mode - refresh the bridge loop avoidance claim table continuously\n");
}
+void bla_backbone_table_usage(void)
+{
+ printf("Usage: batctl [options] backbone table\n");
+ printf("options:\n");
+ printf(" \t -h print this help\n");
+ printf(" \t -n don't replace mac addresses with bat-host names\n");
+ printf(" \t -w [interval] watch mode - refresh the bridge loop avoidance backbone table continuously\n");
+}
+
+
void gateways_usage(void)
{
printf("Usage: batctl [options] gateways \n");
@@ -25,6 +25,7 @@
#define DEBUG_TRANSTABLE_LOCAL "transtable_local"
#define DEBUG_TRANSTABLE_GLOBAL "transtable_global"
#define DEBUG_BLA_CLAIM_TABLE "bla_claim_table"
+#define DEBUG_BLA_BACKBONE_TABLE "bla_backbone_table"
#define DEBUG_GATEWAYS "gateways"
#define DEBUG_VIS_DATA "vis_data"
#define DEBUG_LOG "log"
@@ -33,6 +34,7 @@ void originators_usage(void);
void trans_local_usage(void);
void trans_global_usage(void);
void bla_claim_table_usage(void);
+void bla_backbone_table_usage(void);
void gateways_usage(void);
int handle_debug_table(char *mesh_iface, int argc, char **argv,
char *file_path, void table_usage(void));
@@ -56,6 +56,7 @@ void print_usage(void) {
printf(" \ttranslocal|tl \tdisplay the local translation table\n");
printf(" \ttransglobal|tg \tdisplay the global translation table\n");
printf(" \tclaimtable|cl \tdisplay the bridge loop avoidance claim table\n");
+ printf(" \tbackbonetable|bbl \tdisplay the bridge loop avoidance backbone table\n");
printf(" \tvis_mode|vm [mode] \tdisplay or modify the status of the VIS server\n");
printf(" \tvis_data|vd [dot|JSON] \tdisplay the VIS data in dot or JSON format\n");
printf(" \taggregation|ag [0|1] \tdisplay or modify the packet aggregation setting\n");
@@ -158,6 +159,11 @@ int main(int argc, char **argv)
ret = handle_debug_table(mesh_iface, argc - 1, argv + 1,
DEBUG_BLA_CLAIM_TABLE, bla_claim_table_usage);
+ } else if ((strcmp(argv[1], "backbonetable") == 0) || (strcmp(argv[1], "bbl") == 0)) {
+
+ ret = handle_debug_table(mesh_iface, argc - 1, argv + 1,
+ DEBUG_BLA_BACKBONE_TABLE,
+ bla_backbone_table_usage);
} else if ((strcmp(argv[1], "loglevel") == 0) || (strcmp(argv[1], "ll") == 0)) {
@@ -124,6 +124,9 @@ Display the global translation table. batctl will refresh the list every second
.IP "\fBclaimtable\fP|\fBcl\fP [\fB\-w\fP [\fI\interval\fP]][\fB\-n\fP]"
Display the bridge loop avoidance claim table. batctl will refresh the list every second if the "\-w" option was given or add a number to let it refresh at a custom interval in seconds (with optional decimal places). Use "\-n" to let batctl not replace the MAC addresses with bat\-host names in the output.
.br
+.IP "\fBbackbonetable\fP|\fBbbl\fP [\fB\-w\fP [\fI\interval\fP]][\fB\-n\fP]"
+Display the bridge loop avoidance backbone table. batctl will refresh the list every second if the "\-w" option was given or add a number to let it refresh at a custom interval in seconds (with optional decimal places). Use "\-n" to let batctl not replace the MAC addresses with bat\-host names in the output.
+.br
.IP "\fBvis_mode|vm\fP [\fBmode\fP]\fP"
If no parameter is given the current vis mode is displayed otherwise the parameter is used to set the vis mode.
.br