MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetNetClass

Method GetNetClass

src/netaddress.cpp:674–690  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

672}
673
674Network CNetAddr::GetNetClass() const
675{
676 // Make sure that if we return NET_IPV6, then IsIPv6() is true. The callers expect that.
677
678 // Check for "internal" first because such addresses are also !IsRoutable()
679 // and we don't want to return NET_UNROUTABLE in that case.
680 if (IsInternal()) {
681 return NET_INTERNAL;
682 }
683 if (!IsRoutable()) {
684 return NET_UNROUTABLE;
685 }
686 if (HasLinkedIPv4()) {
687 return NET_IPV4;
688 }
689 return m_net;
690}
691
692std::vector<unsigned char> CNetAddr::GetAddrBytes() const
693{

Callers 9

GetGroupMethod · 0.80
GetMappedASMethod · 0.80
GetAddr_Method · 0.80
ConnectNodeMethod · 0.80
FUZZ_TARGETFunction · 0.80
getnodeaddressesFunction · 0.80
AddrmanEntryToJSONFunction · 0.80

Calls

no outgoing calls

Tested by 1

FUZZ_TARGETFunction · 0.64