Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
Removed some useless code from toxcore.
Astyled core code with new version of astyle.
|
|
the Tox connection.
A/V should now work over TCP.
|
|
|
|
forgot to build before pushing
|
|
|
|
|
|
Added timestamp to know which DHT public key is good in case
onion_client and net_crypto report different ones.
|
|
|
|
|
|
It now uses the NaCl functions when the length is appropriate.
Moved crypto defines to crypto_core.h
|
|
Handshake most likely has no more possible flaws to it, next thing
to do is to do the same with the data packets.
Wrote a couple more functions.
|
|
|
|
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.
|
|
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.
|
|
Mac OS X doesn't have MSG_NOSIGNAL, so we need to use SO_NOSIGPIPE.
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
|
|
Some work done on the TCP part.
|
|
|
|
All the IP/Port related structs now have __attribute__ ((__packed__))
|
|
Main changes:
1. Strings no longer need to be NULL terminated.
2. tox_get_friend_id is now named tox_get_friend_number.
3. The friend request callback function is now (Tox *tox, uint8_t *,
uint8_t *, uint16_t, void *), the Tox object pointer has been added to
it.
|
|
|
|
|
|
|
|
A way to send and handle lossy UDP packets coming from friends.
Will be used for A/V.
|
|
define DHT_SERVER_EXTRA_PACKETS to enable.
|
|
|
|
|
|
Plan 9 requires u.h in every file
|
|
|
|
|
|
Also added some tests.
|
|
No functionality changed.
|
|
AF_INET/AF_INET6 can vary across devices, we introduce TOX_AF_INET and
TOX_AF_INET6 to fix this.
|
|
|
|
|
|
Significantly trimmed down version of an ID<=>IP cache.
|
|
|
|
Besides acknowledging timeouts, the module isn't trying to do anything fancy with the data besides storing and retrieving.
|
|
Also removed some old, useless loading code.
|
|
|
|
|
|
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()
|
|
|
|
|
|
always off).
Additionally (besides cleanups):
network.h/tox.h:
- WIN32: fix a strange sa_family_t definition
- WIN32: define EWOULDBLOCK to WSAEWOULDBLOCK
- WIN32: kill macro for an existing function (IN6_ADDR_EQUAL)
network.c:
- use EWOULDBLOCK instead of EAGAIN (same value, but EWOULDBLOCK is more "popular")
- new_networking(): only try to enable IPv4-in-IPv6 if it's not already enabled per default
- inet_ntop()/inet_pton(): WIN32: remove partial initializers in favor of a simple memset()
- ip_equal(): WIN32: use an existing function
- logging: networking_wait_execute(): only dump result if not timeout
- logging: loglogdata(): kill an unused variable
LAN_discovery.c:
- send_broadcasts(): re-enabled, can only support IPv4 by principle, split into fetch_broadcast_info() (to fetch the addresses once) and send_broadcasts() (actual sending)
DHT.c:
- DHT_load_state_callback(): enclosed a fprintf(stderr, ...) into #ifdef DEBUG
Lossless_UDP.c:
- change_handshake(): harden against strange sa_family_t definitions
Messenger.c:
- logging: fix ID to string conversion
util.c:
- logging: eliminate a signed-warning
|