Commit Graph

72 Commits

Author SHA1 Message Date
Jeremy Lakeman
ade7428687 Don't overrun MDP MTU 2016-05-23 15:38:40 +09:30
Jeremy Lakeman
6b7aa800e4 Start syncing rhizome based on manifest hashes 2016-05-09 11:10:50 +09:30
Jeremy Lakeman
76be37a04e Add API for msp from within the daemon 2016-05-09 11:10:50 +09:30
Andrew Bettison
e8e87b8a34 Fix broken clang and Android builds
Recent addition of the GCC __attribute__(alloc_size) to some functions
in mem.h broke the build when using Clang 3.5.  This commit introduces
configure-time checks for all GCC attributes used in the Serval source
code, and adapts accordingly.
2015-11-23 15:00:25 +10:30
Jeremy Lakeman
a9b9f51a9f Add support for mdp clients to provide a link layer packet transport 2015-03-02 15:44:34 +10:30
gardners
2296196f7b Add config option to select packet radio type. 2014-10-01 15:52:14 +09:30
Jeremy Lakeman
97e7de03cd Fix include order 2014-09-01 11:55:50 +09:30
Andrew Bettison
d436705e64 Fix conflict on UNUSED() macro from OpenJDK 7
The OpenJDK 7 recently introduced the UNUSED() macro in their jni_md.h
header file, which is included from <jni.h>.  This causes a
compile-error if "constants.h", which defines our own UNUSED() macro, is
included as well as <jni.h>.

The OpenJDK UNUSED() macro is unsuitable for our own use, because it
prefixes the unused identifier with "UNUSED_" whereas we depend on the
parameter name remaining unchanged.

I have reported this as a Request for Enhancement with Oracle Java,
asking them to remove the UNUSED() macro, since it is not used by any
JNI or Java extension header files.  Review ID: JI-9013689.

In the meantime, constants.h now undefines UNUSED before defining it, so
including <jni.h> before "constants.h" will avoid a compile error.
2014-07-23 11:55:55 +09:30
Jeremy Lakeman
628a52ca87 Add monitor message for interface up/down events 2014-06-13 13:34:10 +09:30
Jeremy Lakeman
52da7778cd Allow closing a monitor connection to force the server to quit 2014-06-11 20:39:26 +09:30
Andrew Bettison
21f51965c1 Overhaul Makefile and header files
Make .o files in separate subdirectories for servald and library
Factor struct __sourceloc and __WHENCE__ from "log.h" into "whence.h"
Factor sid_t etc from "serval.h" into "serval_types.h"
Factor rhizome_bid_t etc from "rhizome.h" into "rhizome_types.h"
Do not include "serval.h" in library sources
Add log_stderr.c and logMessage.c for stand-alone executables
2014-05-26 15:36:26 +09:30
Jeremy Lakeman
672104bdd8 Create extensible service discovery protocol, with initial basic implementation 2014-05-09 11:21:18 +09:30
Andrew Bettison
df1814309b Improve MDP filter rules file syntax 2014-05-05 14:45:33 +09:30
Jeremy Lakeman
23cb4600e2 Improve VOMP testing 2014-04-10 11:14:46 +09:30
Jeremy Lakeman
b8971e51f4 Refactor socket helper functions to take socket_address struct 2014-02-20 14:44:38 +10:30
Jeremy Lakeman
b4a48e4cc8 Build filter framework for incoming mdp packets 2014-02-19 16:40:18 +10:30
Andrew Bettison
30b2059608 Fix -Wunused-parameter warnings
New UNUSED(param) macro suppresses the warning for a specific parameter

In some cases, removed the unused parameters.  In others, used the
parameter in a DEBUGF() or assert() statement to document the intent.
2013-12-09 18:22:18 +10:30
Andrew Bettison
5226e47ef6 Uniform #ifdef __SERVAL_DNA__... for headers 2013-12-04 17:15:36 +10:30
Andrew Bettison
fa21bec880 Rewrite HTTP server 2013-10-25 00:19:37 +10:30
Jeremy Lakeman
b8ec568711 Send 3-way request to stop routing an identity 2013-10-14 14:40:19 +10:30
Andrew Bettison
c0aa4796a1 Remove MDP and Monitor socket names from config
Now they are fixed names under the instance path: "mdp.socket" and
"monitor.socket".
2013-09-25 16:56:06 +09:30
Jeremy Lakeman
8935db4184 Only ack soon if we have been asked to 2013-08-30 17:38:29 +09:30
Jeremy Lakeman
e4efbf3c8a Define byte values for new codec support 2013-06-25 10:34:36 +09:30
Jeremy Lakeman
adbbed5275 Add new rhizome sync protocol 2013-06-19 12:05:57 +09:30
Jeremy Lakeman
d3a13f8d2c Fix stupid bug, test was backwards 2013-06-03 16:04:08 +09:30
Jeremy Lakeman
c22f24fb19 Remove unused constant (never actually used) 2013-05-29 11:58:06 +09:30
Jeremy Lakeman
5b4e4919cf Mark resent packets so they can be dropped 2013-05-29 11:58:05 +09:30
Jeremy Lakeman
e5856225cf Add packet retransmissions due to missed ack's 2013-05-29 11:58:05 +09:30
Jeremy Lakeman
ef1e93bf52 Establish neighbour links with nodes running our legacy routing engine 2013-05-09 16:57:33 +09:30
Jeremy Lakeman
79f4a78278 Add link state monitor commands 2013-05-02 16:19:59 +09:30
Jeremy Lakeman
9ee09e36a0 Replace old routing engine with new link state engine 2013-05-02 14:29:28 +09:30
Jeremy Lakeman
85b885dde2 Add basic link state routing 2013-04-26 16:54:01 +09:30
Andrew Bettison
8771a50b14 Fix TTL out-of-range bug
Was causing two routing tests to fail since the TTL decrement
logic was fixed in a8b88a46

The default TTL of 64 overflowed the 5-bit unsigned int in the MDP
packet header
2013-04-23 16:02:39 +09:30
Jeremy Lakeman
bb8b3d6376 Add new mdp trace command 2013-02-20 16:18:58 +10:30
Jeremy Lakeman
6d9bbe2e2c Refactor interface handling to separate encapsulation from stream type 2013-02-20 15:36:23 +10:30
Jeremy Lakeman
ba1800012e Only advertise BAR's on an alarm
- we no longer hit the database for every outgoing packet, attempting to announce bundles
- we no longer advertise manifests periodically
- when an interesting bar arrives, we ask for the manifest to be announced, which uses the existing packet format
2013-02-20 15:36:23 +10:30
Jeremy Lakeman
c7caec488a Don't aggregate packets together on radio links 2013-02-20 15:36:23 +10:30
Jeremy Lakeman
fec19eee58 Increase vomp dial timeout 2013-01-26 13:08:38 +10:30
Jeremy Lakeman
82db15db5b Use any packet as a self-announce
Stop sending OF_TYPE_SELFANNOUNCE
Deprecate OF_TYPE_DATA_VOICE
Tweak payload priorities
Don't allow client applications to send high priority payloads
2012-12-16 10:09:29 +10:30
Jeremy Lakeman
78aa01ad30 Add stun lookup messages 2012-12-10 14:05:57 +10:30
Andrew Bettison
8425882ffc Merge branch 'newconfig' into 'master'
Conflicts:
	commandline.c
	conf.h
	dataformats.c
	log.h
	overlay_address.c
	overlay_interface.c
	packetformats.c
	rhizome.c
	serval.h
	tests/directory_service
	vomp_console.c
2012-12-07 14:09:55 +10:30
Jeremy Lakeman
a4eaf37bbd Shrink vomp headers, reduce servald's knowledge of codec details 2012-12-05 15:38:04 +10:30
Jeremy Lakeman
3dfd64f4da Add manually triggered network scan command 2012-12-05 15:13:47 +10:30
Jeremy Lakeman
5c7eb4a594 Add unicast probe packets
Probe directory service instead of assuming that it is always reachable
Fix directory service and routing tests
2012-12-04 14:47:57 +10:30
Andrew Bettison
caa209fc1d Integrate new config into servald
Not passing any tests yet, but compiles and links and simple uses do not
SEGV.
2012-12-04 14:12:28 +10:30
Jeremy Lakeman
2b21a691ca Merge remote-tracking branch 'origin/master' into packet_format
Conflicts:
	constants.h
	packetformats.c
2012-12-03 14:10:32 +10:30
gardners
a665750f4c prepare and dispatch mdp frames for rhizome over mdp.
still need to set bodies of frames, and schedule call backs,
and handle the requests when received.
2012-11-29 21:08:11 +10:30
Jeremy Lakeman
1cd6b6955a Renumber well known mdp ports to use less bits 2012-11-28 15:44:40 +10:30
Jeremy Lakeman
dee3367308 Reduce byte count for mdp payloads by excluding overlay type 2012-11-28 15:44:40 +10:30
Jeremy Lakeman
527e922e29 reduce MTU to fit in a single packet 2012-11-28 15:44:39 +10:30