* [B.A.T.M.A.N.] [PATCH 1/3] batctl: Add NC runtime switch support
@ 2013-03-06 12:17 Martin Hundebøll
2013-03-06 12:17 ` [B.A.T.M.A.N.] [PATCH 2/3] batctl: Add support for the NC nodes table Martin Hundebøll
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Martin Hundebøll @ 2013-03-06 12:17 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Martin Hundebøll
Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
---
README | 9 +++++++++
functions.c | 1 +
man/batctl.8 | 4 ++++
sys.c | 6 ++++++
sys.h | 1 +
5 files changed, 21 insertions(+)
diff --git a/README b/README
index efdd3cb..2bc085e 100644
--- a/README
+++ b/README
@@ -363,6 +363,15 @@ $ batctl loglevel
[ ] messages related to bridge loop avoidance (bla)
[ ] messages related to arp snooping and distributed arp table (dat)
+batctl network_coding
+=====================
+
+display or modify the network coding setting
+
+Usage: batctl network_coding|nc [0|1]
+
+Note that network coding requires a working promiscuous mode on all interfaces.
+
batctl aggregation
==================
diff --git a/functions.c b/functions.c
index 16acbb5..14fb45e 100644
--- a/functions.c
+++ b/functions.c
@@ -51,6 +51,7 @@ const char *fs_compile_out_param[] = {
SYS_LOG_LEVEL,
batctl_settings[BATCTL_SETTINGS_BLA].sysfs_name,
batctl_settings[BATCTL_SETTINGS_DAT].sysfs_name,
+ batctl_settings[BATCTL_SETTINGS_NETWORK_CODING].sysfs_name,
batctl_debug_tables[BATCTL_TABLE_BLA_CLAIMS].debugfs_name,
batctl_debug_tables[BATCTL_TABLE_BLA_BACKBONES].debugfs_name,
batctl_debug_tables[BATCTL_TABLE_DAT].debugfs_name,
diff --git a/man/batctl.8 b/man/batctl.8
index 7af78e9..533fdb7 100644
--- a/man/batctl.8
+++ b/man/batctl.8
@@ -87,6 +87,10 @@ the bonding mode.
If no parameter is given the current fragmentation mode setting is displayed. Otherwise the parameter is used to enable or
disable fragmentation.
.br
+.IP "\fBnetwork_coding\fP|\fBnc\fP [\fB0\fP|\fB1\fP]"
+If no parameter is given the current network coding mode setting is displayed. Otherwise the parameter is used to enable or
+disable network coding.
+.br
.IP "\fBloglevel\fP|\fBll\fP [\fBlevel\fP[ \fBlevel\fP[ \fBlevel\fP]] \fB...\fP]"
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.
diff --git a/sys.c b/sys.c
index d45d1a2..74a6c65 100644
--- a/sys.c
+++ b/sys.c
@@ -98,6 +98,12 @@ const struct settings_data batctl_settings[BATCTL_SETTINGS_NUM] = {
.sysfs_name = "fragmentation",
.params = sysfs_param_enable,
},
+ {
+ .opt_long = "network_coding",
+ .opt_short = "nc",
+ .sysfs_name = "network_coding",
+ .params = sysfs_param_enable,
+ }
};
diff --git a/sys.h b/sys.h
index 5ab4135..a7187af 100644
--- a/sys.h
+++ b/sys.h
@@ -40,6 +40,7 @@ enum batctl_settings_list {
BATCTL_SETTINGS_AGGREGATION,
BATCTL_SETTINGS_BONDING,
BATCTL_SETTINGS_FRAGMENTATION,
+ BATCTL_SETTINGS_NETWORK_CODING,
BATCTL_SETTINGS_NUM,
};
--
1.8.1.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [B.A.T.M.A.N.] [PATCH 2/3] batctl: Add support for the NC nodes table
2013-03-06 12:17 [B.A.T.M.A.N.] [PATCH 1/3] batctl: Add NC runtime switch support Martin Hundebøll
@ 2013-03-06 12:17 ` Martin Hundebøll
2013-03-09 10:29 ` Marek Lindner
2013-03-06 12:18 ` [B.A.T.M.A.N.] [PATCH 3/3] batctl: Add support for the NC log level Martin Hundebøll
2013-03-09 10:28 ` [B.A.T.M.A.N.] [PATCH 1/3] batctl: Add NC runtime switch support Marek Lindner
2 siblings, 1 reply; 6+ messages in thread
From: Martin Hundebøll @ 2013-03-06 12:17 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Martin Hundebøll
Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
---
README | 18 ++++++++++++++++++
debug.c | 6 ++++++
debug.h | 1 +
functions.c | 1 +
man/batctl.8 | 3 +++
5 files changed, 29 insertions(+)
diff --git a/README b/README
index 2bc085e..f19a081 100644
--- a/README
+++ b/README
@@ -363,6 +363,24 @@ $ batctl loglevel
[ ] messages related to bridge loop avoidance (bla)
[ ] messages related to arp snooping and distributed arp table (dat)
+batctl nc_nodes
+===============
+
+display the neighbor nodes considered for network coded packets
+
+Usage: batctl nc_nodes|nn
+
+Example:
+
+Node: fe:fe:00:0a:01:01
+ Ingoing: fe:fe:00:0a:01:01 fe:fe:00:0a:02:01
+ Outgoing: fe:fe:00:0a:01:01 fe:fe:00:0a:02:01
+
+Where:
+- Node is the neighbor
+- Ingoing is the neighbors this neighbor can hear packets from
+- Outgoing is the neighbors that can hear packets from this neighbor
+
batctl network_coding
=====================
diff --git a/debug.c b/debug.c
index 9b9e385..c879603 100644
--- a/debug.c
+++ b/debug.c
@@ -76,6 +76,12 @@ const struct debug_table_data batctl_debug_tables[BATCTL_TABLE_NUM] = {
.debugfs_name = "dat_cache",
.header_lines = 2,
},
+ {
+ .opt_long = "nc_nodes",
+ .opt_short = "nn",
+ .debugfs_name = "nc_nodes",
+ .header_lines = 0,
+ },
};
void debug_table_usage(int debug_table)
diff --git a/debug.h b/debug.h
index 60dd9a8..2427ece 100644
--- a/debug.h
+++ b/debug.h
@@ -33,6 +33,7 @@ enum batctl_debug_tables {
BATCTL_TABLE_BLA_CLAIMS,
BATCTL_TABLE_BLA_BACKBONES,
BATCTL_TABLE_DAT,
+ BATCTL_TABLE_NETWORK_CODING_NODES,
BATCTL_TABLE_NUM,
};
diff --git a/functions.c b/functions.c
index 14fb45e..a025395 100644
--- a/functions.c
+++ b/functions.c
@@ -55,6 +55,7 @@ const char *fs_compile_out_param[] = {
batctl_debug_tables[BATCTL_TABLE_BLA_CLAIMS].debugfs_name,
batctl_debug_tables[BATCTL_TABLE_BLA_BACKBONES].debugfs_name,
batctl_debug_tables[BATCTL_TABLE_DAT].debugfs_name,
+ batctl_debug_tables[BATCTL_TABLE_NETWORK_CODING_NODES].debugfs_name,
NULL,
};
diff --git a/man/batctl.8 b/man/batctl.8
index 533fdb7..6f8d210 100644
--- a/man/batctl.8
+++ b/man/batctl.8
@@ -204,6 +204,9 @@ List of debug tables:
.RS 10
\- dat_cache|dc (compile time option)
.RE
+.RS 10
+\- nc_nodes|nn (compile time option)
+.RE
.RE
.br
.IP "\fBtranslate\fP|\fBt\fP \fBMAC_address\fP|\fBbat\-host_name\fP|\fBhost_name\fP|\fBIPv4_address\fP"
--
1.8.1.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [B.A.T.M.A.N.] [PATCH 3/3] batctl: Add support for the NC log level
2013-03-06 12:17 [B.A.T.M.A.N.] [PATCH 1/3] batctl: Add NC runtime switch support Martin Hundebøll
2013-03-06 12:17 ` [B.A.T.M.A.N.] [PATCH 2/3] batctl: Add support for the NC nodes table Martin Hundebøll
@ 2013-03-06 12:18 ` Martin Hundebøll
2013-03-09 10:30 ` Marek Lindner
2013-03-09 10:28 ` [B.A.T.M.A.N.] [PATCH 1/3] batctl: Add NC runtime switch support Marek Lindner
2 siblings, 1 reply; 6+ messages in thread
From: Martin Hundebøll @ 2013-03-06 12:18 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Martin Hundebøll
Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
---
README | 1 +
man/batctl.8 | 7 ++++---
sys.c | 7 ++++++-
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/README b/README
index f19a081..fd421e1 100644
--- a/README
+++ b/README
@@ -362,6 +362,7 @@ $ batctl loglevel
[ ] messages related to translation table operations (tt)
[ ] messages related to bridge loop avoidance (bla)
[ ] messages related to arp snooping and distributed arp table (dat)
+[ ] messages related to network coding (nc)
batctl nc_nodes
===============
diff --git a/man/batctl.8 b/man/batctl.8
index 6f8d210..38060d6 100644
--- a/man/batctl.8
+++ b/man/batctl.8
@@ -96,9 +96,10 @@ If no parameter is given the current log level settings are displayed otherwise
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 '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.
+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.
.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 74a6c65..3258105 100644
--- a/sys.c
+++ b/sys.c
@@ -275,6 +275,7 @@ static void log_level_usage(void)
fprintf(stderr, " \t tt Messages related to translation table operations\n");
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");
}
int handle_loglevel(char *mesh_iface, int argc, char **argv)
@@ -306,7 +307,7 @@ int handle_loglevel(char *mesh_iface, int argc, char **argv)
log_level = 0;
break;
} else if (strcmp(argv[i], "all") == 0) {
- log_level = 31;
+ log_level = 63;
break;
} else if (strcmp(argv[i], "batman") == 0)
log_level |= BIT(0);
@@ -318,6 +319,8 @@ int handle_loglevel(char *mesh_iface, int argc, char **argv)
log_level |= BIT(3);
else if (strcmp(argv[i], "dat") == 0)
log_level |= BIT(4);
+ else if (strcmp(argv[i], "nc") == 0)
+ log_level |= BIT(5);
else {
log_level_usage();
goto out;
@@ -350,6 +353,8 @@ int handle_loglevel(char *mesh_iface, int argc, char **argv)
"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");
+ printf("[%c] %s (%s)\n", (log_level & BIT(5)) ? 'x' : ' ',
+ "messages related to network coding", "nc");
out:
free(path_buff);
--
1.8.1.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH 1/3] batctl: Add NC runtime switch support
2013-03-06 12:17 [B.A.T.M.A.N.] [PATCH 1/3] batctl: Add NC runtime switch support Martin Hundebøll
2013-03-06 12:17 ` [B.A.T.M.A.N.] [PATCH 2/3] batctl: Add support for the NC nodes table Martin Hundebøll
2013-03-06 12:18 ` [B.A.T.M.A.N.] [PATCH 3/3] batctl: Add support for the NC log level Martin Hundebøll
@ 2013-03-09 10:28 ` Marek Lindner
2 siblings, 0 replies; 6+ messages in thread
From: Marek Lindner @ 2013-03-09 10:28 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Martin Hundebøll
On Wednesday, March 06, 2013 20:17:58 Martin Hundebøll wrote:
> Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
> ---
> README | 9 +++++++++
> functions.c | 1 +
> man/batctl.8 | 4 ++++
> sys.c | 6 ++++++
> sys.h | 1 +
> 5 files changed, 21 insertions(+)
Applied in revision a6d74ca.
Thanks,
Marek
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH 2/3] batctl: Add support for the NC nodes table
2013-03-06 12:17 ` [B.A.T.M.A.N.] [PATCH 2/3] batctl: Add support for the NC nodes table Martin Hundebøll
@ 2013-03-09 10:29 ` Marek Lindner
0 siblings, 0 replies; 6+ messages in thread
From: Marek Lindner @ 2013-03-09 10:29 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Martin Hundebøll
On Wednesday, March 06, 2013 20:17:59 Martin Hundebøll wrote:
> Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
> ---
> README | 18 ++++++++++++++++++
> debug.c | 6 ++++++
> debug.h | 1 +
> functions.c | 1 +
> man/batctl.8 | 3 +++
> 5 files changed, 29 insertions(+)
Applied in revision 763b1f8.
Thanks,
Marek
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH 3/3] batctl: Add support for the NC log level
2013-03-06 12:18 ` [B.A.T.M.A.N.] [PATCH 3/3] batctl: Add support for the NC log level Martin Hundebøll
@ 2013-03-09 10:30 ` Marek Lindner
0 siblings, 0 replies; 6+ messages in thread
From: Marek Lindner @ 2013-03-09 10:30 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Martin Hundebøll
On Wednesday, March 06, 2013 20:18:00 Martin Hundebøll wrote:
> Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
> ---
> README | 1 +
> man/batctl.8 | 7 ++++---
> sys.c | 7 ++++++-
> 3 files changed, 11 insertions(+), 4 deletions(-)
Applied in revision d079921.
Thanks,
Marek
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-09 10:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-06 12:17 [B.A.T.M.A.N.] [PATCH 1/3] batctl: Add NC runtime switch support Martin Hundebøll
2013-03-06 12:17 ` [B.A.T.M.A.N.] [PATCH 2/3] batctl: Add support for the NC nodes table Martin Hundebøll
2013-03-09 10:29 ` Marek Lindner
2013-03-06 12:18 ` [B.A.T.M.A.N.] [PATCH 3/3] batctl: Add support for the NC log level Martin Hundebøll
2013-03-09 10:30 ` Marek Lindner
2013-03-09 10:28 ` [B.A.T.M.A.N.] [PATCH 1/3] batctl: Add NC runtime switch support Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).