a665750f4c
still need to set bodies of frames, and schedule call backs, and handle the requests when received. |
||
---|---|---|
asterisk_include | ||
doc | ||
java/org/servalproject/servald | ||
m4 | ||
nacl | ||
openwrt/packages/serval-dna | ||
sqlite-amalgamation-3070900 | ||
tests | ||
win32 | ||
.dir-locals.el | ||
.gitignore | ||
aclocal.m4 | ||
Android.mk | ||
androidonlysources.mk | ||
asterisk_app.c | ||
audio_alsa.c | ||
audio_msm_g1.c | ||
audio_reflector.c | ||
audiodevices.c | ||
cli.c | ||
cli.h | ||
codecs.c | ||
commandline.c | ||
conf.c | ||
conf.h | ||
config.guess | ||
config.sub | ||
configure.in | ||
constants.h | ||
crypto.c | ||
crypto.h | ||
dataformats.c | ||
directory_client.c | ||
directory_service.c | ||
dna_helper.c | ||
encode.c | ||
fdqueue.c | ||
fifo.c | ||
fifo.h | ||
headerfiles.mk | ||
install-sh | ||
INSTALL.md | ||
jni.c | ||
keyring.c | ||
log.c | ||
log.h | ||
lsif.c | ||
ltmain.sh | ||
macconfig | ||
main.c | ||
Makefile.dbg | ||
Makefile.in | ||
mdp_client.c | ||
mdp_client.h | ||
meshpotato_build | ||
mkdir.c | ||
monitor-cli.c | ||
monitor-client.c | ||
monitor-client.h | ||
monitor.c | ||
mpbuild | ||
net.c | ||
net.h | ||
overlay_address.c | ||
overlay_address.h | ||
overlay_advertise.c | ||
overlay_buffer.c | ||
overlay_buffer.h | ||
overlay_interface.c | ||
overlay_mdp.c | ||
overlay_olsr.c | ||
overlay_packet.h | ||
overlay_packetformats.c | ||
overlay_payload.c | ||
overlay_queue.c | ||
overlay_route.c | ||
overlay.c | ||
pa_phone.c | ||
packetformats.c | ||
performance_timing.c | ||
randombytes.c | ||
README.md | ||
rhizome_bundle.c | ||
rhizome_crypto.c | ||
rhizome_database.c | ||
rhizome_direct_http.c | ||
rhizome_direct.c | ||
rhizome_fetch.c | ||
rhizome_http.c | ||
rhizome_packetformats.c | ||
rhizome.c | ||
rhizome.h | ||
serval_packetvisualise.c | ||
serval.h | ||
servalwrap.c | ||
server.c | ||
sha2.c | ||
sha2.h | ||
sighandlers.c | ||
socket.c | ||
socket.h | ||
sourcefiles.mk | ||
srandomdev.c | ||
str.c | ||
str.h | ||
strbuf_helpers.c | ||
strbuf_helpers.h | ||
strbuf.c | ||
strbuf.h | ||
strlcpy.c | ||
strlcpy.h | ||
testconfig.sh.in | ||
testdefs_rhizome.sh | ||
testdefs.sh | ||
testframework.sh | ||
testnacl.c | ||
tfw_createfile.c | ||
vomp_console.c | ||
vomp.c | ||
xprintf.c | ||
xprintf.h |
Serval DNA
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 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.
Copyright and licensing
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., an organisation 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.
servald
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 detail on the purpose and usage of the servald command-line, see the doc directory.
Build and test
Instructions for building and testing Serval DNA are in INSTALL.md. (If that link is does not work, try INSTALL.md.)