gardners
c05ebada8c
more work on rhizome over MDP.
2012-11-29 20:39:30 +10:30
Andrew Bettison
f42292ffc6
Refactor emalloc() etc. into mem.c/.h
2012-11-29 17:12:43 +10:30
Andrew Bettison
3686a4ade4
Improve new config code to use "log.h"
...
With all the __whence/__WHENCE__ goodness, ready for integration into servald.
2012-11-29 16:44:06 +10:30
gardners
629a36f041
call switch to mdp fetch if http request setup fails.
2012-11-29 16:43:19 +10:30
gardners
a07e5761c4
added code to try switching to mdp if http fetching fails for
...
any reason.
2012-11-29 16:15:51 +10:30
Andrew Bettison
f654d435b1
Rename some new config source and header files
2012-11-29 16:12:03 +10:30
Andrew Bettison
2853d346f1
Re-organise new config code some more
...
Split into several source .c files, leave throw-away code in config_test.c.
2012-11-29 16:07:34 +10:30
gardners
faad1f26b1
Pass SID as well as ip:port through rhizome fetch request logic.
...
This is in preparation for rhizome over MDP.
2012-11-29 15:38:04 +10:30
Andrew Bettison
32debf57ef
Reorganise and rename new config code ready for integration
2012-11-29 14:33:32 +10:30
Andrew Bettison
fdb3249522
Improve toprint_str() function
...
If supplied string pointer is null, return "NULL" result instead of SEGV.
2012-11-29 14:32:43 +10:30
Andrew Bettison
23fff99fee
Add remaining config options to new config schema
2012-11-29 13:21:12 +10:30
Andrew Bettison
b940ac8617
Improve new config prototype code
...
Sort ARRAYs if optional key comparison function is given in schema, no longer
the role of the validator function.
2012-11-29 11:48:01 +10:30
Andrew Bettison
e2f6989fe8
Improve new config prototype code
...
Rework ARRAYs, replacing label string with typed key, declaring KEY and VALUE
independently.
Implement dna.helper.argv array using key of type unsigned short.
Implement mdp.iftype.<interfacetype>.tick_ms using key of type short for the
interface type code.
2012-11-29 09:24:02 +10:30
Andrew Bettison
58bf0e1752
Improve new config prototype code
...
Add hosts.SIDHEX.{interface,network,port} config options.
2012-11-29 06:28:28 +10:30
Andrew Bettison
e7cda64190
Improve new config prototype code
...
The dna.helper.argv validation function now sorts the array in numerical order
of labels using qsort(3).
Add LABELLEN argument to ARRAY schema macros, to control the size of the
label[] string (was fixed at 41 chars before).
2012-11-29 05:47:52 +10:30
Andrew Bettison
c6b2efe396
Improve new config prototype code
...
Add monitor.socket and monitor.uid to schema.
Remove some deprecated warning functions.
2012-11-28 18:13:53 +10:30
Andrew Bettison
af6a912a1f
Improve new config prototype code
...
Implement dna.helper.argv array label validation.
Ignore comment lines starting with '#'.
2012-11-28 17:54:19 +10:30
Jeremy Lakeman
053fa0d52f
Reduce size of MDP port encoding
2012-11-28 15:45:14 +10:30
Jeremy Lakeman
a978e9ae22
Add place holder for packet sequence numbers
2012-11-28 15:45:14 +10:30
Jeremy Lakeman
17690bab81
Add packed integer parsing to buffer functions
2012-11-28 15:45:14 +10:30
Jeremy Lakeman
f86176f3bd
Reserve high nonce bit for future use
2012-11-28 15:45:14 +10:30
Jeremy Lakeman
383a63107f
Use named constant for crypto_box_BOXZEROBYTES
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
1cd6b6955a
Renumber well known mdp ports to use less bits
2012-11-28 15:44:40 +10:30
Jeremy Lakeman
dee3367308
Reduce byte count for mdp payloads by excluding overlay type
2012-11-28 15:44:40 +10:30
Jeremy Lakeman
527e922e29
reduce MTU to fit in a single packet
2012-11-28 15:44:39 +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
aeaeac8a79
No broadcast id required for single hop
2012-11-28 15:44:39 +10:30
Jeremy Lakeman
9939400c82
Remove dead code
2012-11-28 15:44:33 +10:30
Jeremy Lakeman
f13db5405e
New payload header format
2012-11-28 15:43:59 +10:30
Jeremy Lakeman
5a5853f38a
Don't lookup subscribers twice for route announcements
2012-11-28 15:43:58 +10:30
Jeremy Lakeman
e0878644fe
Add command to dump routing table
2012-11-28 15:43:58 +10:30
Jeremy Lakeman
f8f760b95b
Parse all announcements in the payload
2012-11-28 15:43:58 +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
f159e15901
Simplify payload length storage
2012-11-28 15:43:57 +10:30
Jeremy Lakeman
a358d924d7
Remove type flag bits
2012-11-28 15:43:57 +10:30
Jeremy Lakeman
46158fea7e
Remove obsolete constants
2012-11-28 15:43:57 +10:30
Jeremy Lakeman
a84022bc24
Change header to include sender id
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
3d14e2f3db
Hide more information about packet headers
2012-11-28 15:43:56 +10:30
Jeremy Lakeman
4ca6db34d6
Encapsulate payload header details
2012-11-28 15:40:39 +10:30
Andrew Bettison
c4b90a108b
Fix compile warnings on Solaris (gcc 4.4)
2012-11-28 14:13:25 +10:30
Andrew Bettison
8e8a3b1ea2
Improve new config prototype code
...
Add label parser functions to ARRAY schema, use to enforce numeric argv labels
numbered from 1.
2012-11-27 18:10:51 +10:30
Andrew Bettison
479ec5d0df
Improve new config prototype code
...
Add optional validator functions for STRUCT and ARRAY parsing. Tighten up
logic for parsing STRUCTs and ARRAYs and the result flags. Improve
documentation in block comments. Add CFUNSUPPORTED result flag.
2012-11-27 16:47:30 +10:30
Andrew Bettison
cf3c069f83
Improve new config prototype code
...
Refactor ARRAY_xxx() schema declaration macros to fix problem in ARRAY_STRING().
Add dna.helper.executable, dna.helper.argv and server.chdir to config schema.
2012-11-26 17:33:54 +10:30
Andrew Bettison
0091cf082b
Add documentation comments for new config code
2012-11-26 16:15:59 +10:30
Andrew Bettison
8479c52f54
Improve new config prototype code
...
Replace ARRAY() macro with ARRAY_ATOM(), ARRAY_STRING(), ARRAY_NODE() and
ARRAY_STRUCT().
Change parse function return value to flag bits, add CFEMPTY, rename CFMISSING
to CFINCOMPLETE, improve logic around mandatory struct items.
Renamed struct config_node to struct cf_om_node.
2012-11-26 16:12:46 +10:30
Andrew Bettison
2d7766eacd
Improve new config prototype code
...
Finish parsing 'interfaces' old- and new-style.
2012-11-24 03:38:10 +10:30