Rust implementation of a daemon for DTN7 Bundle Protocol draft https://tools.ietf.org/html/draft-ietf-dtn-bpbis-26
Plus:
* Minimal TCP Convergence Layer Protocol https://tools.ietf.org/html/draft-ietf-dtn-mtcpcl-01
* A simple HTTP Convergence Layer
* Convenient command line tools to interact with the daemon
* A simple web interface for status information about dtnd
* A web-socket interface for application agents
The actual BP7 implementation can be found here: https://github.com/dtn7/bp7-rs
Additional dtn related stuff and some client code can be found here: https://github.com/dtn7/bp7-plus-rs
A similar golang implementation can be found here: https://github.com/dtn7/dtn7-go
Currently a very basic service discovery, MTCP & HTTP CLs, flooding/epidemic/sink-routing and rest/ws command interfaces are implemented. Both addressing schemes, dtn as well as ipn are supported. Furthermore, some CLI tools are provided to easily integrate dtn7 into shell scripts.
Beware, the API is not always idiomatic rust and lacks documentation and tests at the moment.
I consider this code to be work-in-progress and not finished yet. Also the rest and web-socket interface is totally undocumented and unfinished at the moment :)
Installation from source using cargo:
cargo install dtn7
``` $ dtnd -h dtn7-rs 0.11.0 Lars Baumgaertner baumgaertner@cs.tu-darmstadt.de A simple Bundle Protocol 7 Daemon for Delay Tolerant Networking
USAGE: dtnd [FLAGS] [OPTIONS]
FLAGS: -d, --debug Set log level to debug -h, --help Prints help information -4, --ipv4 Use IPv4 -6, --ipv6 Use IPv6 -U, --unsafe-httpd Allow httpd RPC calls from anyhwere -V, --version Prints version information
OPTIONS:
-C, --cla
Example usage for node1 with epidemic routing, mtcp convergence layer and the default endpoint 'incoming':
$ dtnd -n node1 -r epidemic -C mtcp -e incoming
The same but with ipn addressing scheme and a default endpoint at 23.42:
$ dtnd -n 23 -r epidemic -C mtcp -e 42
Configuration can also happen via a config file.
For an example take a look at examples/dtn7.toml.example
.
Querying information from dtnd
:
```
$ dtnquery -h
dtnquery 0.11.0
Lars Baumgaertner baumgaertner@cs.tu-darmstadt.de
A simple Bundle Protocol 7 Query Utility for Delay Tolerant Networking
USAGE: dtnquery [FLAGS] [OPTIONS] [SUBCOMMAND]
FLAGS: -h, --help Prints help information -6, --ipv6 Use IPv6 -V, --version Prints version information
OPTIONS:
-p, --port
SUBCOMMANDS: bundles list bundles in node eids list registered endpoint IDs help Prints this message or the help of the given subcommand(s) info General dtnd info nodeid Local node id peers list known peers store list bundles status in store ```
Receiving bundles: ``` $ dtnrecv -h dtnrecv 0.11.0 Lars Baumgaertner baumgaertner@cs.tu-darmstadt.de A simple Bundle Protocol 7 Receive Utility for Delay Tolerant Networking
USAGE:
dtnrecv [FLAGS] [OPTIONS] --endpoint
FLAGS: -h, --help Prints help information -x, --hex hex output -6, --ipv6 Use IPv6 -V, --version Prints version information -v, --verbose verbose output
OPTIONS:
-b, --bundle-id
Sending bundles: ``` $ dtnsend -h dtnsend 0.11.0 Lars Baumgaertner baumgaertner@cs.tu-darmstadt.de A simple Bundle Protocol 7 Send Utility for Delay Tolerant Networking
USAGE:
dtnsend [FLAGS] [OPTIONS] --receiver
FLAGS: -D, --dry-run Don't actually send packet, just dump the encoded one. -h, --help Prints help information -6, --ipv6 Use IPv6 -V, --version Prints version information -v, --verbose verbose output
OPTIONS:
-l, --lifetime
ARGS:
Automatic triggering of external binaries for incoming bundles: ``` $ dtntrigger -h dtntrigger 0.11.0 Lars Baumgaertner baumgaertner@cs.tu-darmstadt.de A simple Bundle Protocol 7 Incoming Trigger Utility for Delay Tolerant Networking
USAGE:
dtntrigger [FLAGS] [OPTIONS] --command
FLAGS: -h, --help Prints help information -6, --ipv6 Use IPv6 -V, --version Prints version information -v, --verbose verbose output
OPTIONS:
-c, --command
A simple DTN echo service can be found under examples/dtnecho.rs
.
This service automatically registers its endpoint and listens for any incoming bundles on the local /echo
endpoint or for ipn addresses on service number 7
.
Each bundle is sent back to its source with the same payload and lifetime, no delivery report is requested.
If you use this software in a scientific publication, please cite the following paper:
BibTeX
@INPROCEEDINGS{baumgaertner2019bdtn7,
author={L. {Baumgärtner} and J. {Höchst} and T. {Meuser}},
booktitle={2019 International Conference on Information and Communication Technologies for Disaster Management (ICT-DM)},
title={B-DTN7: Browser-based Disruption-tolerant Networking via Bundle Protocol 7},
year={2019},
volume={},
number={},
pages={1-8},
keywords={Protocols;Browsers;Software;Convergence;Servers;Synchronization;Wireless fidelity},
doi={10.1109/ICT-DM47966.2019.9032944},
ISSN={2469-8822},
month={Dec},
}
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in dtn7-rs
by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.