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

Function is_ipaddr

common/wireaddr.c:344–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344bool is_ipaddr(const char *arg)
345{
346 struct in_addr v4;
347 struct in6_addr v6;
348 if (inet_pton(AF_INET, arg, &v4))
349 return true;
350 if (inet_pton(AF_INET6, arg, &v6))
351 return true;
352 return false;
353}
354
355bool is_toraddr(const char *arg)
356{

Callers 3

opt_add_addr_withtypeFunction · 0.85
is_dnsaddrFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68