summaryrefslogtreecommitdiff
path: root/toxcore/DHT.c
AgeCommit message (Collapse)Author
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-03-01Some small DHT CPU optimizations.irungentoo
Only compute the shared key once instead of twice for received DHT requests/responses.
2014-02-24Speeded up DHT peer finding and decreased DHT bandwidth usage.irungentoo
2014-02-19Fixed bug in DHT.irungentoo
2014-02-14Fixed small bug in DHT.irungentoo
2014-02-06Fixed bandwidth issue.irungentoo
2014-02-04Lowered the route to friend minimum number of peers.irungentoo
This fixes hole punching for some NATs.
2014-02-03Fixed possible issue.irungentoo
2014-01-26Attempted fix of some hole punching issues.irungentoo
2014-01-25Improved hole punching a bit.irungentoo
2014-01-21random_nodes_path should return slightly better paths.irungentoo
Fixed test in network_test failing on some machines because of localhost ipv6 issues.
2014-01-20Adjusted some timeouts and fixed possible memory leak.irungentoo
2014-01-19Some small improvements added.irungentoo
2014-01-19Commented out now useless code.irungentoo
2014-01-18Some optimizations and fixes.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-14Some packet handling code added to onion_client.irungentoo
2014-01-10Removed useless line.irungentoo
2014-01-02Some work done on the onion announce part.irungentoo
2013-12-27Another packet type added to onion.cirungentoo
2013-12-16Astyled the code.irungentoo
2013-12-15Code cleanups.irungentoo
No functionality changed.
2013-12-13Merge pull request #678 from FullName/retipp-fixirungentoo
Fix a code cleanup.
2013-12-12Merge branch 'assoc-refresh-distant-data' of ↵irungentoo
https://github.com/FullName/ProjectTox-Core into FullName-assoc-refresh-distant-data
2013-12-11Fix a code cleanup.Coren[m]
DHT.c: - get_close_nodes(): - allow two 'indirect' nodes ('indirect' as in distant from us and therefore not tested regularly, "bad") - be consequent when testing for NULLed results, pack nodes_list dense - (logging) dump number of found entries from assoc - returnedip_ports(): - fix code cleanup, the entry to be added is about the node we were told, not about the node who told us assoc.c: - Assoc_get_close_entries(): break from loops as soon as a marking-invalid-node is hit
2013-12-11Increased some intervals/timeouts to lower network usage.irungentoo
2013-12-08Cleaned up and fixed various things.irungentoo
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-07Small fixes.irungentoo
2013-12-07Added/updated some basic docs and cleaned up some things.irungentoo
2013-12-07Try to replace not tested/possibly bad nodes before good nodes.irungentoo
2013-12-06Merge branch 'master' into hardenirungentoo
2013-12-05All nodes returned must be good.irungentoo
2013-12-05Merge branch 'sendnodes-with-assoc' of ↵irungentoo
https://github.com/FullName/ProjectTox-Core into FullName-sendnodes-with-assoc
2013-12-03get_close_nodes(): make use of assoc to find some really close nodesCoren[m]
DHT.c: - get_close_nodes(): use assoc to find nodes for the requested reference id - handle_sendnodes*(): set a proper timestamp for "heard" nodes assoc.*: - expand Assoc_close_entries by flags for additional restrictions for search - Assoc_get_close_entries(): honor the new flags - new_Assoc() prime handling: min. prime is now 5 instead of 3, and up to 25 is handled directly - Assoc_status(): added address family for seen/heard, print of hash is now fixed width
2013-12-02Don't hole punch when we are connected.irungentoo
2013-12-02Fixed bug with hole punching.irungentoo
2013-12-01Tweaked hole punching a bit.irungentoo
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-18Merge pull request #650 from FullName/ID-IP-basicirungentoo
Significantly trimmed down version of an ID<=>IP cache.
2013-11-17Nodes now only send good nodes (or the node that was specifically asked for).irungentoo
2013-11-17Tolerate instable connectivity: if *all* set close nodes are in terminal ↵Coren[m]
timeout (KILL_NODE_TIMEOUT), reset them all to BAD_NODE_TIMEOUT. That keeps the client trying to at least ping the nodes in the hopes of the connection coming back up.