From: Marek Lindner <lindner_marek@yahoo.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Marek Lindner <lindner_marek@yahoo.de>
Subject: [B.A.T.M.A.N.] [PATCH 2/2] batctl: display soft-interface neighbor table
Date: Sun, 26 Sep 2010 20:57:57 +0200 [thread overview]
Message-ID: <1285527477-10340-2-git-send-email-lindner_marek@yahoo.de> (raw)
In-Reply-To: <201009262057.36382.lindner_marek@yahoo.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
---
batctl/debug.c | 9 +++++++++
batctl/debug.h | 2 ++
batctl/main.c | 6 ++++++
batctl/man/batctl.8 | 3 +++
4 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/batctl/debug.c b/batctl/debug.c
index 1dbc204..ea5e1cb 100644
--- a/batctl/debug.c
+++ b/batctl/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/batctl/debug.h b/batctl/debug.h
index 8bed80e..aa5b362 100644
--- a/batctl/debug.h
+++ b/batctl/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/batctl/main.c b/batctl/main.c
index 5e3f5d8..9c1195b 100644
--- a/batctl/main.c
+++ b/batctl/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/batctl/man/batctl.8 b/batctl/man/batctl.8
index f98e6ad..13822ef 100644
--- a/batctl/man/batctl.8
+++ b/batctl/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
--
1.7.1
prev parent reply other threads:[~2010-09-26 18:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-26 18:57 [B.A.T.M.A.N.] LAN loop avoidance (part II) Marek Lindner
2010-09-26 18:57 ` [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: softif lan loop avoidance Marek Lindner
2010-09-26 19:16 ` [B.A.T.M.A.N.] " Lew Pitcher
2010-09-26 20:25 ` Marek Lindner
2010-09-27 0:25 ` DuncanSF
2010-09-27 1:22 ` Donald Gordon
2010-09-27 15:58 ` Marek Lindner
2010-09-27 21:00 ` Donald Gordon
2010-09-28 9:33 ` Marek Lindner
2010-09-28 21:23 ` [B.A.T.M.A.N.] [PATCH 1/2] " Sven Eckelmann
2010-09-29 11:44 ` Marek Lindner
2010-09-26 18:57 ` Marek Lindner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1285527477-10340-2-git-send-email-lindner_marek@yahoo.de \
--to=lindner_marek@yahoo.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).