From patchwork Fri Jun 15 09:46:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wunderlich X-Patchwork-Id: 2015 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 9FC2C6007B0 for ; Fri, 15 Jun 2012 11:46:24 +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=ScRbRrUrRZ1SlZFcEAxFZlkWV1yAttO7q1ppdG0BS5M=; b=yqH1vHb1zcD7h0Z+Z0soHtYz7LaL7fzfaDFTC/pSqPX2D0rhlFbUMeuOmpzEVqxYnfqQYtIUiPqyoFSvBEt1FQzNGMqRTyGi/xhqm3Mc94X9bHjcOMb0HbZ8ruvvc/6VNjwX6T6geoPR8TBp+wR2xOewQ7S87iw2znIu2n3oE+A=; Received: from p57aa1738.dip0.t-ipconnect.de ([87.170.23.56] helo=pandem0nium) by nick.hrz.tu-chemnitz.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1SfT6l-0008Ts-Pa; Fri, 15 Jun 2012 11:46:24 +0200 Received: from dotslash by pandem0nium with local (Exim 4.72) (envelope-from ) id 1SfT6i-00005k-4X; Fri, 15 Jun 2012 11:46:20 +0200 From: Simon Wunderlich To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 15 Jun 2012 11:46:02 +0200 Message-Id: <1339753563-313-1-git-send-email-siwu@hrz.tu-chemnitz.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <20120615084751.GA32430@pandem0nium> References: <20120615084751.GA32430@pandem0nium> X-Scan-AV: nick.hrz.tu-chemnitz.de; 2012-06-15 11:46:24; 76b230ec28fc3501142c9343441bd6c5 X-Scan-SA: nick.hrz.tu-chemnitz.de; 2012-06-15 11:46:24; 09911d00114997580491ce91673e0ea3 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.] [PATCH] 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: Fri, 15 Jun 2012 09:46:24 -0000 Signed-off-by: Simon Wunderlich --- debug.c | 10 ++++++++++ debug.h | 2 ++ main.c | 6 ++++++ 3 files changed, 18 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)) {