From patchwork Fri May 13 15:30:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Linus_L=C3=BCssing?= X-Patchwork-Id: 16186 X-Patchwork-Delegate: mareklindner@neomailbox.ch Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 5B6F682C2A; Fri, 13 May 2016 17:30:37 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=c0d3.blue Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a01:4f8:171:314c::100:a1; helo=mail.aperture-lab.de; envelope-from=linus.luessing@c0d3.blue; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=none header.from=c0d3.blue Received: from mail.aperture-lab.de (mail.aperture-lab.de [IPv6:2a01:4f8:171:314c::100:a1]) by open-mesh.org (Postfix) with ESMTPS id 5760582C29 for ; Fri, 13 May 2016 17:30:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.aperture-lab.de (Postfix) with ESMTP id 170ADE175A; Fri, 13 May 2016 17:30:20 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aperture-lab.de Received: from mail.aperture-lab.de ([127.0.0.1]) by localhost (mail.aperture-lab.de [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id ZShzmQ3WtbG8; Fri, 13 May 2016 17:30:19 +0200 (CEST) Received: from localhost (unknown [IPv6:2001:67c:2d50:0:c85:8cff:fe0f:63fe]) (Authenticated sender: linus.luessing@c0d3.blue) by mail.aperture-lab.de (Postfix) with ESMTPSA; Fri, 13 May 2016 17:30:18 +0200 (CEST) From: =?UTF-8?q?Linus=20L=C3=BCssing?= To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 13 May 2016 17:30:15 +0200 Message-Id: <1463153416-6569-1-git-send-email-linus.luessing@c0d3.blue> X-Mailer: git-send-email 2.8.0.rc3 MIME-Version: 1.0 Subject: [B.A.T.M.A.N.] [PATCHv4 1/2] batctl: adding multicast debug level X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" From: Linus Lüssing This patch adds the multicast debug level to check for own multicast flag changes for instance. Signed-off-by: Linus Lüssing --- Changes in v4: * rebase to current master (no conflicts) Changes in v3: * none Changes in v2: * added a sentence about 'mcast' log level to manpage README | 1 + man/batctl.8 | 6 +++--- sys.c | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README b/README index f87c551..b5de8a6 100644 --- a/README +++ b/README @@ -390,6 +390,7 @@ $ batctl loglevel [ ] messages related to bridge loop avoidance (bla) [ ] messages related to arp snooping and distributed arp table (dat) [ ] messages related to network coding (nc) +[ ] messages related to multicast (mcast) batctl nc_nodes =============== diff --git a/man/batctl.8 b/man/batctl.8 index e804a08..f8955d0 100644 --- a/man/batctl.8 +++ b/man/batctl.8 @@ -98,9 +98,9 @@ level. Level 'none' disables all verbose logging. Level 'batman' enables message Level 'routes' enables messages related to routes being added / changed / deleted. Level 'tt' enables messages related to translation table operations. Level 'bla' enables messages related to the bridge loop avoidance. Level 'dat' enables messages related to ARP snooping and the Distributed Arp Table. Level 'nc' enables messages related to network coding. -Level 'all' enables all messages. The messages are sent to the batman-adv debug log. Use \fBbatctl log\fP to retrieve it. -Make sure to have debugging output enabled when compiling the module otherwise the output as well as the loglevel options -won't be available. +Level 'mcast' enables messages related to multicast optimizations. Level 'all' enables all messages. The messages +are sent to the batman-adv debug log. Use \fBbatctl log\fP to retrieve it. 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 diff --git a/sys.c b/sys.c index afa8533..ca837f6 100644 --- a/sys.c +++ b/sys.c @@ -277,6 +277,7 @@ static void log_level_usage(void) fprintf(stderr, " \t bla Messages related to bridge loop avoidance\n"); fprintf(stderr, " \t dat Messages related to arp snooping and distributed arp table\n"); fprintf(stderr, " \t nc Messages related to network coding\n"); + fprintf(stderr, " \t mcast Messages related to multicast\n"); } int handle_loglevel(char *mesh_iface, int argc, char **argv) @@ -321,6 +322,8 @@ int handle_loglevel(char *mesh_iface, int argc, char **argv) log_level |= BIT(4); else if (strcmp(argv[i], "nc") == 0) log_level |= BIT(5); + else if (strcmp(argv[i], "mcast") == 0) + log_level |= BIT(6); else { log_level_usage(); goto out; @@ -354,6 +357,8 @@ int handle_loglevel(char *mesh_iface, int argc, char **argv) "messages related to arp snooping and distributed arp table", "dat"); printf("[%c] %s (%s)\n", (log_level & BIT(5)) ? 'x' : ' ', "messages related to network coding", "nc"); + printf("[%c] %s (%s)\n", (log_level & BIT(6)) ? 'x' : ' ', + "messages related to multicast", "mcast"); out: free(path_buff);