MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetExtNetwork

Function GetExtNetwork

src/netaddress.cpp:840–847  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

838static const int NET_UNKNOWN = NET_MAX + 0;
839static const int NET_TEREDO = NET_MAX + 1;
840int static GetExtNetwork(const CNetAddr *addr)
841{
842 if (addr == nullptr)
843 return NET_UNKNOWN;
844 if (addr->IsRFC4380())
845 return NET_TEREDO;
846 return addr->GetNetwork();
847}
848
849/** Calculates a metric for how reachable (*this) is from a given partner */
850int CNetAddr::GetReachabilityFrom(const CNetAddr *paddrPartner) const

Callers 1

GetReachabilityFromMethod · 0.85

Calls 2

IsRFC4380Method · 0.80
GetNetworkMethod · 0.80

Tested by

no test coverage detected