Jeremy Lakeman
ac3864ff20
Reuse command line parsing framework with monitor interface
2012-09-25 13:31:34 +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
481dc9218d
Return an error code if ping didn't hear any responses, always log statistics
2012-09-19 14:16:06 +09:30
Jeremy Lakeman
23f1110120
Add optional ping counter
2012-09-19 09:48:12 +09:30
Jeremy Lakeman
f845a18312
Send DNA lookup requests to configured directory service
2012-09-14 17:04:36 +09:30
Jeremy Lakeman
6483d9e0ae
Split client mdp functions so they can be built separately
2012-09-14 11:47:48 +09:30
Jeremy Lakeman
cd67868d2a
Reduce spam from lookups
2012-09-07 13:07:59 +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
Jeremy Lakeman
f6c899e107
Refactor overlay buffer interface to support simple parsing
2012-08-31 15:03:07 +09:30
Jeremy Lakeman
aa5706f9d7
Refactor routing node information to use new subscriber tree
2012-08-31 15:03:07 +09:30
Andrew Bettison
d8fd9fa411
Refactor nanosleep(2) calls into sleep_ms() function
2012-08-21 13:35:33 +09:30
Daniel O'Connor
fc20a4768d
Use get_self_executable_path to resolve our name when calling
...
exec otherwise it will fail when given a relative path as we
chdir to / before trying it.
2012-08-20 15:02:00 +09:30
Jeremy Lakeman
3ab79d8e5b
Pass phone numbers in vomp call initiation
2012-08-13 14:01:57 +09:30
Daniel O'Connor
f453071251
Fix compilation in the non-JNI case
2012-08-10 16:55:38 +09:30
Jeremy Lakeman
f77e055988
Add timeout argument for dna lookup
2012-08-10 15:29:19 +09:30
Andrew Bettison
12d8bc0c12
Use new typedef time_ms_t everywhere
2012-08-09 12:14:32 +09:30
Andrew Bettison
f37ec5af09
Reduce use of stderr in many places
...
serval_packetvisualise() is now replaced by DEBUG_packet_visualise() which uses
logging system not stderr (so now it will appear in Android log).
Replaced several fprintf(stderr,...) with DEBUGF(...).
Command line only prints a full help message on "help" command -- a command
parse failure simply informs the user about the "help" command.
2012-08-01 17:54:02 +09:30
Andrew Bettison
240be25793
Replace overlay_gettime_ms() with gettime_ms()
2012-07-30 17:22:38 +09:30
Daniel O'Connor
09d0fecf28
Remove carnal knowledge of conf.c from serval.h and commandline.c by providing a function to set the instance path override.
2012-07-29 18:58:41 +09:30
Andrew Bettison
8db737ee6f
Quieten startup logging a bit
2012-07-27 19:59:16 +09:30
Andrew Bettison
2152c9267f
DEBUG_VERBOSE log messages for all command-line commands
2012-07-27 18:04:46 +09:30
Andrew Bettison
04b95d2590
Merge branch 'andrew' into 'master'
2012-07-25 18:04:16 +09:30
Jeremy Lakeman
5ec739c712
Add performance timing debug option
2012-07-25 13:33:30 +09:30
Andrew Bettison
6de247e576
Improve diagnosis of SEGV failures in tests
2012-07-24 15:39:36 +09:30
Andrew Bettison
f472ac9a8d
Lots of 'dnahelper' tests, all pass but one
...
Test fails because DNA helper logic does not yet impose a timeout on receiving
the "DONE" ACK after a request.
2012-07-23 18:29:57 +09:30
Andrew Bettison
3e0f8df18a
Fix bug in DID parsing, affects "set did" command
2012-07-23 15:17:21 +09:30
Andrew Bettison
30567c1d34
Start writing systematic 'dnahelper' tests
2012-07-23 12:23:17 +09:30
Andrew Bettison
0e5c5e0e98
More work on dnahelper, almost done
...
Servald starts DNA helper, receives startup ACK, sends requests, receives
responses, handles malformed helper responses, echoes dnahelper stderr lines to
log, sends MDP reply packet, waits for dead helper process, all asynchronously.
Shuts down helper process during servald shutdown.
Remaining issues:
- Does not impose a timeout on helper responses.
- Only the first URI is reported by the "dna lookup" command.
2012-07-20 18:17:43 +09:30
Andrew Bettison
5aac5a3854
Unfinished dnahelper implementation
2012-07-18 19:16:30 +09:30
Andrew Bettison
b50943d09c
Fix handling of empty payload (filesize = 0)
...
Do not add 'filehash' var to manifest if filesize=0
Do not accept 'filehash' var when parsing manifest with filesize=0
When responding to a new rhizome advertisement, do not try to HTTP
request a payload if filesize=0, just import the manifest directly
Various operations, eg "rhizome file add", do not report 'filehash'
fields where 'filesize' is zero
Do not delete rows from MANIFESTS table which have empty filehash
Various related bug fixes
2012-07-16 18:40:30 +09:30
Andrew Bettison
208a95a233
Replace validateSid() with str_is_subscriber_id()
2012-07-12 16:14:25 +09:30
Andrew Bettison
d2898ee22c
Add output fields to 'keyring add' command
2012-07-06 13:17:53 +09:30
Andrew Bettison
ab64b08ceb
Rewrite config file code
...
Gets rid of rotor in confValueGet() and duplicate config file parsing code
Currently fails three tests
2012-07-04 18:57:02 +09:30
Andrew Bettison
68ef34c119
Add 'id allpeers' command to facilitate testing
2012-07-04 12:06:15 +09:30
Andrew Bettison
2c87039307
Replace overlay_render_sid() with alloca_tohex_sid()
...
To eliminate timebomb bugs caused by rotor wraparound
2012-07-03 17:59:30 +09:30
gardners
02ca21a601
CHANGED DNA REPLY PACKET FORMAT BREAKING BACKWARDS COMPATIBILITY
...
... as part of working on work on DNA helper callout facility.
(DNA replies now contain a token that can be used to match them
against DNA requests as a happy side-effect).
2012-07-03 16:45:03 +09:30
Jeremy Lakeman
495de9e0ec
Add more profiling instrumentation
2012-07-03 15:50:04 +09:30
Andrew Bettison
8020ea3b74
Merge branch 'eventscheduler' into master
...
Conflicts:
commandline.c
monitor.c
overlay.c
overlay_interface.c
overlay_packetformats.c
rhizome_fetch.c
rhizome_http.c
rhizome_packetformats.c
serval.h
server.c
testdefs.sh
testframework.sh
tests/dnaprotocol
tests/server
2012-07-03 10:26:22 +09:30
Andrew Bettison
fc8df7d5d4
Config options for tick duration
2012-07-02 12:26:01 +09:30
Andrew Bettison
b368a3aab4
Add confValueGetInt64() function
2012-06-28 18:19:36 +09:30
Andrew Bettison
b9836af8a2
Fix debug logging in overlay_interface.c
...
Also fix bug that closed the logfile when forking the server process.
2012-06-28 17:34:21 +09:30
Andrew Bettison
9625190c6a
Improve debug code:
...
Debug bit mask is unsigned int everywhere.
Refactor DEBUG() macros a bit.
Add SERVALD_DEBUG_FILE env var to support test scripts.
Test defs put instance directories under $TFWVAR not $TFWTMP.
2012-06-28 15:24:43 +09:30
Andrew Bettison
3822d067e7
Remove unnecessary double-fork from server start
2012-06-26 17:27:19 +09:30
Andrew Bettison
889f9c4628
Re-instate prior server start code
...
Do not use server_probe().
Use setsid() instead of setpgrp().
Still uses double-fork technique, as advised in setsid(2) man page.
Return exit status 10 if already running, instead of logging an error and exit
status 255.
2012-06-26 16:07:24 +09:30
Andrew Bettison
19f7e32ba7
Re-instate prior server start code
...
Uses setsid() instead of setpgrp().
Still uses double-fork technique, as advised in setsid(2) man page.
Does not use server_probe().
2012-06-26 15:46:10 +09:30
Jeremy Lakeman
0ca4c16f39
Refactor node info to ignore stale responses without sending another request
2012-06-26 11:20:00 +09:30
gardners
b40a468276
Merge branch 'eventscheduler'
...
Conflicts:
monitor.c
serval.h
2012-06-25 16:50:23 +09:30
Andrew Bettison
1fbf957a9d
Clean up compiler warnings in commandline.c
2012-06-25 15:06:35 +09:30
Daniel O'Connor
05d8ac5d05
Don't treat the server already running as an error otherwise the Java code complains.
...
Emit a useful error if we couldn't get the PID.
2012-06-25 14:14:33 +09:30
Daniel O'Connor
8ad51554b4
Use the right variable to display the PID.
2012-06-25 14:11:16 +09:30