2012-10-29 06:12:39 +00:00
|
|
|
Serval DNA
|
|
|
|
==========
|
2016-09-13 01:04:12 +00:00
|
|
|
[Serval Project][], September 2016
|
2012-10-29 06:12:39 +00:00
|
|
|
|
2014-03-05 04:56:28 +00:00
|
|
|
[Serval DNA][] is the core component of the [Serval Mesh][] app for Android and
|
|
|
|
the [Serval Mesh Extender][] long-range mesh networking device. It is a daemon
|
|
|
|
process that performs all the central services of the Serval mesh network
|
|
|
|
such as dynamic routing, encryption and authentication, file distribution,
|
|
|
|
messaging, and voice telephony.
|
|
|
|
|
|
|
|
Any device with Wi-Fi connectivity that runs the Serval DNA daemon can
|
|
|
|
participate in the [Serval mesh network][].
|
|
|
|
|
|
|
|
Download, build and test
|
|
|
|
------------------------
|
|
|
|
|
2016-01-11 06:10:15 +00:00
|
|
|
* [INSTALL.md](./INSTALL.md) contains instructions for downloading, building
|
2016-09-13 01:04:12 +00:00
|
|
|
and testing Serval DNA on Linux, Mac OS-X, and similar platforms
|
2016-01-11 06:10:15 +00:00
|
|
|
|
|
|
|
* [Notes for Developers](./doc/Development.md) contains useful information for
|
2016-09-13 01:04:12 +00:00
|
|
|
developers of Serval DNA, which may also help resolve build issues
|
2014-03-05 04:56:28 +00:00
|
|
|
|
|
|
|
Configuration
|
|
|
|
-------------
|
|
|
|
|
2016-01-11 06:10:15 +00:00
|
|
|
* [doc/Servald-Configuration.md](./doc/Servald-Configuration.md) describes how
|
2016-09-13 01:04:12 +00:00
|
|
|
to set up and run a Serval DNA daemon
|
2014-03-05 04:56:28 +00:00
|
|
|
|
|
|
|
Documentation
|
|
|
|
-------------
|
|
|
|
|
2016-09-13 01:04:12 +00:00
|
|
|
* [INSTALL.md](./INSTALL.md) -- instructions to compile and install Serval DNA
|
2014-03-05 04:56:28 +00:00
|
|
|
|
2016-09-13 01:04:12 +00:00
|
|
|
* [doc/](./doc/) -- technical documentation
|
2014-03-05 04:56:28 +00:00
|
|
|
|
2016-09-13 01:04:12 +00:00
|
|
|
* once Serval DNA is built, its "help" command will print a summary of all the
|
|
|
|
operations that servald offers:
|
2014-03-05 04:56:28 +00:00
|
|
|
|
|
|
|
$ ./servald help
|
|
|
|
|
2016-09-13 01:04:12 +00:00
|
|
|
* the following pages in the [Serval Project Wiki][]:
|
2014-03-05 04:56:28 +00:00
|
|
|
* [Serval DNA overview][Serval DNA]
|
|
|
|
* [Serval DNA development][]
|
|
|
|
|
2016-09-13 01:04:12 +00:00
|
|
|
* [CONTRIBUTORS.md](./CONTRIBUTORS.md) -- individuals who have contributed to
|
|
|
|
the software
|
2014-03-05 04:56:28 +00:00
|
|
|
|
2016-01-11 06:15:08 +00:00
|
|
|
Bugs and issues
|
|
|
|
---------------
|
|
|
|
|
2016-09-13 01:04:12 +00:00
|
|
|
Bugs can be reported and inspected using the [GitHub issue tracker][Serval DNA issues].
|
2016-01-11 06:15:08 +00:00
|
|
|
|
2014-03-05 04:56:28 +00:00
|
|
|
What is in this repository?
|
|
|
|
---------------------------
|
|
|
|
|
|
|
|
This repository contains the [GNU C][] source code for the **servald**
|
|
|
|
executable, a [test framework](./testframework.sh) and [test scripts](./tests/)
|
2014-03-05 05:09:16 +00:00
|
|
|
written in [Bash][], some [technical documentation](./doc/), and various
|
|
|
|
support files for installation and configuration on various platforms.
|
2014-03-05 04:56:28 +00:00
|
|
|
|
|
|
|
The **servald** executable is a multi-purpose program that can be invoked
|
|
|
|
directly from the command line, run as a daemon process, or invoked via [JNI][]
|
|
|
|
from within a Java program. The **servald** executable is really many commands
|
|
|
|
built into one; the command-line arguments select which *command* to run. Some
|
|
|
|
commands are stand-alone utilities, some start and stop the servald daemon
|
|
|
|
process, some communicate with the servald daemon as an MDP client, and others
|
|
|
|
via a two-way [pipe][] called the *monitor interface*.
|
|
|
|
|
|
|
|
The following protocols and services are implemented in **servald**:
|
2012-10-29 06:12:39 +00:00
|
|
|
|
2013-05-22 06:45:49 +00:00
|
|
|
* The **[Distributed Numbering Architecture (DNA)][DNA]** is the key
|
2013-05-16 08:34:47 +00:00
|
|
|
innovation that makes mesh telephony viable in the absence of any
|
|
|
|
infrastructure, eg, in the aftermath of a natural disaster or in remote
|
2016-01-11 06:15:08 +00:00
|
|
|
locations. DNA is a protocol carried over MDP (see below) that asks many
|
|
|
|
devices at once if they will answer a phone number (DID). A device will
|
|
|
|
respond with its own subscriber identity (SID) if its user has “claimed”
|
|
|
|
that DID. This allows phone calls to be established over the mesh using
|
|
|
|
conventional phone numbers.
|
|
|
|
|
|
|
|
* The **[Serval Keyring][]** is a flat file containing all the user identities
|
|
|
|
on a single device. Each identity is a set of elliptic curve secret
|
2012-10-29 06:12:39 +00:00
|
|
|
cryptographic keys that belong to a single “mesh subscriber”, indexed by the
|
2016-01-11 06:15:08 +00:00
|
|
|
subscriber's 256-bit public key, called a SID. Each identity in the keyring
|
|
|
|
is locked by its own user-chosen password (called a PIN in the code and
|
2012-10-29 06:12:39 +00:00
|
|
|
documentation), using elliptic curve cryptography to protect locked entries
|
|
|
|
from theft or tampering, and steganography to allow the user to plausibly
|
2016-01-11 06:15:08 +00:00
|
|
|
deny the existence of locked identities.
|
2012-10-29 06:12:39 +00:00
|
|
|
|
2013-05-22 06:45:49 +00:00
|
|
|
* The **[Mesh Datagram Protocol (MDP)][MDP]** is Serval's own layer 3 protocol
|
2012-10-29 06:12:39 +00:00
|
|
|
designed for secure mesh networking. It is completely independent of
|
2016-01-11 06:15:08 +00:00
|
|
|
Internet protocols such as IP and UDP, although for the time being it is
|
|
|
|
implemented as an “overlay” network based on UDP/IP because that is the
|
|
|
|
interface that Linux and other operating systems provide for sending data
|
|
|
|
over Wi-Fi. However, MDP could easily be implemented directly over a layer
|
|
|
|
2 data link such as Wi-Fi or Ethernet MAC. MDP uses subscribers' public
|
|
|
|
keys (SID) as source and destination addresses, has a 32-bit port number
|
|
|
|
analogous to the 16-bit port number used in TCP/IP, and encrypts all packet
|
|
|
|
contents by default, using the public key (SID) of the destination.
|
|
|
|
|
|
|
|
* The **[Voice over Mesh Protocol (VoMP)][VoMP]** is Serval's own call
|
|
|
|
negotiation and two-way audio streaming protocol used to implement mesh
|
|
|
|
voice calls. It fills the same role as SIP/RTS, the dominant protocol used
|
|
|
|
for Voice over Internet Protocol, but VoMP is designed for the variable and
|
2013-05-16 08:34:47 +00:00
|
|
|
unstable conditions of wireless mesh networks. VoMP's session state model
|
|
|
|
and signalling can handle packet loss, mid-call re-routing and re-connection
|
|
|
|
where SIP would fail. VoMP's audio streaming can encapsulate many codecs
|
|
|
|
and even DTMF (dialpad button) signalling.
|
|
|
|
|
2016-01-11 06:15:08 +00:00
|
|
|
* **[Rhizome][]** is a content storage and distribution service implemented
|
|
|
|
using SQLite and a content-exchange protocol based on MDP. It can be used
|
|
|
|
to disseminate content like images, videos, documents, software upgrades,
|
|
|
|
etc. Each piece of content in Rhizome is called a “bundle”, which has two
|
|
|
|
parts: a *manifest* that describes the content, and the *payload*, which is
|
|
|
|
the content itself. Each bundle has its own unique cryptographic identifier
|
|
|
|
that allows any recipient to verify that it has not been tampered with. A
|
|
|
|
bundle's payload may be encrypted by the author so that only the designated
|
|
|
|
recipient can read it.
|
2012-10-29 06:12:39 +00:00
|
|
|
|
2013-12-05 04:40:58 +00:00
|
|
|
* The **[MeshMS][]** messaging service sends short text messages using Rhizome
|
|
|
|
as its transport. Each message thread is stored and carried in a pair of
|
|
|
|
journal bundles, one for each direction (ply).
|
2012-10-29 06:12:39 +00:00
|
|
|
|
2013-05-16 08:34:47 +00:00
|
|
|
* **[Serval Infrastructure][]** services may optionally be deployed on any devices
|
2012-10-29 06:12:39 +00:00
|
|
|
in the mesh to expose external services to mesh subscribers and vice versa
|
|
|
|
(eg, VoIP gateways, SMS satellite links, packetised web), and to overcome
|
|
|
|
scalability limitations of a perfectly decentralised mesh (eg, central
|
2014-03-05 05:09:16 +00:00
|
|
|
telephone directory). Serval Infrastructure is implemented as a daemon with
|
2016-01-11 06:15:08 +00:00
|
|
|
its own executable called `directory_service`.
|
2012-10-29 06:12:39 +00:00
|
|
|
|
|
|
|
Copyright and licensing
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
Serval DNA is [free software][] produced by the [Serval Project][] and many
|
2014-05-20 05:22:57 +00:00
|
|
|
[contributors][]. Its source code is licensed to the public under the [GNU
|
|
|
|
General Public License version 2][GPL2]. Its technical documentation is
|
|
|
|
licensed to the public under the [Creative Commons Attribution 4.0
|
|
|
|
International licence][CC BY 4.0]. All source code and technical documentation
|
|
|
|
is freely available from the Serval Project's [serval-dna][] Git repository on
|
|
|
|
[GitHub][].
|
2012-10-29 06:12:39 +00:00
|
|
|
|
2013-05-16 08:34:47 +00:00
|
|
|
The copyright in most of the source code in Serval DNA is held by [Serval
|
2013-05-29 04:45:40 +00:00
|
|
|
Project Inc.][SPI], a not-for-profit association incorporated in the state of
|
|
|
|
South Australia in the Commonwealth of Australia for the purpose of developing
|
2013-12-05 04:40:58 +00:00
|
|
|
the Serval mesh software. The [COPYRIGHT][] file contains a full list of all
|
|
|
|
those who hold copyright in portions of the Serval DNA source code.
|
2012-10-29 06:12:39 +00:00
|
|
|
|
2013-12-05 04:40:58 +00:00
|
|
|
The [Serval Project][] will accept contributions for which copyright has been
|
|
|
|
assigned to [Serval Project Inc.][SPI], or which are licensed to either [Serval
|
|
|
|
Project Inc.][SPI] or to the public on terms that allow the Serval Project to
|
|
|
|
freely redistribute and re-license the code under non-restrictive terms, for
|
|
|
|
example, to release Serval DNA as part of a product distributed through the
|
|
|
|
[Apple app store][].
|
|
|
|
|
|
|
|
Individual developers may assign copyright in their contributions by signing
|
|
|
|
the [Serval Project Developer Agreement - Individual][individ], and
|
|
|
|
organisations by signing the [Serval Project Developer Agreement -
|
|
|
|
Entity][entity].
|
2012-10-29 06:12:39 +00:00
|
|
|
|
2014-05-20 05:22:57 +00:00
|
|
|
-----
|
2016-09-21 09:01:31 +00:00
|
|
|
**Copyright 2015 Serval Project Inc.**
|
|
|
|
**Copyright 2016 Flinders University**
|
2014-05-20 05:22:57 +00:00
|
|
|
![CC-BY-4.0](./cc-by-4.0.png)
|
|
|
|
This document is available under the [Creative Commons Attribution 4.0 International licence][CC BY 4.0].
|
|
|
|
|
2013-12-03 04:35:05 +00:00
|
|
|
|
2012-10-29 06:12:39 +00:00
|
|
|
[Serval Project]: http://www.servalproject.org/
|
2013-05-29 04:45:40 +00:00
|
|
|
[Serval Project Wiki]: http://developer.servalproject.org/
|
|
|
|
[Serval DNA]: http://developer.servalproject.org/dokuwiki/doku.php?id=content:servaldna:
|
2014-03-05 05:09:16 +00:00
|
|
|
[Serval DNA development]: http://developer.servalproject.org/dokuwiki/doku.php?id=content:servaldna:development
|
2014-03-05 04:56:28 +00:00
|
|
|
[Serval Mesh]: http://developer.servalproject.org/dokuwiki/doku.php?id=content:servalmesh:
|
2014-03-05 05:09:16 +00:00
|
|
|
[Serval Mesh Extender]: http://developer.servalproject.org/dokuwiki/doku.php?id=content:meshextender:
|
2014-03-05 04:56:28 +00:00
|
|
|
[Serval mesh network]: http://developer.servalproject.org/dokuwiki/doku.php?id=content:tech:mesh_network
|
2013-05-16 08:34:47 +00:00
|
|
|
[SPI]: http://developer.servalproject.org/dokuwiki/doku.php?id=content:spi
|
2012-10-29 06:12:39 +00:00
|
|
|
[serval-dna]: https://github.com/servalproject/serval-dna
|
|
|
|
[batphone]: https://github.com/servalproject/batphone
|
2016-01-11 06:15:08 +00:00
|
|
|
[Serval DNA issues]: https://github.com/servalproject/serval-dna/issues
|
2012-10-29 06:12:39 +00:00
|
|
|
[issue #28]: https://github.com/servalproject/serval-dna/issues/28
|
|
|
|
[GNU C]: http://gcc.gnu.org/
|
|
|
|
[daemon]: http://en.wikipedia.org/wiki/Daemon_(computing)
|
|
|
|
[free software]: http://www.gnu.org/philosophy/free-sw.html
|
2013-12-03 04:35:05 +00:00
|
|
|
[contributors]: /servalproject/serval-dna/blob/development/CONTRIBUTORS.md
|
2012-10-29 06:12:39 +00:00
|
|
|
[GitHub]: https://github.com/servalproject
|
2013-12-05 04:40:58 +00:00
|
|
|
[COPYRIGHT]: ./COPYRIGHT.txt
|
2013-12-03 16:22:31 +00:00
|
|
|
[GPL2]: ./GPL-2.0.txt
|
2013-12-05 04:40:58 +00:00
|
|
|
[Apple app store]: http://www.fsf.org/blogs/licensing/more-about-the-app-store-gpl-enforcement
|
2013-05-16 08:34:47 +00:00
|
|
|
[individ]: http://developer.servalproject.org/files/serval_project_inc-individual.pdf
|
|
|
|
[entity]: http://developer.servalproject.org/files/serval_project_inc-entity.pdf
|
2013-05-22 06:45:49 +00:00
|
|
|
[DNA]: http://developer.servalproject.org/dokuwiki/doku.php?id=content:tech:dna
|
2013-05-16 08:34:47 +00:00
|
|
|
[Serval Keyring]: http://developer.servalproject.org/dokuwiki/doku.php?id=content:tech:keyring
|
2013-05-22 06:45:49 +00:00
|
|
|
[MDP]: http://developer.servalproject.org/dokuwiki/doku.php?id=content:tech:mdp
|
2013-05-16 08:34:47 +00:00
|
|
|
[VoMP]: http://developer.servalproject.org/dokuwiki/doku.php?id=content:tech:vomp
|
|
|
|
[Rhizome]: http://developer.servalproject.org/dokuwiki/doku.php?id=content:tech:rhizome
|
|
|
|
[MeshMS]: http://developer.servalproject.org/dokuwiki/doku.php?id=content:tech:meshms
|
|
|
|
[Serval Infrastructure]: http://developer.servalproject.org/dokuwiki/doku.php?id=content:tech:serval_infrastructure
|
2012-10-29 06:12:39 +00:00
|
|
|
[JNI]: http://en.wikipedia.org/wiki/Java_Native_Interface
|
2014-03-05 04:56:28 +00:00
|
|
|
[Bash]: http://en.wikipedia.org/wiki/Bash_(Unix_shell)
|
2012-10-29 06:12:39 +00:00
|
|
|
[pipe]: http://www.kernel.org/doc/man-pages/online/pages/man2/pipe.2.html
|
2014-05-21 07:59:22 +00:00
|
|
|
[CC BY 4.0]: ./LICENSE-DOCUMENTATION.md
|