* refactor: remove tr_address_compare()
* refactor: remove tr_address_to_string()
* refactor: remove NUM_TR_AF_INET_TYPES
* refactor: replace tr_sessionGetPublicAddress with tr_session::getPublicAddress()
* refactor: tr_peerIo() takes tr_address by value
* refactor: replace tr_sessionIsAddressBlocked with tr_session::isAddressBlocked()
* refactor: tr_peerMgrAddIncoming now takes tr_address by value
* refactor: replace tr_address_is_valid_for_peers() with tr_address.isValidForPeers()
* refactor: tr_netOpenPeerSocket takes tr_address by value
* refactor: remove tr_generateAllowedSet()
* refactor: setup_sockaddr takes a tr_address by value
* refactor: tr_netBindTCP() takes a tr_address by value
* refactor: tr_dhtAddNode() takes a tr_address by value
* refactor: remove tr_address_from_string()
* refactor: rename tr_address.isValidForPeers() to .isValidPeerAddress()
* refactor: replace tr_address_from_sockaddr_storage() with tr_address::fromSockaddrStorage()
* refactor: minor cleanup to tr_address::readable()
Pass the bind-address-ipv4 to upnpDiscover to allow for upnp to only
use the interface specified. Prevents upnp packet leaks.
Authored-by: LaserEyess <lasereyess@lasereyess.net>
* refactor: include <memory> when using shared_ptr or unique_ptr
* refactor: include <cstdio> iff we use it
* refactor: include <cstring> iff we use it
* refactor: include <cstdlib> iff we use it
* refactor: include <string_view> or <string> iff we use it
* refactor: include <array> iff we use it
* refactor: include <ctime> iff we use it
* refactor: include <cctype> iff we use it
* refactor: misc #include cleanups in libtransmission
* refactor: [[maybe_unused]] iff arg _might_ be used
If the arg is never used, comment out its name.
If the arg is _sometimes_ used e.g. with ifdefs, use [[maybe_unused]].
* refactor: uninit vars in peer-io.cc
* refactor: uninit vars in rpc-server.cc
* refactor: uninit vars in port-forwarding.cc
* refactor: uninit vars in torrent-ctor.cc
* C++ modernize: Replace MIN/MAX with type safe std::min/std::max
* Template std::min/max invocations now explicitly use largest integer type
* torrent.cc did not have <algorithm> included
* MIN/MAX Changes for subprocess-win32.cc
* Using type{} style cast instead of template parameter in std::min/max
* 32-bit type cast errors with uint64_t versus size_t
* 32-bit type cast errors inout.cc and file.cc
* Missing include in windows code; Type cast error fixed
* Missing macro in win32 daemon; Replaced MIN in commented code with std::min
* Update libtransmission/tr-getopt.cc
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* Update libtransmission/file-posix.cc
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* Update tests/libtransmission/copy-test.cc
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* Update libtransmission/peer-mgr.cc
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
* Strlen returns size_t, remove cast
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
Port libtransmission to C++. This PR doesn't refactor everything to c++.
Its code changes are only what was necessary to compile and link as c++.
See libtransmission/README.md for details on how to submit modernization
patches!
Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2021-09-12 12:41:49 -05:00
Renamed from libtransmission/port-forwarding.c (Browse further)