summaryrefslogtreecommitdiff
path: root/toxcore/ping.c
AgeCommit message (Collapse)Author
2014-05-13Nodes already in the DHT closelist should not be added to the toping list.irungentoo
2014-05-12Added ping_array, a special efficient array for use in operationsirungentoo
that require sending ping type packets. Made ping packets use it.
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-16Some speedups and small fixes.irungentoo
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-02Small CPU optimizations to ping requests/reponses.irungentoo
Same idea as last commit.
2014-03-01Some small DHT CPU optimizations.irungentoo
Only compute the shared key once instead of twice for received DHT requests/responses.
2014-01-25Improved hole punching a bit.irungentoo
2014-01-17Incorporated onion into Tox.irungentoo
Fixed a couple of issues related to that.
2013-12-08Cleaned up and fixed various things.irungentoo
2013-12-06Merge branch 'master' into hardenirungentoo
2013-12-01fix 'typedef redefinition' build errors on older gcc versionsalexandervdm
building toxcore
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-10Merge branch 'master' into hardenirungentoo
Conflicts: toxcore/DHT.c
2013-11-06addto_lists(): store the IP/Port that was used to *send*.Coren[m]
Avoids a DOS of sending a copy of a valid response with an invalid IP.
2013-10-28Merge branch 'master' into hardenirungentoo
Also removed some old, useless loading code.
2013-10-24Removed now useless ping_id from send/get node packets.irungentoo
2013-10-24Merge remote-tracking branch 'upstream/master' into ↵Coren[m]
cleanup_unix_time_id_eq_cpy_is_timeout Conflicts: toxcore/net_crypto.c
2013-10-24Move unix_time(), id_cpy()/id_eq(), is_timeout() to util.*Coren[m]
unix_time(): - returns local value for current epoch - value is updated explicitly with unix_time_update() called at new_DHT()/doMessenger()/do_DHT() is_timeout(): - uses the local value for current epoch id_cpy()/id_eq() => id_copy()/id_equal(): - centralized duplicate definitions - replaced (most) memcpy()/memcmp() of (*, *, CLIENT_ID_SIZE) with id_copy()/id_equal()
2013-10-24Removed define that could become confusing.irungentoo
2013-10-23Code cleanups.irungentoo
2013-09-25Fixed bug where hole punching was attempted even though theirungentoo
clients were connected. Increased the number of ports tried per interval of time. Also astyled the files.
2013-09-21moved stuff that belongs into ping.[ch] thereCoren[m]
DHT.*, ping.*: - moved stuff from struct DHT into struct PING: toping, last_toping - moved functions add_toping(), do_toping() - made id_closest() publicly accessible - send_ping_request(): killed (Net_Crypto *c) parameter in favor of copying it into (PING *) on new_ping() group_chats.c: - killed local 1:1 copy in favor of DHT.c::id_closest()
2013-09-14astyled everything.irungentoo
2013-09-13Merge remote-tracking branch 'upstream/master' into IntegrationCoren[m]
2013-09-13Nonce generation changes.irungentoo
Nonces don't need to be random, only different. also random_int now gives same quality random numbers for both NaCl and libsodium.
2013-09-10big push, putting all the infrastructure in place behind TOX_ENABLE_IPV6Coren[m]
2013-09-09network.h:Coren[m]
- global: added sock_t - Networking_Core: added family (currently always AF_INET) and port - sendpacket(): changed signature to require (Networking_Core *) instead of sock_t *.c: - sendpacket()-calls: replaced *->net->sock with *->net
2013-09-06Allow to build vs nacl instead of libsodiumJin^eLD
By default libsodium is used. Only if --enable-nacl is specified, then nacl will be used instead of libsodium. Pass locations of nacl headers and libraries by using the following options: --with-nacl-headers=/home/me/somewhere/nacl-20110221/build/469/include/amd64/ --with-nacl-libs=/home/me/somewhere/nacl-20110221/build/469/lib/amd64/
2013-08-30Fixed build errors.Kostya
2013-08-29Removed packet structs.irungentoo
They were causing problems on certain compiler configurations.
2013-08-29Correct a lot of the grammar and spelling. Also spent a few hours fixing the ↵pete
comments so they follow a standard.
2013-08-24Rename core directory because of autoconf name clashjin-eld
While doing the checks configure might generate "core" files and will then try to remove them. Having a "core" directory generates an error while runing the configure script. There's no workaround but to rename the core directory.