From patchwork Mon Jun 18 10:21:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 2009 Return-Path: Received: from nick.hrz.tu-chemnitz.de (nick.hrz.tu-chemnitz.de [134.109.228.11]) by open-mesh.org (Postfix) with ESMTPS id A7AFF60079C for ; Mon, 18 Jun 2012 12:21:35 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key; insecure key) header.i=@tu-chemnitz.de; dkim-adsp=none (insecure policy) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tu-chemnitz.de; s=dkim2010; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=RP7fZlPiI23IW7LsvHLqfNrrdId7tkqmPZwRxlyryoc=; b=W2tNKcmUa9cAlyYwp/eh7WMOYSmT5kol8+CVtCrmvgYx43r87PmkF7gqC5Q6IY1+yyn4yB5jFXs/z6tTZQndmVPpmErIjjRWSEqbTx4/hY/ueoh7Ta2MXG/dXWwd2CzFXRuR5j8TDf1LZJ2nRnlAu2h1xA9jFeWDBuc7TI/ZXC8=; Received: from p57aa18c3.dip0.t-ipconnect.de ([87.170.24.195] helo=pandem0nium) by nick.hrz.tu-chemnitz.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1SgZ5S-00038v-Tj; Mon, 18 Jun 2012 12:21:35 +0200 Received: from dotslash by pandem0nium with local (Exim 4.72) (envelope-from ) id 1SgZ5c-0005vI-9R; Mon, 18 Jun 2012 12:21:44 +0200 From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org Date: Mon, 18 Jun 2012 12:21:31 +0200 Message-Id: <1340014892-22722-1-git-send-email-siwu@hrz.tu-chemnitz.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <20120616063703.GA32026@sven-atom.home.narfation.org> References: <20120616063703.GA32026@sven-atom.home.narfation.org> X-Scan-AV: nick.hrz.tu-chemnitz.de; 2012-06-18 12:21:35; 53fade6dbf629f642ee76fbbf333ea7a X-Scan-SA: nick.hrz.tu-chemnitz.de; 2012-06-18 12:21:35; 79acc7cc7acd6f3e03367909702d058c X-Spam-Score: -1.0 (-) X-Spam-Report: --- Textanalyse SpamAssassin 3.3.1 (-1.0 Punkte) Fragen an/questions to: Postmaster TU Chemnitz * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP --- Ende Textanalyse Cc: Simon Wunderlich Subject: [B.A.T.M.A.N.] [PATCHv2] batctl: add support for the bla backbone table in debugfs X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 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: Mon, 18 Jun 2012 10:21:35 -0000 Signed-off-by: Simon Wunderlich --- [EDITv2: add manpage entry] --- debug.c | 10 ++++++++++ debug.h | 2 ++ main.c | 6 ++++++ man/batctl.8 | 3 +++ 4 files changed, 21 insertions(+) diff --git a/debug.c b/debug.c index 928f81d..5dca633 100644 --- a/debug.c +++ b/debug.c @@ -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"); diff --git a/debug.h b/debug.h index 50d0e24..2c6d24c 100644 --- a/debug.h +++ b/debug.h @@ -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)); diff --git a/main.c b/main.c index 72b1ea4..929b762 100644 --- a/main.c +++ b/main.c @@ -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)) { diff --git a/man/batctl.8 b/man/batctl.8 index 714f50a..af30b67 100644 --- a/man/batctl.8 +++ b/man/batctl.8 @@ -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