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

Function IsRFC5737

connectd/netaddress.c:108–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108static bool IsRFC5737(const struct wireaddr *addr)
109{
110 return IsIPv4(addr) && ((GetByte(addr, 3) == 192 && GetByte(addr, 2) == 0 && GetByte(addr, 1) == 2) ||
111 (GetByte(addr, 3) == 198 && GetByte(addr, 2) == 51 && GetByte(addr, 1) == 100) ||
112 (GetByte(addr, 3) == 203 && GetByte(addr, 2) == 0 && GetByte(addr, 1) == 113));
113}
114
115static bool IsRFC3849(const struct wireaddr *addr)
116{

Callers 1

IsRoutableFunction · 0.85

Calls 2

IsIPv4Function · 0.85
GetByteFunction · 0.85

Tested by

no test coverage detected