The Serval Project's core daemon that implements Distributed Numbering Architecture (DNA), MDP, VoMP, Rhizome, MeshMS, etc.
Go to file
2014-05-02 13:45:31 +09:30
asterisk_include Added support for batmand.peers file for reliable peer querying. 2011-03-21 13:08:35 +10:30
Debian/etc Improve Debian init.d script and default file 2013-01-24 13:24:11 +10:30
doc Document MSP API 2014-04-11 11:24:50 +09:30
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 Shortcut equals test when objects are the same instance 2014-03-27 13:32:15 +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 Reduce use of stderr in many places 2012-08-01 17:54:02 +09:30
tests Refactor 'vomp' test fifo handling 2014-04-30 17:21:58 +09: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 version_string.sh uses VERSION.txt if not in a Git repo 2014-03-03 15:21:53 +10:30
aclocal.m4 Merge branch 'master' of github.com:servalproject/serval-dna 2012-04-23 20:41:52 +09:30
Android.mk Fix android build, related to issue fix 2014-04-07 15:25:43 +09:30
check-in-out-return.c Uniform copyright notices 2013-12-04 17:15:36 +10:30
cli.c Fix -Wsign-compare warnings: use size_t or unsigned for byte counts 2013-12-10 16:52:53 +10:30
cli.h Fix -Wsign-compare warnings in CLI 2013-12-10 16:56:23 +10:30
commandline.c Improve "mdp ping" command 2014-04-17 16:09:34 +09:30
conf_om.c Fix -Wsign-compare warnings: make loop counters unsigned 2013-12-10 16:21:23 +10:30
conf_parse.c Fix -Wsign-compare warnings: make loop counters unsigned 2013-12-10 16:21:23 +10:30
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 MDP packet filter rules configuration 2014-04-29 15:31:50 +09:30
conf.c Fix config file timestamp bug 2014-04-29 15:04:20 +09:30
conf.h Fix config file timestamp bug 2014-04-29 15:04:20 +09:30
config_test.c Fix unsigned warning 2014-01-09 15:01:37 +10: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 Remove bitrot related to voip testing 2014-04-07 15:48:10 +09:30
constants.h Improve VOMP testing 2014-04-10 11:14:46 +09: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 Add size_t arg to strn_to_sid_t() 2014-04-29 13:39:21 +09:30
dataformats.h Initial msp library implementation with connection state tracking 2014-01-09 15:01:37 +10:30
directory_client.c Replace internal usage of overlay_mdp_dispatch 2014-02-19 16:39:42 +10:30
directory_service.c Fix config file timestamp bug 2014-04-29 15:04:20 +09:30
dna_helper.c Replace internal usage of overlay_mdp_dispatch 2014-02-19 16:39:42 +10:30
encode.c Put back a pile of files needed for building on osx, and also required 2012-03-15 10:57:38 +10:30
fakeradio.c Fix printf formats 2013-12-16 15:19:15 +10:30
fdqueue.c Initial msp library implementation with connection state tracking 2014-01-09 15:01:37 +10:30
fdqueue.h Clean up "serval.h" a bit 2014-04-07 14:27:32 +09:30
fifo.c Uniform copyright notices 2013-12-04 17:15:36 +10:30
fifo.h Uniform copyright notices 2013-12-04 17:15:36 +10:30
golay.c Uniform copyright notices 2013-12-04 17:15:36 +10: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 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 Configurable MOTD (Message of the Day) on HTTPD root page 2014-04-29 13:57:29 +09:30
httpd.h Implement HTTP POST /restful/meshms/<SID>/<SID>/sendmessage 2014-02-05 14:28:15 +10:30
install-sh Artefacts created by libtoolize -c -i 2012-09-12 15:21:50 +09:30
INSTALL.md Remove bitrot related to voip testing 2014-04-07 15:48:10 +09: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 Imported ref10/ implementation of crypto_sign from supercop-20120525 2012-10-18 17:26:48 +10:30
keyring.c Refactor keyring open/seed out of server() 2014-04-07 16:22:31 +09:30
keyring.h Migrate keyring sas commands 2014-02-19 16:37:45 +10:30
log_util.c Revive config_test.c 2013-11-21 16:05:17 +10:30
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 Remove spurius include of netinet/if_ether.h, fixes 2014-04-07 13:22:39 +09: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 Uniform copyright notices 2013-12-04 17:15:36 +10: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 Remove bitrot related to voip testing 2014-04-07 15:48:10 +09:30
mdp_client.c Improve "mdp ping" command 2014-04-17 16:09:34 +09:30
mdp_client.h New "config sync" command 2014-04-16 19:28:16 +09:30
mdp_filter.c MDP packet filter rules configuration 2014-04-29 15:31:50 +09:30
mdp_net.c Uniform copyright notices 2013-12-04 17:15:36 +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 Add size_t arg to strn_to_sid_t() 2014-04-29 13:39:21 +09: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 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 Fix -Wunused-parameter warnings 2013-12-09 18:22:18 +10:30
monitor-client.c Refactor 'vomp' test fifo handling 2014-04-30 17:21:58 +09:30
monitor-client.h Uniform #ifdef __SERVAL_DNA__... for headers 2013-12-04 17:15:36 +10:30
monitor.c Fix android build, related to issue fix 2014-04-07 15:25:43 +09:30
mpbuild Added mesh potato build script. 2011-08-10 15:39:40 +02:00
msp_client.c Add missing copyright messages 2014-04-07 14:39:21 +09:30
msp_client.h Add missing copyright messages 2014-04-07 14:39:21 +09:30
msp_proxy.c Add missing copyright messages 2014-04-07 14:39:21 +09:30
net.c Use ssize_t for read(2) and write(2) return value 2013-12-10 17:21:35 +10:30
net.h Uniform #ifdef __SERVAL_DNA__... for headers 2013-12-04 17:15:36 +10:30
nonce.c Fix -Wunused-parameter warnings 2013-12-09 18:22:18 +10:30
os.c Fix config file timestamp bug 2014-04-29 15:04:20 +09:30
os.h Fix config file timestamp bug 2014-04-29 15:04:20 +09:30
overlay_address.c Refactor interface addresses to use new socket_address struct 2014-01-09 15:01:38 +10:30
overlay_address.h MDP packet filter rules configuration 2014-04-29 15:31:50 +09: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 Finish removing SLIP code and test case 2014-04-07 16:22:31 +09:30
overlay_interface.h Add missing copyright messages 2014-04-07 14:39:21 +09: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 MDP packet filter rules configuration 2014-04-29 15:31:50 +09:30
overlay_olsr.c Refactor interface addresses to use new socket_address struct 2014-01-09 15:01:38 +10:30
overlay_packet.h MDP packet filter rules configuration 2014-04-29 15:31:50 +09: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 Change overlay_buffer fields from int to size_t 2013-12-10 17:03:30 +10:30
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 New config option: server.config_reload_interval_ms 2014-04-16 18:24:16 +09:30
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 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 Fix missing links in README 2014-03-05 15:39:16 +10:30
rhizome_bundle.c Fix Rhizome manifest parsing bug 2014-04-29 15:08:02 +09:30
rhizome_crypto.c Fix Rhizome manifest parsing bug 2014-04-29 15:08:02 +09: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 Remove rhizome_read_manifest_file() 2013-12-20 11:29:17 +10:30
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 Add size_t arg to strn_to_sid_t() 2014-04-29 13:39:21 +09:30
rhizome_store.c Only report that a payload exists if it actually exists 2014-04-07 13:22:27 +09: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 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 2014-04-03 10:43:14 +10:30
route_link.c Don't allow link_send() to dominate the scheduler 2014-03-05 09:57:17 -08:00
serval_packetvisualise.c Fix -Wsign-compare warnings: use size_t or unsigned for byte counts 2013-12-10 16:52:53 +10:30
serval.h MDP packet filter rules configuration 2014-04-29 15:31:50 +09:30
servalwrap.c Fix android commandline interface 2013-07-09 16:46:16 +09:30
server.c MDP packet filter rules configuration 2014-04-29 15:31:50 +09:30
sha2.c Add supid copyright headers on request from Andrew Bettison in the serval project. 2013-12-07 18:38:14 +01:00
sha2.h Substantial preparatory work towards Rhizome/MeshMS store-and-forward 2011-12-13 19:34:12 +10:30
sighandlers.c Add SIGINT handler to cleanup mdp sockets 2014-01-09 15:06:35 +10:30
socket.c Improve "mdp ping" command 2014-04-17 16:09:34 +09:30
socket.h Refactor socket helper functions to take socket_address struct 2014-02-20 14:44:38 +10:30
sourcefiles.mk Clean up "serval.h" a bit 2014-04-07 14:27:32 +09: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 strn_to_uint32() 2014-04-29 12:28:20 +09:30
str.h Add strn_to_uint32() 2014-04-29 12:28:20 +09:30
strbuf_helpers.c Fix config file timestamp bug 2014-04-29 15:04:20 +09:30
strbuf_helpers.h Fix config file timestamp bug 2014-04-29 15:04:20 +09:30
strbuf.c Format UUID strings as lower case hex 2013-11-13 12:45:02 +10:30
strbuf.h STRBUF_ALLOCA_FIT() macro 2014-01-20 15:37:14 +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
testconfig.sh.in Trival test of dna JNI command line entry point 2012-04-23 18:25:26 +09:30
testdefs_rhizome.sh Fix config file timestamp bug 2014-04-29 15:04:20 +09:30
testdefs.sh MDP packet filter rules configuration 2014-04-29 15:31:50 +09:30
testframework.sh Improve test framework: execute --error-on-fail 2014-05-02 13:45:31 +09:30
testnacl.c Add missing copyright/license comment blocks 2013-11-21 16:05:18 +10:30
tfw_createfile.c Fix -Wsign-compare warnings in tfw_createfile 2013-12-11 14:00:41 +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 Cleanup git version arguments 2014-03-05 10:26:54 -08:00
vomp_console.c Enhance console command to allow multiple concurrent calls 2014-04-10 13:46:07 +09:30
vomp.c Improve VOMP testing 2014-04-10 11:14:46 +09:30
xprintf.c Add XPRINT strbuf adapter 2013-03-25 12:02:48 +10:30
xprintf.h Uniform #ifdef __SERVAL_DNA__... for headers 2013-12-04 17:15:36 +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. 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.