Commit Graph

723 Commits

Author SHA1 Message Date
Arvid Norberg ed077c8358 use cstdint intead of boost/cstdint.hpp (#833)
use cstdint intead of boost/cstdint.hpp
2016-06-18 14:01:38 -04:00
Arvid Norberg ead11737b4 fix uses of defines for whether or not asserts are active (#832) 2016-06-18 08:31:07 -04:00
arvidn dfc2206b9f merged RC_1_1 into master 2016-06-11 01:00:41 -04:00
Arvid Norberg 5ecd00c5c5 fix osx build (#804)
fix osx build with asserts enabled
2016-06-11 00:48:13 -04:00
arvidn f4a95131c5 improve asserts in dht_storage 2016-06-10 00:55:17 -04:00
Alden Torres 9d3cf5e68b changed min_distance_exp for correctness and clarity (#789)
changed min_distance_exp for correctness and clarity
2016-06-06 18:22:33 -04:00
Arvid Norberg 223f24ca27 some cleanup and transition to std::unique_ptr (#786)
some cleanup and transition to std::unique_ptr
2016-06-05 14:07:24 -04:00
Alden Torres db65eb320a making dht counters additive (#783)
make dht counters additive to support both IPv4 and IPv6
2016-06-04 14:04:29 -04:00
Arvid Norberg 8c8f5bb03b deprecated public to_hex() and from_hex() functions (#784) 2016-06-04 10:01:43 -04:00
Alden Torres 7c4d92a627 Share the DHT storage for both IPv4 and IPv6 (#762) 2016-06-03 19:44:16 -04:00
arvidn 420b5f51e6 merged RC_1_1 into master 2016-05-27 12:35:53 -07:00
Arvid Norberg 96999ad67f replace uses of boost::bind with std::bind and lambdas (#745) 2016-05-25 00:31:52 -04:00
arvidn 98eabc63e9 using _WIN32 appears safer than WIN32 2016-05-23 23:02:52 -04:00
Arvid Norberg 748af6eec1 general cleanup. remove valgrind markup, log_hash_failures and C headers (#752)
general cleanup. remove valgrind markup, log_hash_failures and C headers
2016-05-23 08:15:39 -04:00
Arvid Norberg 584d74e2f0 fix union storage hacks (#670)
remove union storage hacks
2016-05-21 21:04:47 -04:00
arvidn aa0d29b67d merged RC_1_1 into master 2016-05-19 01:28:22 -04:00
Arvid Norberg e8380e1d0b factor out includes from config.hpp into the files actually using it. primarily, printf family of functions, since C++11 version is used now. This removes the need for an snprintf-wrapper on windows (#732) 2016-05-17 09:24:06 -04:00
Arvid Norberg 53bd03558c Dht stats 1.1 (#720)
fix missing dht stats counter updates
2016-05-12 21:27:11 -04:00
Arvid Norberg c6369194f0 simplify and optimize DHT routing table IP distance comparison (#696) 2016-05-03 23:22:25 -04:00
Arvid Norberg 077e9bb10c improve node-id operations (#693)
improve node-id operations, to operate on 32 bits at a time instead of 8. move out some code into sha1_hash.cpp, from the header file
2016-05-03 08:29:27 -04:00
Arvid Norberg c91a700c07 Msvc warnings (#685)
fix msvc warnings and build examples with warnings-as-errors
2016-05-02 12:36:21 -04:00
Steven Siloti ff0675e64e use standard array container (#676) 2016-04-30 23:10:47 -04:00
Arvid Norberg 20b41ad0b9 Threads (#671)
use std::thread, std::mutex, std::condition_variable instead of pulling them in from boost.asio internals.
2016-04-30 18:54:23 -04:00
Arvid Norberg 4e97bf556c use override and final keywords (unconditionally) (#668)
use override and final keywords instead of macros.
2016-04-30 11:05:54 -04:00
Arvid Norberg c557432431 attempt to run cppcheck on travis (#644)
run cppcheck on travis
2016-04-26 18:09:11 -04:00
Arvid Norberg 3c785b96fc Merge pull request #268 from ssiloti/dht-ipv6
Support DHT over IPv6
2016-04-25 19:19:48 -04:00
Andrei Kurushin 62eb956c54 fix x64 build with VS2015 UP2 compiler (#640)
fix VS2015 compiler warnings for: address-model=64, deprecated-functions=on, link=shared
2016-04-25 17:22:09 -04:00
Steven Siloti 2d9a6b76f1 use asio::protcol instead of an enum/bool 2016-04-24 15:18:47 -07:00
Steven Siloti d3ecc4c906 reduce the number of peers in a get_peers response with IPv6
Since IPv6 addresses are bigger we need to compensate to avoid generating
packets larger than 1500 bytes.
2016-04-24 14:26:57 -07:00
Steven Siloti 2abd9867ce IPv6 DHT support
Fixes #110
2016-04-24 14:26:57 -07:00
Steven Siloti 356d2506bd extend dht_observer to support IPv6 external addresses 2016-04-24 14:26:57 -07:00
Steven Siloti 11fa4f3e47 support IPv6 in node_entry and m_ips 2016-04-24 14:26:57 -07:00
Arvid Norberg 7251575d98 This patch does: (#633)
1. simplifies and regularizies creation of listen sockets based on the listen
   interfaces setting.
2. simplifies and improves the behavior of UDP sockets, which are now explicitly
   opened per listen interface
3. transitions udp tracker, DHT and uTP socket manager over to using the new
   udp sockets
4. greatly simplified udp_socket to only wrap a single underlying socket (as
   opposed to one IPv4 and IPv6 socket)
5. improved behavior of bind-to-device
6. introduce an array_view type to make udp packet passing code simpler
7. simplify and make setting of DF flag more robust
8. simplify and regularize port mapping of listen sockets
2016-04-24 15:26:28 -04:00
Andrei Kurushin 7b5d48c02a fix default release build with VS2015 UP2 compiler warnings (#624)
* fix default release build with VS2015 UP2 compiler warnings
this will allow to successfully build:
bjam toolset=msvc-14.0 release deprecated-functions=off character-set=unicode link=static warnings-as-errors=on
2016-04-17 16:56:07 -04:00
arvidn 6d85c7c5f0 merge RC_1_1 into master 2016-03-08 01:10:48 -05:00
Alden Torres 4998bfedc6 Documentation typos 2016-03-04 10:43:25 -05:00
arvidn d5203c67d9 add DHT rate limit test (simulation). introduce a new counter for dropped incoming dht messages. 2016-01-18 14:34:42 -05:00
arvidn 06b52f1421 some cleanup of the dht_socket_interface and fix tests and simulations to build with the dht disabled 2016-01-18 14:34:42 -05:00
arvidn 297b8943d0 move the DHT rate limiter into the dht_tracker class and remove the rate_limited_udp_socket type. This further simplifies the udp socket (preparing for moving it into the listen_socket structure) 2016-01-18 14:34:41 -05:00
arvidn 1f9f588e75 merge copyright year update and changelog from RC_1_0 2016-01-17 18:57:46 -05:00
arvidn f4d643bd2d instead of restarting the whole DHT when changing external IP, just rebuild the routing table and change the node IDs 2016-01-11 21:17:25 -05:00
Alden Torres 0f442f59f3 Avoid pass IPv6 address to current implementation of DHT while adding a node 2016-01-09 18:46:19 -05:00
arvidn e06daa68a4 overhaul the dht simulator (setup_dht) to be more flexible and cheaper to run thousands of nodes 2016-01-09 01:08:52 -05:00
arvidn d954ae1b18 simplify dht routing table add 2016-01-02 20:03:18 -05:00
arvidn 07ddb010c5 split buckets when exceeding the next bucket's size, to make sure we split before risking discarding nodes because the next bucket is smaller 2016-01-02 00:45:44 -05:00
arvidn e3ba811ae4 improve name of m_timer in dht_tracker 2016-01-01 16:42:44 -05:00
arvidn 01e6b93854 simplify and improve unit test for distance_exp. make some immutable variables const in the DHT implementation. instead of waking up periodically just to check if it's time to refresh the DHT secret key, set the timer to only wake up to refresh the key. If we don't have a DHT observer (to ask for our external IP) or if we don't know our external IP, don't generate a node ID based on 0.0.0.0, just generate a random ID instead. Simplified and improved node replacement logic in the routing table a little bit 2016-01-01 16:42:37 -05:00
Arvid Norberg ffb78f0378 Merge pull request #312 from ssiloti/export-verify-message
export verify_message and incoming_error
2015-12-30 22:51:38 -05:00
Steven Siloti ac01ccc43a add templated wrapper around verify_message
It was too easy to forget to update the ret and size parameters
when the size of desec changed. With this change we now automatically
get the size of desc and enforce that ret has the same size.

It would be nice if we could use bdecode_node ret[static Size] from C99
but that is not widely supported.
2015-12-29 20:35:36 -08:00
arvidn 626baade75 fix dht_storage bug 2015-12-19 22:06:25 -05:00
arvidn 28749466a2 fix build 2015-12-19 02:40:10 -05:00
arvidn 15ec839d33 extend the unit test of dht_storage 2015-12-19 02:09:06 -05:00
Steven Siloti c6f1e0bd7b export verify_message and incoming_error
Also move these functions to a new msg.cpp. They are useful for plugins
which implement DHT extensions.
2015-12-05 18:20:08 -08:00
arvidn 8732863a9a another fix to receiving malformed DHT error message 2015-12-03 01:08:27 -05:00
arvidn 7540a6e5cc correctly check incoming DHT error messages 2015-11-30 18:02:00 -05:00
arvidn 332799bff2 make alert types declared final and disable the log alert declarations when logging is disabled 2015-11-29 10:16:02 -05:00
Thomas Yuan 603ef84c65 Fix observer_size. 2015-11-23 11:06:20 -05:00
Steven Siloti 9c7edf803e add override and a TODO 2015-11-22 18:58:32 -08:00
Steven Siloti 9f7aa7f3a6 fix segfault in put_data
If less than three nodes are found to put an item to then traversal_algorithm::start
will add router nodes. This leads to a crash in put_data::invoke when it tries to
read a token from uninitialized memory in a null_observer.
2015-11-22 16:05:24 -08:00
Steven Siloti 1f13343a70 const correctness 2015-11-22 10:02:26 -08:00
Steven Siloti 8a984effa7 allow done() with a non-zero invoke count 2015-11-22 10:02:26 -08:00
Steven Siloti 6c5bed63d3 whitespace cleanup 2015-11-22 10:02:26 -08:00
Thomas Yuan ab70ad3e05 fix comments and unit test 2015-11-20 00:06:08 -05:00
Thomas Yuan 194ad410dc Make dht_put_alert more accurate. 2015-11-20 00:06:08 -05:00
Steven Siloti 86116caf4c fix assert after a DHT get/put request
If an observer is abandoned due to there being more than 100 results in a
traversal then the traversal may complete while the observer is still
outstanding. When the observer times out or is aborted it calls
traversal_algorithm::failed() which asserts because m_invoke_count has been
cleared to zero by traversal_algorithm::done().

To fix this add a check when abandoning observers to see if they have an
outstanding query. If they do then flag them as done to prevent them from
calling back into the traversal and decrement the invoke count.

Fixes #271
2015-11-16 21:05:32 -08:00
Steven Siloti ba1ccdec66 fix assert in dht::observer
This is was introduced by c2277b3ea5
"fix traversal_algorithm::done() being invoked more than once".
2015-11-14 18:30:42 -08:00
Steven Siloti c2277b3ea5 fix traversal_algorithm::done() being invoked more than once
A traversal can be done while there are still outstanding queries (i.e.
m_invoke_count is non-zero) if K good responses have already been received and
none of the outstanding queries are closer than the nodes which have responded.

When this happens and the outstanding queries eventually complete or timeout
they call traversal_algorithm::failed() or traversal_algorithm::finished() as
usual which will cause traversal_algorithm::done() to be called yet again.

The fix is to always set the done flag on all queried observers in
traversal_algorithm::done() so that the observers will refrain from calling
back into the traversal.

This also makes traversal_algorithm::abort() redundant since this was the only
thing it did before it called into done().
2015-11-09 20:47:33 -08:00
arvidn 3cc464805f update libsimulator submodule 2015-10-25 10:55:20 -04:00
arvidn a75dfe2eb6 silence warnings in boost headers in dht_storage 2015-10-25 09:30:56 -04:00
Steven Siloti 4151c8e366 assert that the signature is valid when assigning a mutable value to an item 2015-10-21 20:29:29 -07:00
Alden Torres 62b24d8b67 Add set_dht_storage to session API. 2015-10-02 09:00:07 -04:00
Arvid Norberg d7cdcf9369 Merge pull request #183 from thomas-yuan/ta_init
start 'find' from near nodes instead of all of nodes in routing table.
2015-09-30 00:43:14 -04:00
Alden Torres 197a443465 Fix of dht_storage_counters::peers counter. 2015-09-24 10:50:04 -04:00
Thomas Yuan 0d2644802d start 'find' from near nodes instead of all of nodes in routing table. 2015-09-23 17:04:33 -04:00
Thomas Yuan f9fa8ffdec Use ping instead of get_peers if current bucket is full. 2015-09-22 10:35:10 -04:00
Thomas Yuan 7fec9e488d make immutable/mutable items lifetime configurable. 2015-09-21 20:32:37 -04:00
Alden Torres 25ed70b977 Create dht_storage_counters to avoid internal counter in future public API. 2015-09-21 07:46:23 -04:00
Arvid Norberg 6bf1971452 Merge pull request #162 from thomas-yuan/bootstrap
Only re-bootstrap when there is no enough nodes in routing table.
2015-09-20 14:52:16 -04:00
arvidn b628692223 separate out announce_entry and torrent_status into their own headers 2015-09-18 08:08:08 -04:00
Thomas Yuan 20708fa5b6 Only re-bootstrap when there is no enough nodes in routing table. 2015-09-17 11:22:23 -04:00
Alden Torres e2d682275a Implementing and using new dht storage interface 2015-09-16 08:30:27 -04:00
Thomas Yuan c0d20d7708 Fix dht counters. 2015-09-11 13:58:33 -04:00
Thomas Yuan d6bb387ab9 Use dht_settings directly instead of add a read_only member variable.
Since rpc_manager has a reference of dht_settings, needn't pass it
as a parameter for incoming().
2015-09-08 10:35:30 -04:00
Thomas Yuan 3d4ed9f37f Add read-only support in dht_settings and outgoing query messages. 2015-09-07 14:24:46 -04:00
arvidn 17c5759829 disable warning for unused command line argument and fix warnings. remove redundant travis build config. use new preprocessor on clang to avoid warnings 2015-09-06 22:55:41 -04:00
Arvid Norberg d7c6a3b3ea Merge pull request #130 from thomas-yuan/invalid_node_id
A node with an invalid node_id, shouldn't be added to routing table.
2015-09-05 13:30:40 -04:00
Thomas Yuan 97217a1fd6 A node with an invalid node_id, shouldn't be added to routing table. 2015-09-04 14:04:49 -04:00
Arvid Norberg 7285520521 Merge pull request #117 from thomas-yuan/master
Fix bug caused by RP #96.
2015-08-31 23:49:08 -04:00
Thomas Yuan ef16ae4e27 Handle response with unexpected format. 2015-08-31 22:37:46 -04:00
Thomas Yuan 71b6b3c262 Fix bug caused by RP #96. 2015-08-31 18:13:47 -04:00
Thomas Yuan 314f134e35 reorganize code to make it straightforward. 2015-08-31 13:53:49 -04:00
Alden Torres 5be9dfb6db Removed unnecessary call to node_id copy constructor. 2015-08-22 16:01:53 -04:00
arvidn e7b8b6da49 forward port DHT routing table fix from RC_1_0 2015-08-22 15:51:28 +02:00
Arvid Norberg 746cd4c1a6 Merge pull request #96 from thomas-yuan/master
Parsing message correctly when message type is error.
2015-08-22 10:42:01 +02:00
Thomas dbfc2fd5ea Parsing message correctly when message type is error.
Also, an error response should call reply() of observer, instead of timeout().

Reference: http://www.libtorrent.org/dht_store.html#errors
2015-08-19 22:20:48 -04:00
arvidn ffa870d280 fixed some GCC warnings 2015-08-20 01:33:20 +02:00
arvidn a3608a39fe fix some warnings 2015-08-19 02:00:46 +02:00
arvidn 347d976a70 since starting the DHT can be delayed now, also cache dht nodes added while waiting 2015-08-18 23:35:27 +02:00
arvidn 8d8c049d9e fix warnings and invalid defines in disk_io_thread.cpp 2015-08-18 07:55:50 -04:00
Alden Torres b303a36ac2 Removed unnecessary full namespace reference to udp::endpoint in new dht_direct_request feature.
Add default value to userdata argument in dht_direct_request.
Minor spelling fix.
2015-08-12 00:49:09 -04:00
Steven Siloti 182c30f2d6 fix typo in class name 2015-08-10 20:33:04 -07:00
Steven Siloti 86fd8c3048 enable arbitrary direct dht requests and extension dht requests
If you're wondering why I used an alert for handling responses but not requests,
it's because the former was easy to do that way but the latter would have
involved some major refactoring or kludging. The DHT node is written with the
(IMO reasonable) assumption that all responses will be generated immediately, so
there was no way to easily accommodate getting a response asynchronously via
an alert.
2015-08-10 20:33:04 -07:00
arvidn a81ca2391b fix some warnings 2015-08-10 20:03:24 -04:00
Arvid Norberg 27c5a28637 Merge pull request #70 from thomas-yuan/master
Call callback function immediately when get data for mutable data.
2015-08-08 21:51:18 -04:00
Thomas e51b61870a Call callback function immediately when get mutable data. 2015-08-08 20:28:53 -04:00
arvidn 97571b4ad4 fixed more warnings 2015-08-07 00:30:29 -04:00
arvidn a91e7ce25d fix warnings 2015-08-06 02:30:06 -04:00
arvidn 655a3ae019 fix some warnings 2015-08-01 23:57:11 -04:00
arvidn 5657772114 limit how often the DHT can wake up 2015-07-28 23:04:15 -04:00
arvidn f85d62b601 merged DHT update of /8 blocks form RC_1_0 2015-07-16 21:56:06 -04:00
Alden Torres 761486ce43 Using PRId64 macro for portability. 2015-07-12 13:05:29 -04:00
Alden Torres 89f3b3bee3 Using the standard log method for round trip time in rcp_manager. 2015-07-12 12:59:38 -04:00
Arvid Norberg 41eff1801e Merge pull request #13 from aldenml/more-dht-api
Added dht_get_peers and dht_announce at session_impl level.
2015-07-04 10:08:14 -04:00
John Sebastian Peterson bb25acd661 use a better windows.foundation.collections.h(462) conflict fix 2015-07-04 05:59:38 +02:00
John Sebastian Peterson e7caa2d20f fix winrt compile error in windows.foundation.collections.h(428) 2015-07-02 09:58:17 +02:00
Alden Torres fcac7140f8 Added dht_get_peers and dht_announce at session_impl level. 2015-07-01 15:30:08 -04:00
Alden Torres 5c8c9cd653 Refactor to expose a more convenient get_peers function as part of the DHT api.
Now announce (a particular case of get_peers DHT operation) uses the function get_peers.
2015-06-24 21:22:24 -04:00
arvidn 389ffc622c don't pull in the asio namespace in libtorrent. refer to it by boost::asio 2015-06-06 01:24:25 -04:00
Arvid Norberg d43f7b56a2 update copyright year 2015-06-03 05:18:48 +00:00
Arvid Norberg 0aca01543b simplify dht logging 2015-05-30 06:31:03 +00:00
Arvid Norberg 945eef4c4d some dht_tracker clean up 2015-05-30 04:37:12 +00:00
Arvid Norberg e44c8e9002 optimize logging of DHT packets by deferring copying and printing, to only do it if the alert category is enabled 2015-05-28 20:36:22 +00:00
Arvid Norberg 0052fa6c19 some cleanup to dht observers (don't expose internals) 2015-05-22 02:42:26 +00:00
Arvid Norberg d18495eb39 support a NULL dht_observer again 2015-05-19 00:48:04 +00:00
Arvid Norberg e7d369646d fix gcc warnings 2015-05-18 01:30:32 +00:00
Arvid Norberg 71ee44ae5e fix build issue, some warnings 2015-05-17 23:32:13 +00:00
Arvid Norberg 88fe6eba9c fix issues introduced in dht logging patch 2015-05-17 20:59:18 +00:00
Arvid Norberg 99de70604a remove dht-verbose logging build configuration. tie it to the main logging configuration (which now is on by default) and make it less costly when dht logging alerts are disabled 2015-05-16 19:29:49 +00:00
Arvid Norberg 494b425ea1 fix warnings and a peer logging bug 2015-05-10 18:38:10 +00:00
Arvid Norberg 242dad0743 fix dht build 2015-05-10 18:24:09 +00:00
Arvid Norberg 2819d5f68e remove the remains of the dht logging 2015-05-10 05:28:50 +00:00
Arvid Norberg b60934288b turn DHT logging into alerts instead of writing to a file 2015-05-10 04:54:02 +00:00
Arvid Norberg ca581f2258 rename dht::node_impl -> dht::node, since this hasn't been a pimpl for quite a while 2015-05-09 19:00:22 +00:00
Arvid Norberg 6557910c7f remove the DHT's last dependency on session_impl 2015-05-09 18:06:02 +00:00
Arvid Norberg ddfef97696 don't use iostream in dht routing table debug logging 2015-05-08 05:21:26 +00:00
Arvid Norberg 4b585dcc0e minor cleanup and fix no-deprecated build 2015-05-06 01:11:54 +00:00
Arvid Norberg 2fff222235 silence some warnings on msvc 2015-04-27 02:21:12 +00:00
Arvid Norberg f97168241f build fix 2015-04-27 00:56:58 +00:00
Arvid Norberg a15bc13392 build fixes 2015-04-26 13:38:56 +00:00
Arvid Norberg 93a19b44c0 fix another format string issue and add comments to kademlia 2015-04-26 06:25:08 +00:00
Arvid Norberg f0336017d1 fix gcc warnings and missing header files in makefiles 2015-04-26 00:51:44 +00:00
Arvid Norberg 31a87c26f0 move another unused time function into the one place it was used from (which will be removed) 2015-04-24 04:08:08 +00:00
Arvid Norberg 3ea67e2bf5 move time_now_string out to the unit test library (basically unused in libtorrent itself) 2015-04-24 03:48:08 +00:00
Arvid Norberg 87c46a144d fix more warnings and some build issues 2015-04-22 04:24:45 +00:00
Arvid Norberg 3951377d95 fix include paths for warning push and pop headers 2015-04-21 01:16:28 +00:00
Arvid Norberg f5629eb403 cleanup and fixing of more warnings 2015-04-21 00:23:00 +00:00
Arvid Norberg 4d15f1410f fix warnings, some clean-up and todo comments 2015-04-20 04:52:49 +00:00
Arvid Norberg 408232cfc8 raise warning level. fix a few of them. filter out warnings from boost 2015-04-18 02:33:39 +00:00
Arvid Norberg 013ed36f09 landed alert_queue feature branch into trunk 2015-04-03 20:15:48 +00:00
Arvid Norberg a516bf46e5 merged changes from RC_1_0 2015-03-22 04:34:11 +00:00
Arvid Norberg 3f21a846f6 fix build without deprecated function. extend test_coverage script. comment out DHT sanity check assert that fires in the wild 2015-03-21 00:50:28 +00:00
Arvid Norberg 1b07ec491d fix build issue out of recent changes of exported functions 2015-03-16 04:38:28 +00:00
Arvid Norberg 794de25212 moved escape_string.hpp into the aux_ directory. moved out the 3 public hex functions into its own public header, hex.hpp 2015-03-14 23:10:20 +00:00
Arvid Norberg 37225b71ae const static -> static const (thanks gubatron). helps swigs parser 2015-03-14 00:42:27 +00:00
Arvid Norberg 65a9d76938 fix dht logging build 2015-03-13 05:53:22 +00:00
Arvid Norberg 6c1df7eb55 landed the bdecode branch in master. lazy_bdecode/lazy_entry is now being replaced by bdecode/bdecode_node 2015-03-12 05:20:12 +00:00
Arvid Norberg c1dc982f4f deprecate the ptime type and related time types. just use boost::chrono / std::chrono 2015-03-12 04:34:54 +00:00
Arvid Norberg 678d4f3a82 fix warning 2015-01-26 03:09:32 +00:00
Arvid Norberg 609b5eb4ba fix dht logging build 2015-01-18 15:03:18 +00:00
Arvid Norberg 8614ed795a attempt to fix build 2015-01-18 04:40:01 +00:00
Arvid Norberg 0afea4bb3e move some DHT verbose stats logging over to performance counters 2015-01-18 01:06:36 +00:00
Arvid Norberg 22a02f4a1f make dht_tracker be held by shared_ptr instead of intrusive_ptr. remove redundant performance counter (total dht sent/received). report DHT IP overhead to the IP overhead counters 2015-01-17 22:06:30 +00:00
Arvid Norberg 58d93e5aa1 add new (non-deprecated) access to dht stats, asynchronously via an alert 2015-01-17 17:02:58 +00:00
Arvid Norberg a462f58372 use hardware optimized CRC32C function in DHT 2015-01-05 13:50:42 +00:00
Arvid Norberg 35b41858cf deprecated session_status and session::status() in favor of performance counters 2015-01-04 21:31:02 +00:00
Arvid Norberg 55e51ab57c merged changes from RC_1_0 2015-01-04 21:18:00 +00:00
Arvid Norberg dbf461ac23 make DHT dos mitigation parameters configurable via dht_settings 2015-01-01 23:24:21 +00:00
Arvid Norberg 1039d4ae86 tweak some TODO comments and fix one 2014-12-31 14:41:35 +00:00
Arvid Norberg 0977d94dbc merged changes from RC_1_0 2014-12-25 11:24:02 +00:00
Arvid Norberg 333a13c957 a bit more conservative block request timeouts. promote some invariant checks in the DHT as expensive (to disable them for regular debug builds) 2014-12-10 07:13:57 +00:00
Arvid Norberg 1ed1963f29 remove size_type typedef in favor of boost::int64_t 2014-12-03 04:32:50 +00:00
Arvid Norberg edade10561 merged fix from RC_1_0 2014-11-26 03:58:55 +00:00
Arvid Norberg 8ec7cff993 merged changes from RC_1_0 2014-11-26 02:02:32 +00:00
Arvid Norberg 179df62379 merged changes from RC_1_0 2014-11-20 05:53:12 +00:00
Arvid Norberg aae56c991c merged changes from RC_1_0 2014-11-08 16:58:18 +00:00
Arvid Norberg 601f0dc434 merged changes from RC_1_0 2014-11-03 06:15:51 +00:00
Arvid Norberg 3742fd2699 merged changes from RC_1_0 2014-11-02 09:41:29 +00:00
Arvid Norberg 34af25beaa merged chagnes from RC_1_0 2014-11-01 22:47:56 +00:00
Arvid Norberg a91848962a merge changes from RC_1_0 2014-10-12 04:18:34 +00:00
Arvid Norberg b55778a847 some DHT logging and parsing 2014-10-07 07:23:20 +00:00
Arvid Norberg 3c7a932aee update comments 2014-10-04 20:06:46 +00:00
Arvid Norberg 7830081585 merged changes from RC_1_0 2014-10-01 18:19:44 +00:00
Arvid Norberg 0ed0bdc50c remove pointless DHT extension (for IPv6) 2014-10-01 16:21:29 +00:00
Arvid Norberg ba3ffe52f8 improve DHT logging a bit 2014-10-01 09:14:49 +00:00
Arvid Norberg 8cbef3876a post alert on outgoing get_peers 2014-09-22 19:49:32 +00:00
Arvid Norberg 645d3cdb32 merge fixes from RC_1_0 2014-09-20 19:27:29 +00:00
Arvid Norberg 44021c99e1 add todo comment 2014-08-28 08:06:11 +00:00
Arvid Norberg 98c4c9327b merged change from RC_1_0 2014-08-28 02:06:21 +00:00
Arvid Norberg 48ea42c990 merged changes from RC_1_0 2014-08-27 05:57:37 +00:00
Arvid Norberg 51f2aafb43 clean up some time_t and srand() uses 2014-08-16 20:55:44 +00:00
Arvid Norberg 524384045c transition to use boost.random instead of rand() and custom pseudo random generator 2014-08-16 20:26:00 +00:00
Arvid Norberg 3f88389f05 merged changes from RC_1_0 2014-08-16 07:46:06 +00:00
Arvid Norberg 1e48745173 another boost chrono fix 2014-07-25 16:51:13 +00:00
Arvid Norberg b78fdc630d fix another integer overflow issue from switching to chrono 2014-07-25 08:43:52 +00:00
Arvid Norberg f15182a737 merged changes from RC_1_0 2014-07-19 07:12:20 +00:00
Arvid Norberg 24b9101075 merged changes from RC_1_0 2014-07-12 06:20:16 +00:00
Arvid Norberg 9d172a8723 fixed chrono issue in dht 2014-07-08 15:36:47 +00:00
Arvid Norberg c90285df8a restore DHT semantics to fix dht unit test 2014-07-07 00:09:05 +00:00
Arvid Norberg 7351389ce8 land libtorrent_aio branch in trunk 2014-07-06 19:18:00 +00:00
Arvid Norberg 6ef1b98717 merged compiler warning fixes from RC_1_0 2014-07-05 14:10:25 +00:00
Arvid Norberg 6c6fe4dfe2 merged fixes of warnings from RC_1_0 2014-07-04 23:40:31 +00:00
Arvid Norberg 6e275fbe21 removed left-over unused variables 2014-07-02 02:53:10 +00:00
Arvid Norberg 36e8945968 more build fixes 2014-06-29 19:11:15 +00:00
Arvid Norberg 3893a55a57 fix to the fix 2014-05-25 05:28:15 +00:00
Arvid Norberg 96f25d6942 attempt to fix linux build 2014-05-25 05:10:30 +00:00
Arvid Norberg 64c09e7607 support for older boost versions 2014-05-25 00:13:17 +00:00
Arvid Norberg 5b89c3f5f9 merged some of steven siloti's changes. expose optimistic unchoke logic to plugins 2014-05-12 07:28:34 +00:00
Arvid Norberg e225259481 fix some msvc warnings 2014-05-10 03:23:05 +00:00
Arvid Norberg 555efd9279 factor out address/endpoint I/O into it's own unit test. merge write_string from bencode and socket_io. extend unit test 2014-05-04 06:46:47 +00:00
Arvid Norberg ab96600ae3 fix dht assert 2014-04-29 21:31:25 +00:00
Arvid Norberg c6b68ab683 fix warning 2014-03-23 01:41:00 +00:00
Arvid Norberg 0e04ab8d72 reorder the node-list in the DHT traversal algorithm if a node updates its ID 2014-03-03 05:09:53 +00:00
Arvid Norberg 8403e58f3c make dht test program able to get and put mutable items. fixed some DHT bugs along the mutable put/get path 2014-03-02 23:35:35 +00:00
Arvid Norberg 86c704a6ff fix dht_bootstrap_alert being posted. add additional alert for dht put completion. add utility to test immutable put/get. fix issue in DHT preventing stores on router nodes (even when they return write tokens). immutable put and get confirmed to be working 2014-02-28 04:02:48 +00:00
Arvid Norberg 1188ec2dcd expose new DHT put/get functionality in the public session API 2014-02-24 00:31:13 +00:00
Arvid Norberg a943fec777 update copyright 2014-02-23 19:12:25 +00:00
Arvid Norberg 715b60c8ff attempted windows build fix 2014-02-17 07:24:43 +00:00
Arvid Norberg 6c22d426d4 make all unit tests pass msvc's /RTCc instrumentation (no implicit integer truncation in casts) 2014-02-05 09:38:32 +00:00
Arvid Norberg 6bda2f7430 change peer priority to use crc32c instead of sha1 2014-01-23 02:28:04 +00:00
Arvid Norberg e0644ce8f5 invariant check macro fixes 2014-01-21 19:26:09 +00:00
Arvid Norberg fec7407461 send implied_port in dht announce messages when uTP is enabled 2014-01-20 06:35:06 +00:00
Arvid Norberg 702b68ecc4 clean up assert related defines and debuf-only fields less error-prone. fix missing initialization in file_pool caused by mistake in defines under which the debug field was initialized 2014-01-19 19:45:50 +00:00
Arvid Norberg a5b5cf0f62 ignore unused parts of the internet on the DHT by default 2014-01-19 07:44:16 +00:00
Arvid Norberg bec02dd953 fix valgrind build 2014-01-19 04:13:46 +00:00
Arvid Norberg 4a7543bdb8 remove a DHT observer right away when the response has an invalid node ID 2014-01-17 05:16:37 +00:00
Arvid Norberg b621f3f00a merged DHT fix from RC_0_16 2014-01-17 04:49:04 +00:00
Arvid Norberg 86b68e65e4 merged dht node ID change from RC_0_16 2014-01-11 08:08:43 +00:00
Arvid Norberg 89d5582560 merged dht fix from RC_0_16 2014-01-07 08:52:53 +00:00
Arvid Norberg ae7bb20170 update node ID generation algorithm from RC_0_16 2014-01-06 05:46:46 +00:00
Arvid Norberg db6a22d5c1 handle DHT error responses correctly 2014-01-03 08:02:53 +00:00
Arvid Norberg 54bbd3cae0 support salt feature in DHT put 2014-01-03 04:18:46 +00:00
Arvid Norberg 260e97c4e0 document salt feature in put and get DHT extensions. include a test vector and add that to the unit test. (salt is not implemented) 2013-12-31 08:37:42 +00:00
Arvid Norberg d6b1aa4c36 DHT refactoring and support for storing arbitrary data with put 2013-12-27 04:28:25 +00:00
Arvid Norberg 4e6b1cfbfb update copyright 2013-12-25 17:07:16 +00:00
Arvid Norberg 11a584991b fix bug in dht logging build 2013-12-21 09:22:10 +00:00
Arvid Norberg 70735a0a67 minor ifdef tweaks and DHT logging 2013-12-21 07:18:49 +00:00
Arvid Norberg 5d822706e1 add invariant check to dht routing_table 2013-12-20 04:54:52 +00:00
Arvid Norberg ce99fd47f2 enable all DHT logging (when building with dht logging enabled) 2013-12-20 04:54:27 +00:00
Arvid Norberg 412842365a add backwards compatible reading of IP field in DHT messages 2013-12-20 04:47:41 +00:00
Arvid Norberg 93d7d89ced fix issue with obfuscated_get_peers where peers in responses to obfuscated requests would still be returned. slight refactoring to move traversal algorithm level logic to traversal_observer class 2013-12-14 23:25:38 +00:00
Arvid Norberg f11959b235 fix initialization order warnings 2013-11-28 08:48:17 +00:00
Arvid Norberg d03d50b6a8 reorder some more fields to reduce padding 2013-11-26 02:23:33 +00:00
Arvid Norberg f9d3571915 merged fix from RC_0_16 2013-11-23 11:06:35 +00:00
Arvid Norberg 8f2683fe5d improve routing_table::depth() performance 2013-11-13 02:17:33 +00:00
Arvid Norberg 0f298dbe88 make the definition of routing table depth a bit more reliaxed in the DHT 2013-11-02 16:07:47 +00:00
Arvid Norberg b911129a12 merged fixes from RC_0_16 2013-11-02 03:35:45 +00:00
Arvid Norberg 1d55894bef improve obfuscated get_peers 2013-10-26 22:59:55 +00:00
Arvid Norberg dd55082321 fixed typo in dht put signature parsing 2013-10-22 07:12:31 +00:00
Arvid Norberg 1a2226b8f0 fix test_dht to take into account the slightly more relaxed semantics of routing_table::find_node 2013-10-22 05:20:00 +00:00
Arvid Norberg a627a4e156 add negative test for put/get DHT feature. fix bug in signature verification and in DHT unit test 2013-10-22 01:24:33 +00:00