debian/0000755000000000000000000000000012142116334007163 5ustar debian/get-orig-source.sh0000755000000000000000000000124112142116334012533 0ustar #! /bin/sh
set -e
if [ -z "$DIR" ]; then
DIR=batmand
fi
if [ -z "$OWNER" ]; then
OWNER=
fi
# try to download source package
if [ "$1" != "snapshot" ]; then
uscan --verbose --force-download
else
MODULE=$(echo "${OWNER}/${DIR}" | sed 's/^\/*//')
TMP="`mktemp -t -d`"
git clone --bare "git://git.open-mesh.org/${MODULE}.git" "${TMP}"
REV="$(git --git-dir "${TMP}" describe --long master | sed -e 's/^v*//' -e 's/-/+/g')"
LONGREV="$(git --git-dir "${TMP}" rev-parse master)"
TARNAME="${DIR}_${REV}.orig.tar"
echo "${LONGREV}"
git --git-dir "${TMP}" archive --format=tar --prefix="${DIR}-${REV}/" master -o "${TARNAME}"
gzip -n -f "${TARNAME}"
rm -rf "${TMP}"
fi
debian/rules0000755000000000000000000000201512142116334010241 0ustar #!/usr/bin/make -f
# -*- makefile -*-
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -fdata-sections -ffunction-sections
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--gc-sections
REVISION=$(shell dpkg-parsechangelog|grep '^Version: '|sed 's/^Version:\s*//')
MAKEOPTIONS = V="1" REVISION="debian-$(REVISION)" PREFIX="/usr" LTO=1
INSTALL=/usr/bin/install
DBG_PACKAGE=$(shell dpkg-parsechangelog|grep '^Source: '|sed 's/^Source:\s*//')-dbg
binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep:
dh $@ --parallel --list-missing
get-orig-source:
$(CURDIR)/debian/get-orig-source.sh
override_dh_auto_build:
dh_auto_build -- $(MAKEOPTIONS)
override_dh_auto_install:
dh_auto_install -- $(MAKEOPTIONS)
override_dh_strip:
dh_strip -a --dbg-package="$(DBG_PACKAGE)"
.PHONY: binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep \
get-orig-source override_dh_auto_build override_dh_auto_install override_dh_strip
debian/gbp.conf0000644000000000000000000000005712142116334010604 0ustar [DEFAULT]
pristine-tar = True
sign-tags = True
debian/changelog0000644000000000000000000002616712142116334011051 0ustar batmand (0.3.2-14) unstable; urgency=low
* Fix Email address of Andreas Langer in debian/copyright
* debian/patches:
- Add dead_links.patch, Fix dead links in documentation
- Add email_addresses.patch, Fix Email addresses as requested by
Andreas Langer
-- Sven Eckelmann Tue, 07 May 2013 08:18:59 +0200
batmand (0.3.2-13) unstable; urgency=low
* Update debian/copyright
* Upgraded to policy 3.9.4, no changes required
* Remove obsolete DM-Upload-Allowed in debian/control
* debian/patches:
- Add define_gnu_source.patch, Define _GNU_SOURCE for all POSIX target
source files (Closes: #703540)
- Add lto.patch, Enable Link-time optimization for smaller binaries
- Add strict-aliasing.patch, Disable strict-aliasing to avoid triggering
aliasing problems
* debian/rules:
- Enable link-time optimization
- Enable garbage collection of sections
-- Sven Eckelmann Sun, 05 May 2013 12:40:58 +0200
batmand (0.3.2-12) unstable; urgency=low
* Update URL in debian/watch
* Update copyright years in debian/copyright
* Enable all hardening flags in debian/rules
* Upgraded to policy 3.9.3, no changes required
* Upgrade debhelper compat to v9
* Let debhelper set the buildflags implicitly
-- Sven Eckelmann Sat, 28 Apr 2012 11:38:43 +0200
batmand (0.3.2-11) unstable; urgency=low
* Update Vcs-* fields to new anonscm.debian.org URLs in debian/control
* Mark all targets in debian/rules as phony
* Remove hardening-includes which are now integrated in dpkg-
buildflags
* Use debian packaging manual URL as format identifier in
debian/copyright
* Let dh_installinit handle the installation of /etc/default/batmand
* debian/patches:
- Add non_parallel_build.patch, Don't start parallel build for
environments disallowing it
- Add build_rules.patch, Use make like build rules to support all
flags provided through dpkg-buildflags
- Add install_manpage.patch, Directly install manpage by build script
- Add version_info.patch, Allow to add debian revision to the version
string
-- Sven Eckelmann Sun, 11 Dec 2011 14:09:48 +0100
batmand (0.3.2-10) unstable; urgency=low
* debian/patches:
- Add ftbfs_secondbuild.patch, Fix FTBFS on second build attempt
- Add man_spelling_errors.patch, Fix spelling errors in manpage
- Remove unnecessary netdevice_ops.patch, nonblock_ioctl.patch,
outoftree_kbuild.patch
* Upgraded to policy 3.9.2, no changes required
* Remove support for the gateway kernel module due to missing upstream
maintenance
- Eliminate batmand-gateway-source and batmand-gateway-dkms from
debian/control
- Delete source preparation from debian/rules
- Remove module-assistent input files control.modules.in and
postinst.modules.in
- Remove dkms script batmand-gateway-dkms.dkms
* Switch to dh for debian/rules
* Fix paths in lintian init.d-script-possible-missing-stop override
-- Sven Eckelmann Fri, 20 May 2011 21:06:16 +0200
batmand (0.3.2-9) unstable; urgency=low
* Upload to unstable
* Keep dependencies on separate lines in debian/control
* debian/copyright:
- Update to DEP5 revision 164
- Update copyright years
-- Sven Eckelmann Sun, 06 Feb 2011 11:46:58 +0100
batmand (0.3.2-8) experimental; urgency=low
* Updated my maintainer e-mail address
* debian/patches:
- Add nonblock_ioctl.patch, Use non-blocking ioctl to fix FTBFS with linux
>= 2.6.35 (Closes LP: #690722)
-- Sven Eckelmann Wed, 15 Dec 2010 21:35:10 +0100
batmand (0.3.2-7) experimental; urgency=low
* Upgraded to policy 3.9.1, no changes required
* Upgrade debhelper compat to v8
* set *FLAGS using dpkg-buildflags in debian/rules to work like
dpkg-buildpackage when called directly
* debian/control:
- Correct unusual spacing in Maintainer field
- Use hardening-includes for CFLAGS and LDFLAGS hardened builds
* Change upstream domain to open-mesh.org
-- Sven Eckelmann Thu, 23 Sep 2010 13:25:00 +0200
batmand (0.3.2-6) unstable; urgency=low
* debian/copyright: Update copyright years
* Remove outdated README.source
* Convert to 3.0 (quilt) source format
* Use dh_dkms to provide DKMS support
* debian/control:
- Upgraded to policy 3.9.0, no changes required
- Build only on linux due dependencies on the linux routing code
-- Sven Eckelmann Mon, 28 Jun 2010 22:43:59 +0200
batmand (0.3.2-5) unstable; urgency=low
* Remove shlibs:Depends for binary packages without shared libs dependencies
* Add missing ${misc:Depends} debhelper for batmand-gateway-source
* Use dkms postinst script for batmand-gateway-dkms (Closes LP: #497149)
* Correct spelling errors found by lintian
-- Sven Eckelmann Wed, 13 Jan 2010 23:32:26 +0100
batmand (0.3.2-4) unstable; urgency=low
* Correct description of debian/patches/netdevice_ops.patch
* Reformat debian/control
* Provide batmand-gateway-dkms package that uses DKMS to dynamically build
modules for the local kernel
* Recommend either batmand-gateway-dkms or batmand-gateway-modules for batmand
in debian/control
-- Sven Eckelmann Tue, 20 Oct 2009 17:19:15 +0200
batmand (0.3.2-3) unstable; urgency=low
[ Sven Eckelmann ]
* debian/patches:
- Change to dep3 patch tagging guidelines
- Remove number before patches as order is given by debian/patches/series
* Remove inactive maintainer Wesley Tsai from Uploaders in debian/control
* Override Lintian warning init.d-script-possible-missing-stop as sendsigs
will kill the daemon more efficiently
[ Petter Reinholdtsen ]
* Correct runlevels and dependencies in init.d LSB header (Closes: #548306)
* Add batmand.postinst to recover from incorrect init.d script headers in
previous versions
-- Sven Eckelmann Sat, 03 Oct 2009 17:49:25 +0200
batmand (0.3.2-2) unstable; urgency=low
* Upgraded to policy 3.8.3, no changes required
* debian/patches:
- Add 101-netdevice_ops.patch, fix compilation against linux-2.6.31
(Closes: #534629)
* Recommend batmand-gateway-modules and only suggest batmand-gateway-source
* Add README.source with information about patch management
-- Sven Eckelmann Fri, 11 Sep 2009 01:06:25 +0200
batmand (0.3.2-1) unstable; urgency=low
* New Upstream Version
* Remove upstream merged batmand manpage
* Remove olsr references from /etc/default/batmand
* debian/patches:
- Update 100-outoftree_kbuild.patch, only activate linux26 type of
module building
* debian/rules:
- Use the kernel makefiles directly to build the module to match
linux-modules-extra-2.6 way of building it
* debian/control:
- Add bzip2 Depend-Indep for batmand-gateway-source
- Allow Debian Maintainers to upload new versions of batmand
* Convert debian/copyright to new dep5 version
-- Sven Eckelmann Sat, 13 Jun 2009 08:49:10 +0200
batmand (0.3.1-3) unstable; urgency=low
* Upgraded to policy 3.8.1, no changes required
* Move batmand-gateway-* to new section kernel
* Add package batmand-dbg with debug symbols
* debian/control: Move Vcs-* to git.debian.org
* Install kernel module source tarball to batmand-gateway.tar.bz2 instead of
batmand-gateway-source.tar.bz2
* Add quilt as patch system to debian/rules
* debian/patches:
- Add 100-outoftree-kbuild.patch - Allow out of tree module build for
linux-modules-extra-2.6
-- Sven Eckelmann Fri, 10 Apr 2009 00:47:07 +0200
batmand (0.3.1-2) unstable; urgency=low
* debian/copyright:
- Correctly state that batmand is available under version 2 of the GPL
only. Thanks to Frank Lichtenheld for spotting
this while reviewing NEW.
-- Holger Levsen Thu, 26 Mar 2009 17:57:54 +0100
batmand (0.3.1-1) unstable; urgency=low
[ Sven Eckelmann ]
* New upstream release.
* Generate package for B.A.T.M.A.N. gateway linux kernel module
* debian/rules:
- Let dh_clean (>= 7) delete top level *-stamp files
- Replace deprecated dh_clean -k with dh_prep
- Remove unused configure target
- Run debhelper in binary-arch only for arch dependent targets
- Use CFLAGS from dpkg-buildpackage
* debian/control:
- Correct Upstream URL
- Add myself as uploader
- Recommend batmand by batmand-gateway-(source|modules)
* debian/copyright:
- Convert copyright to new machine readable copyright format
- Update copyright years
- Remove list.h as special copyright case due to removal
- Add new copyright holders Antoine van Gelder and myself
* Correct URLs to documents in upstream
* Correct URL in debian/watch to match newer releases
[ Holger Levsen ]
* Gladly accept the patches by Sven :-)
* debian/control: batmand-gateway-modules can only be a suggests,
-source is recommended.
* debian/copyright: add small paragraphs about the rights granted by the GPL.
-- Holger Levsen Sat, 14 Mar 2009 17:04:43 +0100
batmand (0.3-3) unstable; urgency=low
* Replace looping maintainer address batmand@packages.d.o with mine.
-- Holger Levsen Sat, 29 Nov 2008 18:54:54 +0000
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
debian/batmand.install0000644000000000000000000000005612142116334012162 0ustar usr/sbin/batmand
usr/share/man/man8/batmand.8
debian/batmand.postinst0000644000000000000000000000047512142116334012404 0ustar #!/bin/sh
set -e
# Recover from incorrect init.d script headers in version 0.3.2-2 and earlier
if [ "$1" = "configure" ] && dpkg --compare-versions "$2" le "0.3.2-2" \
&& [ -f /etc/rcS.d/S[0-9][0-9]batmand ] \
&& ! [ -f /etc/rc2.d/S[0-9][0-9]batmand ] ; then
update-rc.d -f batmand remove
fi
#DEBHELPER#
debian/source/0000755000000000000000000000000012142116334010463 5ustar debian/source/format0000644000000000000000000000001412142116334011671 0ustar 3.0 (quilt)
debian/watch0000644000000000000000000000021412142116334010211 0ustar version=3
opts="uversionmangle=s/-(alpha|beta|rc)/~$1/" \
http://downloads.open-mesh.org/batman/stable/sources/batmand/batmand-(.*).tar.gz
debian/control0000644000000000000000000000315412142116334010571 0ustar Source: batmand
Section: net
Priority: extra
Maintainer: Holger Levsen
Uploaders: Sven Eckelmann
Standards-Version: 3.9.4
Homepage: http://www.open-mesh.org/
Vcs-Git: git://anonscm.debian.org/collab-maint/batmand.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/batmand.git
Build-Depends:
debhelper (>= 9),
dpkg-dev (>= 1.16.1.1),
Package: batmand
Architecture: linux-any
Depends:
${misc:Depends},
${shlibs: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.
Package: batmand-dbg
Section: debug
Architecture: linux-any
Depends:
${misc:Depends},
batmand (= ${binary:Version}),
Description: better approach to mobile adhoc networking (debug files)
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.
.
This package contains the debug files.
debian/batmand.lintian-overrides0000644000000000000000000000017412142116334014153 0ustar # sendsigs will kill the daemon more efficiently
batmand binary: init.d-script-possible-missing-stop etc/init.d/batmand 0 6
debian/patches/0000755000000000000000000000000012142116334010612 5ustar debian/patches/man_spelling_errors.patch0000644000000000000000000000355212142116334015704 0ustar Description: Fix spelling errors in manpage
Author: Sven Eckelmann
---
diff --git a/man/batmand.8 b/man/batmand.8
index ce5f743776be21a2af08a1358f252713220075e8..c5310ee58f743a28854d1f2496dc881bb6594074 100644
--- a/man/batmand.8
+++ b/man/batmand.8
@@ -62,7 +62,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.
+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 separate 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
@@ -92,7 +92,7 @@ This option is only available in daemon mode.
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):
+The routing class can be set to four values \(hy it enables "internet search modus". The daemon will choose an internet gateway based on certain criteria (unless "\-p" is specified):
.RS 17
default: 0 \-> set no default route
.RE
debian/patches/email_addresses.patch0000644000000000000000000000377112142116334014767 0ustar Description: Fix E-Mail address as requested by Andreas Langer
Author: Sven Eckelmann
---
diff --git a/THANKS b/THANKS
index c3ad35f2681cdbcd2d4ec00129bf8674077e1330..306d5abfeb3ca0af6e0e7d7a5dfbea757ae19a00 100644
--- a/THANKS
+++ b/THANKS
@@ -10,6 +10,6 @@ Thomas Lopatic (thomas-at-lopatic.de)
Felix Fietkau (nbd-at-nbd.name)
Ludger Schmudde (lui-at-schmudde.com)
Simon Wunderlich (siwu-at-hrz.tu-chemnitz.de)
-Andreas Langer (a.langer-at-q-dsl.de)
-Sven Eckelmann (sven.eckelmann-at-gmx.de)
+Andreas Langer (an.langer-at-gmx.de)
+Sven Eckelmann (sven-at-narfation.org)
Antoine van Gelder (antoine-at-7degrees.co.za)
diff --git a/man/batmand.8 b/man/batmand.8
index 94352bcd95b5caf3703b3b77ac987f19e021f59c..c2405271a1e4695d924b30d885388fa87e012126 100644
--- a/man/batmand.8
+++ b/man/batmand.8
@@ -139,7 +139,7 @@ Start batman daemon on interface "eth1". Connect in client mode to get the debug
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 AUTHOR
-batmand was written by Marek Lindner , Axel Neumann , Stefan Sperling , Corinna 'Elektra' Aichele , Thomas Lopatic , Felix Fietkau , Ludger Schmudde , Simon Wunderlich , Andreas Langer .
+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 Tsai ,
for the Debian GNU/Linux system.
debian/patches/ftbfs_secondbuild.patch0000644000000000000000000000133712142116334015316 0ustar Description: Fix FTBFS on second build attempt
debian/rules clean will try to remove all files and folders which end with
*.d. This fails on the leftover package folder with etc/init.d included
because the rm is not started in recursive deletion mode. This find can be
replaced with a simpler statement without using its functionality.
Author: Sven Eckelmann
---
diff --git a/Makefile b/Makefile
index daaf4a8a008e84d7af7179fa8df5777f38538d8b..1a98d602abefcb0ee371ac097e9830782b446b9a 100644
--- a/Makefile
+++ b/Makefile
@@ -105,7 +105,7 @@ sources:
clean:
rm -f $(BINARY_NAME) *.o posix/*.o linux/*.o bsd/*.o
- rm -f `find . -name '*.d' -print`
+ rm -f *.d posix/*.d linux/*.d bsd/*.d
clean-long:
debian/patches/define_gnu_source.patch0000644000000000000000000000225212142116334015317 0ustar Description: Define _GNU_SOURCE for all POSIX target source files
Defining _GNU_SOURCE in source files differently can result in conflicting
types.
Bug-Debian: #703540
Author: Sven Eckelmann
---
diff --git a/Makefile b/Makefile
index 4647503c31d66cd5c14af387bac52f98f790f62d..dbbc029c7520fc0080c093d5e1728801a159c5ec 100644
--- a/Makefile
+++ b/Makefile
@@ -26,6 +26,7 @@ LINUX_OBJ = linux/route.o linux/tun.o linux/kernel.o
ifeq ($(UNAME),Linux)
OS_OBJ = $(LINUX_OBJ) $(POSIX_OBJ)
+CPPFLAGS += -D_GNU_SOURCE
endif
ifeq ($(UNAME),Darwin)
diff --git a/linux/route.c b/linux/route.c
index 0c7b932877d994b5cd09442fca1df659138ff3c4..0a1e8de74f084f3f665fce27dbf593efee2cfd9c 100644
--- a/linux/route.c
+++ b/linux/route.c
@@ -21,7 +21,6 @@
-#define _GNU_SOURCE
#include
#include /* inet_ntop() */
#include
diff --git a/posix/unix_socket.c b/posix/unix_socket.c
index 5929dde135188eea5cbe1a1119379c525854cf9b..bb7f371f8aa469969474f606befb87594397e136 100644
--- a/posix/unix_socket.c
+++ b/posix/unix_socket.c
@@ -21,7 +21,6 @@
-#define _GNU_SOURCE
#include
#include
#include
debian/patches/version_info.patch0000644000000000000000000001374112142116334014341 0ustar Description: Replace version info instead of appending them
The version number of batmand can get revision numbers added. This is useful to
give hints about the revision of a distribution package and the used patchset
or the commit which was used to build it. The prepended source number or branch
name doesn't add any additional information which would help to identify
problems and can therefore be omitted.
Author: Sven Eckelmann
---
diff --git a/Makefile b/Makefile
index 06cbfe6e67a7be376d28303b1e33a40a5fc2f0fc..4647503c31d66cd5c14af387bac52f98f790f62d 100644
--- a/Makefile
+++ b/Makefile
@@ -53,7 +53,7 @@ MANPAGE = man/batmand.8
# batmand flags and options
CFLAGS += -pedantic -Wall -W -std=gnu99 -MD
-CPPFLAGS += -DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA $(NO_POLICY_ROUTING) -DREVISION_VERSION=$(REVISION_VERSION)
+CPPFLAGS += -DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA $(NO_POLICY_ROUTING)
LDLIBS += -lpthread
# disable verbose output
@@ -80,8 +80,12 @@ SBINDIR = $(PREFIX)/sbin
MANDIR = $(PREFIX)/share/man
# try to generate revision
-REVISION:= $(shell if [ -d .svn ]; then svn info | grep "Rev:" | sed -e '1p' -n | awk '{print $$4}'; else if [ -d ~/.svk ]; then echo $$(svk info | grep "Mirrored From" | awk '{print $$5}'); fi; fi)
-REVISION_VERSION=\"\ rv$(REVISION)\"
+REVISION= $(shell if [ -d .git ]; then \
+ echo $$(git describe --always --dirty --match "v*" |sed 's/^v//' 2> /dev/null || echo "[unknown]"); \
+ fi)
+ifneq ($(REVISION),)
+CPPFLAGS += -DSOURCE_VERSION=\"$(REVISION)\"
+endif
# default target
all: $(BINARY_NAME)
diff --git a/batman.h b/batman.h
index 3e529e3535c5b853249762b4d101df93941a869e..e384922071ed7bc501b0bb83e20b304fe410a99b 100644
--- a/batman.h
+++ b/batman.h
@@ -43,7 +43,9 @@
-#define SOURCE_VERSION "0.3.2" /* put exactly one distinct word inside the string like "0.3-pre-alpha" or "0.3-rc1" or "0.3" */
+#ifndef SOURCE_VERSION
+#define SOURCE_VERSION "0.3.2"
+#endif
#define COMPAT_VERSION 5
#define PORT 4305
#define GW_PORT 4306
@@ -66,11 +68,6 @@
***/
-#ifndef REVISION_VERSION
-#define REVISION_VERSION "0"
-#endif
-
-
/*
* No configuration files or fancy command line switches yet
diff --git a/originator.c b/originator.c
index d79584bb60f3f13b7374537c744d3740452b655b..0f53bbcf8b80755699ff583ac4107577322de2de 100644
--- a/originator.c
+++ b/originator.c
@@ -449,7 +449,7 @@ void debug_orig(void) {
uptime_sec = (uint64_t)(get_time_msec64() / 1000);
debug_output(2, "BOD\n");
- debug_output(2, "%''12s (%s/%i) %''15s [%10s], gw_class ... [B.A.T.M.A.N. %s%s, MainIF/IP: %s/%s, UT: %id%2ih%2im] \n", "Gateway", "#", TQ_MAX_VALUE, "Nexthop", "outgoingIF", SOURCE_VERSION, (strlen(REVISION_VERSION) > 3 ? REVISION_VERSION : ""), ((struct batman_if *)if_list.next)->dev, orig_str, (uint32_t)(uptime_sec/86400), (uint32_t)((uptime_sec%86400)/3600), (uint32_t)((uptime_sec%3600)/60));
+ debug_output(2, "%''12s (%s/%i) %''15s [%10s], gw_class ... [B.A.T.M.A.N. %s, MainIF/IP: %s/%s, UT: %id%2ih%2im] \n", "Gateway", "#", TQ_MAX_VALUE, "Nexthop", "outgoingIF", SOURCE_VERSION, ((struct batman_if *)if_list.next)->dev, orig_str, (uint32_t)(uptime_sec/86400), (uint32_t)((uptime_sec%86400)/3600), (uint32_t)((uptime_sec%3600)/60));
if ( list_empty( &gw_list ) ) {
@@ -493,7 +493,7 @@ void debug_orig(void) {
uptime_sec = (uint64_t)(get_time_msec64() / 1000);
debug_output(1, "BOD \n");
- debug_output(1, " %-11s (%s/%i) %''15s [%10s]: %''20s ... [B.A.T.M.A.N. %s%s, MainIF/IP: %s/%s, UT: %id%2ih%2im] \n", "Originator", "#", TQ_MAX_VALUE, "Nexthop", "outgoingIF", "Potential nexthops", SOURCE_VERSION, (strlen(REVISION_VERSION) > 3 ? REVISION_VERSION : ""), ((struct batman_if *)if_list.next)->dev, orig_str, (uint32_t)(uptime_sec/86400), (uint32_t)((uptime_sec%86400)/3600), (uint32_t)((uptime_sec%3600)/60));
+ debug_output(1, " %-11s (%s/%i) %''15s [%10s]: %''20s ... [B.A.T.M.A.N. %s, MainIF/IP: %s/%s, UT: %id%2ih%2im] \n", "Originator", "#", TQ_MAX_VALUE, "Nexthop", "outgoingIF", "Potential nexthops", SOURCE_VERSION, ((struct batman_if *)if_list.next)->dev, orig_str, (uint32_t)(uptime_sec/86400), (uint32_t)((uptime_sec%86400)/3600), (uint32_t)((uptime_sec%3600)/60));
if ( debug_clients.clients_num[3] > 0 ) {
diff --git a/posix/init.c b/posix/init.c
index 4fe2324c06c45ba80010e837ee7e2df551ff954e..afd409fd3303d885021d4edb319a55b50e88cfa7 100644
--- a/posix/init.c
+++ b/posix/init.c
@@ -166,9 +166,6 @@ void apply_init_args( int argc, char *argv[] ) {
stop = 0;
prog_name = argv[0];
- if ( strstr( SOURCE_VERSION, "-" ) != NULL )
- printf( "WARNING: You are using the unstable batman branch. If you are interested in *using* batman get the latest stable release !\n" );
-
while ( ( optchar = getopt_long( argc, argv, "a:A:bcd:hHio:g:p:r:s:vV", long_options, &option_index ) ) != -1 ) {
switch ( optchar ) {
@@ -359,14 +356,14 @@ void apply_init_args( int argc, char *argv[] ) {
case 'v':
- printf("B.A.T.M.A.N. %s%s (compatibility version %i)\n", SOURCE_VERSION, (strlen(REVISION_VERSION) > 3 ? REVISION_VERSION : ""), COMPAT_VERSION);
+ printf("B.A.T.M.A.N. %s (compatibility version %i)\n", SOURCE_VERSION, COMPAT_VERSION);
exit(EXIT_SUCCESS);
case 'V':
print_animation();
- printf("\x1B[0;0HB.A.T.M.A.N. %s%s (compatibility version %i)\n", SOURCE_VERSION, (strlen(REVISION_VERSION) > 3 ? REVISION_VERSION : ""), COMPAT_VERSION);
+ printf("\x1B[0;0HB.A.T.M.A.N. %s (compatibility version %i)\n", SOURCE_VERSION, COMPAT_VERSION);
printf("\x1B[9;0H \t May the bat guide your path ...\n\n\n");
exit(EXIT_SUCCESS);
@@ -551,7 +548,7 @@ void apply_init_args( int argc, char *argv[] ) {
} else {
- printf("B.A.T.M.A.N. %s%s (compatibility version %i)\n", SOURCE_VERSION, (strlen(REVISION_VERSION) > 3 ? REVISION_VERSION : ""), COMPAT_VERSION);
+ printf("B.A.T.M.A.N. %s (compatibility version %i)\n", SOURCE_VERSION, COMPAT_VERSION);
debug_clients.clients_num[ debug_level - 1 ]++;
debug_level_info = debugMalloc( sizeof(struct debug_level_info), 205 );
debian/patches/install_manpage.patch0000644000000000000000000000233712142116334014776 0ustar Description: Install manpage
Author: Sven Eckelmann
---
diff --git a/Makefile b/Makefile
index 46a91881f1854a955c9a7fb289a4cd2b62c4c1e1..06cbfe6e67a7be376d28303b1e33a40a5fc2f0fc 100644
--- a/Makefile
+++ b/Makefile
@@ -46,6 +46,7 @@ OS_OBJ = $(BSD_OBJ) $(POSIX_OBJ)
endif
OBJ = batman.o originator.o schedule.o list-batman.o allocate.o bitarray.o hash.o profile.o ring_buffer.o hna.o $(OS_OBJ)
+MANPAGE = man/batmand.8
# activate this variable to deactivate policy routing for backward compatibility
#NO_POLICY_ROUTING = -DNO_POLICY_ROUTING
@@ -76,6 +77,7 @@ LINK.o = $(Q_LD)$(CC) $(LDFLAGS) $(TARGET_ARCH)
# standard install paths
PREFIX = /usr/local
SBINDIR = $(PREFIX)/sbin
+MANDIR = $(PREFIX)/share/man
# try to generate revision
REVISION:= $(shell if [ -d .svn ]; then svn info | grep "Rev:" | sed -e '1p' -n | awk '{print $$4}'; else if [ -d ~/.svk ]; then echo $$(svk info | grep "Mirrored From" | awk '{print $$5}'); fi; fi)
@@ -97,7 +99,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)
debian/patches/series0000644000000000000000000000034512142116334012031 0ustar ftbfs_secondbuild.patch
man_spelling_errors.patch
non_parallel_build.patch
build_rules.patch
install_manpage.patch
version_info.patch
define_gnu_source.patch
lto.patch
strict-aliasing.patch
dead_links.patch
email_addresses.patch
debian/patches/lto.patch0000644000000000000000000000073512142116334012436 0ustar Description: Enable Link-time optimization for smaller binaries
Author: Sven Eckelmann
---
diff --git a/Makefile b/Makefile
index dbbc029c7520fc0080c093d5e1728801a159c5ec..6b52710a6ebbc841caf7b38f5dee3c2d5e1d8dc0 100644
--- a/Makefile
+++ b/Makefile
@@ -91,6 +91,11 @@ endif
# default target
all: $(BINARY_NAME)
+ifeq ($(LTO), 1)
+ CFLAGS += -flto
+ LDFLAGS += -fuse-linker-plugin $(CFLAGS)
+endif
+
# standard build rules
.SUFFIXES: .o .c
.c.o:
debian/patches/non_parallel_build.patch0000644000000000000000000000173112142116334015462 0ustar Description: Don't automatically build in parallel
Distributions like Gentoo and Debian have policies which make it
necessary to use some kind of environmental variable to control the
parallel build.
Author: Sven Eckelmann
---
diff --git a/Makefile b/Makefile
index 1a98d602abefcb0ee371ac097e9830782b446b9a..437a339a6b695baee8f15918f62f9aa2066e8447 100644
--- a/Makefile
+++ b/Makefile
@@ -77,11 +77,8 @@ REVISION_VERSION=\"\ rv$(REVISION)\"
BAT_VERSION= $(shell grep "^\#define SOURCE_VERSION " $(SOURCE_VERSION_HEADER) | sed -e '1p' -n | awk -F '"' '{print $$2}' | awk '{print $$1}')
FILE_NAME= $(PACKAGE_NAME)_$(BAT_VERSION)-rv$(REVISION)_$@
-NUM_CPUS = $(shell NUM_CPUS=`cat /proc/cpuinfo | grep -v 'model name' | grep processor | tail -1 | awk -F' ' '{print $$3}'`;echo `expr $$NUM_CPUS + 1`)
-
-all:
- $(MAKE) -j $(NUM_CPUS) $(BINARY_NAME)
+all: $(BINARY_NAME)
$(BINARY_NAME): $(SRC_O) $(SRC_H) Makefile
$(Q_LD)$(CC) -o $@ $(SRC_O) $(LDFLAGS)
debian/patches/dead_links.patch0000644000000000000000000000460312142116334013733 0ustar Description: Fix dead links in documentation
Author: Sven Eckelmann
---
diff --git a/CHANGELOG b/CHANGELOG
index 4a39e2db69108e92823cf9a9b737d89d4d718150..9552e537fe818341aa5ab26dec1edcc0365105f8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,3 @@
For a reasonable up-to-date CHANGELOG visit:
-http://www.open-mesh.net/log/trunk
+http://git.open-mesh.org/?p=batmand.git;a=shortlog
diff --git a/INSTALL b/INSTALL
index a4fa5599c5fce9c9252698edbe502e6df2069b78..8bbd49b1b49616a0d34c79b0aeff3226a6008a1b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -23,16 +23,16 @@ these systems, please contact us. We would appreciate your help.
Compiling
---------
-You don't necessarily need to compile. May be your distribution
-or our download store offers precompiled packages. Check
-http://www.open-mesh.net/wiki/Download to get an overview.
+You don't necessarily need to compile. May be your distribution or our
+download store offers precompiled packages. Check
+http://www.open-mesh.org/wiki/open-mesh/Download to get an overview.
-Download and compile the latest stable sources from the download
-section http://www.open-mesh.net/wiki/Download by executing eg.:
+Download and compile the latest stable sources from the download section
+http://www.open-mesh.org/wiki/open-mesh/Download by executing eg.:
-$ wget http://downloads.open-mesh.net/batman/releases/batman-0.3.2/batman-0.3.2.tar.gz
-$ tar xzvf batman-0.3.2.tar.gz
-$ cd batmand-0.3.2
+$ wget http://downloads.open-mesh.org/batman/stable/sources/batmand/batmand-0.3.2.tar.gz
+$ tar xzvf batmand-0.3.2.tar.gz
+$ cd batman-0.3.2
$ make
After the compilation process is finished you'll find a executable
diff --git a/man/batmand.8 b/man/batmand.8
index c5310ee58f743a28854d1f2496dc881bb6594074..94352bcd95b5caf3703b3b77ac987f19e021f59c 100644
--- a/man/batmand.8
+++ b/man/batmand.8
@@ -24,7 +24,7 @@ batmand \- better approach to mobile ad\(hyhoc networking
.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://www.open\-mesh.net/ to get more information.
+means better approach to mobile ad\(hyhoc networking, this is a new routing protocol for multi\(hyhop ad\(hyhoc mesh networks. Go to http://www.open\-mesh.org/ to get more information.
.PP
The following document will explain how to use the \fBbatman daemon\fP.
.PP
debian/patches/build_rules.patch0000644000000000000000000001236412142116334014152 0ustar Description: Use standard-like build rules
User expect a specific naming inside makefile rules which they can
modify by changing environment variables or providing them explicitely
as parameters of the make call. The naming was extracted from the gnu
make standard rules database.
Author: Sven Eckelmann
---
diff --git a/Makefile b/Makefile
index 437a339a6b695baee8f15918f62f9aa2066e8447..46a91881f1854a955c9a7fb289a4cd2b62c4c1e1 100644
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,46 @@
# 02110-1301, USA
#
+# batmand build
+BINARY_NAME = batmand
+
+UNAME = $(shell uname)
+POSIX_OBJ = posix/init.o posix/posix.o posix/tunnel.o posix/unix_socket.o
+BSD_OBJ = bsd/route.o bsd/tun.o bsd/kernel.o bsd/compat.o
+LINUX_OBJ = linux/route.o linux/tun.o linux/kernel.o
+
+ifeq ($(UNAME),Linux)
+OS_OBJ = $(LINUX_OBJ) $(POSIX_OBJ)
+endif
+
+ifeq ($(UNAME),Darwin)
+OS_OBJ = $(BSD_OBJ) $(POSIX_OBJ)
+endif
+
+ifeq ($(UNAME),GNU/kFreeBSD)
+OS_OBJ = $(BSD_OBJ) $(POSIX_OBJ)
+LDLIBS += -lfreebsd -lbsd
+endif
+
+ifeq ($(UNAME),FreeBSD)
+OS_OBJ = $(BSD_OBJ) $(POSIX_OBJ)
+endif
+
+ifeq ($(UNAME),OpenBSD)
+OS_OBJ = $(BSD_OBJ) $(POSIX_OBJ)
+endif
+
+OBJ = batman.o originator.o schedule.o list-batman.o allocate.o bitarray.o hash.o profile.o ring_buffer.o hna.o $(OS_OBJ)
+
+# activate this variable to deactivate policy routing for backward compatibility
+#NO_POLICY_ROUTING = -DNO_POLICY_ROUTING
+
+# batmand flags and options
+CFLAGS += -pedantic -Wall -W -std=gnu99 -MD
+CPPFLAGS += -DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA $(NO_POLICY_ROUTING) -DREVISION_VERSION=$(REVISION_VERSION)
+LDLIBS += -lpthread
+
+# disable verbose output
ifneq ($(findstring $(MAKEFLAGS),s),s)
ifndef V
Q_CC = @echo ' ' CC $@;
@@ -25,89 +65,42 @@ ifndef V
endif
endif
-# activate this variable to deactivate policy routing for backward compatibility
-#NO_POLICY_ROUTING = -DNO_POLICY_ROUTING
+# standard build tools
+CC ?= gcc
+RM ?= rm -f
+INSTALL ?= install
+MKDIR ?= mkdir -p
+COMPILE.c = $(Q_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
+LINK.o = $(Q_LD)$(CC) $(LDFLAGS) $(TARGET_ARCH)
-CC = gcc
-CFLAGS += -pedantic -Wall -W -O1 -g3 -std=gnu99
-EXTRA_CFLAGS = -DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA $(NO_POLICY_ROUTING) -DREVISION_VERSION=$(REVISION_VERSION)
-LDFLAGS += -lpthread
-
-SBINDIR = $(INSTALL_PREFIX)/usr/sbin
-
-UNAME= $(shell uname)
-POSIX_C= posix/init.c posix/posix.c posix/tunnel.c posix/unix_socket.c
-BSD_C= bsd/route.c bsd/tun.c bsd/kernel.c bsd/compat.c
-
-ifeq ($(UNAME),Linux)
-OS_C= linux/route.c linux/tun.c linux/kernel.c $(POSIX_C)
-endif
-
-ifeq ($(UNAME),Darwin)
-OS_C= $(BSD_C) $(POSIX_C)
-endif
-
-ifeq ($(UNAME),GNU/kFreeBSD)
-OS_C= $(BSD_C) $(POSIX_C)
-LDFLAGS+= -lfreebsd -lbsd
-endif
-
-ifeq ($(UNAME),FreeBSD)
-OS_C= $(BSD_C) $(POSIX_C)
-endif
-
-ifeq ($(UNAME),OpenBSD)
-OS_C= $(BSD_C) $(POSIX_C)
-endif
-
-LOG_BRANCH= trunk/batman
-
-SRC_FILES= "\(\.c\)\|\(\.h\)\|\(Makefile\)\|\(INSTALL\)\|\(LIESMICH\)\|\(README\)\|\(THANKS\)\|\(TRASH\)\|\(Doxyfile\)\|\(./posix\)\|\(./linux\)\|\(./bsd\)\|\(./man\)\|\(./doc\)"
-
-SRC_C= batman.c originator.c schedule.c list-batman.c allocate.c bitarray.c hash.c profile.c ring_buffer.c hna.c $(OS_C)
-SRC_H= batman.h originator.h schedule.h list-batman.h os.h allocate.h bitarray.h hash.h profile.h vis-types.h ring_buffer.h hna.h
-SRC_O= $(SRC_C:.c=.o)
-
-PACKAGE_NAME= batmand
-BINARY_NAME= batmand
-SOURCE_VERSION_HEADER= batman.h
+# standard install paths
+PREFIX = /usr/local
+SBINDIR = $(PREFIX)/sbin
+# try to generate revision
REVISION:= $(shell if [ -d .svn ]; then svn info | grep "Rev:" | sed -e '1p' -n | awk '{print $$4}'; else if [ -d ~/.svk ]; then echo $$(svk info | grep "Mirrored From" | awk '{print $$5}'); fi; fi)
REVISION_VERSION=\"\ rv$(REVISION)\"
-BAT_VERSION= $(shell grep "^\#define SOURCE_VERSION " $(SOURCE_VERSION_HEADER) | sed -e '1p' -n | awk -F '"' '{print $$2}' | awk '{print $$1}')
-FILE_NAME= $(PACKAGE_NAME)_$(BAT_VERSION)-rv$(REVISION)_$@
-
+# default target
all: $(BINARY_NAME)
-$(BINARY_NAME): $(SRC_O) $(SRC_H) Makefile
- $(Q_LD)$(CC) -o $@ $(SRC_O) $(LDFLAGS)
-
+# standard build rules
+.SUFFIXES: .o .c
.c.o:
- $(Q_CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MD -c $< -o $@
--include $(SRC_C:.c=.d)
+ $(COMPILE.c) -o $@ $<
-sources:
- mkdir -p $(FILE_NAME)
-
- for i in $$( find . | grep $(SRC_FILES) | grep -v "\.svn" ); do [ -d $$i ] && mkdir -p $(FILE_NAME)/$$i ; [ -f $$i ] && cp -Lvp $$i $(FILE_NAME)/$$i ;done
-
- wget -O changelog.html http://www.open-mesh.net/log/$(LOG_BRANCH)/
- html2text -o changelog.txt -nobs -ascii changelog.html
- awk '/View revision/,/10\/01\/06 20:23:03/' changelog.txt > $(FILE_NAME)/CHANGELOG
-
- for i in $$( find man | grep -v "\.svn" ); do [ -f $$i ] && groff -man -Thtml $$i > $(FILE_NAME)/$$i.html ;done
-
- tar czvf $(FILE_NAME).tgz $(FILE_NAME)
+$(BINARY_NAME): $(OBJ)
+ $(LINK.o) $^ $(LDLIBS) -o $@
clean:
- rm -f $(BINARY_NAME) *.o posix/*.o linux/*.o bsd/*.o
- rm -f *.d posix/*.d linux/*.d bsd/*.d
+ $(RM) $(BINARY_NAME) $(OBJ) $(DEP)
+install: $(BINARY_NAME)
+ $(MKDIR) $(DESTDIR)$(SBINDIR)
+ $(INSTALL) -m 0755 $(BINARY_NAME) $(DESTDIR)$(SBINDIR)
-clean-long:
- rm -rf $(PACKAGE_NAME)_*
+# load dependencies
+DEP = $(OBJ:.o=.d)
+-include $(DEP)
-install:
- mkdir -p $(SBINDIR)
- install -m 0755 $(BINARY_NAME) $(SBINDIR)
+.PHONY: all clean install
debian/patches/strict-aliasing.patch0000644000000000000000000000114312142116334014727 0ustar Description: Disable strict-aliasing to avoid triggering aliasing problems
Author: Sven Eckelmann
---
diff --git a/Makefile b/Makefile
index 6b52710a6ebbc841caf7b38f5dee3c2d5e1d8dc0..b20a8bd422e77a2bdd9cb52a7714389bb93d9c40 100644
--- a/Makefile
+++ b/Makefile
@@ -53,7 +53,7 @@ MANPAGE = man/batmand.8
#NO_POLICY_ROUTING = -DNO_POLICY_ROUTING
# batmand flags and options
-CFLAGS += -pedantic -Wall -W -std=gnu99 -MD
+CFLAGS += -pedantic -Wall -W -std=gnu99 -MD -fno-strict-aliasing
CPPFLAGS += -DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA $(NO_POLICY_ROUTING)
LDLIBS += -lpthread
debian/README.Debian0000644000000000000000000000635712142116334011237 0ustar This is taken from B.A.T.M.A.N's website:
http://downloads.open-mesh.org/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://downloads.open-mesh.org/batman/misc/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 information.
$ 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
debian/copyright0000644000000000000000000000513312142116334011120 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: B.A.T.M.A.N.
Source: http://www.open-mesh.org/
Files: *
Copyright: 2006-2009, Marek Lindner
2006-2009, Axel Neumann
2006-2009, Stefan Sperling
2006-2009, Corinna 'Elektra' Aichele
2006-2009, Thomas Lopatic
2006-2009, Felix Fietkau
2006-2009, Ludger Schmudde
2006-2009, Simon Wunderlich
2006-2009, Andreas Langer
2008-2009, Sven Eckelmann
2009, Antoine van Gelder
License: GPL-2
This program is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License.
.
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 package; if not, write to the Free
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301 USA
.
On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file
`/usr/share/common-licenses/GPL-2'.
Files: debian/*
Copyright: 2007, Wesley Tsai
2007-2013, Holger Levsen
2008-2013, Sven Eckelmann
License: GPL-2+
This program is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later
version.
.
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 package; if not, write to the Free
Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301 USA
.
On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file
`/usr/share/common-licenses/GPL-2'.
debian/batmand.init0000644000000000000000000000303612142116334011460 0ustar #! /bin/sh
### BEGIN INIT INFO
# Provides: batmand
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 1
# 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
debian/batmand.default0000644000000000000000000000112612142116334012137 0ustar # 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 batmand automatically at startup
#
#START_BATMAND="YES"
#
# debuglevel from 1 to 5. see man batmand(8) for more information about levels.
# 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"
debian/compat0000644000000000000000000000000212142116334010361 0ustar 9