[linux-merge]linux integration; annotated tag, v3.12-rc3, created. v3.12-rc3
by postmaster@open-mesh.org
The annotated tag, v3.12-rc3 has been created
at 59ca6c45dd68f79fc0470aafcf98fc64efc0d24d (tag)
tagging 15c03dd4859ab16f9212238f29dd315654aa94f6 (commit)
replaces v3.12-rc2
tagged by Linus Torvalds
on Sun Sep 29 15:02:47 2013 -0700
- Shortlog ------------------------------------------------------------
Linux 3.12-rc3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
iQEcBAABAgAGBQJSSKOHAAoJEHm+PkMAQRiGeREH/3EqHmJPBzmVoJwR9/ykDoLg
u+TJTkuxZG220WhgXS7W/0ECyBX0U7yA0bY9PZbqgcdiLjY0veR18/pOhEq5RzHq
ub8Q+AJdiORF/sq268q7gnNmy3rSCgnrAyHA/bzBtkbisYODwZPYvWQVUjgNZ2dW
qtW/TE9rjANcUrk8WdOu9oWcwsq4cyG3cscbfHE/JLFy/8tB5GoD158gxKLZsLXk
uTCeUHMmvFRT56fZwfyvNstA8ozxXcHBmuu6+Ttceky2zeGzp6dOrd+d2SU1Ps3O
P91x4e/Af4RFEwDczGP6TpSBEf/J/JaqrM1drjhnQHho0hrNRZVUXhADFVADCXY=
=dOjB
-----END PGP SIGNATURE-----
-----------------------------------------------------------------------
--
linux integration
9 years, 4 months
[batman-adv] next: Merge branch 'maint' into next (17a6a8c)
by postmaster@open-mesh.org
Repository : ssh://git@open-mesh.org/batman-adv
On branch : next
>---------------------------------------------------------------
commit 17a6a8c33c602fd9b495f5878895449e62361b6f
Merge: 4e1f729 586cf84
Author: Marek Lindner <mareklindner(a)neomailbox.ch>
Date: Mon Sep 30 23:20:26 2013 +0800
Merge branch 'maint' into next
Conflicts:
network-coding.c
network-coding.h
>---------------------------------------------------------------
17a6a8c33c602fd9b495f5878895449e62361b6f
main.c | 5 +++--
network-coding.c | 28 ++++++++++++++++++----------
network-coding.h | 14 ++++++++++----
3 files changed, 31 insertions(+), 16 deletions(-)
diff --cc main.c
index 21c6a01,c8e0671..c51a5e5
--- a/main.c
+++ b/main.c
@@@ -165,8 -161,10 +166,8 @@@ void batadv_mesh_free(struct net_devic
batadv_purge_outstanding_packets(bat_priv, NULL);
- batadv_vis_quit(bat_priv);
-
batadv_gw_node_purge(bat_priv);
- batadv_nc_free(bat_priv);
+ batadv_nc_mesh_free(bat_priv);
batadv_dat_free(bat_priv);
batadv_bla_free(bat_priv);
diff --cc network-coding.c
index 173a96e,4ecc0b6..351e199
--- a/network-coding.c
+++ b/network-coding.c
@@@ -45,63 -59,10 +59,63 @@@ static void batadv_nc_start_timer(struc
}
/**
+ * batadv_nc_tvlv_container_update - update the network coding tvlv container
+ * after network coding setting change
+ * @bat_priv: the bat priv with all the soft interface information
+ */
+static void batadv_nc_tvlv_container_update(struct batadv_priv *bat_priv)
+{
+ char nc_mode;
+
+ nc_mode = atomic_read(&bat_priv->network_coding);
+
+ switch (nc_mode) {
+ case 0:
+ batadv_tvlv_container_unregister(bat_priv, BATADV_TVLV_NC, 1);
+ break;
+ case 1:
+ batadv_tvlv_container_register(bat_priv, BATADV_TVLV_NC, 1,
+ NULL, 0);
+ break;
+ }
+}
+
+/**
+ * batadv_nc_status_update - update the network coding tvlv container after
+ * network coding setting change
+ * @net_dev: the soft interface net device
+ */
+void batadv_nc_status_update(struct net_device *net_dev)
+{
+ struct batadv_priv *bat_priv = netdev_priv(net_dev);
+ batadv_nc_tvlv_container_update(bat_priv);
+}
+
+/**
+ * batadv_nc_tvlv_ogm_handler_v1 - process incoming nc tvlv container
+ * @bat_priv: the bat priv with all the soft interface information
+ * @orig: the orig_node of the ogm
+ * @flags: flags indicating the tvlv state (see batadv_tvlv_handler_flags)
+ * @tvlv_value: tvlv buffer containing the gateway data
+ * @tvlv_value_len: tvlv buffer length
+ */
+static void batadv_nc_tvlv_ogm_handler_v1(struct batadv_priv *bat_priv,
+ struct batadv_orig_node *orig,
+ uint8_t flags,
+ void *tvlv_value,
+ uint16_t tvlv_value_len)
+{
+ if (flags & BATADV_TVLV_HANDLER_OGM_CIFNOTFND)
+ orig->capabilities &= ~BATADV_ORIG_CAPA_HAS_NC;
+ else
+ orig->capabilities |= BATADV_ORIG_CAPA_HAS_NC;
+}
+
+/**
- * batadv_nc_init - initialise coding hash table and start house keeping
+ * batadv_nc_mesh_init - initialise coding hash table and start house keeping
* @bat_priv: the bat priv with all the soft interface information
*/
- int batadv_nc_init(struct batadv_priv *bat_priv)
+ int batadv_nc_mesh_init(struct batadv_priv *bat_priv)
{
bat_priv->nc.timestamp_fwd_flush = jiffies;
bat_priv->nc.timestamp_sniffed_purge = jiffies;
@@@ -1784,14 -1730,11 +1793,13 @@@ free_nc_packet
}
/**
- * batadv_nc_free - clean up network coding memory
+ * batadv_nc_mesh_free - clean up network coding memory
* @bat_priv: the bat priv with all the soft interface information
*/
- void batadv_nc_free(struct batadv_priv *bat_priv)
+ void batadv_nc_mesh_free(struct batadv_priv *bat_priv)
{
- batadv_recv_handler_unregister(BATADV_CODED);
+ batadv_tvlv_container_unregister(bat_priv, BATADV_TVLV_NC, 1);
+ batadv_tvlv_handler_unregister(bat_priv, BATADV_TVLV_NC, 1);
cancel_delayed_work_sync(&bat_priv->nc.work);
batadv_nc_purge_paths(bat_priv, bat_priv->nc.coding_hash, NULL);
diff --cc network-coding.h
index d2f110c,ddfa618..d4fd315
--- a/network-coding.h
+++ b/network-coding.h
@@@ -22,9 -22,9 +22,10 @@@
#ifdef CONFIG_BATMAN_ADV_NC
+void batadv_nc_status_update(struct net_device *net_dev);
- int batadv_nc_init(struct batadv_priv *bat_priv);
- void batadv_nc_free(struct batadv_priv *bat_priv);
+ int batadv_nc_init(void);
+ int batadv_nc_mesh_init(struct batadv_priv *bat_priv);
+ void batadv_nc_mesh_free(struct batadv_priv *bat_priv);
void batadv_nc_update_nc_node(struct batadv_priv *bat_priv,
struct batadv_orig_node *orig_node,
struct batadv_orig_node *orig_neigh_node,
@@@ -47,11 -47,7 +48,11 @@@ int batadv_nc_init_debugfs(struct batad
#else /* ifdef CONFIG_BATMAN_ADV_NC */
+static inline void batadv_nc_status_update(struct net_device *net_dev)
+{
+}
+
- static inline int batadv_nc_init(struct batadv_priv *bat_priv)
+ static inline int batadv_nc_init(void)
{
return 0;
}
9 years, 4 months
[batman-adv] maint: batman-adv: set up network coding packet handlers during module init (586cf84)
by postmaster@open-mesh.org
Repository : ssh://git@open-mesh.org/batman-adv
On branch : maint
>---------------------------------------------------------------
commit 586cf84b0ce6f9e8faa95e5f435de4be49a7eb88
Author: Matthias Schiffer <mschiffer(a)universe-factory.net>
Date: Fri Sep 27 18:03:39 2013 +0200
batman-adv: set up network coding packet handlers during module init
batman-adv saves its table of packet handlers as a global state, so handlers
must be set up only once (and setting them up a second time will fail).
The recently-added network coding support tries to set up its handler each time
a new softif is registered, which obviously fails when more that one softif is
used (and in consequence, the softif creation fails).
Fix this by splitting up batadv_nc_init into batadv_nc_init (which is called
only once) and batadv_nc_mesh_init (which is called for each softif); in
addition batadv_nc_free is renamed to batadv_nc_mesh_free to keep naming
consistent.
Signed-off-by: Matthias Schiffer <mschiffer(a)universe-factory.net>
Signed-off-by: Marek Lindner <mareklindner(a)neomailbox.ch>
>---------------------------------------------------------------
586cf84b0ce6f9e8faa95e5f435de4be49a7eb88
main.c | 5 +++--
network-coding.c | 28 ++++++++++++++++++----------
network-coding.h | 14 ++++++++++----
3 files changed, 31 insertions(+), 16 deletions(-)
diff --git a/main.c b/main.c
index 08125f3..c8e0671 100644
--- a/main.c
+++ b/main.c
@@ -61,6 +61,7 @@ static int __init batadv_init(void)
batadv_recv_handler_init();
batadv_iv_init();
+ batadv_nc_init();
batadv_event_workqueue = create_singlethread_workqueue("bat_events");
@@ -138,7 +139,7 @@ int batadv_mesh_init(struct net_device *soft_iface)
if (ret < 0)
goto err;
- ret = batadv_nc_init(bat_priv);
+ ret = batadv_nc_mesh_init(bat_priv);
if (ret < 0)
goto err;
@@ -163,7 +164,7 @@ void batadv_mesh_free(struct net_device *soft_iface)
batadv_vis_quit(bat_priv);
batadv_gw_node_purge(bat_priv);
- batadv_nc_free(bat_priv);
+ batadv_nc_mesh_free(bat_priv);
batadv_dat_free(bat_priv);
batadv_bla_free(bat_priv);
diff --git a/network-coding.c b/network-coding.c
index a487d46..4ecc0b6 100644
--- a/network-coding.c
+++ b/network-coding.c
@@ -35,6 +35,20 @@ static int batadv_nc_recv_coded_packet(struct sk_buff *skb,
struct batadv_hard_iface *recv_if);
/**
+ * batadv_nc_init - one-time initialization for network coding
+ */
+int __init batadv_nc_init(void)
+{
+ int ret;
+
+ /* Register our packet type */
+ ret = batadv_recv_handler_register(BATADV_CODED,
+ batadv_nc_recv_coded_packet);
+
+ return ret;
+}
+
+/**
* batadv_nc_start_timer - initialise the nc periodic worker
* @bat_priv: the bat priv with all the soft interface information
*/
@@ -45,10 +59,10 @@ static void batadv_nc_start_timer(struct batadv_priv *bat_priv)
}
/**
- * batadv_nc_init - initialise coding hash table and start house keeping
+ * batadv_nc_mesh_init - initialise coding hash table and start house keeping
* @bat_priv: the bat priv with all the soft interface information
*/
-int batadv_nc_init(struct batadv_priv *bat_priv)
+int batadv_nc_mesh_init(struct batadv_priv *bat_priv)
{
bat_priv->nc.timestamp_fwd_flush = jiffies;
bat_priv->nc.timestamp_sniffed_purge = jiffies;
@@ -70,11 +84,6 @@ int batadv_nc_init(struct batadv_priv *bat_priv)
batadv_hash_set_lock_class(bat_priv->nc.coding_hash,
&batadv_nc_decoding_hash_lock_class_key);
- /* Register our packet type */
- if (batadv_recv_handler_register(BATADV_CODED,
- batadv_nc_recv_coded_packet) < 0)
- goto err;
-
INIT_DELAYED_WORK(&bat_priv->nc.work, batadv_nc_worker);
batadv_nc_start_timer(bat_priv);
@@ -1721,12 +1730,11 @@ free_nc_packet:
}
/**
- * batadv_nc_free - clean up network coding memory
+ * batadv_nc_mesh_free - clean up network coding memory
* @bat_priv: the bat priv with all the soft interface information
*/
-void batadv_nc_free(struct batadv_priv *bat_priv)
+void batadv_nc_mesh_free(struct batadv_priv *bat_priv)
{
- batadv_recv_handler_unregister(BATADV_CODED);
cancel_delayed_work_sync(&bat_priv->nc.work);
batadv_nc_purge_paths(bat_priv, bat_priv->nc.coding_hash, NULL);
diff --git a/network-coding.h b/network-coding.h
index 85a4ec8..ddfa618 100644
--- a/network-coding.h
+++ b/network-coding.h
@@ -22,8 +22,9 @@
#ifdef CONFIG_BATMAN_ADV_NC
-int batadv_nc_init(struct batadv_priv *bat_priv);
-void batadv_nc_free(struct batadv_priv *bat_priv);
+int batadv_nc_init(void);
+int batadv_nc_mesh_init(struct batadv_priv *bat_priv);
+void batadv_nc_mesh_free(struct batadv_priv *bat_priv);
void batadv_nc_update_nc_node(struct batadv_priv *bat_priv,
struct batadv_orig_node *orig_node,
struct batadv_orig_node *orig_neigh_node,
@@ -46,12 +47,17 @@ int batadv_nc_init_debugfs(struct batadv_priv *bat_priv);
#else /* ifdef CONFIG_BATMAN_ADV_NC */
-static inline int batadv_nc_init(struct batadv_priv *bat_priv)
+static inline int batadv_nc_init(void)
{
return 0;
}
-static inline void batadv_nc_free(struct batadv_priv *bat_priv)
+static inline int batadv_nc_mesh_init(struct batadv_priv *bat_priv)
+{
+ return 0;
+}
+
+static inline void batadv_nc_mesh_free(struct batadv_priv *bat_priv)
{
return;
}
9 years, 4 months
[alfred] master: alfred: Don't fail rebuild when header is removed (133331a)
by postmaster@open-mesh.org
Repository : ssh://git@open-mesh.org/alfred
On branch : master
>---------------------------------------------------------------
commit 133331a3dc2e3011de6d4db70feb11544c47cb1b
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat Sep 21 16:31:14 2013 +0200
alfred: Don't fail rebuild when header is removed
The *.d depends files for make just list the files used when building an object
file. Removing a file listed in such a dependency file causes make to search
for a way to recreate it. This usually cannot work because these files aren't
autogenerated.
The gcc option -MP can be used to generate empty rule for these files. Removing
a file in a dependency list will then execute this empty rule and continue with
the execution of the creation of the object file. This compilation process will
then automatically correct the dependency file.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
>---------------------------------------------------------------
133331a3dc2e3011de6d4db70feb11544c47cb1b
Makefile | 2 +-
vis/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index aeee2e8..ec9dc11 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ BINARY_NAME = alfred
OBJ = main.o server.o client.o netsock.o send.o recv.o hash.o unix_sock.o util.o debugfs.o batadv_query.o
# alfred flags and options
-CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD
+CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP
LDLIBS += -lrt
# disable verbose output
diff --git a/vis/Makefile b/vis/Makefile
index 8585f9a..9bf72c9 100644
--- a/vis/Makefile
+++ b/vis/Makefile
@@ -23,7 +23,7 @@ BINARY_NAME = vis
OBJ = vis.o debugfs.o
# alfred flags and options
-CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD
+CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP
LDLIBS += -lrt
# disable verbose output
9 years, 4 months
[alfred] master: alfred: Rename vis to batadv-vis (ada988e)
by postmaster@open-mesh.org
Repository : ssh://git@open-mesh.org/alfred
On branch : master
>---------------------------------------------------------------
commit ada988e6a0626ea1f5261bc00dd508d54a872c8f
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat Sep 21 16:31:16 2013 +0200
alfred: Rename vis to batadv-vis
The name vis is to ambiguous and already taken by the batmand vis server.
Distributions like Gentoo or OpenWrt would have a conflict between these
packages just because they share a common name. This makes the situation
unnecessary complex.
A better name may also help an user to find this tool.
Reported-by: Braden Aran <bradenaran(a)gmail.com>
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
>---------------------------------------------------------------
ada988e6a0626ea1f5261bc00dd508d54a872c8f
README | 27 ++++++++++++++-------------
vis/Makefile | 6 +++---
vis/vis.c | 2 +-
3 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/README b/README
index a9013f4..50c36ad 100644
--- a/README
+++ b/README
@@ -33,13 +33,13 @@ To compile alfred, simply type:
$ make
-This will compile both alfred and vis. To install, use
+This will compile both alfred and batadv-vis. To install, use
$ make install
(with the right privileges).
-If you don't want to compile vis, add the directive CONFIG_ALFRED_VIS=n:
+If you don't want to compile batadv-vis, add the directive CONFIG_ALFRED_VIS=n:
$ make CONFIG_ALFRED_VIS=n
$ make CONFIG_ALFRED_VIS=n install
@@ -113,22 +113,23 @@ machines (slaves send information to masters).
Vis
---
-Vis can be used to visualize your batman-adv mesh network. It read the neighbor
-information and local client table and distributes this information via alfred
-in the network. By gathering this local information, any vis node can get the
-whole picture of the network.
+batadv-vis can be used to visualize your batman-adv mesh network. It read the
+neighbor information and local client table and distributes this information via
+alfred in the network. By gathering this local information, any vis node can get
+the whole picture of the network.
-Vis, similar to to alfred, combines server (daemon) and client functionality in
-the 'vis' binary. The vis server must be started to let vis work:
+batadv-vis, similar to to alfred, combines server (daemon) and client
+functionality in the 'batadv-vis' binary. The batadv-vis server must be started
+to let batadv-vis work:
- $ vis -i bat0 -s
+ $ batadv-vis -i bat0 -s
This server will read the neighbor and client information from batman-adv every
10 seconds and set it in alfred via unix socket. Obviously, the alfred server
must run too to get this information set.
To get a graphviz-compatible vis output, simply type:
- $ vis
+ $ batadv-vis
digraph {
subgraph "cluster_fe:f0:00:00:04:01" {
"fe:f0:00:00:04:01"
@@ -153,7 +154,7 @@ digraph {
For a json formatted output, use:
- $ vis -f json
+ $ batadv-vis -f json
{ "primary" : "fe:f0:00:00:04:01" }
{ "router" : "fe:f0:00:00:04:01", "neighbor" : "fe:f0:00:00:05:01", "label" : "1.000" }
{ "router" : "fe:f0:00:00:04:01", "neighbor" : "fe:f0:00:00:03:01", "label" : "1.008" }
@@ -171,8 +172,8 @@ For a json formatted output, use:
License
-------
-alfred and vis are licensed under the terms of version 2 of the GNU General
-Public License (GPL). Please see the LICENSE file.
+alfred and batadv-vis are licensed under the terms of version 2 of the GNU
+General Public License (GPL). Please see the LICENSE file.
The file "packet.h" is an exception and not licensed with the GPL. Instead,
it is licensed using ISC license (see the head of this file). This allows
diff --git a/vis/Makefile b/vis/Makefile
index bd83877..4db27d9 100644
--- a/vis/Makefile
+++ b/vis/Makefile
@@ -18,11 +18,11 @@
# 02110-1301, USA
#
-# alfred build
-BINARY_NAME = vis
+# batadv-vis build
+BINARY_NAME = batadv-vis
OBJ = vis.o debugfs.o
-# alfred flags and options
+# batadv-vis flags and options
CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP
LDLIBS += -lrt
diff --git a/vis/vis.c b/vis/vis.c
index 36ea7fe..ad7f530 100644
--- a/vis/vis.c
+++ b/vis/vis.c
@@ -608,7 +608,7 @@ static int vis_get_data(struct globals *globals)
static void vis_usage(void)
{
- printf("Usage: vis [options]\n");
+ printf("Usage: batadv-vis [options]\n");
printf(" -i, --interface specify the batman-adv interface configured on the system (default: bat0)\n");
printf(" -s, --server start up in server mode, which regularly updates vis data from batman-adv\n");
printf(" -f, --format <format> specify the output format for client mode (either \"json\" or \"dot\")\n");
9 years, 4 months
[alfred] master: alfred: Fix version number for git builds of vis (add63f6)
by postmaster@open-mesh.org
Repository : ssh://git@open-mesh.org/alfred
On branch : master
>---------------------------------------------------------------
commit add63f6ba4f934e12591726fd773d50a0c58527f
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat Sep 21 16:31:15 2013 +0200
alfred: Fix version number for git builds of vis
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
>---------------------------------------------------------------
add63f6ba4f934e12591726fd773d50a0c58527f
vis/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vis/Makefile b/vis/Makefile
index 9bf72c9..bd83877 100644
--- a/vis/Makefile
+++ b/vis/Makefile
@@ -49,7 +49,7 @@ PREFIX = /usr/local
SBINDIR = $(PREFIX)/sbin
# try to generate revision
-REVISION= $(shell if [ -d .git ]; then \
+REVISION= $(shell if [ -d ../.git ]; then \
echo $$(git describe --always --dirty --match "v*" |sed 's/^v//' 2> /dev/null || echo "[unknown]"); \
fi)
ifneq ($(REVISION),)
9 years, 4 months
[alfred] master: alfred: Add manpage stubs (ea03057)
by postmaster@open-mesh.org
Repository : ssh://git@open-mesh.org/alfred
On branch : master
>---------------------------------------------------------------
commit ea03057cc34e1968fa114c3c9a03c4d6953fb2e2
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat Sep 21 16:31:17 2013 +0200
alfred: Add manpage stubs
manpages are a soft requirement for many distributions and it is a nice feature
for the end users. The stubs are only the restructured version of the README
but provides a start for more useful manpages.
Reported-by: Braden Aran <bradenaran(a)gmail.com>
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
>---------------------------------------------------------------
ea03057cc34e1968fa114c3c9a03c4d6953fb2e2
Makefile | 4 ++
man/alfred.8 | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++
vis/Makefile | 4 ++
vis/man/batadv-vis.8 | 116 ++++++++++++++++++++++++++++++++++++++++++
4 files changed, 260 insertions(+)
diff --git a/Makefile b/Makefile
index ec9dc11..7b13d7b 100644
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,7 @@
# alfred build
BINARY_NAME = alfred
OBJ = main.o server.o client.o netsock.o send.o recv.o hash.o unix_sock.o util.o debugfs.o batadv_query.o
+MANPAGE = man/alfred.8
# alfred flags and options
CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP
@@ -47,6 +48,7 @@ LINK.o = $(Q_LD)$(CC) $(CFLAGS) $(LDFLAGS) $(TARGET_ARCH)
# standard install paths
PREFIX = /usr/local
SBINDIR = $(PREFIX)/sbin
+MANDIR = $(PREFIX)/share/man
# try to generate revision
REVISION= $(shell if [ -d .git ]; then \
@@ -79,7 +81,9 @@ clean: $(VIS_CLEAN)
install: $(BINARY_NAME) $(VIS_INSTALL)
$(MKDIR) $(DESTDIR)$(SBINDIR)
+ $(MKDIR) $(DESTDIR)$(MANDIR)/man8
$(INSTALL) -m 0755 $(BINARY_NAME) $(DESTDIR)$(SBINDIR)
+ $(INSTALL) -m 0644 $(MANPAGE) $(DESTDIR)$(MANDIR)/man8
vis-install:
$(MAKE) -C vis install
diff --git a/man/alfred.8 b/man/alfred.8
new file mode 100644
index 0000000..5eb48aa
--- /dev/null
+++ b/man/alfred.8
@@ -0,0 +1,136 @@
+.\" Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH "ALFRED" "8" "Sep 21, 2013" "Linux" "Almighty Lightweight Fact Remote Exchange Daemon"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.\" --------------------------------------------------------------------------
+.\" Process this file with
+.\" groff -man alfred.8 -Tutf8
+.\" Retrieve format warnings with
+.\" man --warnings alfred.8 > /dev/null
+.\" --------------------------------------------------------------------------
+.ad l
+.SH NAME
+alfred \- Almighty Lightweight Fact Remote Exchange Daemon
+.SH SYNOPSIS
+.B alfred [\fIoptions\fP]
+.br
+.SH DESCRIPTION
+alfred is a user space daemon for distributing arbitrary local information over
+the mesh/network in a decentralized fashion. This data can be anything which
+appears to be useful - originally designed to replace the batman-adv
+visualization (vis), you may distribute hostnames, phone books, administration
+information, DNS information, the local weather forecast ...
+.PP
+alfred runs as daemon in the background of the system. A user may insert
+information by using the alfred binary on the command line, or use special
+programs to communicate with alfred (done via unix sockets). alfred then takes
+care of distributing the local information to other alfred servers on other
+nodes. This is done via IPv6 link-local multicast, and does not require any
+configuration. A user can request data from alfred, and will receive the
+information available from all alfred servers in the network.
+.PP
+.PP
+.SH OPTIONS
+.TP
+\fB\-v\fP, \fB\-\-version\fP
+Print the version
+.TP
+\fB\-h\fP, \fB\-\-help\fP
+Display a brief help message.
+.
+.SH CLIENT OPTIONS
+.TP
+\fB\-s\fP, \fB\-\-set\-data\fP \fIdata\-type\fP
+Sets new data to distribute from stdin for the supplied data type (0\-255).
+
+Note that 0 - 63 are reserved (please send an e-mail to the authors if you want
+to register a datatype), and can not be used on the commandline. Information
+must be periodically written again to alfred, otherwise it will timeout and
+alfred will forget about it (after 10 minutes).
+.TP
+\fB\-r\fP, \fB\-\-request\fP \fIdata\-type\fP
+Collect data from the network and prints it on the network
+.TP
+\fB\-V\fP, \fB\-\-req\-version\fP \fIversion\fP
+Specify the data version set for \fB\-s\fP
+
+Skipping the parameter entirely has the same effect as setting the parameter
+to 0 ('\fB\-V\fP 0').
+.TP
+\fB\-M\fP, \fB\-\-modeswitch\fP \fImode\fP
+.nf
+\fBmaster\fP
+ Switch daemon to mode master
+\fBslave\fP
+ Switch daemon to mode slave
+.fi
+.
+.SH SERVER OPTIONS
+.TP
+\fB\-i\fP, \fB\-\-interface\fP \fiface\fP
+Specify the interface to listen on
+.TP
+\fB\-b\fP \fIbatmanif\fP
+Specify the batman-adv interface configured on the system (default: bat0).
+Use 'none' to disable the batman-adv based best server selection.
+
+The \fB\-b\fP option is optional, and only needed if you run alfred on a
+batman-adv interface not called bat0, or if you don't use batman-adv at all
+(use '\fB\-b\fP none'). In this case, alfred will still work but will not be
+able to find the best next master server based on metrics.
+.TP
+\fB\-m\fP, \fB\-\-master\fP
+Start up the daemon in master mode, which accepts data from slaves and synces
+it with other masters.
+
+alfred servers may either run as master or slave in the network. Masters will
+announce their status via broadcast, so that slaves can find them. Slaves will
+then send their data to their nearest master (based on TQ). Masters will
+exchange their data (which they have received from slaves or got on their own)
+with other masters. By using masters and slaves, overhead can be reduced while
+still keeping redundancy (by having multiple masters). Obviously, at least one
+master must be present in the network to let any data exchange happen. Also
+having all nodes in master mode is possible (for maximum decentrality and
+overhead).
+.
+.SH EXAMPLES
+Start an alfred server listening on bridge br0 (assuming that this bridge
+includes the batman interface bat0):
+.br
+\fB alfred \-i br0 \-m\fP
+.br
+
+Send data to the alfred server and store it under id 65:
+.br
+\fB cat /etc/hostname | alfred -s 65\fP
+
+Retreive all data stored as id 65 from all connected alfred servers:
+.br
+\fB alfred -r 65\fP
+.nf
+ { "fe:f1:00:00:01:01", "OpenWRT\-node\-1\\x0a" },
+ { "fe:f1:00:00:02:01", "OpenWRT\-node\-2\\x0a" },
+ { "fe:f1:00:00:03:01", "OpenWRT\-node\-3\\x0a" },
+.fi
+.br
+.
+.SH SEE ALSO
+.BR batadv-vis (8),
+.BR batctl (8)
+.SH AUTHOR
+alfred was written by Simon Wunderlich <siwu(a)hrz.tu-chemnitz.de> and Sven Eckelmann <sven(a)open-mesh.com>.
+.PP
+This manual page was written by Simon Wunderlich <siwu(a)hrz.tu-chemnitz.de> and Sven Eckelmann <sven(a)open-mesh.com>.
diff --git a/vis/Makefile b/vis/Makefile
index 4db27d9..586c1cd 100644
--- a/vis/Makefile
+++ b/vis/Makefile
@@ -21,6 +21,7 @@
# batadv-vis build
BINARY_NAME = batadv-vis
OBJ = vis.o debugfs.o
+MANPAGE = man/batadv-vis.8
# batadv-vis flags and options
CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP
@@ -47,6 +48,7 @@ LINK.o = $(Q_LD)$(CC) $(CFLAGS) $(LDFLAGS) $(TARGET_ARCH)
# standard install paths
PREFIX = /usr/local
SBINDIR = $(PREFIX)/sbin
+MANDIR = $(PREFIX)/share/man
# try to generate revision
REVISION= $(shell if [ -d ../.git ]; then \
@@ -72,7 +74,9 @@ clean:
install: $(BINARY_NAME)
$(MKDIR) $(DESTDIR)$(SBINDIR)
+ $(MKDIR) $(DESTDIR)$(MANDIR)/man8
$(INSTALL) -m 0755 $(BINARY_NAME) $(DESTDIR)$(SBINDIR)
+ $(INSTALL) -m 0644 $(MANPAGE) $(DESTDIR)$(MANDIR)/man8
# load dependencies
DEP = $(OBJ:.o=.d)
diff --git a/vis/man/batadv-vis.8 b/vis/man/batadv-vis.8
new file mode 100644
index 0000000..dfa2604
--- /dev/null
+++ b/vis/man/batadv-vis.8
@@ -0,0 +1,116 @@
+.\" Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH "BATADV-VIS" "8" "Sep 21, 2013" "Linux" "batman-adv visualization server"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.\" --------------------------------------------------------------------------
+.\" Process this file with
+.\" groff -man batadv-vis.8 -Tutf8
+.\" Retrieve format warnings with
+.\" man --warnings batadv-vis.8 > /dev/null
+.\" --------------------------------------------------------------------------
+.ad l
+.SH NAME
+batadv\-vis \- batman-adv visualization server
+.SH SYNOPSIS
+.B batadv\-vis [\fIoptions\fP]
+.br
+.SH DESCRIPTION
+batadv\-vis can be used to visualize your batman-adv mesh network. It read the
+neighbor information and local client table and distributes this information via
+alfred in the network. By gathering this local information, any vis node can get
+the whole picture of the network.
+.PP
+.PP
+.SH OPTIONS
+.TP
+\fB\-v\fP, \fB\-\-version\fP
+Print the version
+.TP
+\fB\-h\fP, \fB\-\-help\fP
+Display a brief help message.
+.TP
+\fB\-i\fP, \fB\-\-interface\fP \fIiface\fP
+Specify the batman-adv interface configured on the system (default: bat0)
+.TP
+\fB\-s\fP, \fB\-\-server\fP
+Start up in server mode. This server will read the neighbor and client
+information from batman-adv every 10 seconds and set it in alfred via unix
+socket. The alfred server must run too to get this information set.
+.TP
+\fB\-f\fP, \fB\-\-format\fP \fIformat\fP
+Specify the output format for client mode (either "json" or "dot")
+.
+.SH EXAMPLES
+Start an batadv\-vis server which is fetching the information for bat0:
+.br
+\fB batadv\-vis \-i bat0 \-s\fP
+.br
+
+To get a graphviz-compatible vis output:
+.br
+\fB batadv-vis\fP
+.nf
+ digraph {
+ subgraph "cluster_fe:f0:00:00:04:01" {
+ "fe:f0:00:00:04:01"
+ }
+ "fe:f0:00:00:04:01" -> "fe:f0:00:00:05:01" [label="1.000"]
+ "fe:f0:00:00:04:01" -> "fe:f0:00:00:03:01" [label="1.004"]
+ "fe:f0:00:00:04:01" -> "00:00:43:05:00:04" [label="TT"]
+ "fe:f0:00:00:04:01" -> "fe:f1:00:00:04:01" [label="TT"]
+ subgraph "cluster_fe:f0:00:00:02:01" {
+ "fe:f0:00:00:02:01"
+ }
+ "fe:f0:00:00:02:01" -> "fe:f0:00:00:03:01" [label="1.000"]
+ "fe:f0:00:00:02:01" -> "fe:f0:00:00:01:01" [label="1.008"]
+ "fe:f0:00:00:02:01" -> "fe:f0:00:00:08:01" [label="1.000"]
+ "fe:f0:00:00:02:01" -> "fe:f1:00:00:02:01" [label="TT"]
+ "fe:f0:00:00:02:01" -> "00:00:43:05:00:02" [label="TT"]
+ subgraph "cluster_fe:f0:00:00:08:01" {
+ "fe:f0:00:00:08:01"
+ }
+ [...]
+ }
+.fi
+.br
+
+To get a json vis output:
+.br
+\fB batadv-vis -f json\fP
+.nf
+ { "primary" : "fe:f0:00:00:04:01" }
+ { "router" : "fe:f0:00:00:04:01", "neighbor" : "fe:f0:00:00:05:01", "label" : "1.000" }
+ { "router" : "fe:f0:00:00:04:01", "neighbor" : "fe:f0:00:00:03:01", "label" : "1.008" }
+ { "router" : "fe:f0:00:00:04:01", "gateway" : "00:00:43:05:00:04", "label" : "TT" }
+ { "router" : "fe:f0:00:00:04:01", "gateway" : "fe:f1:00:00:04:01", "label" : "TT" }
+ { "primary" : "fe:f0:00:00:02:01" }
+ { "router" : "fe:f0:00:00:02:01", "neighbor" : "fe:f0:00:00:03:01", "label" : "1.000" }
+ { "router" : "fe:f0:00:00:02:01", "neighbor" : "fe:f0:00:00:01:01", "label" : "1.016" }
+ { "router" : "fe:f0:00:00:02:01", "neighbor" : "fe:f0:00:00:08:01", "label" : "1.000" }
+ { "router" : "fe:f0:00:00:02:01", "gateway" : "fe:f1:00:00:02:01", "label" : "TT" }
+ { "router" : "fe:f0:00:00:02:01", "gateway" : "00:00:43:05:00:02", "label" : "TT" }
+ { "primary" : "fe:f0:00:00:08:01" }
+ [...]
+.fi
+.br
+.
+.SH SEE ALSO
+.BR alfred (8),
+.BR batctl (8)
+.SH AUTHOR
+batadv\-vis was written by Simon Wunderlich <siwu(a)hrz.tu-chemnitz.de>.
+.PP
+This manual page was written by Simon Wunderlich <siwu(a)hrz.tu-chemnitz.de> and Sven Eckelmann <sven(a)open-mesh.com>.
9 years, 4 months
[batctl] next: batctl tcpdump: Fix reported length of TCP payload (e374a3f)
by postmaster@open-mesh.org
Repository : ssh://git@open-mesh.org/batctl
On branch : next
>---------------------------------------------------------------
commit e374a3fe9b40903591ba8049195fb9327a086ea9
Author: Marco Dalla Torre <marco.dallato(a)gmail.com>
Date: Sat Sep 21 17:05:07 2013 +0200
batctl tcpdump: Fix reported length of TCP payload
Fixes the erratic report of TCP payload length in 'batctl tcpdump'.
Previously TCP header length size was considered fixed, while
this is actually not the case given the variable length (or no
presence at all) of the options field.
Signed-off-by: Marco Dalla Torre <marco.dallato(a)gmail.com>
Signed-off-by: Marek Lindner <mareklindner(a)neomailbox.ch>
>---------------------------------------------------------------
e374a3fe9b40903591ba8049195fb9327a086ea9
tcpdump.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tcpdump.c b/tcpdump.c
index a220c3c..8f39ac0 100644
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -198,6 +198,7 @@ static void dump_ip(unsigned char *packet_buff, ssize_t buff_len, int time_print
struct tcphdr *tcphdr;
struct udphdr *udphdr, *tmp_udphdr;
struct icmphdr *icmphdr;
+ uint16_t tcp_header_len;
iphdr = (struct iphdr *)packet_buff;
LEN_CHECK((size_t)buff_len, (size_t)(iphdr->ihl * 4), "IP");
@@ -261,16 +262,18 @@ static void dump_ip(unsigned char *packet_buff, ssize_t buff_len, int time_print
break;
case IPPROTO_TCP:
- LEN_CHECK((size_t)buff_len - (iphdr->ihl * 4), sizeof(struct tcphdr), "TCP");
-
tcphdr = (struct tcphdr *)(packet_buff + (iphdr->ihl * 4));
+ tcp_header_len = tcphdr->doff * 4;
+ LEN_CHECK((size_t)buff_len - (iphdr->ihl * 4),
+ (size_t)tcp_header_len, "TCP");
+
printf("IP %s.%i > ", inet_ntoa(*(struct in_addr *)&iphdr->saddr), ntohs(tcphdr->source));
printf("%s.%i: TCP, flags [%c%c%c%c%c%c], length %zu\n",
inet_ntoa(*(struct in_addr *)&iphdr->daddr), ntohs(tcphdr->dest),
(tcphdr->fin ? 'F' : '.'), (tcphdr->syn ? 'S' : '.'),
(tcphdr->rst ? 'R' : '.'), (tcphdr->psh ? 'P' : '.'),
(tcphdr->ack ? 'A' : '.'), (tcphdr->urg ? 'U' : '.'),
- (size_t)buff_len - (iphdr->ihl * 4) - sizeof(struct tcphdr));
+ (size_t)buff_len - (iphdr->ihl * 4) - tcp_header_len);
break;
case IPPROTO_UDP:
LEN_CHECK((size_t)buff_len - (iphdr->ihl * 4), sizeof(struct udphdr), "UDP");
9 years, 4 months
[batman-adv] master's head updated: batman-adv: remove accidentally re-introduced unicast.c file (4e1f729)
by postmaster@open-mesh.org
Repository : ssh://git@open-mesh.org/batman-adv
Branch 'master' now includes:
75b99c8 batman-adv: fix wrong kernel doc
96cebef batman-adv: no need for return in void functions
a5aa462 batman-adv: fix orig capabilities numbering
4e458f4 batman-adv: fix orig capabilities numbering (NetCod)
8b3e7b9 batman-adv: fix usage and declaration of batadv_bandwidth_units
b34050b batman-adv: make gw_init() return void
390858d batman-adv: properly format kernel doc
e65bb36 batman-adv: send GW_DEL event in case of soft-iface destruction
4e1f729 batman-adv: remove accidentally re-introduced unicast.c file
9 years, 4 months