From patchwork Mon Nov 20 21:02:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 17145 X-Patchwork-Delegate: sven@narfation.org Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 2B5F682C22; Mon, 20 Nov 2017 22:03:21 +0100 (CET) Authentication-Results: open-mesh.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=narfation.org header.i=@narfation.org header.b="l8cNVfmx"; dkim-atps=neutral Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:4d88:2000:7::2; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver= Received: from v3-1039.vlinux.de (narfation.org [IPv6:2001:4d88:2000:7::2]) by open-mesh.org (Postfix) with ESMTPS id 73DEB82B0E for ; Mon, 20 Nov 2017 22:02:26 +0100 (CET) Received: from sven-desktop.home.narfation.org (p200300C593C2BCF90000000000004065.dip0.t-ipconnect.de [IPv6:2003:c5:93c2:bcf9::4065]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 0D7B61100E8; Mon, 20 Nov 2017 22:02:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1511211746; bh=DAPwd8Jybyc9eoSm855jnUjsqNIO6aIa556/rvx8ebM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l8cNVfmxyFEYl/h0x1OOCYXaRTeaumeNLvjvXx7PxiaVLZCtqfj0Ve5Eetx642F63 Ep0B9qzy805IjnHNpQX69fPgmW1U6wJbLDrR4Mq2egwyRqKWaRSWRs3pp+fNFJzvNT ghpTY9I5EtsyY/NGZKuLCCD/BRfx9Cs/86iGSh6U= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Mon, 20 Nov 2017 22:02:22 +0100 Message-Id: <20171120210223.9002-2-sven@narfation.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171120210223.9002-1-sven@narfation.org> References: <20171120210223.9002-1-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH 1/2] alfred: Convert CHANGELOG to reStructuredText X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" The current format of the file is not well defined. The reStructuredText format (as used by other batman-adv related files) has the benefit that it is similar easy to read and write. And it allows other tools to parse the content of the file and convert it in a sensible way to a different file format. Multiple git repository web-based management software also can directly render these files as properly formatted HTML output. Signed-off-by: Sven Eckelmann --- CHANGELOG | 169 ---------------------------------------------------- CHANGELOG.license | 2 - CHANGELOG.rst | 175 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 175 insertions(+), 171 deletions(-) delete mode 100644 CHANGELOG delete mode 100644 CHANGELOG.license create mode 100644 CHANGELOG.rst diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index c7018fb..0000000 --- a/CHANGELOG +++ /dev/null @@ -1,169 +0,0 @@ -alfred 2017.3: - - * reduction of memory usage when using --update-command - - -- Thu, 28 Sep 2017 13:43:18 +0200 - -alfred 2017.2: - - * reduce cpu load when rating multiple master servers - * coding style cleanups and refactoring - - -- Fri, 28 Jul 2017 13:45:50 +0200 - -alfred 2017.1: - - * (no changes) - - -- Tue, 23 May 2017 11:40:21 +0200 - -alfred 2017.0: - - * support IPv4 multicast distribution - * coding style cleanups - - -- Tue, 28 Feb 2017 17:22:49 +0100 - -alfred 2016.5: - - * support interface validity checks on systems without debugfs - * remove debugfs check during batadv-vis startup - * allow out-of-order txend packets during transmissions - - -- Thu, 15 Dec 2016 18:11:55 +0100 - -alfred 2016.4: - - * add expert option to specify sync interval - * fix various bugs in batadv-vis netlink integration - * fix build build problems with libnl-tiny - - -- Thu, 27 Oct 2016 21:22:32 +0200 - -alfred 2016.3: - - * integrate support for batman-adv netlink - - -- Thu, 01 Sep 2016 16:18:35 +0200 - -alfred 2016.2: - - * add support for automatic debugfs mount with enabled - CONFIG_ALFRED_CAPABILITIES - - -- Thu, 09 Jun 2016 16:21:19 +0200 - -alfred 2016.1: - - * add support for master servers to receive push_data packets with foreign - source addresses - * various code cleanups - * bugs squashed: - - ignore invalid EUI64 addresses - - -- Thu, 21 Apr 2016 14:09:12 +0200 - -alfred 2016.0: - - * various code and documentation cleanups - - -- Tue, 19 Jan 2016 16:44:26 +0100 - -alfred 2015.2: - - * mention libcap in the README - * Fix typos - - -- Mon, 23 Nov 2015 20:35:20 +0100 - -alfred 2015.1: - - * add support to run on interfaces with multiple link-local addresses - * various code cleanups - * bugs squashed: - - reduce of maximum payload size to always fit into UDP datagrams - - -- Tue, 04 Aug 2015 14:59:10 +0200 - -alfred 2015.0: - - * add support to call commands after data was updated - * automatic reduction of process capabilities when not needed anymore - * allow printing of the data version number in the alfred client mode - * various code cleanups - * bugs squashed: - - update of the version number when data was updated with different - version number - - tighten size check on received packet - - -- Tue, 28 Apr 2015 20:39:51 +0200 - -alfred 2014.4.0: - - * add support for multiple interfaces per master - * add support for changing interfaces on the fly - * changes to support multiple alfred interfaces: - - bind alfred to a specific interface - - allow configuring the unix socket path - * enhanced debugging - - -- Wed, 31 Dec 2014 00:40:42 +0100 - -alfred 2014.3.0: - - * fix various possible memleak, access errors and strncpy issues - * handle fcntl return codes - * fix altitude verification check in gpsd - - -- Mon, 21 Jul 2014 16:53:01 +0200 - -alfred 2014.2.0: - - * Handle EPERM errors on every sendto - * Check for changed interface properties, e.g. recreation or - changed MAC- and IPv6 addresses - - -- Thu, 15 May 2014 19:41:44 +0200 - -alfred 2014.1.0: - - * don't leak socket fd in batadv-vis - - -- Thu, 13 Mar 2014 12:10:26 +0100 - -alfred 2014.0.0: - - * add installation of the alfred-gpsd manpage - * add -lm to linker flags for libgps in alfred-gpsd - - -- Sat, 04 Jan 2014 20:17:07 +0100 - -alfred 2013.4.0: - - * add new json output format for vis - * add gps location information service for alfred - * allow network interface to vanish and return without restart - * allow to switch between master and slave operation without restart - * renamed vis to batadv-vis to avoid collisions with other vis binaries - * add manpages - * various code cleanups - * bugs squashed: - - * handle failing write() in unix sockets - * Fix crash when vis opened empty file - - -- Sun, 13 Oct 2013 22:55:43 +0200 - -alfred 2013.3.0: - - * initial release of alfred after beta (synced release cycle with - batman-adv) - * allows to share arbitrary local information over a (mesh) network - * initial support for vis (previously in-kernel feature of batman-adv - to visualize the network) included - * easy but flexible communication interface to allow data applications - of all kinds - * two-tiered architecture (master and slaves) - * exchanges data via IPv6 unicast/multicast - - -- Sun, 28 Jul 2013 18:56:52 +0200 diff --git a/CHANGELOG.license b/CHANGELOG.license deleted file mode 100644 index a55d70e..0000000 --- a/CHANGELOG.license +++ /dev/null @@ -1,2 +0,0 @@ -SPDX-License-Identifier: GPL-2.0 -License-Filename: LICENSES/preferred/GPL-2.0 diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 0000000..c559f54 --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,175 @@ +.. SPDX-License-Identifier: GPL-2.0 + +2017.3 (2017-09-28) +=================== + +* reduction of memory usage when using --update-command + + +2017.2 (2017-07-28) +=================== + +* reduce cpu load when rating multiple master servers +* coding style cleanups and refactoring + + +2017.1 (2017-05-23) +=================== + +* (no changes) + + +2017.0 (2017-02-28) +=================== + +* support IPv4 multicast distribution +* coding style cleanups + + +2016.5 (2016-12-15) +=================== + +* support interface validity checks on systems without debugfs +* remove debugfs check during batadv-vis startup +* allow out-of-order txend packets during transmissions + + +2016.4 2016-10-27) +=================== + +* add expert option to specify sync interval +* fix various bugs in batadv-vis netlink integration +* fix build build problems with libnl-tiny + + +2016.3 (2016-09-01) +=================== + +* integrate support for batman-adv netlink + + +2016.2 (2016-06-09) +=================== + +* add support for automatic debugfs mount with enabled + CONFIG_ALFRED_CAPABILITIES + + +2016.1 (2016-04-21) +=================== + +* add support for master servers to receive push_data packets with foreign + source addresses +* various code cleanups +* bugs squashed: + + - ignore invalid EUI64 addresses + + +2016.0 (2016-01-19) +=================== + +* various code and documentation cleanups + + +2015.2 (2015-11-23) +=================== + +* mention libcap in the README +* Fix typos + + +2015.1 (2015-08-04) +=================== + +* add support to run on interfaces with multiple link-local addresses +* various code cleanups +* bugs squashed: + + - reduce of maximum payload size to always fit into UDP datagrams + + +2015.0 (2015-04-28) +=================== + +* add support to call commands after data was updated +* automatic reduction of process capabilities when not needed anymore +* allow printing of the data version number in the alfred client mode +* various code cleanups +* bugs squashed: + + - update of the version number when data was updated with different + version number + - tighten size check on received packet + + +2014.4.0 (2014-12-31) +===================== + +* add support for multiple interfaces per master +* add support for changing interfaces on the fly +* changes to support multiple alfred interfaces: + + - bind alfred to a specific interface + - allow configuring the unix socket path + +* enhanced debugging + + +2014.3.0 (2014-07-21) +===================== + +* fix various possible memleak, access errors and strncpy issues +* handle fcntl return codes +* fix altitude verification check in gpsd + + +2014.2.0 (2014-05-15) +===================== + +* Handle EPERM errors on every sendto +* Check for changed interface properties, e.g. recreation or + changed MAC- and IPv6 addresses + + +2014.1.0 (2014-03-13) +===================== + +* don't leak socket fd in batadv-vis + + +2014.0.0 (2014-01-04) +===================== + +* add installation of the alfred-gpsd manpage +* add -lm to linker flags for libgps in alfred-gpsd + + +2013.4.0 (2013-10-13) +===================== + +* add new json output format for vis +* add gps location information service for alfred +* allow network interface to vanish and return without restart +* allow to switch between master and slave operation without restart +* renamed vis to batadv-vis to avoid collisions with other vis binaries +* add manpages +* various code cleanups +* bugs squashed: + + - handle failing write() in unix sockets + - Fix crash when vis opened empty file + + +2013.3.0 (2013-07-28) +===================== + +* initial release of alfred after beta (synced release cycle with + batman-adv) +* allows to share arbitrary local information over a (mesh) network +* initial support for vis (previously in-kernel feature of batman-adv + to visualize the network) included +* easy but flexible communication interface to allow data applications + of all kinds +* two-tiered architecture (master and slaves) +* exchanges data via IPv6 unicast/multicast From patchwork Mon Nov 20 21:02:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 17146 X-Patchwork-Delegate: sven@narfation.org Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 16BF382C47; Mon, 20 Nov 2017 22:03:29 +0100 (CET) Authentication-Results: open-mesh.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=narfation.org header.i=@narfation.org header.b="ZE6Yw3tC"; dkim-atps=neutral Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver= Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id 226D182B0F for ; Mon, 20 Nov 2017 22:02:27 +0100 (CET) Received: from sven-desktop.home.narfation.org (p200300C593C2BCF90000000000004065.dip0.t-ipconnect.de [IPv6:2003:c5:93c2:bcf9::4065]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id AB73A1100E8; Mon, 20 Nov 2017 22:02:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1511211746; bh=kwYqz3g5MmJFeOlwLO9Vx/wUWUmCXk8lOTr5bBcxyfk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZE6Yw3tCcI94GefBUM0Pt6lALLslOXhPpC4KUvDQ5ox+k60GQkPkUi/1eVtOQFQC+ sLh/x73qdcPa/o7UOyoErg0fFNuCNCCMXj/mcVDcOWF8pFxyGNGQRRS4j5rHWMJfF3 St5vJz9W4gnKq3rbIEuKevBFUXNHrdsFpT1EW0kc= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Mon, 20 Nov 2017 22:02:23 +0100 Message-Id: <20171120210223.9002-3-sven@narfation.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171120210223.9002-1-sven@narfation.org> References: <20171120210223.9002-1-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH 2/2] alfred: Convert README to reStructuredText X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" The current format of the file is not well defined. The reStructuredText format (as used by other batman-adv related files) has the benefit that it is similar easy to read and write. And it allows other tools to parse the content of the file and convert it in a sensible way to a different file format. Multiple git repository web-based management software also can directly render these files as properly formatted HTML output. Signed-off-by: Sven Eckelmann --- README.license | 2 - README => README.rst | 311 +++++++++++++++++++++++++++------------------------ 2 files changed, 164 insertions(+), 149 deletions(-) delete mode 100644 README.license rename README => README.rst (55%) diff --git a/README.license b/README.license deleted file mode 100644 index a55d70e..0000000 --- a/README.license +++ /dev/null @@ -1,2 +0,0 @@ -SPDX-License-Identifier: GPL-2.0 -License-Filename: LICENSES/preferred/GPL-2.0 diff --git a/README b/README.rst similarity index 55% rename from README rename to README.rst index 28f3dc9..d7446a3 100644 --- a/README +++ b/README.rst @@ -1,12 +1,17 @@ +.. SPDX-License-Identifier: GPL-2.0 + +============================================================== A.L.F.R.E.D - Almighty Lightweight Fact Remote Exchange Daemon --------------------------------------------------------------- +============================================================== + + "alfred is a user space daemon to efficiently[tm] flood the network with + useless data - like vis, weather data, network notes, etc" + + - Marek Lindner, 2012 -"alfred is a user space daemon to efficiently[tm] flood the network with - useless data - like vis, weather data, network notes, etc" - - Marek Lindner, 2012 Introduction ------------- +============ 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 @@ -24,47 +29,51 @@ information available from all alfred servers in the network. Alternatively, alfred can be configured to distribute the local information via IPv4 multicast. This is configured by setting the IPv4 multicast group address in the -4 option. + Compilation ------------ +=========== alfred depends on: - * librt (usually part of libc) - * IPv6 support in the kernel/host system - * libnl-3 - support for netlink sockets - * libnl-3-genl - support for generic netlink messages + +* librt (usually part of libc) +* IPv6 support in the kernel/host system +* libnl-3 - support for netlink sockets +* libnl-3-genl - support for generic netlink messages and optionally: - * libgps - if you want to distribute GPS information - * libcap - if you want extra security by dropping unneeded privileges -To compile alfred, simply type: +* libgps - if you want to distribute GPS information +* libcap - if you want extra security by dropping unneeded privileges + +To compile alfred, simply type:: - $ make + $ make -This will compile alfred, batadv-vis & alfred-gpsd. To install, use +This will compile alfred, batadv-vis & alfred-gpsd. To install, use:: - $ make install + $ make install (with the right privileges). -If you don't want to compile batadv-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 + $ make CONFIG_ALFRED_VIS=n + $ make CONFIG_ALFRED_VIS=n install If you don't want to compile alfred-gpsd, add the directive -CONFIG_ALFRED_GPSD=n: +CONFIG_ALFRED_GPSD=n:: + + $ make CONFIG_ALFRED_GPSD=n + $ make CONFIG_ALFRED_GPSD=n install - $ make CONFIG_ALFRED_GPSD=n - $ make CONFIG_ALFRED_GPSD=n install +If don't want to compile with libcap to drop privileges, use:: -If don't want to compile with libcap to drop privileges, use: + $ make CONFIG_ALFRED_CAPABILITIES=n + $ make CONFIG_ALFRED_CAPABILITIES=n install - $ make CONFIG_ALFRED_CAPABILITIES=n - $ make CONFIG_ALFRED_CAPABILITIES=n install Usage ------ +===== First, alfred must run as daemon (server) in background to be used. This can either be done by some init-scripts from your distribution (if you have @@ -97,14 +106,14 @@ having all nodes in master mode is possible (for maximum decentrality and overhead). To put it together, let us start alfred in master mode on our bridge br0 -(assuming that this bridge includes the batman interface bat0): +(assuming that this bridge includes the batman interface bat0):: - $ alfred -i br0 -m + $ alfred -i br0 -m Now that the server is running, let us input some data. This can be done by -using the alfred binary in client mode from the command line: +using the alfred binary in client mode from the command line:: - $ cat /etc/hostname | alfred -s 64 + $ cat /etc/hostname | alfred -s 64 This will set the hostname as data for datatype 64. Note that 0 - 63 are reserved (please send us an e-mail if you want to register a datatype), and can @@ -113,12 +122,13 @@ to assign a version to your data which can be filtered by other alfred users. Skipping the parameter entirely has the same effect as setting the parameter to 0 ('-V 0'). -After the hostname has been set on a few alfred hosts, the can be retrieved again: +After the hostname has been set on a few alfred hosts, the can be retrieved +again:: - $ alfred -r 64 -{ "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" }, + $ alfred -r 64 + { "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" }, Note that the information must be periodically written again to alfred, otherwise it will timeout and alfred will forget about it (after 10 minutes). @@ -129,8 +139,9 @@ unix sockets (client connects and talks to servers). On the other hand, "slaves" and "masters" are the roles alfred can take over in the network between different machines (slaves send information to masters). + Vis ---- +=== 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 @@ -139,98 +150,100 @@ the whole picture of the network. 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: +to let batadv-vis work:: - $ batadv-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: - $ batadv-vis -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" - } -[...] -} - -For a json line formatted output, use: - - $ 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" } -{ "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" } -[...] - -and for output where the complete document is json, use: - - $ batadv-vis -f jsondoc -{ - "source_version" : "2013.3.0-14-gcd34783", - "algorithm" : 4, - "vis" : [ - { "primary" : "fe:f0:00:00:04:01", - "neighbors" : [ - { "router" : "fe:f0:00:00:04:01", - "neighbor" : "fe:f0:00:00:05:01", - "metric" : "1.000" }, - { "router" : "fe:f0:00:00:04:01", - "neighbor" : "fe:f0:00:00:03:01", - "metric" : "1.008" } - ], - "clients" : [ - "00:00:43:05:00:04", - "fe:f1:00:00:04:01" - ] - }, - { "primary" : "fe:f0:00:00:02:01", - "neighbors" : [ - { "router" : "fe:f0:00:00:02:01", - "neighbor" : "fe:f0:00:00:03:01", - "metric" : "1.000" }, - { "router" : "fe:f0:00:00:02:01", - "neighbor" : "fe:f0:00:00:01:01", - "metric" : "1.016" }, - { "router" : "fe:f0:00:00:02:01", - "neighbor" : "fe:f0:00:00:08:01", - "metric" : "1.000" } - ], - "clients" : [ - "fe:f1:00:00:02:01", - "00:00:43:05:00:02" - ] - }, - { "primary" : "fe:f0:00:00:08:01", -[...] +To get a graphviz-compatible vis output, simply type:: + + $ batadv-vis + 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" + } + [...] + } + +For a json line formatted output, use:: + + $ 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" } + { "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" } + [...] + +and for output where the complete document is json, use:: + + $ batadv-vis -f jsondoc + { + "source_version" : "2013.3.0-14-gcd34783", + "algorithm" : 4, + "vis" : [ + { "primary" : "fe:f0:00:00:04:01", + "neighbors" : [ + { "router" : "fe:f0:00:00:04:01", + "neighbor" : "fe:f0:00:00:05:01", + "metric" : "1.000" }, + { "router" : "fe:f0:00:00:04:01", + "neighbor" : "fe:f0:00:00:03:01", + "metric" : "1.008" } + ], + "clients" : [ + "00:00:43:05:00:04", + "fe:f1:00:00:04:01" + ] + }, + { "primary" : "fe:f0:00:00:02:01", + "neighbors" : [ + { "router" : "fe:f0:00:00:02:01", + "neighbor" : "fe:f0:00:00:03:01", + "metric" : "1.000" }, + { "router" : "fe:f0:00:00:02:01", + "neighbor" : "fe:f0:00:00:01:01", + "metric" : "1.016" }, + { "router" : "fe:f0:00:00:02:01", + "neighbor" : "fe:f0:00:00:08:01", + "metric" : "1.000" } + ], + "clients" : [ + "fe:f1:00:00:02:01", + "00:00:43:05:00:02" + ] + }, + { "primary" : "fe:f0:00:00:08:01", + [...] + Alfred-gpsd ------------ +=========== Alfred-gpsd can be used to distibute GPS location information about your batman-adv mesh network. This information could be, for example, @@ -242,31 +255,32 @@ on the command line, which is useful for static nodes without a GPS. Alfred-gpsd, similar to to alfred, combines server (daemon) and client functionality in the 'alfred-gpsd' binary. The alfred-gpsd server must be started to distribute location information. When retrieving -location information from gpsd, it should be started with: +location information from gpsd, it should be started with:: - $ alfred-gpsd -s + $ alfred-gpsd -s -For a static location, use: +For a static location, use:: - $ alfred-gpsd -s -l 48.858222,2.2945,358 + $ alfred-gpsd -s -l 48.858222,2.2945,358 This server will set the location in alfred via unix socket. Obviously, the alfred server must run too to get this information set. When using gpsd, it updates alfred every 2 seconds. With a static location, the update it made every 5 minutes. -To get JSON formatted output, use: +To get JSON formatted output, use:: - $ alfred-gpsd -[ - { "source" : "f6:00:48:13:d3:1e", "tpv" : {"class":"TPV","tag":"RMC","device":"/dev/ttyACM0","mode":3,"time":"2013-10-01T10:43:20.000Z","ept":0.005,"lat":52.575485000,"lon":-1.339716667,"alt":122.500,"epx":10.199,"epy":15.720,"epv":31.050,"track":0.0000,"speed":0.010,"climb":0.000,"eps":31.44} }, - { "source" : "8e:4c:77:b3:65:b4", "tpv" : {"class":"TPV","device":"command line","time":"2013-10-01T10:43:05.129Z","lat":48.858222,"lon":2.2945,"alt":358.000000,"mode":3} } -] + $ alfred-gpsd + [ + { "source" : "f6:00:48:13:d3:1e", "tpv" : {"class":"TPV","tag":"RMC","device":"/dev/ttyACM0","mode":3,"time":"2013-10-01T10:43:20.000Z","ept":0.005,"lat":52.575485000,"lon":-1.339716667,"alt":122.500,"epx":10.199,"epy":15.720,"epv":31.050,"track":0.0000,"speed":0.010,"climb":0.000,"eps":31.44} }, + { "source" : "8e:4c:77:b3:65:b4", "tpv" : {"class":"TPV","device":"command line","time":"2013-10-01T10:43:05.129Z","lat":48.858222,"lon":2.2945,"alt":358.000000,"mode":3} } + ] See gpsd_json(5) for documentation of the tpv object. + Running alfred as non-root user -------------------------------- +=============================== Alfred currently requires special capabilities and access rights to work correctly. The user root is normally the only user having these @@ -274,25 +288,26 @@ capabilities/rights on a standard Linux system. Operations requiring special capabilities: - * bind to device - * creating the unix socket - * accessing the debugfs filesystem +* bind to device +* creating the unix socket +* accessing the debugfs filesystem The first operation can still be executed when the admin grants the special capability CAP_NET_RAW+CAP_NET_ADMIN to anyone executing the alfred binary. The unix socket can also be moved using the parameter '-u' to a different -directory which can be accessed by the user. +directory which can be accessed by the user:: - $ sudo setcap cap_net_admin,cap_net_raw+ep alfred - $ ./alfred -u alfred.sock -i eth0 + $ sudo setcap cap_net_admin,cap_net_raw+ep alfred + $ ./alfred -u alfred.sock -i eth0 The user running alfred must still be in a group which is allowed to access /sys/kernel/debugfs to correctly choose best neighbors for communication. It is possible (but not recommended) to disable the neighbor selection/prioritization using the parameter '-b none'. + License -------- +======= alfred, batadv-vis and alfred-gpsd are licensed under the terms of version 2 of the GNU General Public License (GPL). Please see the LICENSE file. @@ -303,23 +318,25 @@ programs to include this header file (e.g. for communicating with alfred via unix sockets) without enforcing the restrions of the GPL license on this third party program. + Contact -------- +======= As alfred was developed to help on batman-adv, we share communication channels. Please send us comments, experiences, questions, anything :) -IRC: #batman on irc.freenode.org -Mailing-list: b.a.t.m.a.n@lists.open-mesh.org (optional subscription - at https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n) +IRC: + #batman on irc.freenode.org +Mailing-list: + b.a.t.m.a.n@open-mesh.org (optional subscription at + https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n) -If you have test reports/patches/ideas, please read the wiki for further instruction -on how to contribute: +If you have test reports/patches/ideas, please read the wiki for further +instruction on how to contribute: https://www.open-mesh.org/projects/open-mesh/wiki/Contribute You can also contact the Authors: -Simon Wunderlich -Sven Eckelmann - +* Marek Lindner +* Simon Wunderlich