summaryrefslogtreecommitdiff
path: root/toxcore/network.c
AgeCommit message (Collapse)Author
2013-09-20Increased the size of the UDP buffers.irungentoo
2013-09-18Allow loginit() to be delayed, store loglog() data in intermediate buffer ↵Coren[m]
and flush it out when loginit() is called util.c: - handle loglog() before loginit() by storing the lines into an expanding buffer - when loginit() is called, write out and kill the buffer network.c: - push loginit() to the point where we know the actually used port
2013-09-16Toxcore should never print anything when built normally.irungentoo
2013-09-16Fix warnings of -Wall -WextraCoren[m]
2013-09-15Fix in ip_equal, plus testing code which led to that fix...Coren[m]
network.c: - use the correct macro for IPv4-in-IPv6 test network_test.c: - bunch of tests for addr_resolve() and ip_equal()
2013-09-15more portability fixes.irungentoo
2013-09-15Fixed merge problems.irungentoo
2013-09-15Merge branch 'master' of https://github.com/irungentoo/ProjectTox-Coreirungentoo
2013-09-15Fixed portablity problems.irungentoo
struct in6_addr member names can differ per platform.
2013-09-15Merge remote-tracking branch 'upstream/master' into IntegrationCoren[m]
2013-09-15ip_equal(): handle embedded v4 vs. native v4 as equalCoren[m]
network.c: - ip_equal(): on IPv4 vs. IPv6, check if the IPv6 is an embedded IPv4 and if true, compare that
2013-09-15addr_resolve() rewrite broke { (ipv6enabled == true) name => IPv4 address }Coren[m]
network.c: - addr_resolve(): save AF_UNSPEC ip4 address into ip4, not into to->ip4
2013-09-14Small fixes.irungentoo
2013-09-14Fixed some warnings.irungentoo
2013-09-14Some fixes.irungentoo
2013-09-14network.c:Coren[m]
- addr_resolve(): for() instead of while(), flip conditions for a much neater function (suggested by Andreas Schneider) - ip_ntoa(): enforced termination: terminate at the maximum position, that's the one snprintf() may forget - networking_poll(): forgot tabs2spaces
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-12network.*:Coren[m]
- addr_resolv(_or_parse_ip)(): added an optional parameter to return both an IPv6 and an IPv4 address if requested address family was AF_UNSPEC - logging of unhandled packets DHT.c: - bootstrap_from_address(): use the additional return from addr_resolv_or_parse_ip() to bootstrap in both network types at once Lossless_UDP_testclient.c: - main(): adapt to signature change of addr_resolve() Messenger.c. LAN_discovery.h: - lost a htons(), readded - moved LAN_DISCOVERY_INTERVAL #define into LAN_discovery.h LAN_discovery.c: - added IPv4-in-IPv6 local address test
2013-09-12tox.h:Coren[m]
- #define'd tox's network port (as range) - finally killed tox_new_ex() in favor of changing tox_new()'s signature - renamed tox_bootstrap() to tox_bootstrap_from_ip() network.h: - #define'd tox's network port (as range) - renamed SEND_NODES_EX to SEND_NODES_IPV6 - bind() loop uses #define'd port range DHT.c: - renamed SEND_NODES_EX to SEND_NODES_IPV6 - sending ipv6 node addresses even if can't use them ourselves nTox.c: - adapted to changed tox_new()
2013-09-11network.c:Coren[m]
- removed almost unused variable without further use
2013-09-11tox.h, DHT.h:Coren[m]
- tox_bootstrap_ex(), DHT_bootstrap_ex() renamed to tox_bootstrap_from_address(), DHT_bootstrap_from_address() - (handle_)sendnodes_ex() renamed to (handle_)sendnodes_ipv6() - only sending sendnodes_ipv6() if we're actually IPv6 enabled - changed comments to conform better nTox.c, Messenger_text.c, DHT_test.c, DHT_bootstrap.c: - fallout from *_ex() to *_from_address() DHT_bootstrap.c: - corrected a potentially wrong info message util.c: - fixed logfile name: now (funcptr) => now() (number) network.c: - addead comment about the necessity of bind() to succeed auto_test/messenger_test.c: - defaulting ipv6enabled to TOX_ENABLE_IPV6_DEFAULT LAN_discovery.c: - slight cleanup and comments for clarity
2013-09-11network.c:Coren[m]
- undo "fixing" the wrong variable - fix the logging in receivepacket()
2013-09-11Prettier fix to missing length initializationCoren[m]
2013-09-11network.c: logging more details, fixing pollCoren[m]
LAN_discovery.c: IPv6: send both v6 multicast and v4 broadcast if socket allows
2013-09-11network.c:Coren[m]
- reset errno from failed bind() calls if the last one succeeds DHT_bootstrap.c: - move the perror() output next to where it belongs to
2013-09-10util.*:Coren[m]
- added logging functions, default off tox.h: - added includes for sockaddr_in/6 network.c: - added logging functions, default off (#define in util.h) - IPv6: activating site-local all-nodes multicast address (i.e. IPv6 equivalent of broadcast)
2013-09-10fix: bad memset length in ip_init()Coren[m]
2013-09-10big push, putting all the infrastructure in place behind TOX_ENABLE_IPV6Coren[m]
2013-09-09network.*:Coren[m]
- IPAny_Port: analogous to IP_Port - ipport_equal: moved from DHT.c and adapted DHTc.: - ipport_equal renamed to ip4port_equal
2013-09-09network.h:Coren[m]
- added ipany_ntoa() network.c: - added ipany_ntoa() - fixed formatting
2013-09-09network.*:Coren[m]
- IP4: changed in_addr_t to struct in_addr for compatibility reasons - IP6: added - IPAny: added - addr_resolve_or_parse_ip(): converts a string into an IPAny
2013-09-09network.h:Coren[m]
- IP: add in_addr_t as part of the union - IP: rename IP to IP4
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-09-02Merge branch 'master' of https://github.com/JamoBox/ProjectTox-Core into ↵irungentoo
JamoBox-master
2013-09-02last of the comment refactoring from toxcoreJamoBox
2013-09-02Merge pull request #554 from nurupo/masterirungentoo
Fixed missing field initializer warnings
2013-09-02Fixed missing field initializers warningsMaxim Biro
2013-09-02Fixed some warnings.irungentoo
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.