DTN2 Compilation
Getting Started
You can access the latest ("bleeding edge") version of the code using the anonymous pserver. Using CVS, you can do the following:
% cvs -d :pserver:anonymous@code.dtnrg.org:/orig login % cvs -d :pserver:anonymous@code.dtnrg.org:/orig checkout DTN2
The password is 'bundles'. Please be aware this code is under regular developmental changes, so your mileage may vary. In addition, if you grab the development copy in this way, any README files or other docs may not be quite up to date.
Currently, the cvs codebase and releases after 2.0.2 compile and run on arm, x86/redhat, OSX, and cygwin.
You will also need BerkeleyDB and Tcl development packages installed to compile DTN2. Optionally, you can install tclreadline for a more user-friendly console interface.
The DTN2 configure script should tell you if you are missing a required component.
External Resources
These are some external resources you can consult for instructions on compilation and installation of DTN2. Eventually, this information will be folded into this website.
Compilation Instructions
These are the general instructions for compiling DTN2. To build for the arm platform (for running on the Sharp Zaurus), see Dtn2Compilation/Arm. For instructions on cygwin see Dtn3Compilation/Windows.
1. Download or check out the source.
DTN2 Source Directory Structure |
|
Directory |
Description |
oasys |
Object-oriented Adaptors to SYStem interfaces (OASYS) is Mike Demmer's set of wrapper classes for systems projects |
applib |
Library implementing the DTN application API. Examples of its use are in apps |
apps |
A collection of basic DTN applications, including dtnsend, dtnrecv, dtnping, and dtncp/dtncpd. |
servlib |
Library implementing the DTN server components. |
daemon |
The implementation of the DTN2 bundle daemon. |
test |
A collection of tcl-based testing scripts for use with the DTN2 daemon. |
2. Run configure. Using the -C option caches the values so all of the tests do not have to be run again.
3. Run make
Running and Testing DTN2
These instructions assume that you are using BerkeleyDB. Adapt accordingly for postgres or MySQL.
1. Create a directory for bundle storage, and edit daemon/dtn.conf accordingly.
% mkdir -p /var/dtn
2. Initialize the database for its first use and run dtnd, specifying the location of the configuration file, if it is not in /etc/dtn.conf.
% ./daemon/dtnd -c ./daemon/dtn.conf --init-db (first time only) % ./daemon/dtnd -c ./daemon/dtn.conf
You should see something like:
[1141695854.619367 /dtnd notice] DTN daemon starting up... (pid 7874) [1141695854.622356 /dtnd notice] random seed is 622351 [1141695854.627244 /bundle/daemon notice] loading bundles from data store dtn%
3. From another window, ping the daemon to make sure it is up:
% apps/dtnping/dtnping localhost source_eid [dtn://sandbox.berkeley.intel-research.net.dtn/ping.7915] replyto_eid [dtn://sandbox.berkeley.intel-research.net.dtn/ping.7915] dtn_register succeeded, regid 0x19 checking for bundles already queued... PING [dtn://sandbox.berkeley.intel-research.net.dtn/]... 10 bytes from [dtn://sandbox.berkeley.intel-research.net.dtn/]: 'dtn_ping!' time=3.22 ms 10 bytes from [dtn://sandbox.berkeley.intel-research.net.dtn/]: 'dtn_ping!' time=15.51 ms
4. Congratulations! You now have a running DTN2 daemon. The next step is to add interfaces, links, and routes so you can send bundles between two or more daemons. For examples, look in daemon/dtn.conf.