--- batmand-0.3.orig/debian/compat +++ batmand-0.3/debian/compat @@ -0,0 +1 @@ +5 --- batmand-0.3.orig/debian/watch +++ batmand-0.3/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts="uversionmangle=s/-(alpha|beta|rc)/~$1/" \ + http://downloads.open-mesh.net/batman/stable/sources/batman-(\d+).(.*).tar.gz --- batmand-0.3.orig/debian/batmand.8 +++ batmand-0.3/debian/batmand.8 @@ -0,0 +1,140 @@ +.\" 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 batmand 8 "Sep 2007" +.\" 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 insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.TH "batmand" 8 +.SH NAME +batmand \- better approach to mobile ad\(hyhoc networking +.SH SYNOPSIS +.B batmand +.RI [ options ] interface [ interface ... ] +.br +.SH DESCRIPTION +.B B.A.T.M.A.N +means better approach to mobile ad\(hyhoc networking, this is a new routing protocol for multi\(hyhop ad\(hyhoc mesh networks. Go to http://open\-mesh.net/batman to get more information. +.PP +The following document will explain how to use the \fBbatman daemon\fP. +.PP +The batmand binary can be run in 2 different ways. First you need to start the daemon with "batmand [options] interface" (daemon mode) and then you can connect to that daemon to issue further commands with "batmand \-c [options]" (client mode). Some of the options below are always available, some are not. See the example section to get an idea. +.SH OPTIONS +.TP +.B \-a announce network(s) +The daemon announces the availability of a connection to another network. This option can be used multiple times and is only available in daemon mode. The parameter has to be in the form of ip\(hyaddress/netmask. +.TP +.B \-b run debug connection in batch mode +The debug information are updated after a period of time by default, so if you use "\-b" it will execute once and then stop. This option is useful for script integration of the debug output and is only available in client mode together with "\-d 1" or "\-d 2". +.TP +.B \-c connect via unix socket +Use this option to switch to client mode. +.TP +.B \-d debug level +The debug level can be set to five values. +.RS 17 +default: 0 \-> debug disabled +.RE +.RS 10 +allowed values: 1 \-> list neighbors +.RE +.RS 25 + 2 \-> list gateways + 3 \-> observe batman + 4 \-> observe batman (verbose) + 5 \-> memory debug / cpu usage +.RE +.RS 7 +Note that debug level 5 can be disabled at compile time. +.RE +.TP +.B \-g gateway class +The gateway class is used to tell other nodes in the network your available internet bandwidth. Just enter any number (optionally followed by "kbit" or "mbit") and the daemon will guess your appropriate gateway class. Use "/" to seperate the down\(hy and upload rates. You can omit the upload rate and batmand will assume an upload of download / 5. +.RS 17 +default: 0 \-> gateway disabled +.RE +.RS 10 +allowed values: 5000 +.RE +.RS 25 + 5000kbit + 5mbit + 5mbit/1024 + 5mbit/1024kbit + 5mbit/1mbit +.RE +.TP +.B \-h short help +.TP +.B \-H verbose help +.TP +.B \-o orginator interval in ms +A node transmits broadcast messages (we call them originator message or OGM) to inform the neighboring nodes about it's existence. +Originator interval is the time to wait after sending one message and before sending the next message. The default value is 1000 ms (1 second). +In a mobile network, you may want to detect network changes very quickly, so you need to send message very often, for example, use a value of 500 ms. +In a static network, you can save bandwidth by using a higher value. +This option is only available in daemon mode. +.TP +.B \-p preferred gateway +Set the internet gateway by yourself. Note: This automatically switches your daemon to "internet search modus" with "\-r 1" unless "\-r" is given. If the preferred gateway is not found the gateway selection will use the current routing class to choose a gateway. +.TP +.B \-r routing class +The routing class can be set to four values \(hy it enables "internet search modus". The deamon will choose an internet gateway based on certain criteria (unless "\-p" is specified): +.RS 17 +default: 0 \-> set no default route +.RE +.RS 10 +allowed values: 1 \-> use fast connection +.RE +.RS 25 + 2 \-> use stable connection + 3 \-> use fast\(hyswitch connection +.RE +.RS 7 +In level 1, B.A.T.M.A.N tries to find the best available connection by watching the uplinks throughput and the link quality. +In level 2, B.A.T.M.A.N compares the link quality of the internet node and chooses the one with the best connection. +In level 3, B.A.T.M.A.N compares the link quality of the internet node and chooses the one with the best connection but switches to another gateway as soon as a better connection is found. +.RE +.TP +.B \-s visualization server +Since no topology database is computed by the protocol an additional solution to create topology graphs has been implemented, the vis server. Batman daemons may send their local view about their single\(hyhop neighbors to the vis server. It collects the information and provides data in a format similar to OLSR's topology information output. Therefore existing solutions to draw topology graphs developed for OLSR can be used to visualize mesh\(hyclouds using B.A.T.M.A.N. +.TP +.B \-v print version +.TP +.B \-\-no\-policy\-routing +This option disables the policy routing feature of batmand \(hy no policy rules and special throw or unreachable routing entries are created. Firmware and package maintainers can use this option to tightly integrate batmand into their own routing policies. This option is only available in daemon mode. +.SH EXAMPLES +.TP +.B batmand eth1 wlan0:test +Start batman daemon on interface "eth1" and on alias interface "wlan0:test" +.TP +.B batmand \-o 2000 \-a 192.168.100.1/32 \-a 10.0.0.0/24 eth1 +Start batman daemon on interface "eth1" with originator interval of 2000 ms while announcing 192.168.100.1 and 10.0.0.0/24. +.TP +.B batmand \-s 192.168.1.1 \-d 1 eth1 +Start batman daemon on interface "eth1", sending topology information to 192.168.1.1 and with debug level 1 (does not fork into the background). +.TP +.B batmand eth1 && batmand \-c \-d 1 \-b +Start batman daemon on interface "eth1". Connect in client mode to get the debug level 1 output once (batch mode). +.TP +.B batmand \-g 2000kbit/500kbit eth1 && batmand \-c \-r 1 +Start batman daemon on interface "eth1" as internet gateway. Connect in client mode to disable the internet gateway and enable internet search mode. +.br +.SH SEE ALSO +There is also a HOWTO from WesleyTsai available as a pdf at: +.IR "http://open\-mesh.net/batman/documentation/batmand_howto.pdf" +.SH AUTHOR +batmand was written by Marek Lindner , Axel Neumann , Stefan Sperling , Corinna 'Elektra' Aichele , Thomas Lopatic , Felix Fietkau , Ludger Schmudde , Simon Wunderlich , Andreas Langer . +.PP +This manual page was written by Wesley Tasi , +for the Debian GNU/Linux system. --- batmand-0.3.orig/debian/batmand.init +++ batmand-0.3/debian/batmand.init @@ -0,0 +1,67 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: batmand +# Required-Start: networking ifupdown $local_fs +# Required-Stop: $local_fs +# Default-Start: S +# Default-Stop: 0 6 +# Short-Description: /etc/init.d/batmand: start batmand +### END INIT INFO + +# Based on skeleton script written by Miquel van Smoorenburg . +# Modified for Debian +# by Ian Murdock . +# Modified for olsrd +# by Holger Levsen +# Modified for batmand +# by Wesley Tsai +# +# Version: 21-Dec-2006 +# modified: 18-Sep-2007 + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/batmand +NAME=batmand +DESC=batmand + +test -x $DAEMON || exit 0 + +# Include batmand defaults if available +if [ -f /etc/default/batmand ] ; then + . /etc/default/batmand +fi + +set -e + +case "$1" in + debug) + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_OPTS & + echo "$NAME." + ;; + start) + if [ "$START_BATMAND" != "YES" ] ; then exit 0 ; fi + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_OPTS & + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + killall -q $DAEMON || true + echo "$NAME." + ;; + restart|force-reload) + echo -n "Restarting $DESC: " + killall -q $DAEMON || true + sleep 1 + start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_OPTS + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {debug|start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 --- batmand-0.3.orig/debian/manpages +++ batmand-0.3/debian/manpages @@ -0,0 +1 @@ +debian/batmand.8 --- batmand-0.3.orig/debian/copyright +++ batmand-0.3/debian/copyright @@ -0,0 +1,51 @@ +B.A.T.M.A.N. was downloaded from: http://downloads.open-mesh.net/batman/ + +Upstream Authors / B.A.T.M.A.N. contributors: + Marek Lindner , + Axel Neumann , + Stefan Sperling , + Corinna 'Elektra' Aichele , + Thomas Lopatic , + Felix Fietkau , + Ludger Schmudde , + Simon Wunderlich , + Andreas Langer + +Copyright (C) 2006 B.A.T.M.A.N. contributors + +This program is free software; you can redistribute it and/or +modify it under the terms of version 2 of the GNU General Public +License as published by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301, USA + +On Debian systems, the full text of the GPL2 is also available at +/usr/share/common-licenses/GPL-2 + +--------------------------------------------------------------------- + +The file list.h was taken from the linux headers, is copyrighted by +Linus Torvalds and others and is also licenced under the GPL2. + +On Debian systems, the full text of the GPL is also available at +/usr/share/common-licenses/GPL-2 + +--------------------------------------------------------------------- + +The Debian packaging is (C) 2007, Wesley Tsai +and Holger Levsen and is licensed under the GPL2, +either version 2 of the License, or (at your option) any later version. + +see `/usr/share/common-licenses/GPL-2'. + +It was initially debianized by Wesley Tsai on +Fri, 7 Sep 2007 20:04:44 +0800. + --- batmand-0.3.orig/debian/README.Debian +++ batmand-0.3/debian/README.Debian @@ -0,0 +1,85 @@ +This is taken from B.A.T.M.A.N's website: +https://dev.open-mesh.net/svn/batman/trunk/batman/INSTALL +========================================================= + + ( This documentation is actually for the stable batman-0.2.x branch. + However, the main steps described here for compilation and usage should + be almost the same for the currently unstable 0.3.x branch. + There is also a very nice HOWTO from Wesley available as a pdf at: + http://open-mesh.net/batman/documentation/batmand_howto.pdf ) + +Usage +===== + +Make sure you have no firewall running that is blocking UDP +port 1966 (originator messages), port 1967 (HNA messages). +Port 1968 has to be open for incoming UDP traffic if you run the +B.A.T.M.A.N. visualization server. + +First the network interfaces supposed to participate +in the batman mesh must be configured properly. Assuming you +are already running olsr on interface eth1 with the IP address +104.1.12.123/8 and now want to run batman in parallel to olsr +on the same physical interface but with a 105.1.12.123/8 IP/netmask. + + $ ifconfig eth1:bat 105.1.12.123 netmask 255.0.0.0 broadcast 105.255.255.255 + $ batmand -d 3 eth1:bat + +This will configure an alias interface on top of eth1 named eth1:bat and start +the batman daemon with debug level 3 on that alias interface. As soon as +another running batmand (with the same netmask and broadcast address) is +connected to that link (or within the range of the wireless link) +both batman daemons should see each other and indicate this in the debug output. + +The daemon started with debug level 3 can be terminated with ctrl-c. +If no debuglevel is given at startup, using + +$ batmand eth1:bat + +the daemon will immediateley fork to the background (as is the usual behavior +of a daemon). However you can always connect to the main daemon (running +in background) by launching a client-batmand process with the +-c and -d option, where the number represents the desired +debug-level. The following command will connect to a running batmand +process providing debug-level 1 informations. + +$ batmand -c -d 1 # shows a list of other nodes in the mesh + +$ batmand -c -d 2 # shows a list of nodes offering internet GW access + +$ route -n # shows your current routing table as modified by batmand + +For a full list of supported debug-levels and other startup options see + + $ batmand -h # providing a brief summary of options and + + $ batmand -H # for a more detailed list of options + +Use ctrl-c to terminate a process running in foreground and + +$ killall batmand + +to terminate the main batmand daemon running in background. + +If you want to use one of the batman-internet gateways showed with +debug-level 2 launch the main batmand using: + + $ batmand -r 3 eth1:bat # to automatically select a reasonable GW + + $ batmand -r 3 -p eth1:bat # to set a preferred GW + +In case of success this will setup a tunnel to a (preferred) batman-gw-node +and configure the routing table that all packets matching the default route +are forwarded (tunneled) respectively. +More information is available using the -h and -H options. + + + + +Happy routing! + +The B.A.T.M.A.N. contributors + +=================================================================== + + -- Wesley Tsai Fri, 7 Sep 2007 20:04:44 +0800 --- batmand-0.3.orig/debian/changelog +++ batmand-0.3/debian/changelog @@ -0,0 +1,51 @@ +batmand (0.3-2) unstable; urgency=low + + * The thanks to Sven Eckelmann release! (All patches in this upload where + provided by him, I just wrote this changelog :-) + * Bump standards version to 3.8.0, no changes needed, added breaks to + Uploaders: anyway. (Closes: #497158) + * batmand.8: turn minus signs into hyphens, or escape them properly. + (Closes: #497159) + * Add a watch file. (Closes: #497157) + + -- Holger Levsen Sat, 25 Oct 2008 15:11:56 +0200 + +batmand (0.3-1) unstable; urgency=low + + * New upstream version. + * Remove debian/patches and build-dependency on dpatch + * Change maintainer email address. + + -- Holger Levsen Fri, 23 May 2008 15:44:24 +0200 + +batmand (0.3~r875-1) experimental; urgency=low + + * new upstream version (current svn from stable development branch) + * upgraded to policy 3.7.3, no changes requiered + * add description to 01_makefile.dpatch + + -- Holger Levsen Wed, 26 Dec 2007 17:02:18 +0000 + +batmand (0.2-2) unstable; urgency=low + + * debian/copyright: fixed the link for batmands licence pointing to the full + text of the GPL2 + * debian/copyright: relicenced the packaging to be GPL2 or (at your option) + any later version - Wesleys agreement to this per + <6f0dd0c00711252021t66b848b5i57078175aee5c248@mail.gmail.com> + + -- Holger Levsen Mon, 26 Nov 2007 09:10:49 +0000 + +batmand (0.2-1) unstable; urgency=low + + [ Wesley Tsai ] + * Initial release (Closes: #405588) + + [ Holger Levsen ] + * put Wesley and myself into uploaders and batmand@packages.qa.d. as + maintainer + * added Vcs-* and Homepage: headers to debian/control + * debian/rules: removed unused dh_ examples, don't ignore make clean error + * debian/copyright: mention list.h explicitly + + -- Holger Levsen Fri, 23 Nov 2007 23:38:28 +0000 --- batmand-0.3.orig/debian/batmand-default +++ batmand-0.3/debian/batmand-default @@ -0,0 +1,28 @@ +# Defaults for batmand initscript +# sourced by /etc/init.d/batmand +# installed at /etc/default/batmand by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +# +# uncomment the next line run olsrd automatically at startup +# +#START_BATMAND="YES" + +# +# debuglevel from 1 (=quiet) to 9 (=max debug) +# for running from init.d 0 is recommended +# +DEBUGLEVEL=0 + +# Set your interface(s) here. +# If you have more interfaces, then you just add them behind the first. +# +#INTERFACES="eth1 eth2" +# +# "command-line options" +# +DAEMON_OPTS="-d $DEBUGLEVEL $INTERFACES" + --- batmand-0.3.orig/debian/control +++ batmand-0.3/debian/control @@ -0,0 +1,29 @@ +Source: batmand +Section: net +Priority: extra +Maintainer: Debian B.A.T.M.A.N maintainers +Uploaders: Wesley Tsai , + Holger Levsen +Build-Depends: debhelper (>= 5) +Standards-Version: 3.8.0 +Homepage: http://open-mesh.net/batman +Vcs-Svn: svn://svn.debian.org/svn/collab-maint/deb-maint/batmand +Vcs-Browser: http://svn.debian.org/wsvn/collab-maint/deb-maint/batmand + +Package: batmand +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: better approach to mobile adhoc networking + B.A.T.M.A.N. (better approach to mobile ad-hoc networking) is a new + routing protocol for multi-hop ad-hoc mesh networks. + . + The approach of the B.A.T.M.A.N algorithm is to divide the knowledge + about the best end-to-end paths between nodes in the mesh to all + participating nodes. Each node perceives and maintains only the + information about the best next hop towards all other nodes. Thereby + the need for a global knowledge about local topology changes becomes + unnecessary. Additionally, an event-based but timeless flooding + mechanism prevents the accruement of contradicting topology + information and limits the amount of topology messages flooding the + mesh. The algorithm is designed to deal with networks that are based + on unreliable links. --- batmand-0.3.orig/debian/rules +++ batmand-0.3/debian/rules @@ -0,0 +1,88 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +INSTALL=/usr/bin/install + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +configure: configure-stamp + +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + #docbook-to-man debian/batmand.sgml > batmand.1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/batmand. + $(MAKE) INSTALL_PREFIX=$(CURDIR)/debian/batmand install + $(INSTALL) -m 0644 -D $(CURDIR)/debian/batmand-default $(CURDIR)/debian/batmand/etc/default/batmand + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs CHANGELOG + dh_installdocs + dh_installexamples +# dh_install + dh_installinit + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure