From patchwork Tue Nov 22 17:28:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1403 Return-Path: Received: from confino.investici.org (investici.nine.ch [217.150.252.179]) by open-mesh.org (Postfix) with ESMTPS id B8A196006DD for ; Tue, 22 Nov 2011 18:29:06 +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 D3A7CC864D; Tue, 22 Nov 2011 17:29:05 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 confino.investici.org D3A7CC864D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1321982946; bh=e6htdYJn8honY4ivsOUYYaJ3KsGJYAOdAFcJuEbXHxQ=; h=From:To:Cc:Subject:Date:Message-Id; b=im5thaPzqWPo0k8knKlKW5DI9XRiuTOWnXtc6J2IDfi/SQVTUgR6cPCbtI7R/cMoI B2W59rdGT8+6XcOETKtBMMIeXGRcm0Vgo4cc8eldRPw7FsgeELsR5utKdVPUuZBmw+ fPFwKzS0+NXJY2Zl2C/ETaFiZQniOlnQF5TkWfhs= From: Antonio Quartull To: b.a.t.m.a.n@lists.open-mesh.org Date: Tue, 22 Nov 2011 18:28:51 +0100 Message-Id: <1321982931-32465-1-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.3.4 Subject: [B.A.T.M.A.N.] [PATCH] batctl: 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 17:29:07 -0000 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 + sys.c | 5 +++++ 2 files changed, 6 insertions(+), 0 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/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)