The following commit has been merged in the next branch: commit c1f7b3f7f7a7aa3f100d9a7a71c77a6058f60c48 Author: Marek Lindner lindner_marek@yahoo.de Date: Sat Oct 9 11:39:26 2010 +0200
batctl: display soft-interface neighbor table
Signed-off-by: Marek Lindner lindner_marek@yahoo.de Signed-off-by: Sven Eckelmann sven.eckelmann@gmx.de
diff --git a/debug.c b/debug.c index 1dbc204..ea5e1cb 100644 --- a/debug.c +++ b/debug.c @@ -61,6 +61,15 @@ void trans_global_usage(void) printf(" \t -w [interval] watch mode - refresh the global translation table continuously\n"); }
+void softif_neigh_usage(void) +{ + printf("Usage: batctl [options] softif_neigh \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 soft-interface neighbor table continuously\n"); +} + void gateways_usage(void) { printf("Usage: batctl [options] gateways \n"); diff --git a/debug.h b/debug.h index 8bed80e..aa5b362 100644 --- a/debug.h +++ b/debug.h @@ -24,6 +24,7 @@ #define DEBUG_ORIGINATORS "originators" #define DEBUG_TRANSTABLE_LOCAL "transtable_local" #define DEBUG_TRANSTABLE_GLOBAL "transtable_global" +#define DEBUG_SOFTIF_NEIGH "softif_neigh" #define DEBUG_GATEWAYS "gateways" #define DEBUG_VIS_DATA "vis_data" #define DEBUG_LOG "log" @@ -31,6 +32,7 @@ void originators_usage(void); void trans_local_usage(void); void trans_global_usage(void); +void softif_neigh_usage(void); void gateways_usage(void); int handle_debug_table(char *mesh_iface, int argc, char **argv, char *file_path, void table_usage(void)); diff --git a/main.c b/main.c index 5e3f5d8..9c1195b 100644 --- a/main.c +++ b/main.c @@ -52,6 +52,7 @@ void print_usage(void) { printf(" \tgateways|gwl \tdisplay the gateway server list\n"); printf(" \ttranslocal|tl \tdisplay the local translation table\n"); printf(" \ttransglobal|tg \tdisplay the global translation table\n"); + printf(" \tsoftif_neigh|sn \tdisplay the soft-interface neighbor 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"); @@ -136,6 +137,11 @@ int main(int argc, char **argv) ret = handle_debug_table(mesh_iface, argc - 1, argv + 1, DEBUG_TRANSTABLE_GLOBAL, trans_global_usage);
+ } else if ((strcmp(argv[1], "softif_neigh") == 0) || (strcmp(argv[1], "sn") == 0)) { + + ret = handle_debug_table(mesh_iface, argc - 1, argv + 1, + DEBUG_SOFTIF_NEIGH, softif_neigh_usage); + } else if ((strcmp(argv[1], "loglevel") == 0) || (strcmp(argv[1], "ll") == 0)) {
ret = handle_loglevel(mesh_iface, argc - 1, argv + 1); diff --git a/man/batctl.8 b/man/batctl.8 index d206328..ba22e21 100644 --- a/man/batctl.8 +++ b/man/batctl.8 @@ -121,6 +121,9 @@ Display the local translation table. batctl will refresh the list every second i .IP "\fBtransglobal\fP|\fBtg\fP [\fB-w\fP [\fI\interval\fP]][\fB-n\fP]" Display the global translation 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 "\fBsoftif_neigh\fP|\fBsn\fP [\fB-w\fP [\fI\interval\fP]][\fB-n\fP]" +Display the soft-interface neighbor 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