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
Jeremy Lakeman
a77642fc9e
Support for binding internal handlers to mdp ports
2013-11-27 13:08:43 +10:30
Jeremy Lakeman
0d5d878521
Refactor socket name and address length handling
2013-11-27 13:08:37 +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
Jeremy Lakeman
6ec6a6c966
Fix printf formats
2013-11-27 12:59:52 +10:30
Andrew Bettison
46363db257
Format MDP port numbers as 0xXXXXXXXX
2013-11-26 17:44:49 +10:30
Andrew Bettison
e97e3db444
Silence unconditional DEBUG log message
2013-11-26 17:44:25 +10:30
Andrew Bettison
56349b962e
Remove bogus ERROR messages from Batphone log
...
Improve overlay buffer primitives to eliminate bugus logged ERRORs
"ob_makespace() failed" and "could not append payload of N bytes" and
also add buffer overflow checks to more packet construction code.
Fix link state timing logic to eliminate logged ERROR "Alarm `link_send`
tried to schedule a deadline 1343871867115ms ago"
Improve debug logging of some MDP and dummy interface read/write code
Add 'debug.overlaybuffer' and 'debug.subscriber' config options
2013-11-26 15:44:16 +10:30
Andrew Bettison
fb39dd84ef
Improve dummy file Read/Write debug logging
2013-11-26 15:33:54 +10:30
Andrew Bettison
39d6c4fc3a
strbuf_append_sockaddr_in()
2013-11-26 15:33:54 +10:30
Andrew Bettison
851dbb4d64
Add 'debug.subscriber' config option
...
Add debug logging to find_subscriber() function
2013-11-26 15:33:54 +10:30
Andrew Bettison
59a6ded10c
Update 'dnaprotocol' debug flags
2013-11-26 15:33:54 +10:30
Andrew Bettison
97ce07b76c
Improve MDP debug logging
2013-11-26 15:33:54 +10:30
Andrew Bettison
1bb60fd8bc
Add 'debug.overlaybuffer' logging
...
Instrument all ob_xxx() primitives with __whence
2013-11-26 15:33:54 +10:30
Andrew Bettison
e3ceedddf8
Fix link state routing timing logic
...
Avoid calling schedule() with zero alarm time
2013-11-26 15:33:54 +10:30
Andrew Bettison
a9ccd38adc
Improve overlay buffer ob_xxx() primitives
...
All ob_append_xxx(b,...) functions return void
ob_makespace() returns 1 if successful, 0 if not
Add ob_overrun(b) predicate to check for overrun after any number of
appends
2013-11-26 15:33:54 +10:30
Andrew Bettison
9cdf053320
Fix RETURN macros
...
Remove trailing semicolon
Fix RETURNNULL(X) -- was not executing X at all
2013-11-25 13:22:40 +10:30
Andrew Bettison
45450386db
Improve sendto(2) failure diagnostics
...
In MDP client and server MDP overlay code
2013-11-22 13:12:29 +10:30
Andrew Bettison
3805650736
Use ssize_t for sendto(2) return value, not int
...
Also improve error checking on ssize_t values (use ==-1 not <0) test
and cast ssize_t to size_t for comparisons
2013-11-22 11:55:09 +10:30
Andrew Bettison
e92e7cb65e
Improve sendto(2) error log messages
2013-11-22 11:55:09 +10:30
Andrew Bettison
9ddcfb87aa
Fix output delimiter in "reverse lookup" command
2013-11-22 11:55:09 +10:30
Jeremy Lakeman
0085291ae6
Remove stop file last during server shutdown to allow database cleanup
2013-11-21 18:11:47 +10:30
Jeremy Lakeman
a13189e554
Fix printf formats
2013-11-21 18:11:47 +10:30
Andrew Bettison
67a724b29d
Fix Android compiler warnings ("%zd" and ssize_t)
...
Also squash some unconditional DEBUG statements
2013-11-21 17:32:58 +10:30
Andrew Bettison
702d22de99
Fix version_string.sh: check for .git directory was too early
2013-11-21 17:09:25 +10:30
Andrew Bettison
711364ad8d
Merge branch 'meshextender' into 'development'
2013-11-21 17:05:03 +10:30
Andrew Bettison
8c06881fa3
Fix compiler warning
2013-11-21 16:49:44 +10:30
gardners
003603b97c
minor tweaks to bash compatibility fixes.
2013-11-21 16:36:59 +10:30
gardners
22258b60c0
fixes and improvements to handling of git repo with no tags on branch.
2013-11-21 16:35:02 +10:30
Jeremy Lakeman
36bc5ff390
Fix string buffer overflow
2013-11-21 16:29:10 +10:30
Jeremy Lakeman
8a3ee79797
Fix printf format
2013-11-21 16:19:14 +10:30
Jeremy Lakeman
56e91518b8
Fix fetch insert assertion
2013-11-21 16:16:12 +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