Commit Graph

42 Commits

Author SHA1 Message Date
Jeremy Lakeman
adbbed5275 Add new rhizome sync protocol 2013-06-19 12:05:57 +09:30
Jeremy Lakeman
d7caaf4973 Add length of link record for forward compatibility 2013-04-29 10:06:22 +09:30
Jeremy Lakeman
af584994a2 Ensure encryption buffer doesn't move between nonce and cypher text allocation 2013-02-22 16:29:07 +10:30
Jeremy Lakeman
6d9bbe2e2c Refactor interface handling to separate encapsulation from stream type 2013-02-20 15:36:23 +10:30
Andrew Bettison
5985df751d Overhaul debug flags
Replace debugflags_t and DEBUG_XXX bit masks with config schema "debug.xxx"
entries.

No more support for "debug.all".
2012-12-11 15:59:46 +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
Andrew Bettison
5139d8d34d Add mem.c and "mem.h" with emalloc() etc. 2012-12-04 10:03:32 +10:30
Jeremy Lakeman
17690bab81 Add packed integer parsing to buffer functions 2012-11-28 15:45:14 +10:30
Jeremy Lakeman
0e0137e968 Hide some buffer implementations details 2012-11-28 15:45:09 +10:30
Jeremy Lakeman
f159e15901 Simplify payload length storage 2012-11-28 15:43:57 +10:30
Andrew Bettison
259b9a9d24 Logging/debug improvements: __WHENCE__, __whence
Introduce __WHENCE__ macro and a block comment in log.h explaining it.

In "primitive" kinds of functions, rename 'whence' arguments to '__whence' and
use WHYF(), WARNF(), DEBUGF() macros instead of calling logMessage() directly.
2012-10-16 17:00:03 +10:30
Paul Gardner-Stephen
dd3a5ae62d Fix compile errors and some warnings on solaris. 2012-10-15 15:36:36 +10:30
Jeremy Lakeman
e05806f25e Separate routing calculation from resulting rules, refactor more code to use subscriber structure 2012-08-31 15:11:18 +09:30
Jeremy Lakeman
f6c899e107 Refactor overlay buffer interface to support simple parsing 2012-08-31 15:03:07 +09:30
Andrew Bettison
27a0a6eeb5 Introduce struct __sourceloc
Replaces (const char *file, unsigned int line, const char *function) arguments
to all logging functions, simplifies malloc/free tracking code in
overlay_buffer.c and Rhizome manifest alloc/free tracking in rhizome_bundle.c.

Use __HERE__ macro instead of (__FILE__, __LINE__, __FUNCTION__) everywhere.

Special __NOWHERE__ macro is equivalent to (NULL, 0, NULL).

Declare net.c functions in new "net.h" header, so log.c doesn't have to pull
in the entire "serval.h" just to use write_str().

Facilitates progress on issue #2.
2012-08-23 12:31:07 +09:30
Jeremy Lakeman
1a468f23b6 Fix off by one bug in payload length storage 2012-08-16 16:25:20 +09:30
Andrew Bettison
813cf94f79 Replace fprintf(stderr,...) with DEBUGF(...) 2012-07-31 16:20:48 +09:30
Jeremy Lakeman
87515d5dda Allow a frame buffer to wrap an existing buffer 2012-07-18 14:43:14 +09:30
Jeremy Lakeman
e9566de0af Fix payload length fields 2012-07-13 12:18:49 +09:30
Andrew Bettison
3d0038754b Add HTTP port number to rhizome advertise packet 2012-06-25 18:03:00 +09:30
Andrew Bettison
881576212c Fix all trivial compiler warnings 2012-05-10 18:08:59 +09:30
gardners
171eb75d48 fixed packet size calculation bug. 2012-05-07 16:50:49 +09:30
gardners
3059a5c3e9 still tracking blasted memory corruption bug. 2012-04-20 17:14:04 +09:30
gardners
5c52c8e274 trying to find memory corruption bug, probably queue handling
related.
2012-04-20 17:14:04 +09:30
gardners
2a67153613 Really fixed RFS length patch bug and ob_indel processing. 2012-04-16 06:18:34 +09:30
gardners
e7e8b2d630 fixed bug in RFS size patching.
A lot of debug output tweaks to track the problem down.
2012-04-16 06:06:43 +09:30
gardners
ca24513599 Work towards actually authcrypting MDP payloads.
Not complete.
2012-04-14 02:14:41 +09:30
gardners
6759a26720 Cleaned out some debugging output after tracking down and fixing
memory corruption bug.  Next challenge is to find out why broadcast
MDP packets are not getting dispatched properly (is trying to treat
broadcast address as unicast address it seems).
2012-03-23 07:06:57 +10:30
gardners
2b42f77ccf Fixed some bounds checking, and added some fairly rigorous memory
handling debug aids. No known memory corruption bugs remain, I
think.
2012-03-22 17:10:27 +10:30
gardners
13d1d3084e Various fixes to track down memory handling bugs.
Fixed one free-before-time bug with queuing MDP frames.
Some heap corruption bug seems to remain.
2012-03-22 16:33:25 +10:30
gardners
70497df7b5 More work on MDP. Removed some debug fluff.
Added framework for MDP ping, and some work towards MDP port binding
and sending packets with option to wait for reply.  MDP server
doesn't yet support port binding, and client doesn't yet support
reading replies.
2012-03-19 16:06:34 +10:30
gardners
1eb4c34015 Renamed mphlr.h to serval.h
(also some temporary debugging has been added in some places)
2012-02-23 12:45:42 +10:30
gardners
2a3721506b More debugging output fixes and bug fixes for overlay operation.
Added proper check to suppress frames claiming to come from
ourselves ( necessary for squelching multi-hop broadcasts, although
we need an extra step there of having transaction ids on broadcast
frames so that we can flood smartly).
2012-01-10 20:27:36 +10:30
gardners
45835344fa Fixed some compiler warnings. 2012-01-03 14:46:22 +10:30
gardners
16fb3a3f61 Added missing GPL license statements. 2011-12-21 20:25:05 +10:30
gardners
c65bc0d764 Stub in place for processing selfannounce acks.
Some bug fixes with address expansion.
2011-09-11 17:21:09 +09:30
gardners
78e3bfc4a3 Finally looks like selfacknowledgement acks get sent and can be
decoded.  Now to actually use them ...
2011-09-07 13:09:54 +09:30
gardners
cbb1939241 Fixed various compiler warnings.
Change overlay_frame payload to use an overlay_buffer structure for
consistency and ease of payload construction.
Added some sanity checking to peer score calculation.
Getting closer to being able to TX acks to selfannouncements.
Other little things to accomplish these.
2011-09-05 12:19:53 +09:30
gardners
1d6d744067 More work towards overlay mesh.
Added single byte append to overlay_buffer type.
Added source interface to self-announce packets.
Probably other stuff, too.
2011-09-04 06:36:39 +09:30
gardners
b075b51c43 Merged overlay_payload and overlay_frame structures to just overlay_frame
which is now used for both encapsulation and decapsulation.
Improved payload length encoding scheme to be shorter for most payload
lengths.
selfannouncement frames now get directed to stub functions for
implementation.
2011-08-17 10:52:17 +09:30
gardners
2ff8541049 Woot! overlay mode now emits regular tick frames on interfaces it knows about.
Still doesn't know about broadcast properly or a pile of other things, oh, and
the frames are completely empty, but none the less, we are now sending frames.
2011-08-09 12:45:24 +08:00
gardners
6e172c76c9 Fixed broadcast address discovery to work on Mac.
Fixed Linux assumptions.
Added parsing of overlay mesh interface specification from command line.
Separated overlay mesh code out into several files.
Overlay mesh is still far from working, but the infrastructure is coming together.
2011-08-08 16:11:05 +09:30