69 if (net_addr.
IsTor()) {
77 (void)sub_net.IsValid();
78 (void)sub_net.ToString();
81 (void)service.GetKey();
82 (void)service.GetPort();
83 (void)service.ToString();
84 (void)service.ToStringIPPort();
85 (void)service.ToStringPort();
91 (void)sub_net.Match(other_net_addr);
94 assert((service == other_service) != (service != other_service));
95 (void)(service < other_service);
97 const CSubNet sub_net_copy_1{net_addr, other_net_addr};
98 const CSubNet sub_net_copy_2{net_addr};
101 mutable_net_addr.
SetIP(net_addr);
102 assert(net_addr == mutable_net_addr);
Network GetNetClass() const
std::string ToStringIP() const
void SetIP(const CNetAddr &ip)
std::string ToString() const
bool IsTor() const
Check whether this object represents a TOR address.
int GetReachabilityFrom(const CNetAddr *paddrPartner=nullptr) const
Calculates a metric for how reachable (*this) is from a given partner.
enum Network GetNetwork() const
A combination of a network address (CNetAddr) and a (TCP) port.
@ NET_ONION
TOR (v2 or v3)
@ NET_UNROUTABLE
Addresses from these networks are not publicly routable on the global Internet.
@ NET_INTERNAL
A set of addresses that represent the hash of a string or FQDN.
CNetAddr ConsumeNetAddr(FuzzedDataProvider &fuzzed_data_provider) noexcept