| config.hpp | | config.hpp | |
| | | | |
| skipping to change at line 363 | | skipping to change at line 363 | |
| // I/O subsytem will use a separate thread for closing files | | // I/O subsytem will use a separate thread for closing files | |
| #ifndef TORRENT_CLOSE_MAY_BLOCK | | #ifndef TORRENT_CLOSE_MAY_BLOCK | |
| #define TORRENT_CLOSE_MAY_BLOCK 0 | | #define TORRENT_CLOSE_MAY_BLOCK 0 | |
| #endif | | #endif | |
| | | | |
| #ifndef TORRENT_BROKEN_UNIONS | | #ifndef TORRENT_BROKEN_UNIONS | |
| #define TORRENT_BROKEN_UNIONS 0 | | #define TORRENT_BROKEN_UNIONS 0 | |
| #endif | | #endif | |
| | | | |
| #ifndef TORRENT_USE_WSTRING | | #ifndef TORRENT_USE_WSTRING | |
|
| #if defined UNICODE && !defined BOOST_NO_STD_WSTRING | | #if !defined BOOST_NO_STD_WSTRING | |
| #define TORRENT_USE_WSTRING 1 | | #define TORRENT_USE_WSTRING 1 | |
| #else | | #else | |
| #define TORRENT_USE_WSTRING 0 | | #define TORRENT_USE_WSTRING 0 | |
|
| #endif // UNICODE | | #endif // BOOST_NO_STD_WSTRING | |
| #endif // TORRENT_USE_WSTRING | | #endif // TORRENT_USE_WSTRING | |
| | | | |
| #ifndef TORRENT_HAS_FALLOCATE | | #ifndef TORRENT_HAS_FALLOCATE | |
| #define TORRENT_HAS_FALLOCATE 1 | | #define TORRENT_HAS_FALLOCATE 1 | |
| #endif | | #endif | |
| | | | |
| #ifndef TORRENT_EXPORT | | #ifndef TORRENT_EXPORT | |
| # define TORRENT_EXPORT | | # define TORRENT_EXPORT | |
| #endif | | #endif | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| node.hpp | | node.hpp | |
| | | | |
| skipping to change at line 133 | | skipping to change at line 133 | |
| // popularity if we reach the limit of items to store | | // popularity if we reach the limit of items to store | |
| bloom_filter<128> ips; | | bloom_filter<128> ips; | |
| // the last time we heard about this | | // the last time we heard about this | |
| ptime last_seen; | | ptime last_seen; | |
| // number of IPs in the bloom filter | | // number of IPs in the bloom filter | |
| int num_announcers; | | int num_announcers; | |
| // size of malloced space pointed to by value | | // size of malloced space pointed to by value | |
| int size; | | int size; | |
| }; | | }; | |
| | | | |
|
| | | struct rsa_key { char bytes[268]; }; | |
| | | | |
| struct dht_mutable_item : dht_immutable_item | | struct dht_mutable_item : dht_immutable_item | |
| { | | { | |
| char sig[256]; | | char sig[256]; | |
| int seq; | | int seq; | |
|
| | | rsa_key key; | |
| }; | | }; | |
| | | | |
|
| struct rsa_key { char bytes[268]; }; | | | |
| | | | |
| inline bool operator<(rsa_key const& lhs, rsa_key const& rhs) | | inline bool operator<(rsa_key const& lhs, rsa_key const& rhs) | |
| { | | { | |
| return memcmp(lhs.bytes, rhs.bytes, sizeof(lhs.bytes)) < 0; | | return memcmp(lhs.bytes, rhs.bytes, sizeof(lhs.bytes)) < 0; | |
| } | | } | |
| | | | |
| inline bool operator<(peer_entry const& lhs, peer_entry const& rhs) | | inline bool operator<(peer_entry const& lhs, peer_entry const& rhs) | |
| { | | { | |
| return lhs.addr.address() == rhs.addr.address() | | return lhs.addr.address() == rhs.addr.address() | |
| ? lhs.addr.port() < rhs.addr.port() | | ? lhs.addr.port() < rhs.addr.port() | |
| : lhs.addr.address() < rhs.addr.address(); | | : lhs.addr.address() < rhs.addr.address(); | |
| | | | |
| skipping to change at line 181 | | skipping to change at line 182 | |
| , libtorrent::dht::torrent_entry> const& t) | | , libtorrent::dht::torrent_entry> const& t) | |
| { | | { | |
| count += t.second.peers.size(); | | count += t.second.peers.size(); | |
| } | | } | |
| }; | | }; | |
| | | | |
| class TORRENT_EXTRA_EXPORT node_impl : boost::noncopyable | | class TORRENT_EXTRA_EXPORT node_impl : boost::noncopyable | |
| { | | { | |
| typedef std::map<node_id, torrent_entry> table_t; | | typedef std::map<node_id, torrent_entry> table_t; | |
| typedef std::map<node_id, dht_immutable_item> dht_immutable_table_t; | | typedef std::map<node_id, dht_immutable_item> dht_immutable_table_t; | |
|
| typedef std::map<rsa_key, dht_mutable_item> dht_mutable_table_t; | | typedef std::map<node_id, dht_mutable_item> dht_mutable_table_t; | |
| | | | |
| public: | | public: | |
| typedef boost::function3<void, address, int, address> external_ip_fu
n; | | typedef boost::function3<void, address, int, address> external_ip_fu
n; | |
| | | | |
| node_impl(libtorrent::alert_manager& alerts | | node_impl(libtorrent::alert_manager& alerts | |
| , bool (*f)(void*, entry&, udp::endpoint const&, int) | | , bool (*f)(void*, entry&, udp::endpoint const&, int) | |
| , dht_settings const& settings, node_id nid, address const&
external_address | | , dht_settings const& settings, node_id nid, address const&
external_address | |
| , external_ip_fun ext_ip, void* userdata); | | , external_ip_fun ext_ip, void* userdata); | |
| | | | |
| virtual ~node_impl() {} | | virtual ~node_impl() {} | |
| | | | |
End of changes. 4 change blocks. |
| 3 lines changed or deleted | | 4 lines changed or added | |
|
| policy.hpp | | policy.hpp | |
| | | | |
| skipping to change at line 449 | | skipping to change at line 449 | |
| bool is_force_erase_candidate(peer const& pe) const; | | bool is_force_erase_candidate(peer const& pe) const; | |
| bool should_erase_immediately(peer const& p) const; | | bool should_erase_immediately(peer const& p) const; | |
| | | | |
| enum flags_t { force_erase = 1 }; | | enum flags_t { force_erase = 1 }; | |
| void erase_peers(int flags = 0); | | void erase_peers(int flags = 0); | |
| | | | |
| peers_t m_peers; | | peers_t m_peers; | |
| | | | |
| torrent* m_torrent; | | torrent* m_torrent; | |
| | | | |
|
| | | // this shouldbe NULL for the most part. It's set | |
| | | // to point to a valid torrent_peer object if that | |
| | | // object needs to be kept alive. If we ever feel | |
| | | // like removing a torrent_peer from m_peers, we | |
| | | // first check if the peer matches this one, and | |
| | | // if so, don't delete it. | |
| | | peer* m_locked_peer; | |
| | | | |
| // since the peer list can grow too large | | // since the peer list can grow too large | |
| // to scan all of it, start at this iterator | | // to scan all of it, start at this iterator | |
| int m_round_robin; | | int m_round_robin; | |
| | | | |
| // The number of peers in our peer list | | // The number of peers in our peer list | |
| // that are connect candidates. i.e. they're | | // that are connect candidates. i.e. they're | |
| // not already connected and they have not | | // not already connected and they have not | |
| // yet reached their max try count and they | | // yet reached their max try count and they | |
| // have the connectable state (we have a listen | | // have the connectable state (we have a listen | |
| // port for them). | | // port for them). | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 8 lines changed or added | |
|
| session_settings.hpp | | session_settings.hpp | |
| | | | |
| skipping to change at line 262 | | skipping to change at line 262 | |
| int initial_picker_threshold; | | int initial_picker_threshold; | |
| | | | |
| // the number of allowed pieces to send to peers | | // the number of allowed pieces to send to peers | |
| // that supports the fast extensions | | // that supports the fast extensions | |
| int allowed_fast_set_size; | | int allowed_fast_set_size; | |
| | | | |
| // this determines which pieces will be suggested to peers | | // this determines which pieces will be suggested to peers | |
| // suggest read cache will make libtorrent suggest pieces | | // suggest read cache will make libtorrent suggest pieces | |
| // that are fresh in the disk read cache, to potentially | | // that are fresh in the disk read cache, to potentially | |
| // lower disk access and increase the cache hit ratio | | // lower disk access and increase the cache hit ratio | |
|
| enum { no_piece_suggestions = 0, suggest_read_cache = 1 }; | | enum suggest_mode_t { no_piece_suggestions = 0, suggest_read
_cache = 1 }; | |
| int suggest_mode; | | int suggest_mode; | |
| | | | |
| // the maximum number of bytes a connection may have | | // the maximum number of bytes a connection may have | |
| // pending in the disk write queue before its download | | // pending in the disk write queue before its download | |
| // rate is being throttled. This prevents fast downloads | | // rate is being throttled. This prevents fast downloads | |
| // to slow medias to allocate more and more memory | | // to slow medias to allocate more and more memory | |
| // indefinitely. This should be set to at least 16 kB | | // indefinitely. This should be set to at least 16 kB | |
| // to not completely disrupt normal downloads. If it's | | // to not completely disrupt normal downloads. If it's | |
| // set to 0, you will be starving the disk thread and | | // set to 0, you will be starving the disk thread and | |
| // nothing will be written to disk. | | // nothing will be written to disk. | |
| | | | |
End of changes. 1 change blocks. |
| 1 lines changed or deleted | | 1 lines changed or added | |
|
| socket.hpp | | socket.hpp | |
| | | | |
| skipping to change at line 101 | | skipping to change at line 101 | |
| using boost::asio::async_read; | | using boost::asio::async_read; | |
| | | | |
| typedef boost::asio::ip::tcp::socket stream_socket; | | typedef boost::asio::ip::tcp::socket stream_socket; | |
| typedef boost::asio::ip::udp::socket datagram_socket; | | typedef boost::asio::ip::udp::socket datagram_socket; | |
| typedef boost::asio::ip::tcp::acceptor socket_acceptor; | | typedef boost::asio::ip::tcp::acceptor socket_acceptor; | |
| | | | |
| namespace asio = boost::asio; | | namespace asio = boost::asio; | |
| #endif | | #endif | |
| | | | |
| #if TORRENT_USE_IPV6 | | #if TORRENT_USE_IPV6 | |
|
| | | #ifdef IPV6_V6ONLY | |
| struct v6only | | struct v6only | |
| { | | { | |
| v6only(bool enable): m_value(enable) {} | | v6only(bool enable): m_value(enable) {} | |
| template<class Protocol> | | template<class Protocol> | |
| int level(Protocol const&) const { return IPPROTO_IPV6; } | | int level(Protocol const&) const { return IPPROTO_IPV6; } | |
| template<class Protocol> | | template<class Protocol> | |
| int name(Protocol const&) const { return IPV6_V6ONLY; } | | int name(Protocol const&) const { return IPV6_V6ONLY; } | |
| template<class Protocol> | | template<class Protocol> | |
| int const* data(Protocol const&) const { return &m_value; } | | int const* data(Protocol const&) const { return &m_value; } | |
| template<class Protocol> | | template<class Protocol> | |
| size_t size(Protocol const&) const { return sizeof(m_value);
} | | size_t size(Protocol const&) const { return sizeof(m_value);
} | |
| int m_value; | | int m_value; | |
| }; | | }; | |
| #endif | | #endif | |
|
| | | #endif | |
| | | | |
| #ifdef TORRENT_WINDOWS | | #ifdef TORRENT_WINDOWS | |
| | | | |
| #ifndef IPV6_PROTECTION_LEVEL | | #ifndef IPV6_PROTECTION_LEVEL | |
| #define IPV6_PROTECTION_LEVEL 30 | | #define IPV6_PROTECTION_LEVEL 30 | |
| #endif | | #endif | |
| struct v6_protection_level | | struct v6_protection_level | |
| { | | { | |
| v6_protection_level(int level): m_value(level) {} | | v6_protection_level(int level): m_value(level) {} | |
| template<class Protocol> | | template<class Protocol> | |
| | | | |
End of changes. 2 change blocks. |
| 0 lines changed or deleted | | 2 lines changed or added | |
|
| torrent.hpp | | torrent.hpp | |
| | | | |
| skipping to change at line 997 | | skipping to change at line 997 | |
| int flags; | | int flags; | |
| // how many peers it's been requested from | | // how many peers it's been requested from | |
| int peers; | | int peers; | |
| // the piece index | | // the piece index | |
| int piece; | | int piece; | |
| bool operator<(time_critical_piece const& rhs) const | | bool operator<(time_critical_piece const& rhs) const | |
| { return deadline < rhs.deadline; } | | { return deadline < rhs.deadline; } | |
| }; | | }; | |
| | | | |
| // this list is sorted by time_critical_piece::deadline | | // this list is sorted by time_critical_piece::deadline | |
|
| | | // TODO: this should be a deque | |
| std::list<time_critical_piece> m_time_critical_pieces; | | std::list<time_critical_piece> m_time_critical_pieces; | |
| | | | |
| std::string m_trackerid; | | std::string m_trackerid; | |
| std::string m_username; | | std::string m_username; | |
| std::string m_password; | | std::string m_password; | |
| | | | |
| // the network interfaces outgoing connections | | // the network interfaces outgoing connections | |
| // are opened through. If there is more then one, | | // are opened through. If there is more then one, | |
| // they are used in a round-robin fasion | | // they are used in a round-robin fasion | |
| std::vector<union_endpoint> m_net_interfaces; | | std::vector<union_endpoint> m_net_interfaces; | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 1 lines changed or added | |
|
| utp_socket_manager.hpp | | utp_socket_manager.hpp | |
| | | | |
| skipping to change at line 106 | | skipping to change at line 106 | |
| | | | |
| // the last socket we received a packet on | | // the last socket we received a packet on | |
| utp_socket_impl* m_last_socket; | | utp_socket_impl* m_last_socket; | |
| | | | |
| int m_new_connection; | | int m_new_connection; | |
| | | | |
| session_settings const& m_sett; | | session_settings const& m_sett; | |
| | | | |
| // this is a copy of the routing table, used | | // this is a copy of the routing table, used | |
| // to initialize MTU sizes of uTP sockets | | // to initialize MTU sizes of uTP sockets | |
|
| std::vector<ip_route> m_routes; | | mutable std::vector<ip_route> m_routes; | |
| | | | |
| // the timestamp for the last time we updated | | // the timestamp for the last time we updated | |
| // the routing table | | // the routing table | |
|
| ptime m_last_route_update; | | mutable ptime m_last_route_update; | |
| | | | |
| | | // cache of interfaces | |
| | | mutable std::vector<ip_interface> m_interfaces; | |
| | | mutable ptime m_last_if_update; | |
| | | | |
| // the buffer size of the socket. This is used | | // the buffer size of the socket. This is used | |
| // to now lower the buffer size | | // to now lower the buffer size | |
| int m_sock_buf_size; | | int m_sock_buf_size; | |
| }; | | }; | |
| } | | } | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 6 lines changed or added | |
|
| version.hpp | | version.hpp | |
| | | | |
| skipping to change at line 38 | | skipping to change at line 38 | |
| ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
| POSSIBILITY OF SUCH DAMAGE. | | POSSIBILITY OF SUCH DAMAGE. | |
| | | | |
| */ | | */ | |
| | | | |
| #ifndef TORRENT_VERSION_HPP_INCLUDED | | #ifndef TORRENT_VERSION_HPP_INCLUDED | |
| #define TORRENT_VERSION_HPP_INCLUDED | | #define TORRENT_VERSION_HPP_INCLUDED | |
| | | | |
| #define LIBTORRENT_VERSION_MAJOR 0 | | #define LIBTORRENT_VERSION_MAJOR 0 | |
| #define LIBTORRENT_VERSION_MINOR 16 | | #define LIBTORRENT_VERSION_MINOR 16 | |
|
| #define LIBTORRENT_VERSION_TINY 5 | | #define LIBTORRENT_VERSION_TINY 6 | |
| | | | |
| // the format of this version is: MMmmtt | | // the format of this version is: MMmmtt | |
| // M = Major version, m = minor version, t = tiny version | | // M = Major version, m = minor version, t = tiny version | |
| #define LIBTORRENT_VERSION_NUM ((LIBTORRENT_VERSION_MAJOR * 10000) + (LIBTO
RRENT_VERSION_MINOR * 100) + LIBTORRENT_VERSION_TINY) | | #define LIBTORRENT_VERSION_NUM ((LIBTORRENT_VERSION_MAJOR * 10000) + (LIBTO
RRENT_VERSION_MINOR * 100) + LIBTORRENT_VERSION_TINY) | |
| | | | |
|
| #define LIBTORRENT_VERSION "0.16.5.0" | | #define LIBTORRENT_VERSION "0.16.6.0" | |
| #define LIBTORRENT_REVISION "$Rev: 7607 $" | | #define LIBTORRENT_REVISION "$Rev: 7769 $" | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 2 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|