summaryrefslogtreecommitdiff
path: root/toxcore/DHT.h
AgeCommit message (Collapse)Author
2014-09-27Moved all the connection stuff from messenger to friend_connection.irungentoo
Messenger was doing way do many things. friend_connection takes care of finding and establishing a connection to friends.
2014-09-26Added callbacks to onion_client and net_crypto for the temp dht key.irungentoo
Better than the polling mess. Moved DHT to Messenger from onion_client (still needs some cleanups).
2014-09-26Added callbacks to DHT called when the ip of a peer is discovered.irungentoo
2014-09-26DHT can now be used for group chat cons and friend cons at the same time.irungentoo
2014-09-25More groupchats code written.irungentoo
2014-09-25Removed now useless atributes from structs.irungentoo
2014-09-12Removed tox_connect, initial connections are made on first tox_dosaneki
2014-09-09Fixed spacingsaneki
2014-09-09Added tox_connect function, no connecting done during tox_loadsaneki
2014-08-18Added function to check if we were only connected to LAN DHT peers.irungentoo
2014-06-30Const-correctness for onion_client.cMarc Schütz
2014-06-10Astyle and fixes.irungentoo
2014-06-10Const correctness in various interdependent filesMarc Schütz
2014-05-28Reduced size of get_node packets.irungentoo
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-13pack/unpack nodes can now pack and unpack TCP nodes.irungentoo
2014-05-08Merge branch 'master' into TCPirungentoo
2014-05-01Random number functions belong in crypto_core.irungentoo
2014-04-25MAX_SENT_NODE is now 4.irungentoo
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-25The data in the DHT get nodes and send nodes packets can now be ofirungentoo
variable length.
2014-04-23Updated some files so that they could build with latest core.irungentoo
Fixed some issues.
2014-04-23Major cleanups.irungentoo
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-22Decided pretty much how the handshake would work.irungentoo
Started writing the code. Astyled some files.
2014-04-21Crypto related cleanups.irungentoo
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-16multiple spelling fixesCarlos E. Garcia
2014-04-15Major protocol changes, this commit breaks all network compatibility.irungentoo
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-03-16Renamed toping to to_ping.irungentoo
2014-03-05CPU optimizations.irungentoo
Use get_shared_key() in more places.
2014-03-04CPU usage improvements.irungentoo
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-02-24Speeded up DHT peer finding and decreased DHT bandwidth usage.irungentoo
2014-01-25Improved hole punching a bit.irungentoo
2014-01-19Some small improvements added.irungentoo
2014-01-17Small performance increases.irungentoo
2014-01-17Incorporated onion into Tox.irungentoo
Fixed a couple of issues related to that.
2014-01-16Wrote random_path function.irungentoo
Added onion_client to the build system.
2014-01-15onion_client almost done.irungentoo
2014-01-02Some work done on the onion announce part.irungentoo
2013-12-27Another packet type added to onion.cirungentoo
2013-12-12Merge branch 'assoc-refresh-distant-data' of ↵irungentoo
https://github.com/FullName/ProjectTox-Core into FullName-assoc-refresh-distant-data
2013-12-08Send groupchat ips like DHT ones.irungentoo
2013-12-08Compatibility fixes.irungentoo
AF_INET/AF_INET6 can vary across devices, we introduce TOX_AF_INET and TOX_AF_INET6 to fix this.
2013-12-08do_Assoc(): keep the data of the buckets somewhat currentCoren[m]
2013-12-06Merge branch 'master' into hardenirungentoo
2013-12-01fix 'typedef redefinition' build errors on older gcc versionsalexandervdm
building toxcore
2013-11-30The stuff in do_DHT only need to be run once per second.irungentoo
Should lower CPU usage by a bit.
2013-11-17Assoc's array is now allocated dynamically and per default much smaller (320 ↵Coren[m]
entries). id_hash() was not at all working as expected for very small bucket size (when (size / 4) was zero). Simplified to be trivially correct. Also added a used flag on adding an entry, which is set by callers if they have that association in active use. Those get priority over unused entries on collision. Fleshed out test to be at least elementary useful. Each group chat now uses an own, small assoc (80 entries).
2013-11-14Significantly trimmed down version of an ID<=>IP cache.Coren[m]
Besides acknowledging timeouts, the module isn't trying to do anything fancy with the data besides storing and retrieving.
2013-11-10Fixed small issues.irungentoo
DHT_test now only prints non zero entries.
2013-11-02Get node testing response packets are now handled.irungentoo
2013-10-30Testing requests are now sent.irungentoo
2013-10-28Removed some now useless code.irungentoo