From patchwork Wed Sep 29 13:20:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 512 Return-Path: Received: from smtp128.mail.ukl.yahoo.com (smtp128.mail.ukl.yahoo.com [77.238.184.59]) by open-mesh.org (Postfix) with SMTP id 7471115448E for ; Wed, 29 Sep 2010 15:22:23 +0200 (CEST) Received: (qmail 44036 invoked from network); 29 Sep 2010 13:22:22 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.de; h=DKIM-Signature:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References; b=me6SYnJV46kIestWbpbVHxTxbwahCGUMoP+Gunk8oh3pv3EXD9XWNFvtP7cJvVQibRHU/7upkc5Y1gm0r+fu8sPsko/T95+1o+gJG37TRaPYOKUZopmG76xa0twjTksT8j2V4EnwcRCwKjJ2ykYjMuJ7EWI5+8CRzEbPefTRj3U= ; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s1024; t=1285766542; bh=K7ZJKCYZZqPUDDx0C1hUC0bydFxChhQer1yEDmhkaT4=; h=Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References; b=hR8SVKE6KUqg+etofSgjuCn+IOkEfuG4tH1i3hTM1FcRMLVJ3ETYPFLXZ2/83j3GuizJpH86WDp8VxP5BrhASkcQvkIg1BxG2Opupp4g7WRXeccllXGHuiT/PE31rnhp/7n/JsRhlcqqRlDYZsNsx4IEib160Bmf14eWYc58lP0= Received: from localhost (lindner_marek@78.225.40.81 with plain) by smtp128.mail.ukl.yahoo.com with SMTP; 29 Sep 2010 13:22:21 +0000 GMT X-Yahoo-SMTP: tW.h3tiswBBMXO2coYcbPigGD5Lt6zY_.Zc- X-YMail-OSG: xW7W7DUVM1k1KTrPVlDzJ10PlAMHEeWS0vdiqYPSj5zCKCs PIrkFrBCwvk6tHMDaAKaDhzqF8bgqIuXuihfJnScquqzfCNB5jWWxSBLdFpZ CO0gj5nTWzUwVag2tgVmLwJE2__baTb7PfDzBQTm0Oiqo43zV81dozLHU2vK lSaZGDWhSCHjdhruEscR3_IIum2nE6zD63nHWoITlrXbMeC7YoFdUhANkWf5 b9Cl.8kAhyIX0Mn3e.siFZJvw4fpOEbyyOkhqFQPN X-Yahoo-Newman-Property: ymail-3 From: Marek Lindner To: b.a.t.m.a.n@lists.open-mesh.org Date: Wed, 29 Sep 2010 15:20:51 +0200 Message-Id: <1285766451-22259-2-git-send-email-lindner_marek@yahoo.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <201009291520.13588.lindner_marek@yahoo.de> References: <201009291520.13588.lindner_marek@yahoo.de> Cc: Marek Lindner Subject: [B.A.T.M.A.N.] [PATCHv3 2/2] batctl: display soft-interface neighbor table X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2010 13:22:25 -0000 Signed-off-by: Marek Lindner --- 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