irungentoo
aca18f65c3
Small fixes.
2014-05-02 15:13:10 -04:00
irungentoo
8e24771fc4
Remove Lossless UDP (This breaks Tox.)
2014-05-02 10:36:48 -04:00
irungentoo
deb8bfc350
Random number functions belong in crypto_core.
2014-05-01 19:42:44 -04:00
irungentoo
47aa53a384
Protocol implementation is starting to look ok.
...
Still need to decide exactly how data packets will work though.
2014-05-01 19:20:28 -04:00
irungentoo
19a4b1e443
Improved the crypto_cmp function.
...
It now uses the NaCl functions when the length is appropriate.
Moved crypto defines to crypto_core.h
2014-05-01 08:06:24 -04:00
irungentoo
509edb983f
Remove duplicates.
2014-04-30 21:01:09 -04:00
irungentoo
5715e50169
Some more code written for the middle level protocol stuff.
2014-04-30 20:53:43 -04:00
irungentoo
0505df009b
Added number to cookie request/response packets to prevent possible
...
DoS issue.
2014-04-30 09:24:05 -04:00
irungentoo
3863e01e22
Some more work done on the middle network protocol.
...
Handshake most likely has no more possible flaws to it, next thing
to do is to do the same with the data packets.
Wrote a couple more functions.
2014-04-29 20:45:32 -04:00
irungentoo
94545c3b50
Added some packet defines.
2014-04-28 20:27:23 -04:00
irungentoo
b9370d519f
Added some functions to create/handle middle level protocol packets.
2014-04-28 20:14:07 -04:00
irungentoo
50cea69f57
Added raw UDP cookie request packet handler.
2014-04-27 20:37:59 -04:00
irungentoo
82873d62c1
Fixed minor issue.
...
Socket used to find the broadcast ip was not closed when there was
more than 16 broadcast interfaces.
2014-04-26 12:30:29 -04:00
irungentoo
09aa97f712
Fixed issue.
2014-04-25 17:31:04 -04:00
irungentoo
45d122e2cb
Fixed building with NaCl.
2014-04-25 11:17:20 -04:00
irungentoo
c16928c4aa
MAX_SENT_NODE is now 4.
...
This means that in every part of the Tox code that sends nodes
will now send a maximum of 4 nodes instead of 8.
2014-04-25 09:15:53 -04:00
irungentoo
a79eafbb52
The data in the DHT get nodes and send nodes packets can now be of
...
variable length.
2014-04-25 09:02:49 -04:00
irungentoo
78cbb287b1
sendnodes packets now contains a byte indicating the number of nodes
2014-04-24 21:02:36 -04:00
irungentoo
0e3ad9c624
Merge pull request #841 from stal888/leaky_friends
...
Properly deallocate friends' status messages in kill_messenger
2014-04-23 20:48:54 -04:00
stal
2b28353554
Properly deallocate friends' status messages in kill_messenger
...
Lightly tested. I'm not sure whether this creates a double-free
bug
2014-04-23 17:29:50 -07:00
irungentoo
2aa3cdfc69
Fixed the DHT bootstrap daemon.
2014-04-23 12:47:57 -04:00
irungentoo
0559904ea2
Updated some files so that they could build with latest core.
...
Fixed some issues.
2014-04-23 12:29:24 -04:00
irungentoo
384750af8c
Major cleanups.
...
Fixed circular dependency between DHT and net_crypto: DHT no longer
depends on net_crypto.
Moved the crypto request packets functions to crypto core and DHT.
Cleaned up/added some defines that can be used to get the true maximum
length of things like the friends request message.
MAX_DATA_SIZE has been replaced in most places by more appropriate defines.
2014-04-23 11:35:40 -04:00
irungentoo
1bfe15ee88
Decided pretty much how the handshake would work.
...
Started writing the code.
Astyled some files.
2014-04-22 20:28:40 -04:00
irungentoo
c46ab5821d
Fixed test.
2014-04-21 17:09:52 -04:00
irungentoo
496d4fe203
Fixed a test.
...
Removed function from Messenger.h
2014-04-21 16:54:47 -04:00
irungentoo
9c6a8432ce
Crypto related cleanups.
...
Moved Bunch of functions from net_crypto to crypto_core.
decrypt_data_fast and decrypt_data_symmetric were the same thing
therefore, removed decrypt_data_fast.
Replaced all the crypto_secretbox_* defines with the equivalent
crypto_box_* one.
New define: crypto_box_KEYBYTES that is equal to
crypto_box_BEFORENMBYTES.
2014-04-21 16:51:36 -04:00
irungentoo
1603ca974e
Small cleanup.
2014-04-20 20:17:24 -04:00
irungentoo
09d9d34a93
Removed deprecated function from public api.
...
Added upper length check to friendreq_handlepacket().
2014-04-19 17:50:10 -04:00
irungentoo
8815956f0a
Small cleanups.
2014-04-19 16:52:29 -04:00
irungentoo
235ce56855
Fixed possible buffer overflow in function to send friend requests.
2014-04-19 16:18:07 -04:00
irungentoo
98bea094b3
Autoconf apparently gives us a nice define for processor endianess.
2014-04-19 11:38:14 -04:00
irungentoo
39ac20fc2d
Fixed possible pointer issues.
2014-04-19 11:28:46 -04:00
irungentoo
db3672bf3f
Added text document explaining what needs to be done before TCP can be merged.
2014-04-18 22:00:12 -04:00
irungentoo
9f6b17de55
Added function to increment nonce by specified number.
...
Nonces now behave like big endian numbers.
2014-04-18 20:36:52 -04:00
irungentoo
47fb2e8067
Fixed build issues.
2014-04-17 20:53:12 -04:00
irungentoo
38e3b3516c
Merge pull request #834 from cgar/spelling
...
multiple spelling fixes
2014-04-16 20:41:07 -04:00
irungentoo
de079d7cf7
Some speedups and small fixes.
2014-04-16 13:53:51 -04:00
Carlos E. Garcia
cf33c2f9ad
multiple spelling fixes
2014-04-16 12:14:44 -04:00
irungentoo
6578d930f8
DHT_bootstrap.c now has TCP server functionality enabled.
...
Fixed a regression (same type as last commit).
2014-04-16 07:19:40 -04:00
irungentoo
be413de396
Fixed regression, announce responses can contain 0 nodes.
2014-04-15 19:16:35 -04:00
irungentoo
3835bc167b
Merge branch 'master' of https://github.com/tycho/ProjectTox-Core into tycho-master
2014-04-15 18:31:10 -04:00
irungentoo
f9bf7b074a
Major protocol changes, this commit breaks all network compatibility.
...
Removed a bunch of useless space from various structs.
pack_nodes() and unpack_nodes() are now used to transmit lists of
nodes for the DHT and onion parts. They provide a way to transmit
both ipv6 and ipv4 nodes in the same packet in a portable way that
takes as little space as possible without compression.
Using pack_nodes, merged the send nodes and send nodes ipv6 packets
into one packet greatly reducing the risk of amplification attacks.
2014-04-15 18:09:07 -04:00
irungentoo
229b2b2dcd
Added function to TCP client and some tests.
2014-04-14 16:59:48 -04:00
Steven Noonan
20336c0076
media.h: include 'opus.h' instead of 'opus/opus.h'
...
The current 'opus/opus.h' works if your opus.h is in /usr/include/opus, as
/usr/include is already in the header search path. If your opus header search
path is found via pkg-config, however, you will get something like this:
$ pkg-config --cflags opus
-I/usr/local/Cellar/opus/1.1/include/opus
Since this is pointing directly to include/opus, the 'opus/' prefix on the
header include directive will break.
Since 'opus.h' should work in both cases (as in both cases it will be
discovered via pkg-config), just use the simpler 'opus.h'.
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2014-04-13 20:56:29 -07:00
Steven Noonan
1808c88c79
toxav/Makefile.inc: add LIBSODIUM_* variables to flags
...
These are needed if libsodium paths are discovered by 'configure'. Most systems
don't need this just because libsodium is already on the header/library search
paths, but on e.g. Mac OS X this is required.
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2014-04-13 20:56:29 -07:00
irungentoo
b16af69d92
TCP_client pretty much done?
...
Now next step is integrating it in tox.
Added TCP server functionality to bootstrap server (define TCP_RELAY_ENABLED to enable it.)
2014-04-13 20:40:48 -04:00
Steven Noonan
ecf0ff3e7f
sockets: support Mac OS X way of disabling SIGPIPE on a socket
...
Mac OS X doesn't have MSG_NOSIGNAL, so we need to use SO_NOSIGPIPE.
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
2014-04-13 04:01:38 -07:00
irungentoo
268172ec41
Pings and onion packets implemented in TCP_Client.c
...
Astyled one test and added a couple lines to another.
2014-04-12 22:00:46 -04:00
irungentoo
881e95671a
Some code written for the TCP part.
2014-04-11 22:09:04 -04:00