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

Function IsRoutable

connectd/netaddress.c:190–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190static bool IsRoutable(const struct wireaddr *addr)
191{
192 return IsValid(addr) && !(IsRFC1918(addr) || IsRFC2544(addr) || IsRFC3927(addr) || IsRFC4862(addr) || IsRFC6598(addr) || IsRFC5737(addr) || (IsRFC4193(addr) && !IsTor(addr)) || IsRFC4843(addr) || IsLocal(addr) || IsInternal(addr));
193}
194
195/* Trick I learned from Harald Welte: create UDP socket, connect() and
196 * then query address. */

Callers 1

address_routableFunction · 0.85

Calls 12

IsValidFunction · 0.85
IsRFC1918Function · 0.85
IsRFC2544Function · 0.85
IsRFC3927Function · 0.85
IsRFC4862Function · 0.85
IsRFC6598Function · 0.85
IsRFC5737Function · 0.85
IsRFC4193Function · 0.85
IsTorFunction · 0.85
IsRFC4843Function · 0.85
IsLocalFunction · 0.85
IsInternalFunction · 0.85

Tested by

no test coverage detected