Commit Graph

2784 Commits

Author SHA1 Message Date
Andrew Bettison
85448d5612 Fix bugs in keyring revealed by -Wunused-parameter 2013-12-09 18:19:58 +10:30
Andrew Bettison
48ef87a68b Fix -Wsign-compare warning in alloca_toprint_quoted() 2013-12-09 16:33:44 +10:30
Andrew Bettison
27b37c143f Fix -Wsign-compare warnings in strbuf 2013-12-09 16:29:06 +10:30
Andrew Bettison
6b3d4e563f Add Petter Reinholdtsen to copyright message 2013-12-09 16:27:58 +10:30
Andrew Bettison
63ad0affe8 Pull Petter Reinholdtsen's 'warnings-security' branch 2013-12-09 15:44:22 +10:30
Jeremy Lakeman
4c525ae281 Add is_watching method 2013-12-09 11:22:44 +10:30
Jeremy Lakeman
68b8f94b01 Add time constants representing +/- infinity, don't schedule an alarm that will never run 2013-12-09 11:22:44 +10:30
Jeremy Lakeman
3b14543750 Sleep while waiting for forked processes to complete 2013-12-09 11:22:44 +10:30
Petter Reinholdtsen
dd166c4ba2 Get rid of warning about comparing unsigned integer with >= 0 (always true). 2013-12-07 21:48:05 +01:00
Petter Reinholdtsen
3dff555073 Get rid of more warnings. 2013-12-07 20:51:57 +01:00
Petter Reinholdtsen
804af66308 Add supid copyright headers on request from Andrew Bettison in the serval project. 2013-12-07 18:38:14 +01:00
Petter Reinholdtsen
4d80c7c5db Merge branch 'development' into warnings-security 2013-12-07 17:57:46 +01:00
Jeremy Lakeman
1ed03e5bf3 Add compiler flags for android ndk build 2013-12-06 15:08:40 +10:30
Jeremy Lakeman
bc34c642ee Add link arguments so the linker can find math functions 2013-12-06 12:50:08 +10:30
Jeremy Lakeman
b63f1f0114 Fix formatting issues 2013-12-06 12:10:08 +10:30
Andrew Bettison
44b27bce57 Update README
Licensing and copyright, MeshMS, Rhizome
2013-12-05 15:10:58 +10:30
Andrew Bettison
9c124c8ba8 Add "servald version" command and "make copyright"
New COPYRIGHT.txt is regenerated manually using "make copyright" which
invokes the sp-copyright-tool utility from the serval-tools repo.
2013-12-05 14:32:01 +10:30
Andrew Bettison
5226e47ef6 Uniform #ifdef __SERVAL_DNA__... for headers 2013-12-04 17:15:36 +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
67b79d0390 Add full text of GPL version 2.0 2013-12-04 02:52:31 +10:30
Andrew Bettison
56309886f3 Merge branch 'naf4' into 'development'
Copyright notices added to most source files and headers

New 'config_test' make target

Add RHIZOME_BUNDLE_ID_xxx, deprecate RHIZOME_MANIFEST_ID_xxx

Consolidate Rhizome string functions
2013-12-04 02:09:30 +10:30
Andrew Bettison
a0392878d8 Remove alternative links from README.md
GitHub have fixed the README Markdown rendering on the
repository home page, so alternative links are no longer
needed
2013-12-03 15:18:48 +10:30
Andrew Bettison
41dcafb4f5 Add CONTRIBUTORS.md file, fix alternative links in README.md 2013-12-03 15:05:05 +10:30
Andrew Bettison
bf84c5815f Fix 'make install' target, add 'make uninstall'
Define $(sbindir) and $(exec_prefix)

Define $(INSTALL), $(INSTALL_PROGRAM) and $(INSTALL_DATA)

Use $(RM) instead of rm -f
2013-12-03 14:29:13 +10:30
Andrew Bettison
7aa291802a Merge branch 'install-target' of github.com:petterreinholdtsen/serval-dna into install-target 2013-12-03 11:56:39 +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
Andrew Bettison
4f0aa3a41c Improve test framework: include %label in fork log 2013-12-02 16:07:37 +10:30
Andrew Bettison
9953949c6e Improve test framework: forked commands inherit stdin
Remove the subshell parentheses around the command invoked using fork(),
so that the forked command inherits the file descriptors.  This allows
it to be used like "fork some command < input".
2013-12-02 15:56:32 +10:30
Andrew Bettison
2bb0d2047a Enforce valid Rhizome 'service' and 'name' strings 2013-12-02 11:12:31 +10:30
Petter Reinholdtsen
36a2eed016 Merge latest version. Clean up merge conflict. 2013-12-01 00:06:36 +01:00
Petter Reinholdtsen
7c9a964e47 Merge branch 'development' into install-target 2013-12-01 00:00:04 +01:00
Andrew Bettison
6bff87f7e5 Increase 'rhizomeprotocol' test case timeout
The 50% MDP packet loss test case is now likely to take more than 60
seconds to transfer the bundles, probably because of stricter manifest
syntax
2013-12-01 05:49:50 +10:30
Andrew Bettison
8db5f9c14a Merge branch 'anyservice' into 'development'
Allows any valid "service" manifest field in the "rhizome add file"
command

Many improvements in Rhizome manifest parsing; stricter manifest syntax
rules (no comment or blank lines, field names must be alphanumeric
identifiers), faster preliminary manifest inspection when receiving
manifest advertisements or syncing manifests

The 'development' branch introduces "struct socket_address" which
coincidentally fixed the recently encountered Linux kernel 3.12
recvmsg(2) EINVAL problem, so that 'rhizomeprotocol' tests which fail on
the 'anyservice' branch will pass after this merge
2013-12-01 05:44:01 +10:30
Andrew Bettison
0dd1b302b5 Rewrite Rhizome manifest parsing
Move validation checks into new function rhizome_manifest_validate()

Remove rhizome_manifest 'errors' field

Replace rhizome_manifest 'warnings' with 'malformed'

Replace rhizome_manifest 'manifest_bytes' with 'manifest_body_bytes' and
refactor to use 'manifest_all_bytes' in all manifest i/o

Refactor rhizome_manifest_verify() and reverse sense of return value to
match rhizome_manifest_validate()

New function rhizome_manifest_inspect() -- lightweight manifest parser
used when receiving Rhizome advertisements

New 'rhizomeops' test case for invalid manifest "service" field values,
now passes
2013-12-01 05:13:34 +10:30
Andrew Bettison
5e5e097d7f Accept any well formed Rhizome service field
Do not limit service field to only recognised supported values 'file',
'MeshMS1' and 'MeshMS2'

New test case checks for malformed service field, fails
2013-12-01 05:13:33 +10:30
Andrew Bettison
72482b3427 Better error logging for recvwithttl() 2013-12-01 05:13:33 +10:30
Andrew Bettison
16995f1041 Minor refactor in strn_edup() 2013-12-01 05:13:33 +10:30
Andrew Bettison
1d14f43050 Improve test framework: --timeout option in usage message 2013-12-01 05:13:33 +10:30
Andrew Bettison
dafa1fc186 Improve struct socket_address
Add struct sockaddr_in 'inet' union field, rename 'addr_un' union field
to 'local'

Replace recvwithttl()'s (struct sockaddr *) and socklen_t pair of args
with single (struct socket_address *) arg
2013-11-29 12:56:59 +10:30
Jeremy Lakeman
d45470ce81 Refactor radio link for better encapsulation 2013-11-27 13:13:08 +10:30
Jeremy Lakeman
cd639ba3b6 Use constants instead of magic numbers 2013-11-27 13:12:25 +10:30
Jeremy Lakeman
99d5d9fa1f Refactor dataformats into separate header 2013-11-27 13:11:42 +10:30
Jeremy Lakeman
6dbc623643 Increase mdp timeout based on file size 2013-11-27 13:11:40 +10:30
Jeremy Lakeman
0e6a3cd7cc Use interval parameter correctly even for unlimited pings 2013-11-27 13:11:37 +10:30
Jeremy Lakeman
28fc1da2d2 Encapsulate rhizome fetch logging 2013-11-27 13:10:55 +10:30
Jeremy Lakeman
1681abd620 Increase default mdp timeout & make it configurable 2013-11-27 13:10:11 +10:30
Jeremy Lakeman
62cd8c7555 Log any alarm we call more than 10,000 times a second (probably indicates a bug) 2013-11-27 13:10:10 +10:30
Jeremy Lakeman
844afcff0e Calculate golay parity regardless of CPU endian 2013-11-27 13:10:10 +10:30
Jeremy Lakeman
1b34c2dc13 Improve test reliability 2013-11-27 13:10:09 +10:30
Jeremy Lakeman
ad33264834 Rename mavlink to radio_link
- split link state from slip structures and encapsulate it completely
- allocate interface specific buffers on demand
2013-11-27 13:09:26 +10:30