[commits] [batctl] master: batctl: add support for the DAT log level (ac27265)

postmaster at open-mesh.org postmaster at open-mesh.org
Sun Oct 14 17:05:59 CEST 2012


Repository : ssh://git@open-mesh.org/batctl

On branch  : master

>---------------------------------------------------------------

commit ac2726519769ed5b7463e214e0a6f96419090c18
Author: Antonio Quartulli <ordex at autistici.org>
Date:   Sun Oct 14 16:54:32 2012 +0200

    batctl: add support for the DAT log level
    
    Signed-off-by: Antonio Quartulli <ordex at autistici.org>
    Signed-off-by: Marek Lindner <lindner_marek at yahoo.de>


>---------------------------------------------------------------

ac2726519769ed5b7463e214e0a6f96419090c18
 README       |    1 +
 man/batctl.8 |    7 ++++---
 sys.c        |    7 ++++++-
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/README b/README
index 5e58452..22ad616 100644
--- a/README
+++ b/README
@@ -342,6 +342,7 @@ $  batctl loglevel
 [ ] messages related to route added / changed / deleted (routes)
 [ ] messages related to translation table operations (tt)
 [ ] messages related to bridge loop avoidance (bla)
+[ ] messages related to arp snooping and distributed arp table (dat)
 
 batctl aggregation
 ==================
diff --git a/man/batctl.8 b/man/batctl.8
index 7983ea2..6ff60ef 100644
--- a/man/batctl.8
+++ b/man/batctl.8
@@ -85,9 +85,10 @@ disable fragmentation.
 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 'bla' enables messages related to the bridge loop avoidance. 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.
+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 '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 6f94483..815ff88 100644
--- a/sys.c
+++ b/sys.c
@@ -258,6 +258,7 @@ static void log_level_usage(void)
 	printf(" \t routes  Messages related to route added / changed / deleted\n");
 	printf(" \t tt      Messages related to translation table operations\n");
 	printf(" \t bla     Messages related to bridge loop avoidance\n");
+	printf(" \t dat     Messages related to arp snooping and distributed arp table\n");
 }
 
 int handle_loglevel(char *mesh_iface, int argc, char **argv)
@@ -288,7 +289,7 @@ int handle_loglevel(char *mesh_iface, int argc, char **argv)
 				log_level = 0;
 				break;
 			} else if (strcmp(argv[i], "all") == 0) {
-				log_level = 15;
+				log_level = 31;
 				break;
 			} else if (strcmp(argv[i], "batman") == 0)
 				log_level |= BIT(0);
@@ -298,6 +299,8 @@ int handle_loglevel(char *mesh_iface, int argc, char **argv)
 				log_level |= BIT(2);
 			else if (strcmp(argv[i], "bla") == 0)
 				log_level |= BIT(3);
+			else if (strcmp(argv[i], "dat") == 0)
+				log_level |= BIT(4);
 			else {
 				log_level_usage();
 				goto out;
@@ -327,6 +330,8 @@ int handle_loglevel(char *mesh_iface, int argc, char **argv)
 	       "messages related to translation table operations", "tt");
 	printf("[%c] %s (%s)\n", (log_level & BIT(3)) ? 'x' : ' ',
 	       "messages related to bridge loop avoidance", "bla");
+	printf("[%c] %s (%s)\n", (log_level & BIT(4)) ? 'x' : ' ',
+	       "messages related to arp snooping and distributed arp table", "dat");
 
 out:
 	free(path_buff);



More information about the commits mailing list