The Serval Project's core daemon that implements Distributed Numbering Architecture (DNA), MDP, VoMP, Rhizome, MeshMS, etc.
Go to file
2013-10-14 10:15:56 +02:00
asterisk_include
Debian/etc
doc Minimal doc/OpenBTS.md points to app_servaldna repo 2013-05-30 15:52:37 +09:30
fec-3.0.1 Use heartbeat packets to control serial buffering 2013-09-20 14:41:50 +09:30
java/org/servalproject/servald
m4
nacl Avoid warning from unused variable. 2013-10-13 21:09:37 +02:00
openwrt/packages/serval-dna
sqlite-amalgamation-3070900
tests Send 3-way request to stop routing an identity 2013-10-14 14:40:19 +10:30
utilities
win32
.dir-locals.el
.gitignore Build fakeradio with other test binaries 2013-08-19 13:56:19 +09:30
aclocal.m4
Android.mk Issue #20: merge branch 'sockets' into 'development' 2013-09-19 04:30:14 +09:30
check-in-out-return.c
cli.c Move cli global state into a structure and pass it around 2013-07-03 16:51:27 +09:30
cli.h Clean up string formatting for 64bit compilation 2013-07-15 09:59:24 +09:30
commandline.c Initialize some struct members reported by the compiler. 2013-10-13 09:01:53 +02:00
conf_om.c
conf_parse.c
conf_schema.c Use sid_t everywhere 2013-10-09 18:54:21 +10:30
conf_schema.h Fix intermittent 'routing' test failures 2013-10-08 16:36:07 +10:30
conf.c Issue #11: replace long long with int64_t 2013-10-07 05:54:46 +10:30
conf.h
config_test.c Use sid_t everywhere 2013-10-09 18:54:21 +10:30
config.guess
config.sub
configure.in Issue #20: Make abstract sockets work 2013-09-19 17:26:06 +09:30
constants.h Send 3-way request to stop routing an identity 2013-10-14 14:40:19 +10:30
crc32.c
crypto.c Send 3-way request to stop routing an identity 2013-10-14 14:40:19 +10:30
crypto.h Add API to generate public key from private key 2013-07-25 14:40:59 +09:30
dataformats.c Issue #11: Use rhizome_filehash_t everywhere 2013-10-11 15:35:27 +10:30
directory_client.c Use sid_t everywhere 2013-10-09 18:54:21 +10:30
directory_service.c Use sid_t everywhere 2013-10-09 18:54:21 +10:30
dna_helper.c Make code to avoid compiler warnings about uninitialized variables simpler. Fix some more. 2013-10-13 22:55:24 +02:00
encode.c
fakeradio.c Make sure to check argc before use argv. 2013-10-13 09:01:35 +02:00
fdqueue.c Initialize a few more uninitialized values. 2013-10-13 09:49:25 +02:00
fifo.c
fifo.h
golay.c Add golay [12,24] FEC routines 2013-09-20 14:41:50 +09:30
golay.h Add golay [12,24] FEC routines 2013-09-20 14:41:50 +09:30
headerfiles.mk
install-sh
INSTALL.md Clean up a few details in INSTALL and README 2013-05-29 14:15:40 +09:30
instance.c Improve Serval instance path operations 2013-09-19 17:19:37 +09:30
jni.c
keyring.c Send 3-way request to stop routing an identity 2013-10-14 14:40:19 +10:30
log.c Use consistent integer types and formats 2013-09-09 12:09:40 +09:30
log.h Simplify packet debug logging 2013-09-20 14:41:50 +09:30
lsif.c Implement flow of mavlink packets over serial connections 2013-09-10 13:07:52 +09:30
ltmain.sh
macconfig
main.c Move cli global state into a structure and pass it around 2013-07-03 16:51:27 +09:30
Makefile.dbg
Makefile.in Enable more warnings and use the flags from dpkg-buildflags to enhance security. 2013-10-13 09:01:05 +02:00
mavlink.c Issue #11: use socklen_t instead of int where appropriate 2013-10-08 14:11:00 +10:30
mdp_client.c mdp_port_t 2013-10-09 19:22:51 +10:30
mdp_client.h mdp_port_t 2013-10-09 19:22:51 +10:30
mem.c
mem.h
meshms.c Remove default service=file for new manifests 2013-10-11 15:39:10 +10:30
meshpotato_build
monitor-cli.c Move cli global state into a structure and pass it around 2013-07-03 16:51:27 +09:30
monitor-client.c Remove MDP and Monitor socket names from config 2013-09-25 16:56:06 +09:30
monitor-client.h
monitor.c Use sid_t everywhere 2013-10-09 18:54:21 +10:30
mpbuild
net.c Add writev_all() function 2013-10-12 03:54:18 +10:30
net.h Add writev_all() function 2013-10-12 03:54:18 +10:30
nonce.c Move cli global state into a structure and pass it around 2013-07-03 16:51:27 +09:30
os.c urandombytes() size_t instead of unsigned long long 2013-10-07 04:47:23 +10:30
os.h Issue #11: replace long long with int64_t 2013-10-07 05:54:46 +10:30
overlay_address.c Use sid_t everywhere 2013-10-09 18:54:21 +10:30
overlay_address.h Use sid_t everywhere 2013-10-09 18:54:21 +10:30
overlay_buffer.c Improved debug to help diagnose MDP failures on Android 2013-10-07 04:47:13 +10:30
overlay_buffer.h Simplify mavlink link frame creation 2013-09-11 17:15:43 +09:30
overlay_interface.c Fix printf formats for 64bit compilation 2013-10-09 10:31:52 +10:30
overlay_link.c Use sid_t everywhere 2013-10-09 18:54:21 +10:30
overlay_mdp_services.c Send 3-way request to stop routing an identity 2013-10-14 14:40:19 +10:30
overlay_mdp.c Merge with latest development branch. 2013-10-14 10:15:56 +02:00
overlay_olsr.c Make code to avoid compiler warnings about uninitialized variables simpler. Fix some more. 2013-10-13 22:55:24 +02:00
overlay_packet.h Adjust retransmission delay based on measured RTT 2013-08-29 15:28:20 +09:30
overlay_packetformats.c Use sid_t everywhere 2013-10-09 18:54:21 +10:30
overlay_packetradio.c Send the next packet via stream interface ASAP 2013-09-12 16:14:01 +09:30
overlay_payload.c Use sid_t everywhere 2013-10-09 18:54:21 +10:30
overlay_queue.c Use sid_t everywhere 2013-10-09 18:54:21 +10:30
overlay.c Add test for server start with --keyring-pin option 2013-09-09 14:47:02 +09:30
pa_phone.c
performance_timing.c Avoid warnings about missing initializers. 2013-10-13 22:41:41 +02:00
randombytes.c More consistent use of sleep_ms 2013-08-27 15:14:17 +09:30
README.md Clean up a few details in INSTALL and README 2013-05-29 14:15:40 +09:30
rhizome_bundle.c Fix format patterns for 64-bit compilation 2013-10-14 14:45:43 +10:30
rhizome_crypto.c Use sid_t everywhere 2013-10-09 18:54:21 +10:30
rhizome_database.c Fix format patterns for 64-bit compilation 2013-10-14 14:45:43 +10:30
rhizome_direct_http.c Issue #11: improve types in file i/o functions 2013-10-11 16:24:51 +10:30
rhizome_direct.c Issue #11: replace long long with int64_t 2013-10-07 05:54:46 +10:30
rhizome_fetch.c Remove useless tests that have constant value because the variables are unsigned. 2013-10-13 22:56:48 +02:00
rhizome_http.c Issue #11: Use rhizome_filehash_t everywhere 2013-10-11 15:35:27 +10:30
rhizome_packetformats.c Issue #11: improve types in file i/o functions 2013-10-11 16:24:51 +10:30
rhizome_store.c Remove useless tests that have constant value because the variables are unsigned. 2013-10-13 22:56:48 +02:00
rhizome_sync.c Use sid_t everywhere 2013-10-09 18:54:21 +10:30
rhizome.c Fix format patterns for 64-bit compilation 2013-10-14 14:45:43 +10:30
rhizome.h Issue #11: improve types in file i/o functions 2013-10-11 16:24:51 +10:30
rotbuf.c
rotbuf.h
route_link.c Merge with latest development branch. 2013-10-14 10:15:56 +02:00
serval_packetvisualise.c Avoid warning from compiler about empty if block. 2013-10-13 22:17:42 +02:00
serval.h Merge with latest development branch. 2013-10-14 10:15:56 +02:00
servalwrap.c Fix android commandline interface 2013-07-09 16:46:16 +09:30
server.c Improve logic and logging in server_pid() 2013-10-07 04:47:23 +10:30
sha2.c Reorder keywords to avoid compilter warnings. 2013-10-13 22:12:17 +02:00
sha2.h
sighandlers.c
slip.c Issue #11: replace long long with int64_t 2013-10-07 05:54:46 +10:30
socket.c Fix bugs in new local socket naming code 2013-09-25 16:56:06 +09:30
sourcefiles.mk Use sid_t everywhere 2013-10-09 18:54:21 +10:30
srandomdev.c Correct test of FILE value. Get rid of compiler warning. 2013-10-13 22:19:18 +02:00
str.c Use sid_t everywhere 2013-10-09 18:54:21 +10:30
str.h Use sid_t everywhere 2013-10-09 18:54:21 +10:30
strbuf_helpers.c Reorder keywords to avoid compilter warnings. 2013-10-13 22:12:17 +02:00
strbuf_helpers.h Add writev_all() function 2013-10-12 03:54:18 +10:30
strbuf.c Use sid_t everywhere 2013-10-09 18:54:21 +10:30
strbuf.h Use sid_t everywhere 2013-10-09 18:54:21 +10:30
strlcpy.c
strlcpy.h
testconfig.sh.in
testdefs_rhizome.sh Improve Rhizome test functions 2013-09-30 16:39:58 +09:30
testdefs.sh Expand output of rhizome add and import 2013-09-27 22:34:22 +09:30
testframework.sh Improve test framework: assertGrep --fixed-strings option 2013-09-05 09:19:14 +09:30
testnacl.c
tfw_createfile.c Remove useless tests that have constant value because the variables are unsigned. 2013-10-13 22:56:48 +02:00
version_servald.c
version_string.sh Improve version_string.sh: detect changes in submodules 2013-10-07 04:47:13 +10:30
vomp_console.c Make code to avoid compiler warnings about uninitialized variables simpler. Fix some more. 2013-10-13 22:55:24 +02:00
vomp.c Use sid_t everywhere 2013-10-09 18:54:21 +10:30
xprintf.c
xprintf.h Resurrect packet visualisation 2013-09-02 14:55:02 +09:30

Serval DNA

Serval Project, May 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.

  • The MeshMS messaging service is implemented using Rhizome as its transport, with each thread represented as a pair of bundles, one for each direction. At present, the MeshMS logic is implemented in Java within the Serval Mesh Android app, but is planned to be re-implemented in C as part of Serval DNA (see issue #28).

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

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 Serval Project will accept contributions from individual developers who have agreed to the Serval Project Developer Agreement - Individual, and from organisations that have agreed to the Serval Project Developer Agreement - Entity.

Download, build and test

Instructions for downloading, building and testing Serval DNA are in INSTALL.md. (If that link is does not work, try INSTALL.md.)

Configure

See doc/Servald-Configuration (alternative link [doc/Servald-Configuration] (/servalproject/serval-dna/blob/master/doc/Servald-Configuration.md)).

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: