diff mbox

[1/2] batctl: adding multicast debug level

Message ID 1405391008-5112-1-git-send-email-linus.luessing@web.de
State Superseded, archived
Headers show

Commit Message

Linus Lüssing July 15, 2014, 2:23 a.m. UTC
This patch adds the multicast debug level to check for own
multicast flag changes for instance.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
---
 README |    1 +
 sys.c  |    5 +++++
 2 files changed, 6 insertions(+)

Comments

Marek Lindner July 19, 2014, 9:55 a.m. UTC | #1
On Tuesday 15 July 2014 04:23:27 Linus Lüssing wrote:
> @@ -280,6 +280,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)

We have a little section in the manpage dedicated to the loglevel which also 
needs an update.

Cheers,
Marek
diff mbox

Patch

diff --git a/README b/README
index b5fd259..c5e3575 100644
--- a/README
+++ b/README
@@ -389,6 +389,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/sys.c b/sys.c
index 676bef1..4fa0e24 100644
--- a/sys.c
+++ b/sys.c
@@ -280,6 +280,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)
@@ -325,6 +326,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;
@@ -359,6 +362,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);