Commit Graph

29 Commits

Author SHA1 Message Date
Andrew Bettison
1efe6686fc Use config.h instead of -DHAVE_FOO=1
swiftc(1) requires every -D option to be prefixed with -Xcc, which
is not easy to achieve using autoconf.

Now instead of setting configuration macros like HAVE_LSEEK64 on the
command line using -D, they are defined in config.h, which is generated
by ./configure, ignored by Git, and included by all headers and source
files that use any configuration macro.

The dependency on Makefile has been replaced with a dependency on
Makefile.in and config.h, which helps avoid some redundant full
recompiles after running ./configure, because the configure script
does not overwrit config.h if its content does not change.
2016-10-19 16:27:20 +10:30
Andrew Bettison
8cb3afa7dc Replace cf_on_config_change() with "config_change" trigger
This is required to support feature-driven linking, in which the exact
list of which functions to call in response to a configuration re-load
is not known until link time.

The "config_change_log" trigger is called before "config_change", so
that the logger can respond to the change before other subsystems.
2016-10-19 09:30:54 +10:30
Jeremy Lakeman
bd47a8eb60 Use libsodium for retrieving random bytes 2016-05-09 10:32:04 +09:30
Jeremy Lakeman
7bc253e844 Refactor source and build process to split out test commands 2014-12-01 13:26:27 +10: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
8d80cf55f2 Fix printf formats 2013-12-16 15:19:15 +10:30
Andrew Bettison
f087e4ddee Fix -Wsign-compare warnings in fakeradio code
Replace int with unsigned or size_t for byte counts
2013-12-11 13:59:41 +10:30
Andrew Bettison
9b64bb87e0 Uniform copyright notices
Added some missing copyright/license block comments
2013-12-04 17:15:36 +10:30
Andrew Bettison
42ab9aec4c Merge branch 'development' into 'naf4'
Remove two redundant calls to rhizome_retrieve_manifest() in meshms.c,
revealed by an assert() in the stricter manifest parsing code

Fix header files included by socket.h
2013-12-02 17:17:47 +10:30
Jeremy Lakeman
1b34c2dc13 Improve test reliability 2013-11-27 13:10:09 +10:30
Jeremy Lakeman
5ea19ab538 Better approximation of TDMA timing 2013-11-27 13:00:02 +10:30
Jeremy Lakeman
bea9d36411 Drop radio packets based on the probability of receiving the header 2013-11-27 13:00:01 +10:30
Andrew Bettison
711364ad8d Merge branch 'meshextender' into 'development' 2013-11-21 17:05:03 +10:30
Andrew Bettison
7564d529a1 Add missing copyright/license comment blocks
Update a few existing copyright notices to reflect recent work
2013-11-21 16:05:18 +10:30
Andrew Bettison
291a631095 New header file "fdqueue.h"
So that "http_server.h" does not have to include "serval.h" which
creates a circular dependency.

Remove the __SERVALDNA__HTTP_SERVER_IMPLEMENTATION hack from
"http_server.h"
2013-10-25 00:20:53 +10:30
gardners
e9e0a1b4a4 allow setting of % of 252 byte RS protected packets that we want
to have delivered.  Adjust tests accordingly.  Create new test
for ~50% packet delivery on fakeradio in preparation for network
coding.
2013-10-23 19:45:50 -07:00
Andrew Bettison
ffafae86b1 Issue #11: replace long long with int64_t 2013-10-07 05:54:46 +10:30
Jeremy Lakeman
e3a5e8c353 Use heartbeat packets to control serial buffering
- Improve simulation of fakeradio
- Backtrack on partial RS errors in case of truncation / heartbeat insertion
2013-09-20 14:41:50 +09:30
Jeremy Lakeman
2a5ba97b48 Add rhizome test over fakeradio 2013-09-13 14:02:35 +09:30
Jeremy Lakeman
7076b5abb9 Protect most mavlink header bytes with FEC 2013-09-13 10:51:52 +09:30
Jeremy Lakeman
3f123e1875 Send the next packet via stream interface ASAP 2013-09-12 16:14:01 +09:30
Jeremy Lakeman
589c334d5b Fakeradio responds to mavlink heartbeat packets
- attempts to send mavlink packets in one piece
2013-09-12 14:07:08 +09:30
Jeremy Lakeman
e29564bc6c Refactor fakeradio
- completely event driven and non-blocking
- modelling of tx & rx serial buffers that will truncate on overfilling
- each radio takes turns to send a packet, with approx TDMA overhead
2013-09-11 15:03:43 +09:30
Jeremy Lakeman
e2c3f1a8fb Improve fakeradio
- block until writes have completed
- implement transfer rate throttling
- add optional bit-flip errors
2013-09-10 14:53:12 +09:30
Jeremy Lakeman
5c374e9e6e Basic routing test with simulated serial modem interface 2013-08-19 16:59:10 +09:30
gardners
776e8e4f00 greatly improved fakeradio.c to simulate an RFD900a radio.
Simulates +++ / ATO capture, as well as enabling and disabling
RSSI output with at&t=rssi and at&t commands.
Implements some data rate throttling to match real radio, but
untested.
2013-08-19 10:34:40 +09:30
Jeremy Lakeman
2d566dbd5b Fix fake radio 2013-02-20 15:36:26 +10:30
Jeremy Lakeman
45efb3f899 Add more raw options to serial interface 2013-02-20 15:36:24 +10:30
gardners
95f2ed3225 added simple fake radio driver with ~100ms latency. 2013-02-20 15:36:23 +10:30