This kernel module implements the Scalable Position-Based Multicast (SPBM) routing protocol. It internally uses 16 bit-coordinates for each dimension (x and y). To use it in combination with GPS, an additional daemon is needed to map the GPS coordinates to the internal virtual coordinates of the module. An experimental daemon can be found at the Loclib page.
Download
The current release is 0.2. Changes to the previous version contain:
- works with kernel 2.4 and 2.6
- bugfix: handling of packets larger than MTU
- code cleanup
Download the source archive:
Installation
First, untar the sources:
tar xjvf spbm-0.2.tar.bz2
Next, change into the newly generated directory and run make:
cd spbm-0.2
make
And finally, as root:
make install
This will copy the module into the modules' directory.
To build the iPAQ version, you need a working arm cross compiler and the kernel sources of the kernel running on your iPAQ. Create a symbolic link to the kernel includes, e.g.:
ln -s /usr/src/linux-2.4.19-rmk6-pxa1-hh40/include ./ipaqinclude
and then issue the following command to build the iPAQ kernel module (tested only for kernel 2.4):
make spbmipaq.o
Static Configuration
There are some "static" configuration parameters you can change before compiling the module. They are defined in config.h. The values are in detail:
- Grid depth (GRIDDEPTH)
The number of the aggregation levels in the network.
- Update interval (UPDATETIME)
The basic interval between two consecutive update messages on the lowest level.
- Update interval jitter (UPDATEJITTER)
The basic time span for the exponential backoff part of the update timers.
- Beacon interval (BEACONTIME)
The interval between two consecutive beacons.
- Suppression distance (MAXDISTSQUARE)
Packets from nodes located more than the given distance away are dropped to simulate larger ad-hoc networks in a smaller area or to stabilize neighborship information by dropping "weak" beacons.
- Group address offset (GROUPOFFSET)
Defines the base address for SPBM multicast group addresses. Default is 10.255.255.0.
Usage
To load the module, issue the following command:
modprobe spbm
Now, you should have a new directory in /proc:
/proc/spbm:
-r--r--r-- 1 root root 0 Feb 8 11:48 config
-rw-r--r-- 1 root root 0 Feb 8 11:48 join
--w------- 1 root root 0 Feb 8 11:48 leave
-r--r--r-- 1 root root 0 Feb 8 11:48 membertable
-r--r--r-- 1 root root 0 Feb 8 11:48 neighbors
-rw-r--r-- 1 root root 0 Feb 8 11:48 pos
To set your current position to 1234/5678 (hexadecimal values, please note the leading 0):
echo "01234 05678" > /proc/spbm/pos
And to check it, you can use:
cat /proc/spbm/pos
Dynamic Configuration
Besides the position, you can also control the subscribed groups via the proc interface. To join or leave a certain group, write the group number in ASCII to the correpsonding file. E.g.,
echo "7" > /proc/spbm/join
Additionally, you can get a list of the currently subscribed groups by issueing:
cat /proc/spbm/join
For debugging purposes, the protocols' internal tables are available via two additional files: one for the member table and one for the neighbor table.
cat /proc/spbm/membertable
cat /proc/spbm/neighbors
Acknowledgments
Many thanks to Thomas Butter who wrote the first release of this kernel module.
|