The Serval Project's core daemon that implements Distributed Numbering Architecture (DNA), MDP, VoMP, Rhizome, MeshMS, etc.
Go to file
2014-04-03 10:36:38 +10:30
asterisk_include
Debian/etc
doc Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
fec-3.0.1
java/org/servalproject Shortcut equals test when objects are the same instance 2014-03-27 13:32:15 +10:30
m4
nacl
openwrt/packages/serval-dna Modify OpenWRT Makefile for development 2014-03-03 15:21:53 +10:30
sqlite-amalgamation-3070900
tests Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
utilities
win32
.dir-locals.el
.gitignore version_string.sh uses VERSION.txt if not in a Git repo 2014-03-03 15:21:53 +10:30
aclocal.m4
Android.mk Move Android INSTANCE_PATH from instance.c to Android.mk 2014-03-26 16:07:28 +10:30
check-in-out-return.c
cli.c
cli.h
commandline.c Use slightly cheaper JNI exception test 2014-03-27 13:30:46 +10:30
conf_om.c
conf_parse.c
conf_schema.c Add config set warning if attempting to drop packets on datagram sockets 2014-03-12 14:55:46 +10:30
conf_schema.h Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
conf.c Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
conf.h Rename "rhizome_http.h" to "httpd.h" 2014-02-03 21:40:05 +10:30
config_test.c Fix unsigned warning 2014-01-09 15:01:37 +10:30
config.guess
config.sub
configure.in Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
constants.h Refactor socket helper functions to take socket_address struct 2014-02-20 14:44:38 +10:30
context1.c
CONTRIBUTORS.md
COPYRIGHT.txt
crc32.c
crypto.c Migrate keyring sas commands 2014-02-19 16:37:45 +10:30
crypto.h Migrate keyring sas commands 2014-02-19 16:37:45 +10:30
dataformats.c
dataformats.h
directory_client.c Replace internal usage of overlay_mdp_dispatch 2014-02-19 16:39:42 +10:30
directory_service.c Replace internal usage of overlay_mdp_dispatch 2014-02-19 16:39:42 +10:30
dna_helper.c Replace internal usage of overlay_mdp_dispatch 2014-02-19 16:39:42 +10:30
encode.c
fakeradio.c
fdqueue.c
fdqueue.h
fifo.c
fifo.h
golay.c
golay.h
GPL-2.0.txt
headerfiles.mk New "instance.h" header 2014-03-24 15:29:57 +10:30
http_server.c Improve MeshMS RESTful HTTP failure reporting 2014-02-07 16:28:40 +10:30
http_server.h Improve MeshMS RESTful HTTP failure reporting 2014-02-07 16:28:40 +10:30
httpd.c Return mdp inet & http port numbers in servald start & status 2014-02-25 12:42:36 +10:30
httpd.h Implement HTTP POST /restful/meshms/<SID>/<SID>/sendmessage 2014-02-05 14:28:15 +10:30
install-sh
INSTALL.md Update README, INSTALL and OpenWRT instructions 2014-03-05 15:26:28 +10:30
instance.c Move Android INSTANCE_PATH from instance.c to Android.mk 2014-03-26 16:07:28 +10:30
instance.h Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
jni.c
keyring.c Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
keyring.h Migrate keyring sas commands 2014-02-19 16:37:45 +10:30
log_util.c
log.c Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
log.h Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
lsif.c Refactor interface addresses to use new socket_address struct 2014-01-09 15:01:38 +10:30
ltmain.sh
macconfig
main.c
Makefile.dbg
Makefile.in Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
mdp_client.c Refactor socket helper functions to take socket_address struct 2014-02-20 14:44:38 +10:30
mdp_client.h Replace internal usage of overlay_mdp_dispatch 2014-02-19 16:39:42 +10:30
mdp_filter.c Build filter framework for incoming mdp packets 2014-02-19 16:40:18 +10:30
mdp_net.c
mem.c
mem.h
meshms_restful.c Fix 64bit printf formatting 2014-02-12 15:09:07 +10:30
meshms.c Fix meshms conversations parsing when looking for a single SID 2014-02-12 15:08:24 +10:30
meshms.h Improve MeshMS RESTful HTTP failure reporting 2014-02-07 16:28:40 +10:30
meshpotato_build
monitor-cli.c
monitor-client.c Refactor socket helper functions to take socket_address struct 2014-02-20 14:44:38 +10:30
monitor-client.h
monitor.c Don't shuffle monitor client connections on close 2014-02-25 13:55:49 +10:30
mpbuild
msp_client.c Shutdown local tcp connection when remote msp connection has shutdown 2014-01-10 15:37:00 +10:30
msp_client.h Add command to support forwarding TCP connections to an MSP service 2014-01-09 15:06:35 +10:30
msp_proxy.c Refactor socket helper functions to take socket_address struct 2014-02-20 14:44:38 +10:30
net.c
net.h
nonce.c
os.c Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
os.h Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
overlay_address.c Refactor interface addresses to use new socket_address struct 2014-01-09 15:01:38 +10:30
overlay_address.h Build filter framework for incoming mdp packets 2014-02-19 16:40:18 +10:30
overlay_buffer.c Refactor rhizome mdp and vomp packet sending 2014-02-19 16:38:26 +10:30
overlay_buffer.h Refactor rhizome mdp and vomp packet sending 2014-02-19 16:38:26 +10:30
overlay_interface.c Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
overlay_interface.h Fix interface name comparison for detecting real interfaces 2014-01-20 16:01:29 +10:30
overlay_link.c Replace internal usage of overlay_mdp_dispatch 2014-02-19 16:39:42 +10:30
overlay_mdp_services.c Replace internal usage of overlay_mdp_dispatch 2014-02-19 16:39:42 +10:30
overlay_mdp.c Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
overlay_olsr.c Refactor interface addresses to use new socket_address struct 2014-01-09 15:01:38 +10:30
overlay_packet.h Swap to using NOCRYPT / NOSIGN for internal processing 2014-02-19 16:36:34 +10:30
overlay_packetformats.c Refactor socket helper functions to take socket_address struct 2014-02-20 14:44:38 +10:30
overlay_packetradio.c Refactor interface addresses to use new socket_address struct 2014-01-09 15:01:38 +10:30
overlay_payload.c
overlay_queue.c Don't report error when dropping a packet due to no peers 2014-03-27 13:31:43 +10:30
overlay.c Initialise client API sockets before PID file 2014-02-24 17:14:35 +10:30
pa_phone.c
performance_timing.c Refactor interface addresses to use new socket_address struct 2014-01-09 15:01:38 +10:30
radio_link.c Refactor interface addresses to use new socket_address struct 2014-01-09 15:01:38 +10:30
radio_link.h
randombytes.c
README.md Fix missing links in README 2014-03-05 15:39:16 +10:30
rhizome_bundle.c Fix "name=/file" bug in Rhizome add 2014-03-12 15:48:00 +10:30
rhizome_crypto.c Fix rhizome key generation for meshms 2014-01-22 15:51:06 +10:30
rhizome_database.c Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
rhizome_direct_http.c Fix enum compiler warnings (clang -Wenum-conversion) 2014-04-03 10:36:38 +10:30
rhizome_direct.c
rhizome_fetch.c Tidy up rhizome fetch status, remove duplicate data 2014-03-05 09:58:05 -08:00
rhizome_http.c Improve MeshMS RESTful HTTP failure reporting 2014-02-07 16:28:40 +10:30
rhizome_packetformats.c Enable rhizome HTTP transfers over loopback while using local sockets 2014-03-05 09:55:23 -08:00
rhizome_restful.c Rename uuid_t --> serval_uuid_t 2014-02-17 13:26:03 +10:30
rhizome_store.c Fix enum compiler warnings (clang -Wenum-conversion) 2014-04-03 10:36:38 +10:30
rhizome_sync.c Don't check the database again after tranfer completes 2014-03-05 10:04:33 -08:00
rhizome.c Rename "rhizome_http.h" to "httpd.h" 2014-02-03 21:40:05 +10:30
rhizome.h Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
rotbuf.c
rotbuf.h
route_link.c Don't allow link_send() to dominate the scheduler 2014-03-05 09:57:17 -08:00
serval_packetvisualise.c
serval.h Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
servalwrap.c
server.c Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
sha2.c
sha2.h
sighandlers.c Add SIGINT handler to cleanup mdp sockets 2014-01-09 15:06:35 +10:30
slip.c
socket.c Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
socket.h Refactor socket helper functions to take socket_address struct 2014-02-20 14:44:38 +10:30
sourcefiles.mk Refactor Makefile.in and Android.mk 2014-03-04 21:53:01 +10:30
srandomdev.c
str.c Fix formatting of strings with unknown size 2014-02-12 13:09:17 +10:30
str.h
strbuf_helpers.c "struct json_atom" with strbuf helper functions 2014-02-07 15:59:34 +10:30
strbuf_helpers.h "struct json_atom" with strbuf helper functions 2014-02-07 15:59:34 +10:30
strbuf.c
strbuf.h STRBUF_ALLOCA_FIT() macro 2014-01-20 15:37:14 +10:30
strlcpy.c
strlcpy.h
testconfig.sh.in
testdefs_rhizome.sh Fix "name=/file" bug in Rhizome add 2014-03-12 15:48:00 +10:30
testdefs.sh Fix test defs: pop_instance did not restore instance 2014-03-03 15:14:34 +10:30
testframework.sh Improve test framework: tfw_run() function 2014-03-03 15:14:34 +10:30
testnacl.c
tfw_createfile.c
timeit.c
uuid.c Rename uuid_t --> serval_uuid_t 2014-02-17 13:26:03 +10:30
uuid.h Rename uuid_t --> serval_uuid_t 2014-02-17 13:26:03 +10:30
version_servald.c
version_string.sh Cleanup git version arguments 2014-03-05 10:26:54 -08:00
vomp_console.c Introduce basic vomp console test 2014-02-19 16:39:05 +10:30
vomp.c Don't shuffle monitor client connections on close 2014-02-25 13:55:49 +10:30
xprintf.c
xprintf.h

Serval DNA

Serval Project, March 2014

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

INSTALL.md contains instructions for downloading, building and testing Serval DNA on most Linux and some Linux-like platforms.

Configuration

doc/Servald-Configuration.md describes how to set up and run a Serval DNA daemon.

Documentation

What is in this repository?

This repository contains the GNU C source code for the servald executable, a test framework and test scripts written in Bash, some technical documentation, and various support files for installation and configuration on various platforms.

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:

  • 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). Serval Infrastructure is implemented as a daemon with its own executable called directory_service.

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.