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

Method IsRoutable

src/netaddress.cpp:462–465  ·  view source on GitHub ↗

* @returns Whether or not this network address is publicly routable on the * global internet. * * @note A routable address is always valid. As in, the set of routable addresses * is a subset of the set of valid addresses. * * @see CNetAddr::IsValid() */

Source from the content-addressed store, hash-verified

460 * @see CNetAddr::IsValid()
461 */
462bool CNetAddr::IsRoutable() const
463{
464 return IsValid() && !(IsRFC1918() || IsRFC2544() || IsRFC3927() || IsRFC4862() || IsRFC6598() || IsRFC5737() || IsRFC4193() || IsRFC4843() || IsRFC7343() || IsLocal() || IsInternal());
465}
466
467/**
468 * @returns Whether or not this is a dummy address that represents a name.

Callers 15

GetGroupMethod · 0.80
PushNodeVersionMethod · 0.80
ProcessMessageMethod · 0.80
ProcessAddrsMethod · 0.80
AddSingleMethod · 0.80
ProcessPCPFunction · 0.80
IsPeerAddrLocalGoodFunction · 0.80
GetLocalAddrForPeerFunction · 0.80
AddLocalFunction · 0.80
BindMethod · 0.80
AddPeerMethod · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 1

IsLocalFunction · 0.85

Tested by 4

AddPeerMethod · 0.64
BOOST_AUTO_TEST_CASEFunction · 0.64
AddRandomOutboundPeerMethod · 0.64
FUZZ_TARGETFunction · 0.64