The Serval Project's core daemon that implements Distributed Numbering Architecture (DNA), MDP, VoMP, Rhizome, MeshMS, etc.
Go to file
2015-03-16 22:33:42 +10:30
Debian/etc Improve Debian init.d script and default file 2013-01-24 13:24:11 +10:30
doc Fix broken link 2015-01-07 15:56:56 +01:00
fec-3.0.1 Fix -Wsign-compare warnings: use size_t or unsigned for byte counts 2013-12-10 16:52:53 +10:30
java/org/servalproject Add support for mdp clients to provide a link layer packet transport 2015-03-02 15:44:34 +10:30
m4 Artefacts created by libtoolize -c -i 2012-09-12 15:21:50 +09:30
nacl Fix -Wsign-compare warnings in NaCl code 2013-12-11 13:58:51 +10:30
openwrt/packages/serval-dna Modify OpenWRT Makefile for development 2014-03-03 15:21:53 +10:30
sqlite-amalgamation-3070900 Fix sqlite compiler warnings, when building with gcc 2014-07-01 18:31:31 +09:30
tests POST /restful/rhizome/append for journals 2015-03-02 18:52:12 +10:30
utilities Fix Markdown formatting 2013-02-22 00:05:34 -08:00
win32 Allow clients to request variables for all records by passing empty did. 2011-04-27 12:17:26 +09:30
.dir-locals.el Add file to set emacs variables to match the prevailing style. 2012-07-29 13:52:46 +09:30
.gitignore Ignore new test binary 2015-02-06 09:56:36 +10:30
aclocal.m4 Merge branch 'master' of github.com:servalproject/serval-dna 2012-04-23 20:41:52 +09:30
android.c Flush stdout on android 2014-09-12 15:24:23 +09:30
Android.mk Pass PIE flags for compiling on Android L 2014-10-13 14:14:28 +10:30
cc-by-4.0.png Add copyright notices and CC-BY license to README.md and INSTALL.md 2014-05-20 14:52:57 +09:30
CC-BY-4.0.md Add text of CC BY 4.0 license 2014-05-21 17:37:23 +09:30
check-in-out-return.c Uniform copyright notices 2013-12-04 17:15:36 +10:30
cli.c Accept '#passphrase' for bundle secret arguments 2014-11-14 13:11:44 +10:30
cli.h Accept '#passphrase' for bundle secret arguments 2014-11-14 13:11:44 +10:30
commandline.c Treat null strings as empty 2015-03-02 15:44:34 +10:30
commandline.h Refactor source and build process to split out test commands 2014-12-01 13:26:27 +10:30
conf_cli.c Fix include order 2014-09-01 11:55:50 +09:30
conf_om.c Don't compare past the end of the parent key 2014-05-09 15:13:13 +09:30
conf_parse.c Refactor "conf_schema.h" to fix compile warnings 2014-08-14 16:40:30 +09:30
conf_schema.c Add support for mdp clients to provide a link layer packet transport 2015-03-02 15:44:34 +10:30
conf_schema.h Add config option to select packet radio type. 2014-10-01 15:52:14 +09:30
conf.c Refactor source and build process to split out test commands 2014-12-01 13:26:27 +10:30
conf.h Refactor "conf_schema.h" to fix compile warnings 2014-08-14 16:40:30 +09:30
config.guess Artefacts created by libtoolize -c -i 2012-09-12 15:21:50 +09:30
config.sub Artefacts created by libtoolize -c -i 2012-09-12 15:21:50 +09:30
configure.in Measure free space on Android using statfs() 2014-06-26 12:17:36 +09:30
console.c Build the array of console commands by using linkage tricks 2014-08-22 10:36:52 +09:30
console.h Overhaul Makefile and header files 2014-05-26 15:36:26 +09:30
constants.h Add support for mdp clients to provide a link layer packet transport 2015-03-02 15:44:34 +10:30
context1.c Fix compiler warning 2013-11-21 16:49:44 +10:30
CONTRIBUTORS.md Add CONTRIBUTORS.md file, fix alternative links in README.md 2013-12-03 15:05:05 +10:30
COPYRIGHT.txt Add Petter Reinholdtsen to copyright message 2013-12-09 16:27:58 +10:30
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 Accept '#passphrase' for bundle secret arguments 2014-11-14 13:11:44 +10:30
dataformats.h Initial msp library implementation with connection state tracking 2014-01-09 15:01:37 +10:30
directory_client.c Refactor keyring identity iteration 2014-10-31 15:19:59 +10:30
directory_service.c Fix un/signed comparison warning (error) 2014-09-11 16:10:49 +09:30
dna_helper.c Stop an existing dna helper on config reload 2014-10-02 10:49:20 +09:30
fakeradio.c Refactor source and build process to split out test commands 2014-12-01 13:26:27 +10:30
fdqueue.c Rework scheduler to allow for lazy but important alarms 2014-06-04 17:13:08 +09:30
fdqueue.h Rework scheduler to allow for lazy but important alarms 2014-06-04 17:13:08 +09:30
fifo.h Uniform copyright notices 2013-12-04 17:15:36 +10:30
golay.c Refactor to fix some OS-X compile warnings 2014-08-14 17:39:44 +09:30
golay.h Uniform #ifdef __SERVAL_DNA__... for headers 2013-12-04 17:15:36 +10:30
GPL-2.0.txt Add full text of GPL version 2.0 2013-12-04 02:52:31 +10:30
headerfiles.mk Accept '#passphrase' for bundle secret arguments 2014-11-14 13:11:44 +10:30
http_server.c HTTP server debug: log content of HTTP responses 2015-02-23 15:56:30 +10:30
http_server.h Allow lcal http servers to perform cross site scripting of restful APIs 2014-07-28 12:54:57 +09:30
httpd.c POST /restful/rhizome/append for journals 2015-03-02 18:52:12 +10:30
httpd.h POST /restful/rhizome/append for journals 2015-03-02 18:52:12 +10:30
install-sh Artefacts created by libtoolize -c -i 2012-09-12 15:21:50 +09:30
INSTALL.md Improve test framework: test coverage support 2014-06-06 14:47:54 +09:30
instance.c Overhaul Makefile and header files 2014-05-26 15:36:26 +09:30
instance.h Filesystem Heirarchy Standard (FHS) paths 2014-03-26 15:35:43 +10:30
jni.c Imported ref10/ implementation of crypto_sign from supercop-20120525 2012-10-18 17:26:48 +10:30
keyring_cli.c Fix test failure: create keyring 2015-02-23 13:24:05 +10:30
keyring_restful.c Refactor keyring identity iteration 2014-10-31 15:19:59 +10:30
keyring.c Fix test failure: create keyring 2015-02-23 13:24:05 +10:30
keyring.h Fix test failure: create keyring 2015-02-23 13:24:05 +10:30
LICENSE-DOCUMENTATION.md Add text of CC BY 4.0 license 2014-05-21 17:37:23 +09:30
limit.c Move rate limit code to separate file 2014-05-12 13:44:50 +09:30
limit.h Move rate limit code to separate file 2014-05-12 13:44:50 +09:30
log_stderr.c Move serverMode flag from log.c to server.c 2014-06-11 14:53:26 +09:30
log_util.c Refactor source and build process to split out test commands 2014-12-01 13:26:27 +10:30
log.c Refactor source and build process to split out test commands 2014-12-01 13:26:27 +10:30
log.h Move serverMode flag from log.c to server.c 2014-06-11 14:53:26 +09:30
logMessage.c Overhaul Makefile and header files 2014-05-26 15:36:26 +09:30
lsif.c initialise length field in netmask_addr 2014-10-31 15:18:22 +10:30
ltmain.sh Artefacts created by libtoolize -c -i 2012-09-12 15:21:50 +09:30
macconfig Fixed broadcast address discovery to work on Mac. 2011-08-08 16:11:05 +09:30
main.c Overhaul Makefile and header files 2014-05-26 15:36:26 +09:30
Makefile.dbg Move debug options to Makefile.dbg so we don't have to re-run configure. 2012-07-29 14:55:10 +09:30
Makefile.in Refactor source and build process to split out test commands 2014-12-01 13:26:27 +10:30
mdp_client.c Trace network paths that are supposed to exist 2014-09-23 14:54:22 +09:30
mdp_client.h Add support for mdp clients to provide a link layer packet transport 2015-03-02 15:44:34 +10:30
mdp_filter.c Move most console commands to other files 2014-08-25 16:03:30 +09:30
mdp_net.c Don't force the caller to initialise the address buffer length 2014-10-31 13:45:46 +10:30
mem.c Minor refactor in strn_edup() 2013-12-01 05:13:33 +10:30
mem.h Uniform #ifdef __SERVAL_DNA__... for headers 2013-12-04 17:15:36 +10:30
meshms_restful.c Fix bug in new RESTful MeshMS newsince logic 2014-11-19 22:57:16 +10:30
meshms.c Refactor meshms seed string generation 2014-11-14 13:11:43 +10:30
meshms.h Fix RESTful MeshMS newsince ACK logic 2014-11-12 23:09:00 +10:30
meshpotato_build Assorted unknown changes. Updated Makefile.in etc to properly build serval.c for building asterisk module. 2011-06-15 13:52:30 +09:30
monitor-cli.c Build the array of console commands by using linkage tricks 2014-08-22 10:36:52 +09:30
monitor-client.c Overhaul Makefile and header files 2014-05-26 15:36:26 +09:30
monitor-client.h Uniform #ifdef __SERVAL_DNA__... for headers 2013-12-04 17:15:36 +10:30
monitor.c Log the source of monitor errors 2014-10-03 11:16:41 +09:30
mpbuild Added mesh potato build script. 2011-08-10 15:39:40 +02:00
msp_client.c Fix off by one error in packet acknowledgment 2014-07-04 12:23:18 +09:30
msp_client.h Overhaul Makefile and header files 2014-05-26 15:36:26 +09:30
msp_proxy.c Build the array of console commands by using linkage tricks 2014-08-22 10:36:52 +09:30
net.c Overhaul Makefile and header files 2014-05-26 15:36:26 +09:30
net.h Overhaul Makefile and header files 2014-05-26 15:36:26 +09:30
network_cli.c Refactor source and build process to split out test commands 2014-12-01 13:26:27 +10:30
os.c fix OSX build errors. 2014-10-01 15:52:14 +09:30
os.h Add timestamps to meshms messages and acks 2014-07-14 13:43:37 +09:30
overlay_address.c Move most console commands to other files 2014-08-25 16:03:30 +09:30
overlay_address.h Refactor source and build process to split out test commands 2014-12-01 13:26:27 +10:30
overlay_buffer.c Remove unused debug flags 2014-05-26 14:01:34 +09:30
overlay_buffer.h Refactor rhizome mdp and vomp packet sending 2014-02-19 16:38:26 +10:30
overlay_interface.c Add support for mdp clients to provide a link layer packet transport 2015-03-02 15:44:34 +10:30
overlay_interface.h Add support for mdp clients to provide a link layer packet transport 2015-03-02 15:44:34 +10:30
overlay_link.c Allow for different routes per packet destination 2014-09-23 14:54:22 +09:30
overlay_mdp_services.c Refactor keyring identity iteration 2014-10-31 15:19:59 +10:30
overlay_mdp.c Add support for mdp clients to provide a link layer packet transport 2015-03-02 15:44:34 +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 Allow for different routes per packet destination 2014-09-23 14:54:22 +09:30
overlay_packetformats.c Fix duplicate payload detection over unicast links 2014-06-26 17:20:06 +09:30
overlay_packetradio.c Move most console commands to other files 2014-08-25 16:03:30 +09:30
overlay_payload.c Allow for different routes per packet destination 2014-09-23 14:54:22 +09:30
overlay_queue.c Allow for different routes per packet destination 2014-09-23 14:54:22 +09:30
performance_timing.c Sort timing details by duration then call count 2014-06-27 15:08:25 +09:30
radio_link.c Add config option to select packet radio type. 2014-10-01 15:52:14 +09:30
radio_link.h Uniform #ifdef __SERVAL_DNA__... for headers 2013-12-04 17:15:36 +10:30
randombytes.c More consistent use of sleep_ms 2013-08-27 15:14:17 +09:30
README.md Add text of CC BY 4.0 license 2014-05-21 17:37:23 +09:30
rhizome_bundle.c Update some copyright notices 2014-11-20 00:01:12 +10:30
rhizome_cli.c Rhizome test: cannot use "add file" to update a journal 2015-03-02 18:49:51 +10:30
rhizome_crypto.c Update some copyright notices 2014-11-20 00:01:12 +10:30
rhizome_database.c Update some copyright notices 2014-11-20 00:01:12 +10:30
rhizome_direct_http.c Ensure sql lock failures are returned. 2014-09-12 15:24:23 +09:30
rhizome_direct.c Build the array of console commands by using linkage tricks 2014-08-22 10:36:52 +09:30
rhizome_fetch.c Ensure sql lock failures are returned. 2014-09-12 15:24:23 +09:30
rhizome_http.c Ensure sql lock failures are returned. 2014-09-12 15:24:23 +09:30
rhizome_packetformats.c Improve debug info for rhizome sync 2014-06-28 20:27:29 +09:30
rhizome_restful.c POST /restful/rhizome/append for journals 2015-03-02 18:52:12 +10:30
rhizome_store.c POST /restful/rhizome/append for journals 2015-03-02 18:52:12 +10:30
rhizome_sync.c Improve debug info for rhizome sync 2014-06-28 20:27:29 +09:30
rhizome_types.h Accept '#passphrase' for bundle secret arguments 2014-11-14 13:11:44 +10:30
rhizome.c Update some copyright notices 2014-11-20 00:01:12 +10:30
rhizome.h POST /restful/rhizome/append for journals 2015-03-02 18:52:12 +10:30
rotbuf.c Fix bug in rotbuf_next_chunk() when rotation == 0 2013-05-15 16:46:39 +09:30
rotbuf.h Remove spurious rotbuf_log() declaration, fixes #75 2014-04-03 10:43:14 +10:30
route_link.c Add support for mdp clients to provide a link layer packet transport 2015-03-02 15:44:34 +10:30
serval_packetvisualise.c Overhaul Makefile and header files 2014-05-26 15:36:26 +09:30
serval_types.h Overhaul Makefile and header files 2014-05-26 15:36:26 +09:30
serval.h Add support for mdp clients to provide a link layer packet transport 2015-03-02 15:44:34 +10:30
servalwrap.c Fix android commandline interface 2013-07-09 16:46:16 +09:30
server.c Refactor source and build process to split out test commands 2014-12-01 13:26:27 +10:30
server.h Move most console commands to other files 2014-08-25 16:03:30 +09:30
sha2.c Add SHA512_Final_Len() et al 2014-11-13 09:59:21 +10:30
sha2.h Add SHA512_Final_Len() et al 2014-11-13 09:59:21 +10:30
sighandlers.c Overhaul Makefile and header files 2014-05-26 15:36:26 +09:30
sighandlers.h Overhaul Makefile and header files 2014-05-26 15:36:26 +09:30
simulator.c Fix conflict on UNUSED() macro from OpenJDK 7 2014-07-23 11:55:55 +09:30
simulator.h Create new AF_UNIX based network simulator 2014-05-23 10:47:22 +09:30
socket.c Overhaul Makefile and header files 2014-05-26 15:36:26 +09:30
socket.h Add support for mdp clients to provide a link layer packet transport 2015-03-02 15:44:34 +10:30
sourcefiles.mk Refactor source and build process to split out test commands 2014-12-01 13:26:27 +10:30
srandomdev.c Add supid copyright headers on request from Andrew Bettison in the serval project. 2013-12-07 18:38:14 +01:00
str.c Add alloca_sprintf() macro 2015-03-16 22:33:42 +10:30
str.h Add alloca_sprintf() macro 2015-03-16 22:33:42 +10:30
strbuf_helpers.c Rhizome Java API: improved form-data headers 2014-07-10 21:12:40 +09:30
strbuf_helpers.h Set up SEGV crash handler in main() not server() 2014-05-08 14:24:00 +09:30
strbuf.c Change return type of strbuf_sprintf() 2015-03-16 22:33:11 +10:30
strbuf.h Change return type of strbuf_sprintf() 2015-03-16 22:33:11 +10:30
strlcpy.c Fix issues arising from new strlcpy.c 2012-08-14 11:23:27 +09:30
strlcpy.h Fix build when strlcpy is present 2013-01-11 14:43:37 +10:30
test_cli.c Refactor source and build process to split out test commands 2014-12-01 13:26:27 +10:30
testconfig.sh.in Trival test of dna JNI command line entry point 2012-04-23 18:25:26 +09:30
testdefs_java.sh Rhizome Java API: list bundles new since token 2014-07-12 22:49:00 +09:30
testdefs_json.sh Split up 'rhizomehttp' test script 2014-06-26 15:08:48 +09:30
testdefs_meshms.sh Refactor tests: testdefs_java.sh, testdefs_meshms.sh 2014-06-19 09:54:29 +09:30
testdefs_rhizome.sh Fix Rhizome test defs: assert_stdout_add_file 2015-03-02 18:49:50 +10:30
testdefs.sh Improve test defs: assertions in unpack_stdout_list() 2015-02-16 11:16:15 +10:30
testframework.sh Improve test framework: begin/end_fixture 2015-03-02 18:49:50 +10:30
testnacl.c Add missing copyright/license comment blocks 2013-11-21 16:05:18 +10:30
tfw_createfile.c Allow write to return less bytes than we asked for, or zero 2014-10-31 13:45:46 +10:30
timeit.c add context switching speed test to "test memory" command. 2013-10-22 13:12:10 -07:00
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 Add "servald version" command and "make copyright" 2013-12-05 14:32:01 +10:30
version_string.sh Don't depend on .git folders or on error text strings 2014-12-12 11:01:34 +10:30
vomp_console.c Build the array of console commands by using linkage tricks 2014-08-22 10:36:52 +09:30
vomp.c Send ANSWERED message even if we never see RINGING 2014-10-01 15:53:19 +09:30
whence.c Overhaul Makefile and header files 2014-05-26 15:36:26 +09:30
whence.h Overhaul Makefile and header files 2014-05-26 15:36:26 +09:30
xprintf.c Add XPRINT strbuf adapter 2013-03-25 12:02:48 +10:30
xprintf.h Fix minor compilation issues on CentOS. 2014-10-20 12:35:21 +10:30

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. Its source code is licensed to the public under the GNU General Public License version 2. Its technical documentation is licensed to the public under the Creative Commons Attribution 4.0 International licence. All source code and technical documentation 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.


Copyright 2014 Serval Project Inc.
CC-BY-4.0 This document is available under the Creative Commons Attribution 4.0 International licence.