summaryrefslogtreecommitdiff
path: root/toxcore/LAN_discovery.c
AgeCommit message (Collapse)Author
2014-06-13Const correctness for various packet callbacksMarc Schütz
2014-06-07Toxcore closer to building correctly with gcc -std=c99.irungentoo
2014-04-26Fixed minor issue.irungentoo
Socket used to find the broadcast ip was not closed when there was more than 16 broadcast interfaces.
2014-01-17Incorporated onion into Tox.irungentoo
Fixed a couple of issues related to that.
2013-12-05Shared address space for stacking NAT (CGN) is, just like 'regular' private ↵Coren[m]
address space, LAN.
2013-11-19Fixed possible issue.irungentoo
2013-11-13IPv6 address of ::1 is local.Coren[m]
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-20Fixed possible bug.irungentoo
2013-10-20Main: Eliminate TOX_ENABLE_IPV6 (then always on), CLIENT_ONETOONE_IP (then ↵Coren[m]
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
2013-09-27don't lose globally valid addresses for locally valid onesCoren[m]
2013-09-15Fixed portability problems.irungentoo
2013-09-15Fixed portablity problems.irungentoo
struct in6_addr member names can differ per platform.
2013-09-14Fixed warnings.irungentoo
2013-09-14astyled everything.irungentoo
2013-09-14LAN_discovery.c:Coren[m]
- LAN_ip(): use standard macro from IPv4-in-IPv6 test
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-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: logging more details, fixing pollCoren[m]
LAN_discovery.c: IPv6: send both v6 multicast and v4 broadcast if socket allows
2013-09-10big push, putting all the infrastructure in place behind TOX_ENABLE_IPV6Coren[m]
2013-09-09caught by autobuild, missing net->sock to net changeCoren[m]
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-04Possibly fixed LAN discovery on some configurations.irungentoo
2013-09-03Remove error printoutsJin^eLD
A library should never print anything, so removing the perror() printouts.
2013-09-02Merge branch 'master' of https://github.com/JamoBox/ProjectTox-Core into ↵irungentoo
JamoBox-master
2013-09-02Fixed missing field initializers warningsMaxim Biro
2013-09-02Even more comment updates.JamoBox
2013-08-30Merge branch 'master' of https://github.com/irungentoo/ProjectTox-Coreirungentoo
2013-08-30Compiler fix.irungentoo
2013-08-30Fix build error on non-linux machines.stal
2013-08-30Fixed warnings and moved hex_string_to_bin to testing/irungentoo
2013-08-30Fixed build errors.Kostya
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.