The Serval Project's Serval Daemon, incorporating Distributed Numbering Architecture (DNA), Rhizome, MDP, VoMP etc
Clone or download
Pull request Compare This branch is 19 commits ahead, 951 commits behind servalproject:development.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
asterisk_include
debian
doc
fec-3.0.1
java/org/servalproject
m4
nacl
openwrt/packages/serval-dna
sqlite-amalgamation-3070900
tests
utilities
win32
.dir-locals.el
.gitignore
Android.mk
CONTRIBUTORS.md
COPYRIGHT.txt
GPL-2.0.txt
INSTALL.md
Makefile.dbg
Makefile.in
README.md
aclocal.m4
check-in-out-return.c
cli.c
cli.h
commandline.c
conf.c
conf.h
conf_om.c
conf_parse.c
conf_schema.c
conf_schema.h
config.guess
config.sub
config_test.c
configure.in
constants.h
context1.c
crc32.c
crypto.c
crypto.h
dataformats.c
dataformats.h
directory_client.c
directory_service.c
dna_helper.c
encode.c
fakeradio.c
fdqueue.c
fdqueue.h
fifo.c
fifo.h
golay.c
golay.h
headerfiles.mk
http_server.c
http_server.h
httpd.c
httpd.h
install-sh
instance.c
jni.c
keyring.c
keyring.h
log.c
log.h
log_util.c
lsif.c
ltmain.sh
macconfig
main.c
mdp_client.c
mdp_client.h
mdp_filter.c
mdp_net.c
mem.c
mem.h
meshms.c
meshms.h
meshms_restful.c
meshpotato_build
monitor-cli.c
monitor-client.c
monitor-client.h
monitor.c
mpbuild
msp_client.c
msp_client.h
msp_proxy.c
net.c
net.h
nonce.c
os.c
os.h
overlay.c
overlay_address.c
overlay_address.h
overlay_buffer.c
overlay_buffer.h
overlay_interface.c
overlay_interface.h
overlay_link.c
overlay_mdp.c
overlay_mdp_services.c
overlay_olsr.c
overlay_packet.h
overlay_packetformats.c
overlay_packetradio.c
overlay_payload.c
overlay_queue.c
pa_phone.c
performance_timing.c
radio_link.c
radio_link.h
randombytes.c
rhizome.c
rhizome.h
rhizome_bundle.c
rhizome_crypto.c
rhizome_database.c
rhizome_direct.c
rhizome_direct_http.c
rhizome_fetch.c
rhizome_http.c
rhizome_packetformats.c
rhizome_restful.c
rhizome_store.c
rhizome_sync.c
rotbuf.c
rotbuf.h
route_link.c
serval.h
serval_packetvisualise.c
servalwrap.c
server.c
sha2.c
sha2.h
sighandlers.c
slip.c
socket.c
socket.h
sourcefiles.mk
srandomdev.c
str.c
str.h
strbuf.c
strbuf.h
strbuf_helpers.c
strbuf_helpers.h
strlcpy.c
strlcpy.h
testconfig.sh.in
testdefs.sh
testdefs_rhizome.sh
testframework.sh
testnacl.c
tfw_createfile.c
timeit.c
uuid.c
uuid.h
version_servald.c
version_string.sh
vomp.c
vomp_console.c
xprintf.c
xprintf.h

README.md

alt tag

This is the Commotion fork of Serval DNA. It includes minor fixes and modifications and custom Debian packaging.

Serval DNA

Serval Project, December 2013

This repository contains the source code for the “core” Serval components implemented in GNU C:

  • The Distributed Numbering Architecture (DNA) is the key innovation that makes mesh telephony viable in the absence of any infrastructure, eg, in the aftermath of a natural disaster or in remote locations. It is a protocol carried over MDP (see below) that allows any device to ask its neighboring devices for a phone number (DID). Such a request will propagate through the mesh, and any device may respond with the identity (SID) of a subscriber who has “claimed” that DID.

  • 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 cryptographic keys that belong to a single “mesh subscriber”, indexed by the 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 documentation), using elliptic curve cryptography to protect locked entries from theft or tampering, and steganography to allow the user to plausibly deny the existence of any locked identity.

  • The Mesh Datagram Protocol (MDP) is Serval's own layer 3 protocol designed for secure mesh networking. It is completely independent of Internet protocols such as IP and UDP, but for the time being 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 WiFi. However, MDP could easily be implemented directly over a layer 2 data link such as WiFi or Ethernet MAC. MDP uses subscribers' public keys (SID) as source and destination addresses, and has a 32-bit port number analogous to the 16-bit port number used in TCP/IP.

  • The Voice over Mesh Protocol (VoMP) is Serval's own call negotiation and two-way audio streaming protocol used to implement mesh voice calls. It is analogous to SIP/RTS, which is the dominant protocol used to implement Voice over Internet Protocol, but VoMP is designed for the variable and 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.

  • The Rhizome content distribution service is a storage engine implemented using SQLite and a content-exchange protocol based on MDP and HTTP for the pervasive dissemination of 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.

  • 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).

  • Serval Infrastructure services may optionally be deployed on any devices 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 telephone directory).

Most of these services are performed by a daemon process called servald. Serval Infrastructure is implemented by a separate daemon called directory_service.

Copyright and licensing

Serval DNA is free software produced by the Serval Project and many contributors. It is licensed to the public under the GNU General Public License version 2. All source code is freely available from the Serval Project's serval-dna Git repository on GitHub.

The copyright in most of the source code in Serval DNA is held by Serval Project Inc., a not-for-profit association incorporated in the state of South Australia in the Commonwealth of Australia for the purpose of developing 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.

The Serval Project will accept contributions for which copyright has been assigned to Serval Project Inc., or which are licensed to either Serval Project Inc. 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, and organisations by signing the Serval Project Developer Agreement - Entity.

Download, build and test

Instructions for downloading, building and testing Serval DNA are in INSTALL.md.

Configure

See doc/Servald-Configuration.

More information

The servald executable is a multi-purpose program designed to be invoked directly from the command line and also via JNI from within a Java program. The following command will print a summary of all the operations that servald offers:

$ servald help

Some operations are self-contained, 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.

For more documentation, see: