dtn7-go

module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2019 License: GPL-3.0

README

dtn7-go Build Status GoDoc

Delay-Tolerant Networking software suite and library based on the Bundle Protocol Version 7.

Protocols

This software implements the current draft of the Bundle Protocol Version 7.

Convergence Layer

Bundles might be exchanged between nodes by the following protocols.

Routing

One of the following routing protocols might be used.

  • Delay-Tolerant Link State Routing (DTLSR)
  • Epidemic Routing
  • Probabilistic Routing Protocol using History of Encounters and Transitivity (PRoPHET)
  • Spray and Wait, vanilla and binary

Software

Installation

Install the Go programming language, version 1.11 or later.

git clone https://github.com/dtn7/dtn7-go.git
cd dtn7-go

go build ./cmd/dtncat
go build ./cmd/dtnd
dtnd

dtnd is a delay-tolerant networking daemon. It represents a node inside the network and is able to transmit, receive and forward bundles to other nodes. A node's neighbors may be specified in the configuration or detected within the local network through a peer discovery. Bundles might be sent and received through a REST-like web interface. The features and their configuration is described inside the provided example configuration.toml.

REST-API usage

The API might be used with the dtncat program or by plain HTTP requests.

# Create a outbounding bundle to dtn:host, containing "hello world"
# Payload must be base64 encoded
curl -d "{\"Destination\":\"dtn:host\", \"Payload\":\"`base64 <<< "hello world"`\"}" http://localhost:8080/send/

# Fetch received bundles. Payload is base64 encoded.
curl http://localhost:8080/fetch/
dtncat

dtncat is a companion tool for dtnd and allows both sending and receiving bundles through dtnd's REST-API.

$ ./dtncat help
dtncat [send|fetch|help] ...

dtncat send REST-API ENDPOINT-ID
  sends data from stdin through the given REST-API to the endpoint

dtncat fetch REST-API
  fetches all bundles from the given REST-API

Examples:
  dtncat send  "http://127.0.0.1:8080/" "dtn:alpha" <<< "hello world"
  dtncat fetch "http://127.0.0.1:8080/"

Go Library

Multiple parts of this software are usable as a Go library. The bundle package contains code for bundle modification, serialization and deserialization and would most likely the most interesting part. If you are interested in working with this code, check out the documentation.

Directories

Path Synopsis
Package bundle provides a library for interaction with Bundles as defined in the Bundle Protocol Version 7 (draft-ietf-dtn-bpbis-14.txt).
Package bundle provides a library for interaction with Bundles as defined in the Bundle Protocol Version 7 (draft-ietf-dtn-bpbis-14.txt).
arecord
Package arecord includes an abstration for administrative records, as defined in the Bundle Protocol.
Package arecord includes an abstration for administrative records, as defined in the Bundle Protocol.
cla
Package cla defines two interfaces for Convergence Layer Adapters.
Package cla defines two interfaces for Convergence Layer Adapters.
mtcp
Package mtcp provides a library for the Minimal TCP Convergence-Layer Protocol as defined in draft-ietf-dtn-mtcpcl-01 Because of the unidirectional design of MTCP, both MTPCServer and MTCPClient exists.
Package mtcp provides a library for the Minimal TCP Convergence-Layer Protocol as defined in draft-ietf-dtn-mtcpcl-01 Because of the unidirectional design of MTCP, both MTPCServer and MTCPClient exists.
tcpcl
Package tcpcl provides a library for the Delay-Tolerant Networking TCP Convergence Layer Protocol Version 4, draft-ietf-dtn-tcpclv4-14.
Package tcpcl provides a library for the Delay-Tolerant Networking TCP Convergence Layer Protocol Version 4, draft-ietf-dtn-tcpclv4-14.
cmd
Package core represents a bundle node's router and contains both the bundle protocol agent and application agent.
Package core represents a bundle node's router and contains both the bundle protocol agent and application agent.
Package discovery contains code for peer/neighbor discovery of other DTN nodes through UDP multicast packages.
Package discovery contains code for peer/neighbor discovery of other DTN nodes through UDP multicast packages.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL