Commit Graph

79 Commits

Author SHA1 Message Date
irungentoo 0e982405d6 Some comment fixes. 2015-06-26 22:58:59 -04:00
irungentoo 0a38ffcbba Don't bootstrap to all loaded nodes at once. 2015-06-07 20:47:40 -04:00
irungentoo f4d0b85284 Save DHT nodes in a smarter way. 2015-06-06 22:13:43 -04:00
irungentoo f463cb52a2 Code cleanups.
Rename array in Node_format from client_id to public_key.
2015-01-29 19:38:44 -05:00
irungentoo d4ea2809db Removed useless function. 2015-01-02 22:40:53 -05:00
irungentoo 8ff85f09cb Check if received ip family is valid for the onion packets. 2014-12-31 12:30:39 -05:00
irungentoo 523cc20eb0 Remove useless code. 2014-12-30 21:34:01 -05:00
irungentoo 6bbb939855 Cleaned up packet length types in toxcore.
They are now all uint16_t instead of sometimes being uint32_t.

Replaced some other uint32_t with unsigned ints.
2014-11-21 20:18:29 -05:00
irungentoo 6c71bb7e64 Moved all the connection stuff from messenger to friend_connection.
Messenger was doing way do many things.

friend_connection takes care of finding and establishing a connection
to friends.
2014-09-27 18:25:03 -04:00
irungentoo f2a313359e Added callbacks to onion_client and net_crypto for the temp dht key.
Better than the polling mess.

Moved DHT to Messenger from onion_client (still needs some cleanups).
2014-09-26 20:32:38 -04:00
irungentoo 33721da46a Added callbacks to DHT called when the ip of a peer is discovered. 2014-09-26 17:56:06 -04:00
irungentoo bb60c28b73 DHT can now be used for group chat cons and friend cons at the same time. 2014-09-26 15:42:56 -04:00
irungentoo d5d84818fe More groupchats code written. 2014-09-25 21:05:17 -04:00
irungentoo ebdfa892b3 Removed now useless atributes from structs. 2014-09-25 16:49:05 -04:00
saneki 27369ac762 Removed tox_connect, initial connections are made on first tox_do 2014-09-12 12:21:17 -05:00
saneki 98a93c7880 Fixed spacing 2014-09-09 14:48:09 -05:00
saneki f771bfbe30 Added tox_connect function, no connecting done during tox_load 2014-09-09 11:34:39 -05:00
irungentoo c959f6c019 Added function to check if we were only connected to LAN DHT peers. 2014-08-18 18:56:02 -04:00
Marc Schütz 9762089bad Const-correctness for onion_client.c 2014-06-30 21:41:03 +02:00
irungentoo 07936960df Astyle and fixes. 2014-06-10 18:35:55 -04:00
Marc Schütz 99d5940140 Const correctness in various interdependent files 2014-06-10 20:54:48 +02:00
irungentoo d87c772a7e Reduced size of get_node packets.
Sendback data is now 8 bytes.

This does not break the network as the sendback data can be any
size between 1 and 150 bytes.
2014-05-28 17:59:48 -04:00
irungentoo a05ab89dbf pack/unpack nodes can now pack and unpack TCP nodes. 2014-05-13 14:53:59 -04:00
irungentoo a26ced5fcb Merge branch 'master' into TCP 2014-05-08 18:26:01 -04:00
irungentoo deb8bfc350 Random number functions belong in crypto_core. 2014-05-01 19:42:44 -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 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 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
Carlos E. Garcia cf33c2f9ad multiple spelling fixes 2014-04-16 12:14:44 -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 f9c9b263e0 Renamed toping to to_ping. 2014-03-16 13:57:21 -04:00
irungentoo 3bcc6e2ae5 CPU optimizations.
Use get_shared_key() in more places.
2014-03-05 16:54:17 -05:00
irungentoo b6fe49e59a CPU usage improvements.
Shared keys for recieved DHT packets are now stored in a special array
so that they don't need to be recomputed for nodes that send us lots of
packets.
2014-03-04 15:36:29 -05:00
irungentoo 718b5e8ca3 Speeded up DHT peer finding and decreased DHT bandwidth usage. 2014-02-24 17:14:47 -05:00
irungentoo 86ba735198 Improved hole punching a bit. 2014-01-25 21:09:26 -05:00
irungentoo 3268f18a32 Some small improvements added. 2014-01-19 14:14:23 -05:00
irungentoo d11cf9c5a8 Small performance increases. 2014-01-17 15:46:09 -05:00
irungentoo cd2474a2f6 Incorporated onion into Tox.
Fixed a couple of issues related to that.
2014-01-17 13:35:40 -05:00
irungentoo 9fcb707ec4 Wrote random_path function.
Added onion_client to the build system.
2014-01-16 10:00:36 -05:00
irungentoo aff78b159c onion_client almost done. 2014-01-15 20:47:26 -05:00
irungentoo 97a141c0cc Some work done on the onion announce part. 2014-01-02 22:33:46 -05:00
irungentoo 86aff82a9f Another packet type added to onion.c 2013-12-27 15:21:16 -05:00
irungentoo dfd46a040a Merge branch 'assoc-refresh-distant-data' of https://github.com/FullName/ProjectTox-Core into FullName-assoc-refresh-distant-data 2013-12-12 21:51:17 -05:00
irungentoo 48c50b5cef Send groupchat ips like DHT ones. 2013-12-08 18:23:30 -05:00
irungentoo a4968bdbc5 Compatibility fixes.
AF_INET/AF_INET6 can vary across devices, we introduce TOX_AF_INET and
TOX_AF_INET6 to fix this.
2013-12-08 18:15:30 -05:00
Coren[m] ad9d20c08b do_Assoc(): keep the data of the buckets somewhat current 2013-12-08 05:43:24 +01:00
irungentoo 7cd43ecc76 Merge branch 'master' into harden 2013-12-06 22:51:17 -05:00