Debian/etc | ||
doc | ||
fec-3.0.1 | ||
java/org/servalproject | ||
javatest/org/servalproject/test | ||
m4 | ||
openwrt/packages/serval-dna | ||
sqlite-amalgamation-3140200 | ||
tests | ||
utilities | ||
win32 | ||
.dir-locals.el | ||
.gitignore | ||
android.c | ||
Android.mk | ||
base64.c | ||
base64.h | ||
build-libsodium.sh | ||
cc-by-4.0.png | ||
CC-BY-4.0.md | ||
check-in-out-return.c | ||
cli_stdio.c | ||
cli_stdio.h | ||
cli.c | ||
cli.h | ||
commandline.c | ||
commandline.h | ||
conf_cli.c | ||
conf_om.c | ||
conf_parse.c | ||
conf_schema.c | ||
conf_schema.h | ||
conf.c | ||
conf.h | ||
config.guess | ||
config.sub | ||
configure.ac | ||
console.c | ||
console.h | ||
constants.h | ||
context1.c | ||
CONTRIBUTORS.md | ||
COPYRIGHT.txt | ||
crypto.c | ||
crypto.h | ||
dataformats.c | ||
dataformats.h | ||
debug.h | ||
directory_client.c | ||
directory_service.c | ||
dna_helper.c | ||
echo_cli.c | ||
fakeradio.c | ||
fdqueue.c | ||
fdqueue.h | ||
feature.h | ||
fifo.h | ||
golay.c | ||
golay.h | ||
GPL-2.0.txt | ||
headerfiles.mk | ||
http_server.c | ||
http_server.h | ||
httpd.c | ||
httpd.h | ||
install-sh | ||
INSTALL.md | ||
instance.c | ||
instance.h | ||
jni_commandline.c | ||
jni_common.c | ||
jni_common.h | ||
jni_server.c | ||
keyring_cli.c | ||
keyring_restful.c | ||
keyring.c | ||
keyring.h | ||
lang.h | ||
LICENSE-DOCUMENTATION.md | ||
limit.c | ||
limit.h | ||
log_cli.c | ||
log_context.c | ||
log_stderr.c | ||
log_util.c | ||
log.c | ||
log.h | ||
logMessage.c | ||
lsif.c | ||
ltmain.sh | ||
macconfig | ||
main.c | ||
Makefile.dbg | ||
Makefile.in | ||
mdp_client.c | ||
mdp_client.h | ||
mdp_filter.c | ||
mem.c | ||
mem.h | ||
meshmb.c | ||
meshms_cli.c | ||
meshms_restful.c | ||
meshms.c | ||
meshms.h | ||
meshpotato_build | ||
message_ply.c | ||
message_ply.h | ||
monitor-cli.c | ||
monitor-client.c | ||
monitor-client.h | ||
monitor.c | ||
mpbuild | ||
msp_client.c | ||
msp_client.h | ||
msp_common.h | ||
msp_proxy.c | ||
msp_server.c | ||
msp_server.h | ||
net.c | ||
net.h | ||
network_cli.c | ||
nibble_tree.c | ||
nibble_tree.h | ||
numeric_str.c | ||
numeric_str.h | ||
os.c | ||
os.h | ||
overlay_address.c | ||
overlay_address.h | ||
overlay_buffer.c | ||
overlay_buffer.h | ||
overlay_interface.c | ||
overlay_interface.h | ||
overlay_link.c | ||
overlay_mdp_dnalookup.c | ||
overlay_mdp_echo.c | ||
overlay_mdp_keymaprequest.c | ||
overlay_mdp_rhizome.c | ||
overlay_mdp_trace.c | ||
overlay_mdp.c | ||
overlay_olsr.c | ||
overlay_packet.h | ||
overlay_packetformats.c | ||
overlay_packetradio.c | ||
overlay_payload.c | ||
overlay_probe.c | ||
overlay_queue.c | ||
overlay_stun.c | ||
overlay_stunreq.c | ||
performance_timing.c | ||
radio_link.c | ||
radio_link.h | ||
README.md | ||
rhizome_bundle.c | ||
rhizome_cli.c | ||
rhizome_crypto.c | ||
rhizome_database.c | ||
rhizome_direct_cli.c | ||
rhizome_direct_http.c | ||
rhizome_direct.c | ||
rhizome_fetch.c | ||
rhizome_http.c | ||
rhizome_packetformats.c | ||
rhizome_restful.c | ||
rhizome_store.c | ||
rhizome_sync_keys.c | ||
rhizome_sync.c | ||
rhizome_types.h | ||
rhizome.c | ||
rhizome.h | ||
rotbuf.c | ||
rotbuf.h | ||
route_link.c | ||
route_link.h | ||
section.h | ||
serval_packetvisualise.c | ||
serval_types.h | ||
serval.h | ||
servald_features.c | ||
servald_main.c | ||
servalwrap.c | ||
server_httpd.c | ||
server.c | ||
server.h | ||
sighandlers.c | ||
sighandlers.h | ||
simulator.c | ||
simulator.h | ||
socket.c | ||
socket.h | ||
sourcefiles.mk | ||
str.c | ||
str.h | ||
strbuf_helpers.c | ||
strbuf_helpers.h | ||
strbuf.c | ||
strbuf.h | ||
strlcpy.c | ||
strlcpy.h | ||
sync_keys.c | ||
sync_keys.h | ||
test_cli.c | ||
test_features.c | ||
testconfig.sh.in | ||
testdefs_java.sh | ||
testdefs_json.sh | ||
testdefs_meshms.sh | ||
testdefs_rhizome.sh | ||
testdefs.sh | ||
testframework.sh | ||
testnacl.c | ||
tfw_createfile.c | ||
timeit.c | ||
trigger.h | ||
uri.c | ||
uri.h | ||
uuid.c | ||
uuid.h | ||
version_cli.c | ||
version_servald.c | ||
version_servald.h | ||
version_string.sh | ||
vomp_console.c | ||
vomp.c | ||
whence.c | ||
whence.h | ||
xprintf.c | ||
xprintf.h |
Serval DNA
Serval Project, September 2016
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 Linux, Mac OS-X, and similar platforms
-
Notes for Developers contains useful information for developers of Serval DNA, which may also help resolve build issues
Configuration
- doc/Servald-Configuration.md describes how to set up and run a Serval DNA daemon
Documentation
-
INSTALL.md -- instructions to compile and install Serval DNA
-
doc/ -- technical documentation
-
once Serval DNA is built, its "help" command will print a summary of all the operations that servald offers:
$ ./servald help
-
the following pages in the Serval Project Wiki:
-
CONTRIBUTORS.md -- individuals who have contributed to the software
Bugs and issues
Bugs can be reported and inspected using the GitHub issue tracker.
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. DNA is a protocol carried over MDP (see below) that asks many devices at once if they will answer a phone number (DID). A device will respond with its own subscriber identity (SID) if its user has “claimed” that DID. This allows phone calls to be established over the mesh using conventional phone numbers.
-
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 locked identities.
-
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, although for the time being it 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 Wi-Fi. However, MDP could easily be implemented directly over a layer 2 data link such as Wi-Fi or Ethernet MAC. MDP uses subscribers' public keys (SID) as source and destination addresses, has a 32-bit port number analogous to the 16-bit port number used in TCP/IP, and encrypts all packet contents by default, using the public key (SID) of the destination.
-
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 fills the same role as SIP/RTS, the dominant protocol used for 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.
-
Rhizome is a content storage and distribution service implemented using SQLite and a content-exchange protocol based on MDP. It can be used to disseminate 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
.
Copyright and licensing
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 2015 Serval Project Inc.
Copyright 2016 Flinders University
This document is available under the Creative Commons Attribution 4.0 International licence.