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

Method IsRFC1918

src/netaddress.cpp:322–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320bool CNetAddr::IsIPv6() const { return m_net == NET_IPV6; }
321
322bool CNetAddr::IsRFC1918() const
323{
324 return IsIPv4() && (
325 m_addr[0] == 10 ||
326 (m_addr[0] == 192 && m_addr[1] == 168) ||
327 (m_addr[0] == 172 && m_addr[1] >= 16 && m_addr[1] <= 31));
328}
329
330bool CNetAddr::IsRFC2544() const
331{

Callers 2

BOOST_AUTO_TEST_CASEFunction · 0.80
FUZZ_TARGETFunction · 0.80

Calls

no outgoing calls

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.64
FUZZ_TARGETFunction · 0.64