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

Function IsRFC1918

connectd/netaddress.c:85–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85static bool IsRFC1918(const struct wireaddr *addr)
86{
87 return IsIPv4(addr) && (
88 GetByte(addr, 3) == 10 ||
89 (GetByte(addr, 3) == 192 && GetByte(addr, 2) == 168) ||
90 (GetByte(addr, 3) == 172 && (GetByte(addr, 2) >= 16 && GetByte(addr, 2) <= 31)));
91}
92
93static bool IsRFC2544(const struct wireaddr *addr)
94{

Callers 2

IsRoutableFunction · 0.85
mainFunction · 0.85

Calls 2

IsIPv4Function · 0.85
GetByteFunction · 0.85

Tested by 1

mainFunction · 0.68