Commit Graph

1349 Commits

Author SHA1 Message Date
gardners
ee09ea92f3 Added keyring.c to android make file. 2012-04-10 13:50:27 +09:30
gardners
1b5801b622 Move randombytes() from jni.c to keyring.c so that it is available
for the dna standalone binary.
Added code to initialise an empty keyring file with zeroed bitmap
and salt.
2012-04-10 13:49:18 +09:30
gardners
2b260402b5 Added keyring.c and begun work on routines to manipulate keyrings. 2012-04-10 12:56:32 +09:30
Andrew Bettison
ce5dc011b8 Split dna bit error tests into separate script
- Put common utility functions into testdefs.sh
 - Add abspath() and realpath() functions to test framework
 - Test framework now executes all tests with working directory in a temporary
   directory, to avoid pollution of caller's working directory
 - Improve test log verbosity
 - Name test log files by test script name
2012-04-10 12:41:15 +09:30
Andrew Bettison
f5acb301d8 Transcribe from ./testdna to new test framework
- testframework.sh is now a very full-featured, creates test.log
 - some tests fail, looks like bugs in dna
2012-04-05 19:47:57 +09:30
Andrew Bettison
1e2779a6e3 First cut at a dna testing framework 2012-04-03 19:18:57 +09:30
Andrew Bettison
91d19df5cb Ressurect testdna script 2012-04-03 19:15:39 +09:30
Andrew Bettison
c31860986f Get native build working on Debian Linux
- now './autoconf && ./configure && make' will produce ./dna executable
 - added various missing libraries to configure.in
 - fixed nacl CFLAGS and LDFLAGS settings in configure.in
 - make git ignore autoconf and configure detritus
2012-04-03 10:33:21 +09:30
gardners
cad00beb5b Fix for identity enquiry frame type. 2012-04-03 09:22:58 +09:30
gardners
6127b25602 Added overlay frame type for identity enquiry (proving ownership
of a signing key).
2012-04-03 09:22:58 +09:30
Andrew Bettison
74986a0c30 Implement "rhizome add file" and "rhizome list" 2012-04-02 17:42:40 +09:30
gardners
0b11389023 Fixed problem with null-termination of received addresses for
unix domain socket connections.
2012-03-29 20:45:07 +10:30
gardners
54da5f3ffc Added output of statistics to MDP PING. 2012-03-29 20:31:01 +10:30
Andrew Bettison
3befe32711 New command "rhizome add", support optional args 2012-03-29 17:51:59 +10:30
Andrew Bettison
b8e3047479 Add 'get' and 'del' commands 2012-03-29 15:21:30 +10:30
Andrew Bettison
e87e80aee7 Create instance directory in "set" and "node start" 2012-03-29 15:03:17 +10:30
Andrew Bettison
a338c2f0f9 Refactor instance path handling
- handle buffer limits when forming path names within instance dir
 - uniform use of serval_instancepath()
2012-03-29 14:07:07 +10:30
Andrew Bettison
6f74393ea1 Replace bcmp() with memcmp() 2012-03-29 13:02:10 +10:30
gardners
942605d247 Removed some debugging, improved MDP PING client output. 2012-03-28 13:26:14 +10:30
gardners
3a0a62b780 Fixed source address of MDP echo frames when destination of echo
request was broadcast (returns local address or all zeroes).
2012-03-28 13:19:53 +10:30
gardners
aeee2f993c MDP ping client now shows pings coming in with their transit times.
(no TTLs etc, but hey, it is the first working use of MDP)
2012-03-28 13:16:06 +10:30
gardners
61920238d5 Fixed overlay_mdp_dispatch() versus overlay_mdp_send() confusion
bug in MDP ping client.
2012-03-28 13:10:55 +10:30
gardners
6a50bbb024 MDP server can now pass received MDP frames to client. 2012-03-28 13:10:41 +10:30
gardners
8fbbdc5087 More work on MDP.
Swapped functions of overlay_mdp_send() and overlay_mdp_dispatch()
to match normal socket operations and thus avoid programmer confusion.
2012-03-28 11:28:04 +10:30
gardners
d3cd7714ac Further work on MDP - overlay_saw_mdp_frame() now looks for
different MDP frame types, but does not yet do anything with the
MDP_TX frames which are the only valid MDP frame to be received
via a real network interface (in reality they are constructed from
the surrounding MDP type overlay frame).t
2012-03-27 21:13:40 +10:30
gardners
5cc3283646 Cleaned up some debug output. 2012-03-27 19:50:31 +10:30
gardners
8bd0153b0f Modified MDP ping code to set source address correctly. 2012-03-27 19:45:52 +10:30
gardners
5c4918f5bd Added code to verify source address when sending MDP frames. 2012-03-27 19:45:39 +10:30
gardners
aa543e1766 Various fixes and work towards MDP ping working.
MDP clients can now request the set of local addresses.
Framework is improved to avoid info leaks by sending more bytes
in an MDP frame than are necessary, but without having to bzero
almost 2KB each time.
2012-03-27 19:25:38 +10:30
gardners
d1bb637cba Fixed bug with sending of broadcast frames (nexthop was not being
set for broadcast frames).
2012-03-27 08:24:27 +10:30
Andrew Bettison
4e29cb1eb3 Fix some dodgy code and remove the #warning message pointing to it 2012-03-26 15:03:57 +10:30
Andrew Bettison
84b24b9918 Remove use of (struct sockaddr_un).sun_len field (BSDism only available on Apple) 2012-03-26 15:02:42 +10:30
gardners
6759a26720 Cleaned out some debugging output after tracking down and fixing
memory corruption bug.  Next challenge is to find out why broadcast
MDP packets are not getting dispatched properly (is trying to treat
broadcast address as unicast address it seems).
2012-03-23 07:06:57 +10:30
gardners
bd999138cf Added note about inscrutable frame construction. 2012-03-22 17:16:04 +10:30
gardners
3e0e1bf7e3 Disabled extra verbose malloc debug stuff. 2012-03-22 17:15:51 +10:30
gardners
2b42f77ccf Fixed some bounds checking, and added some fairly rigorous memory
handling debug aids. No known memory corruption bugs remain, I
think.
2012-03-22 17:10:27 +10:30
gardners
13d1d3084e Various fixes to track down memory handling bugs.
Fixed one free-before-time bug with queuing MDP frames.
Some heap corruption bug seems to remain.
2012-03-22 16:33:25 +10:30
gardners
c7dd475d50 Further work on MDP, including dispatching low-priority data when
it can fit in frames.  A nasty bug in queue code needs fixing.
Also, we only send tick frames at present, and need to add code
for dispatching packets at other times (bandwidth allowance permitting).
So the whole bandwidth management code needs to get finished.
2012-03-22 08:26:19 +10:30
gardners
76ef948455 Added back rather vital line that was mistakenly removed during a debugging
cleanout.
2012-03-21 15:26:07 +10:30
gardners
2d63e91c96 More work on preparing packet payloads for enqueing MDP frames.
Also errors for unimplemented crypto modes.
2012-03-21 13:08:08 +10:30
gardners
d8f7f27bad Removed a debug statement. 2012-03-21 13:00:24 +10:30
gardners
30e2540470 Various fixes and work towards sending MDP frames.
Broadcast and unicast addresses are accepted.  Some frame headers
are set.  Payload is yet to be set, and ciphered &/or signed as required,
and queueing is not yet verified.
2012-03-21 12:57:24 +10:30
gardners
c71ddbbd18 MDP ping getting closer: ping loop showing server-returned error
messages now works.  Server currently reports error when trying to
send MDP_TX frames (since it is not yet implemented), which the
client successfully displays. Onto making the server handle the
MDP_TX frames.
2012-03-21 03:55:13 +10:30
gardners
6e3fe903d9 Improved shutdown behaviour to properly handle client mode (don't
delete server socket if you are a client).  Also added main MDP
ping loop of sending packets.  Reading returned packets not yet
implemented.  Server handling of MDP_TX packets also not yet
implemented.
2012-03-21 03:27:47 +10:30
gardners
9d4e9f80ed Modified overlay_mdp_dispatch() to return reply MDP frame. 2012-03-21 03:07:29 +10:30
gardners
7ee72b3cba Further work on MDP. Client now receives server replies. So we
can actually bind an MDP port.  Next step is to make use of it to
send a packet.
2012-03-21 03:00:39 +10:30
gardners
2bfb6eb569 Added verification that replies come from MDP server
(including dealing with when the server is referenced via a
symlink, and verification by inode/dev is required)
2012-03-21 02:44:36 +10:30
gardners
67c4577b55 MDP replies almost working, and thus port binding almost working.
Just need to add sender verification check, i.e., that it was the
MDP server that replied, and interpret the reply.
2012-03-21 01:36:52 +10:30
gardners
8e6f6ee925 Work towards getting MDP working. Still some fun and games with
getting unix domain sockets to play nicely.  Some superfluous debug
code is present while working this through.
2012-03-20 17:11:58 +10:30
gardners
5fe959f033 Fixed reading of unix domain socket connections to provide a large
enough buffer to get the full socket name of the sending party.
2012-03-20 09:15:08 +10:30