From patchwork Sat Feb 18 16:38:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1603 Return-Path: Received: from confino.investici.org (investici.nine.ch [217.150.252.179]) by open-mesh.org (Postfix) with ESMTPS id 5CEBA6008A0 for ; Sat, 18 Feb 2012 17:39:59 +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 A5B0AC8643; Sat, 18 Feb 2012 16:39:58 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 confino.investici.org A5B0AC8643 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1329583198; bh=fW2Uy8qExXgCYAVpq26OhSMgouv821tl93jPTz1MA7M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=QAd4kDcj5nF6P5wDUyFOkwqbcmeVDcpMuWcUB09DZHpMCaWwr6lHjhXEbJZ/WafJf I7uZ4UXrYsA/OrcB2akD5I4i1tMep2zS/WaEZOQGDcDaOJ63xszClenxCWU1+q4lsx OQXW6yNAydlHEftX9GbMuRu+wpMQmYn5X03sKHjs= From: Antonio Quartulli To: b.a.t.m.a.n@lists.open-mesh.org Date: Sat, 18 Feb 2012 17:38:48 +0100 Message-Id: <1329583133-11681-3-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1329583133-11681-1-git-send-email-ordex@autistici.org> References: <1329583133-11681-1-git-send-email-ordex@autistici.org> Subject: [B.A.T.M.A.N.] [PATCHv6 2/7] batman-adv: add a new log level for DAT/ARP debugging 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: Sat, 18 Feb 2012 16:39:59 -0000 A new log level has been added to concentrate messages regarding DAT: ARP snooping, requests, response and DHT related messages. The new log level is named DBG_ARP Signed-off-by: Antonio Quartulli --- README | 3 ++- bat_sysfs.c | 2 +- main.h | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README b/README index 0c7a3c8..4ee2f54 100644 --- a/README +++ b/README @@ -201,7 +201,8 @@ abled during run time. Following log_levels are defined: 2 - Enable messages related to route added / changed / deleted 4 - Enable messages related to translation table operations 8 - Enable messages related to bridge loop avoidance -15 - enable all messages +16 - Enable messaged related to DAT, ARP snooping and parsing +31 - Enable all messages The debug output can be changed at runtime using the file /sys/class/net/bat0/mesh/log_level. e.g. diff --git a/bat_sysfs.c b/bat_sysfs.c index 3adb183..abf7300 100644 --- a/bat_sysfs.c +++ b/bat_sysfs.c @@ -401,7 +401,7 @@ BAT_ATTR_UINT(gw_sel_class, S_IRUGO | S_IWUSR, 1, TQ_MAX_VALUE, static BAT_ATTR(gw_bandwidth, S_IRUGO | S_IWUSR, show_gw_bwidth, store_gw_bwidth); #ifdef CONFIG_BATMAN_ADV_DEBUG -BAT_ATTR_UINT(log_level, S_IRUGO | S_IWUSR, 0, 15, NULL); +BAT_ATTR_UINT(log_level, S_IRUGO | S_IWUSR, 0, 31, NULL); #endif static struct bat_attribute *mesh_attrs[] = { diff --git a/main.h b/main.h index e669eea..3060f94 100644 --- a/main.h +++ b/main.h @@ -126,7 +126,8 @@ enum dbg_level { DBG_ROUTES = 1 << 1, /* route added / changed / deleted */ DBG_TT = 1 << 2, /* translation table operations */ DBG_BLA = 1 << 3, /* bridge loop avoidance */ - DBG_ALL = 15 + DBG_ARP = 1 << 4, /* snooped arp messages / dht operations */ + DBG_ALL = 31 };