77 if (net_addr.
IsTor()) {
80 if (net_addr.
IsI2P()) {
90 (void)sub_net.IsValid();
91 (void)sub_net.ToString();
94 (void)service.GetKey();
95 (void)service.GetPort();
96 (void)service.ToStringAddrPort();
102 (void)sub_net.Match(other_net_addr);
105 assert((service == other_service) != (service != other_service));
106 (void)(service < other_service);
108 const CSubNet sub_net_copy_1{net_addr, other_net_addr};
109 const CSubNet sub_net_copy_2{net_addr};
112 mutable_net_addr.
SetIP(net_addr);
113 assert(net_addr == mutable_net_addr);
Network GetNetClass() const
std::string ToStringAddr() const
void SetIP(const CNetAddr &ip)
enum Network GetNetwork() const
int GetReachabilityFrom(const CNetAddr &paddrPartner) const
Calculates a metric for how reachable (*this) is from a given partner.
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, FastRandomContext *rand) noexcept
Create a CNetAddr.
void SeedRandomStateForTest(SeedRand seedtype)
Seed the global RNG state for testing and log the seed value.
@ ZEROS
Seed with a compile time constant of zeros.