Commit Graph

48 Commits

Author SHA1 Message Date
gardners
2252fdcaa7 created tool for automatically finding IN()s without matching
OUT()s or where return() is used instead of RETURN().
Added OUT() to end of all functions using IN() that lacked it to
make it easier to statically analyse this invariant.
Fixed several return instead of RETURNs detected through use of
this tool. #49
2013-02-20 16:18:56 +10:30
Jeremy Lakeman
c7caec488a Don't aggregate packets together on radio links 2013-02-20 15:36:23 +10:30
Jeremy Lakeman
7be03f15e7 Move link tracking to one c file 2012-12-14 17:07:28 +10:30
Andrew Bettison
7d970d8f92 Merge branch 'newconfig' into 'master' 2012-12-11 17:21:56 +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
Jeremy Lakeman
542a9f817d Send monitor announcement based on reachability change instead of routing calcs 2012-12-11 14:21:38 +10:30
Jeremy Lakeman
ed8be33f82 Please explains should be sent in packets with a full sid 2012-12-11 14:17:01 +10:30
Jeremy Lakeman
70266fc7e5 Resolve host names for use with a directory service 2012-12-10 16:15:37 +10:30
Jeremy Lakeman
c3f573ea7f Add more messages, wait for directory service to start first
And make sure gaps in sockaddr_in are zeroed.
2012-12-10 14:42:57 +10:30
Jeremy Lakeman
2932544eb8 Add IPv4 addresses to dummy interface 2012-12-10 14:06:25 +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
ce48ca97b0 Validate abbreviation length 2012-12-06 12:21:40 +10:30
Jeremy Lakeman
10ce16e1f3 Fix reading port number 2012-12-04 15:53:32 +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
d5f78bcffe Rework reachable link flags for simpler bitmask tests 2012-11-30 14:38:09 +10:30
Jeremy Lakeman
0e0137e968 Hide some buffer implementations details 2012-11-28 15:45:09 +10:30
Jeremy Lakeman
24a3ed1469 Simplify address abbreviation format and interface 2012-11-28 15:44:39 +10:30
Jeremy Lakeman
54f9d9b0e0 Rely on please explain, don't send too many full sids 2012-11-28 15:44:39 +10:30
Jeremy Lakeman
f13db5405e New payload header format 2012-11-28 15:43:59 +10:30
Jeremy Lakeman
627e86fb73 Shift all payload header writing to one place 2012-11-28 15:43:58 +10:30
Jeremy Lakeman
6d958f3bf3 Fix possible SEGV 2012-11-28 15:43:57 +10:30
Jeremy Lakeman
ce63e96db2 Use decode structure for tracking previous sid 2012-11-28 15:43:57 +10:30
Jeremy Lakeman
3dc831481e Degrade link score to zero within 20 seconds 2012-11-16 15:54:01 +10:30
Andrew Bettison
3d55a019c0 Quieten some unconditional DEBUG messages 2012-11-08 10:23:57 +10:30
Andrew Bettison
4450116472 Refactor string functions, add str_fromprint()
Move lots of non-Serval-specific string functions from "serval.h"/dataformats.c
to "str.h"/str.c.

Add str_fromprint() function that reverses the effect of toprint(): interprets
escape sequences in the source string "\n\t\r\0\xHH\\" and replaces them with a
single char in the destination string.
2012-11-07 16:42:45 +10:30
Paul Gardner-Stephen
dd3a5ae62d Fix compile errors and some warnings on solaris. 2012-10-15 15:36:36 +10:30
Jeremy Lakeman
4658251ebe Only allow abreviated SID's in route announcements 2012-10-10 15:29:36 +10:30
Jeremy Lakeman
e28deeb6d5 Move requested payload queue into frame structure 2012-10-09 15:44:37 +10:30
Jeremy Lakeman
275aa49903 Change route announcement format, add please explain support 2012-10-09 12:57:11 +10:30
Jeremy Lakeman
b72c01518b Move SAS key storage into subscriber structure 2012-10-03 13:59:46 +09:30
Jeremy Lakeman
ac00c06a18 Improve reliability of tests with dummy interface 2012-09-20 10:28:01 +09:30
Jeremy Lakeman
dc8a453b7f Add please explain message
- non-tick packets now include a poorly formed SELF_ANNOUNCE to correctly identify every packet sender
2012-09-20 10:28:01 +09:30
Jeremy Lakeman
5914bc92ce Use a directory service as a default route 2012-09-19 09:50:29 +09:30
Jeremy Lakeman
7c73ca7a78 Finish test and implementation of directory service 2012-09-18 12:30:15 +09:30
Jeremy Lakeman
8c49e0e486 Fix logic for periodically sending full SID's 2012-09-14 12:25:40 +09:30
Jeremy Lakeman
ac8d9b93e6 Add stub directory service 2012-09-14 11:50:45 +09:30
Jeremy Lakeman
a73b9ee7f7 Update unicast addresses if they change 2012-09-14 11:42:58 +09:30
Jeremy Lakeman
fbe9980199 Add explicit flag for unicast peers 2012-09-10 10:55:12 +09:30
Jeremy Lakeman
3dba4633b7 Fix port endian order 2012-09-07 13:38:06 +09:30
Jeremy Lakeman
2b530bb02a Trying to send unicast sas request 2012-09-07 13:04:40 +09:30
Jeremy Lakeman
3b55643b08 Send my full sid periodically for any outgoing payload header 2012-09-07 10:01:34 +09:30
Jeremy Lakeman
9e86bb476e Allow for parsing an expected broadcast address 2012-09-06 16:44:05 +09:30
Jeremy Lakeman
472a7cea20 Always send a full sid when we hear an unknown / new sid 2012-09-06 16:38:11 +09:30
Jeremy Lakeman
f9287149dd Setup unicast return address when receiving unicast packet 2012-09-06 15:21:31 +09:30
Jeremy Lakeman
cf22ef8e8c Ensure route and interface is still valid before sending packet 2012-09-01 12:41:50 +09: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