The following commit has been merged in the master branch:
commit d8ed5e0303baadffcada247e3cb8be337337da64
Author: Marek Lindner <lindner_marek(a)yahoo.de>
Date: Thu May 26 14:31:50 2011 +0200
batctl: update readme
Signed-off-by: Marek Lindner <lindner_marek(a)yahoo.de>
diff --git a/README b/README
index d11c6d3..442f8b6 100644
--- a/README
+++ b/README
@@ -18,8 +18,8 @@ settings.
How does it work ?
==================
-batctl uses the /dev/batman-adv device provided by the B.A.T.M.A.N. advanced
-kernel module to inject custom icmp packets into the data flow. That's why
+batctl uses the debugfs/batman_adv/bat0/socket device provided by the B.A.T.M.A.N.
+advanced kernel module to inject custom icmp packets into the data flow. That's why
ping and traceroute work almost like their IP based counterparts. Tcpdump was
designed because B.A.T.M.A.N. advanced encapsulates all traffic within batman
packets, so that the normal tcpdump would not recognize the packets.
@@ -30,8 +30,8 @@ The bat-hosts file
This file is simliar to the /etc/hosts file. You can write one MAC address and
one host name per line. batctl will analyze the file to find the matching MAC
-address to your provided host name. Host names are much easier to remember
-than MAC addresses. ;)
+address to your provided host name. Host names are much easier to remember than
+MAC addresses. ;)
batctl ping
@@ -45,6 +45,7 @@ options:
-h print this help
-i interval in seconds
-t timeout in seconds
+ -R record route
Example:
@@ -95,8 +96,9 @@ options:
4 - batman unicast packets
8 - batman broadcast packets
16 - batman vis packets
- 32 - non batman packets
- 33 - batman ogm & non batman packets
+ 32 - batman fragmented packets
+ 64 - non batman packets
+ 65 - batman ogm & non batman packets
Example output for tcpdump:
@@ -241,12 +243,12 @@ batctl interface
display or modify the interface settings
-Usage: batctl interface|if [none|interface]
+Usage: batctl interface|if [add|del iface(s)]
Example:
$ batctl interface
-[ active] eth0 fe:fe:00:00:01:01
+eth0: active
batctl interval
===============
@@ -270,7 +272,6 @@ Usage: batctl log|l
Example:
$ batctl log
-r)
[ 400] Received BATMAN packet via NB: fe:fe:00:00:02:01 IF: eth0 [fe:fe:00:00:01:01] (from OG: fe:fe:00:00:01:01 via prev OG: fe:fe:00:00:01:01 seqno 670, tq 245, TTL 49, V 8, IDF 1)
[ 400] Drop packet: originator packet from myself (via neighbour)
[ 400] Received BATMAN packet via NB: fe:fe:00:00:02:01 IF: eth0 [fe:fe:00:00:01:01] (from OG: fe:fe:00:00:02:01 via prev OG: fe:fe:00:00:02:01 seqno 545, tq 255, TTL 50, V 8, IDF 0)
@@ -285,15 +286,14 @@ batctl loglevel
display or modify the log level
-Usage: batctl |ll [level]
+Usage: batctl loglevel|ll [level]
Example:
$ batctl loglevel
-[x] critical (0)
-[x] warnings (1)
-[x] notices (2)
-[x] batman (4)
-[x] routes (8)
+[x] all debug output disabled (0)
+[ ] messages related to routing / flooding / broadcasting (1)
+[ ] messages related to route or hna added / changed / deleted (2)
+[ ] all debug messages (3)
batctl aggregation
==================
@@ -334,18 +334,17 @@ Globally announced TT entries received via the mesh (translation table):
* 86:4b:b2:d2:00:00 via fe:fe:00:00:07:01
* ca:a1:5b:e5:00:00 via fe:fe:00:00:06:01
-batctl vis_server
+batctl vis_mode
=================
display or modify the status of the VIS server
-Usage: batctl vis_server|vs [enabled|disabled]
+Usage: batctl vis_mode|vm [mode]
Example:
-$ batctl vis_server
-[x] client mode (server disabled)
-[ ] server mode (server enabled)
+$ batctl vis_mode
+client
batctl vis_data
@@ -410,7 +409,7 @@ vis-dot to png
--------------
The vis dot output could then further be converted to an image of the topology
-graph, e.g. with the help of the graphviz-tools. The according commands could
+graph, e.g. with the help of the graphviz-tools. The according commands could
then look like this:
$ batctl vis_data dot > /tmp/graph.dot
--
batctl
The following commit has been merged in the master branch:
commit 3e7fe2ecb85e6f1f94b6fdf9d344931c267898f1
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Tue May 10 11:22:37 2011 +0200
batman-adv: Ensure that we really have route changes in update_route
The debug output of update_route has tests for "route deleted" and "route
added". All other situations are handled as "route changed". This is not
true because neigh_node and curr_router could be both NULL.
The function is not called in this situation, but the code might be
interpreted wrong when reading it without this test.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/routing.c b/routing.c
index 90ae6f0..368ceeb 100644
--- a/routing.c
+++ b/routing.c
@@ -108,7 +108,7 @@ static void update_route(struct bat_priv *bat_priv, struct orig_node *orig_node,
tt_buff, tt_buff_len);
/* route changed */
- } else {
+ } else if (neigh_node && curr_router) {
bat_dbg(DBG_ROUTES, bat_priv,
"Changing route towards: %pM "
"(now via %pM - was via %pM)\n",
--
batman-adv
The following commit has been merged in the master branch:
commit 9ca5b445d066e804467f442810b7d2ecd23ca376
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat May 21 14:28:17 2011 +0200
batctl: Introduce PREFIX as standard installation prefix
cmake and configure (generated by autotools) use a prefix configuration
which is by default /usr/local to define to which all other paths are
relative to. SBINDIR is then defined as $PREFIX/sbin but can also be
redefined.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/Makefile b/Makefile
index b5aa6ca..7ac72ed 100755
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@
# 02110-1301, USA
#
-# batctl build and install configuration
+# batctl build
BINARY_NAME = batctl
OBJ = main.o bat-hosts.o functions.o sys.o debug.o ping.o traceroute.o tcpdump.o list-batman.o hash.o vis.o debugfs.o bisect.o
@@ -46,7 +46,8 @@ COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
LINK.o = $(Q_LD)$(CC) $(LDFLAGS) $(TARGET_ARCH)
# standard install paths
-SBINDIR = /usr/sbin
+PREFIX = /usr/local
+SBINDIR = $(PREFIX)/sbin
# try to generate revision
REVISION = $(shell if [ -d .git ]; then echo $$(git describe --always --dirty 2> /dev/null || echo "[unknown]"); fi)
--
batctl