summaryrefslogtreecommitdiff
path: root/toxcore/onion_announce.c
AgeCommit message (Collapse)Author
2020-05-05refactor: Remove multi-declarators entirely.iphydf
We no longer allow `int a, b;`. In the few cases where we used it, we instead better * limit the scope of the identifier (e.g. in a for-init-decl) * split the line and have 2 separate declarators, because the identifiers designate different types of things (e.g. friend numbers and group numbers).
2020-03-14Use spdx license identifier instead of GPL blurb.iphydf
2018-08-27Make `ip_is_lan` return bool instead of 0/-1.iphydf
This inverts the truthiness of the return value. Previously, 0 meant `true` and -1 meant `false`. Now, `true` (1) means `true` and `false` (0) means `false`.
2018-08-26Update copyright to 2018.iphydf
2018-08-16Use per-instance `Mono_Time` for Messenger and onion.iphydf
2018-07-09Factor out time keeping code into its own module: mono_time.c.iphydf
It turns out, `unix_time` is also monotonic, and is used as such, so I've renamed the new functions to `mono_time_*`. 2018-07-08: ``` 00:01 <@irungentoo> the idea used to be that the unix_time() function could go backward in time but I think I might have started using it like if it could not after I changed it so that it would never go back in time ```
2018-07-08Use named types for onion callbacks.iphydf
This is now a style rule: you can only use typedef'd function types. Previous rules now applied in `onion_*.c`: * `struct`s must have a name (typedef of unnamed struct is not allowed). * `++i` for increment-stmt, not `i++`, e.g. in loops. * Only a single declarator per struct member declaration. * Type_Names vs. variable_names.
2018-05-20Finish @Diadlo's network Family abstraction.iphydf
The Family stuff in toxcore is a big mess. I'm sure I saw a bunch of bugs on the way, but I'm not verifying that code now, so the bugs stay.
2018-05-20Move system header includes from network.h to network.ciphydf
2018-02-24Some minor cleanups suggested by cppcheck.iphydf
DETECTED=cppcheck
2018-02-24Minor cleanups: dead stores and avoiding complex macros.iphydf
2018-02-04Use more ubuntu packages; remove hstox for now.iphydf
Since trusty has more up-to-date packages, we can remove some of the custom install code. Also, we're not using hstox at the moment, so there is no need to slow down the builds for now.
2018-01-30Use nullptr as NULL pointer constant instead of NULL or 0.iphydf
This changes only code, no string literals or comments.
2018-01-16Make DHT a module-private type.iphydf
2018-01-16Use apidsl to generate LAN_discovery.h.iphydf
2018-01-14Make Onion_Announce a module-private type.iphydf
2018-01-11Move Networking_Core struct into the .c file.iphydf
To make it an abstract type everywhere except in network.c.
2018-01-10Fix formatting in some C files.iphydf
Also replace &(x) with &x for consistency.
2017-10-28set onion pingid timeout to announce timeout (300s)zugz
2017-02-21Use VLA macroMaxim Biro
2017-02-11remove statics used in onion comparison functionszugz
2017-01-28Add VLA compatibility macro for C89-ish compilers.iphydf
2017-01-19Update license headers and remove redundant file name comment.iphydf
"All rights reserved" was incorrect. The project was licensed under GPL3, which means a lot of rights are licensed to everybody in the world, i.e. not reserved to the "Tox Project".
2016-12-22Wrap all sodium/nacl functions in crypto_core.c.iphydf
2016-09-24Make toxcore code C++ compatible.iphydf
It is still C code, so still compatible with C compilers as well. This change lets us see more clearly where implicit conversions occur by making them explicit.
2016-09-13Group #include directives in 3-4 groups.iphydf
1. Current module (if C file). 2. Headers from current library. 3. Headers from other library (e.g. toxcore includes in toxav). 4. System headers.
2016-09-01Remove useless casts.iphydf
These casts are either completely useless (casting T to T) or implicit (x = y).
2016-09-01Sort #includes in all source files.iphydf
2016-08-31Add braces to all if statements.iphydf
2016-08-18Make tox_callback_friend_name stateless.iphydf
See #27 and #40 for details.
2016-01-30Fixes.irungentoo
Fixed bug from merged PR. Don't build useless files when building with libsodium.
2016-01-27 fix: compare sensitive data with sodium_memcmpRoman Proskuryakov
fix: make increment_nonce & increment_nonce_number independent of user-controlled input fix: make crypto_core more stable agains null ptr dereference
2015-01-29Code cleanups.irungentoo
Rename array in Node_format from client_id to public_key.
2014-11-21Cleaned up packet length types in toxcore.irungentoo
They are now all uint16_t instead of sometimes being uint32_t. Replaced some other uint32_t with unsigned ints.
2014-10-24Don't send -1 bytes. There is such check everythere. But if we add it in ↵xor2003
side funciton the logic will change
2014-09-06This fixes an issue where nodes could stay unannounced for certainirungentoo
periods of time. Online nodes should now be able to announce themselves continuously.
2014-08-28Fixed gcc warnings.irungentoo
2014-08-11Some code refactoring to make passing onion packets through TCP easier.irungentoo
2014-07-02Merge branch 'const_correctness' of https://github.com/schuetzm/ProjectTox-Coreirungentoo
2014-06-30Const-correctness for toxcore/onion_announce.cMarc Schütz
2014-06-18Preparation work to make onion packets go through TCP.irungentoo
2014-06-15Astyled code.irungentoo
2014-06-13Const correctness for various packet callbacksMarc Schütz
2014-06-01Fixed TOX_MAX_MESSAGE_LENGTH define.irungentoo
Removed some useless code from toxcore. Astyled core code with new version of astyle.
2014-05-12Use ping_array to store onion announce information instead of sendingirungentoo
over a huge cookie. This reduces the size of the onion announce packets by 100 bytes.
2014-04-23Updated some files so that they could build with latest core.irungentoo
Fixed some issues.
2014-04-23Major cleanups.irungentoo
Fixed circular dependency between DHT and net_crypto: DHT no longer depends on net_crypto. Moved the crypto request packets functions to crypto core and DHT. Cleaned up/added some defines that can be used to get the true maximum length of things like the friends request message. MAX_DATA_SIZE has been replaced in most places by more appropriate defines.
2014-04-22Decided pretty much how the handshake would work.irungentoo
Started writing the code. Astyled some files.
2014-04-21Crypto related cleanups.irungentoo
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.
2014-04-15Fixed regression, announce responses can contain 0 nodes.irungentoo