refactor: port forwarding (#3850)

* refactor: rename state enum type as tr_port_forwarding_state

* chore: use snake_case for tr_shared struct fields

* refactor: replace tr_shared with tr_port_forwarding

* refactor: make tr_natpmp_state an enum class

* refactor: uniform naming for port-forwarding module

* refactor: move output-only parameters in tr_natpmp::pulse() to return struct

* fix: use a nullptr multicastif if bindaddr is empty

* chore: use PascalCase for enum class values

* chore: clean up port-forwarding #includes

* chore: remove unused tr_port_forwarding::peerPort()
This commit is contained in:
Charles Kerr
2022-09-30 08:59:10 -05:00
committed by GitHub
parent a5ca289f41
commit bf156a97cf
12 changed files with 363 additions and 356 deletions

View File

@@ -56,6 +56,7 @@ struct evdns_base;
class tr_rpc_server;
class tr_web;
class tr_lpd;
class tr_port_forwarding;
struct BlocklistFile;
struct struct_utp_context;
struct tr_announcer;
@@ -550,7 +551,7 @@ public:
}
struct tr_peerMgr* peerMgr = nullptr;
struct tr_shared* shared = nullptr;
std::unique_ptr<tr_port_forwarding> port_forwarding_;
std::unique_ptr<Cache> cache;