Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rename array in Node_format from client_id to public_key.
|
|
They are now all uint16_t instead of sometimes being uint32_t.
Replaced some other uint32_t with unsigned ints.
|
|
for the auto tests.
|
|
|
|
|
|
with only the first byte set to 1 instead of 0 and the public key set
to the one of the reciever as a valid response packet.
This breaks network compatibility with all previous cores.
|
|
|
|
that require sending ping type packets.
Made ping packets use it.
|
|
Started writing the code.
Astyled some files.
|
|
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.
|
|
|
|
|
|
Use get_shared_key() in more places.
|
|
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.
|
|
Same idea as last commit.
|
|
Only compute the shared key once instead of twice for received DHT
requests/responses.
|
|
|
|
Fixed a couple of issues related to that.
|
|
|
|
|
|
building toxcore
|
|
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.
|
|
Conflicts:
toxcore/DHT.c
|
|
Avoids a DOS of sending a copy of a valid response with an invalid IP.
|
|
Also removed some old, useless loading code.
|
|
|
|
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.
|