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

Method IsRFC1918

src/netaddress.cpp:311–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311bool CNetAddr::IsRFC1918() const
312{
313 return IsIPv4() && (
314 m_addr[0] == 10 ||
315 (m_addr[0] == 192 && m_addr[1] == 168) ||
316 (m_addr[0] == 172 && m_addr[1] >= 16 && m_addr[1] <= 31));
317}
318
319bool CNetAddr::IsRFC2544() const
320{

Callers 2

BOOST_AUTO_TEST_CASEFunction · 0.80
FUZZ_TARGETFunction · 0.80

Calls 1

IsIPv4Function · 0.85

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.64
FUZZ_TARGETFunction · 0.64