Age | Commit message (Collapse) | Author |
|
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).
|
|
Besides acknowledging timeouts, the module isn't trying to do anything fancy with the data besides storing and retrieving.
|
|
Avoids a DOS of sending a copy of a valid response with an invalid IP.
|
|
cleanup_unix_time_id_eq_cpy_is_timeout
Conflicts:
toxcore/net_crypto.c
|
|
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()
|
|
|
|
clients were connected.
Increased the number of ports tried per interval of time.
Also astyled the files.
|
|
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()
|
|
|
|
|
|
Nonces don't need to be random, only different.
also random_int now gives same quality random numbers for both NaCl and
libsodium.
|
|
|
|
- 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
|
|
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/
|
|
|
|
They were causing problems on certain compiler configurations.
|
|
comments so they follow a standard.
|
|
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.
|