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

Method IsRoutable

src/netaddress.cpp:490–493  ·  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

488 * @see CNetAddr::IsValid()
489 */
490bool CNetAddr::IsRoutable() const
491{
492 return IsValid() && !(IsRFC1918() || IsRFC2544() || IsRFC3927() || IsRFC4862() || IsRFC6598() || IsRFC5737() || IsRFC4193() || IsRFC4843() || IsRFC7343() || IsLocal() || IsInternal());
493}
494
495/**
496 * @returns Whether or not this is a dummy address that represents a name.

Callers 9

PushNodeVersionMethod · 0.80
ProcessMessageMethod · 0.80
AddSingleMethod · 0.80
IsPeerAddrLocalGoodFunction · 0.80
GetLocalAddrForPeerFunction · 0.80
AddLocalFunction · 0.80
BindMethod · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
FUZZ_TARGETFunction · 0.80

Calls 1

IsLocalFunction · 0.85

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.64
FUZZ_TARGETFunction · 0.64