Extract the content of the archive:
unzip test_lepton_with_ibrdtn.zip
In order to build IBRDTN on a Linux plaform, you may have to install several packages first:
sudo apt-get install build-essential libssl-dev libz-dev libsqlite3-dev \
libcurl4-gnutls-dev libdaemon-dev automake autoconf pkg-config libtool libcppunit-dev \
libnl-3-dev libnl-cli-3-dev libnl-genl-3-dev libnl-nf-3-dev libnl-route-3-dev libarchive-dev
Once your Linux platform is ready, you can start building IBRDTN (this may take a while!):
pushd test_lepton_with_ibrdtn/ibrdtn-for-lepton/ibrdtn
./autogen.sh
Note: while running autogen.sh the script may complain that the folder is not a git repository. Don't worry about that and continue with the following commands:
./configure --prefix=$(realpath $(pwd)/../target)
make
make install
popd
Note: this version of IBRDTN you have just installed is not the
official version, but a version modified by team CASA so as to make it
compatible with LEPTON.
The executable files and libraries are located in test_lepton_with_ibrdtn/ibrdtn-for-lepton/target
.
Set environment variables:
cd test_lepton_with_ibrdtn
export LEPTON_HOME="${PWD}/lepton"
export IBRDTN_HOME="${PWD}/ibrdtn-for-lepton/target"
export IBRDTN_ADAPTER_HOME="${PWD}/ibrdtn-adapter"
export PATH="${PATH}:${LEPTON_HOME}/bin:${IBRDTN_HOME}/bin:${IBRDTN_HOME}/sbin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${IBRDTN_HOME}/lib"
Note: you may find it convenient to copy these command lines of variables in your ~/.${SHELL}rc file.
lepton.sh start oppnet_adapter=${IBRDTN_ADAPTER_HOME}/bin/adapter.sh
By default LEPTON creates 20 nodes and drives their mobility according to a Levy Walk policy.
You may observe that 20 instances of IBRDTN are indeed running in the background:
ps ax | grep dtnd
Each IBRDTN node is indeed discovering and losing neighbors according to the topology of the dynamic graph shown in the display screen:
tail -f /dev/shm/${USER}/ibrdtn/N00/log
(Use Ctrl-C to terminate)
All transmissions between IBRDTN nodes are conducted by LEPTON's software hub, which behaves as a proxy between these nodes:
tail -f /dev/shm/${USER}/lepton/lepton.out
Commands roughly equivalent to dtnsend
and dtnrecv
can be
addressed to any node at runtime:
echo "Dummy file content" > /tmp/dummy
lepton.sh exec N00 send N18 /tmp/dummy
With this command the content of file /tmp/dummy
is sent by node
N00
to node N18
.
lepton.sh exec N18 recv
Node N18
waits until it receives something, and displays the content
on the standard output stream.
You may notice that vertices in the graph sometimes turn red. This happens when a TCP session is established between two nodes.
LEPTON (and all IBRDTN) can be terminated with:
lepton.sh stop