From patchwork Tue Nov 22 20:47:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1396 Return-Path: Received: from confino.investici.org (investici.nine.ch [217.150.252.179]) by open-mesh.org (Postfix) with ESMTPS id B68EC6006DD for ; Tue, 22 Nov 2011 21:48:09 +0100 (CET) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@autistici.org; dkim-adsp=pass Received: from [217.150.252.179] (confino [217.150.252.179]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id C1AA7C8647; Tue, 22 Nov 2011 20:48:08 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 confino.investici.org C1AA7C8647 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1321994889; bh=IW2R8mBJmisGwqM83KJpn5VW+WC/LK7K5dS+LM9s9Qg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=XMV6j2KAeMEqKvBT083ddDXIA4+CWbSTg2Bas/hAZOEzSiTTkJMAK3giSLy0sv+Yo kz6T/zh4FWwZD/KsqVHr3ygzNYnyuSJ/L5xl/iAKwFbRdg8tgPG6TF+0ncCMW6YrYg 98kwXyqFRWxk/9k1OWPZDIwGwtDHeSIJ5xd+NPJI= From: Antonio Quartulli To: b.a.t.m.a.n@lists.open-mesh.org Date: Tue, 22 Nov 2011 21:47:54 +0100 Message-Id: <1321994874-10225-1-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1321982931-32465-1-git-send-email-ordex@autistici.org> References: <1321982931-32465-1-git-send-email-ordex@autistici.org> Subject: [B.A.T.M.A.N.] [PATCHv2] batctl: added loglevel support for DBG_ARP 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: Tue, 22 Nov 2011 20:48:10 -0000 From: Antonio Quartull With the introduction of DAT (Distributed ARP Table) a new log level has been added. This log level is i ncharge of collecting messages related to DAT, ARP parsing and snooping. README has been updated accordingly Signed-off-by: Antonio Quartull --- README | 1 + man/batctl.8 | 2 +- sys.c | 5 +++++ 3 files changed, 7 insertions(+), 1 deletions(-) diff --git a/README b/README index 7119951..4bbfcb5 100644 --- a/README +++ b/README @@ -300,6 +300,7 @@ $ batctl loglevel [ ] messages related to routing / flooding / broadcasting (batman) [ ] messages related to route added / changed / deleted (routes) [ ] messages related to translation table operations (tt) +[ ] messages related to DAT, ARP parsing and snooping (arp) batctl aggregation ================== diff --git a/man/batctl.8 b/man/batctl.8 index 0cf0a7b..3f3ebc2 100644 --- a/man/batctl.8 +++ b/man/batctl.8 @@ -65,7 +65,7 @@ Once started batctl will display the list of announced gateways in the network. If no parameter is given the current originator interval setting is displayed otherwise the parameter is used to set the originator interval. The interval is in units of milliseconds. .br .IP "\fBloglevel\fP|\fBll\fP [\fBlevel\fP[ \fBlevel\fP[ \fBlevel\fP]] \fB...\fP]" -If no parameter is given the current log level settings are displayed otherwise the parameter(s) is/are used to set the log level. Level 'none' disables all verbose logging. Level 'batman' enables messages related to routing / flooding / broadcasting. Level 'routes' enables messages related to routes being added / changed / deleted. Level 'tt' enables messages related to translation table operations. Level 'all' enables all messages. The messages are sent to the batman-adv debug log. Use \fBbatctl log\fP to see them. Make sure to have debugging output enabled when compiling the module otherwise the output as well as the loglevel options won't be available. +If no parameter is given the current log level settings are displayed otherwise the parameter(s) is/are used to set the log level. Level 'none' disables all verbose logging. Level 'batman' enables messages related to routing / flooding / broadcasting. Level 'routes' enables messages related to routes being added / changed / deleted. Level 'tt' enables messages related to translation table operations. Level 'arp' enables messages related to DAT, ARP parsing and snooping. Level 'all' enables all messages. The messages are sent to the batman-adv debug log. Use \fBbatctl log\fP to see them. Make sure to have debugging output enabled when compiling the module otherwise the output as well as the loglevel options won't be available. .br .IP "\fBlog\fP|\fBl\fP [\fB\-n\fP]\fP" batctl will read the batman-adv debug log which has to be compiled into the kernel module. If "\-n" is given batctl will not replace the MAC addresses with bat\-host names in the output. diff --git a/sys.c b/sys.c index e510bee..044f772 100644 --- a/sys.c +++ b/sys.c @@ -183,6 +183,7 @@ static void log_level_usage(void) printf(" \t batman Messages related to routing / flooding / broadcasting\n"); printf(" \t routes Messages related to route added / changed / deleted\n"); printf(" \t tt Messages related to translation table operations\n"); + printf(" \t arp Messages related to DAT, ARP parsing and snooping\n"); } int handle_loglevel(char *mesh_iface, int argc, char **argv) @@ -221,6 +222,8 @@ int handle_loglevel(char *mesh_iface, int argc, char **argv) log_level |= (1 << 1); else if (strcmp(argv[i], "tt") == 0) log_level |= (1 << 2); + else if (strcmp(argv[i], "arp") == 0) + log_level |= (1 << 3); else log_level_usage(); } @@ -246,6 +249,8 @@ int handle_loglevel(char *mesh_iface, int argc, char **argv) "messages related to route added / changed / deleted", "routes"); printf("[%c] %s (%s)\n", (log_level & 4) ? 'x' : ' ', "messages related to translation table operations", "tt"); + printf("[%c] %s (%s)\n", (log_level & 8) ? 'x' : ' ', + "messages related to DAT, ARP parsing and snooping", "arp"); out: if (errno == ENOENT)