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

Function wireaddr_to_sockname

common/wireaddr.c:752–761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

750}
751
752bool wireaddr_to_sockname(const struct wireaddr_internal *addr,
753 struct sockaddr_un *sun)
754{
755 if (addr->itype != ADDR_INTERNAL_SOCKNAME)
756 return false;
757 sun->sun_family = AF_LOCAL;
758 BUILD_ASSERT(sizeof(sun->sun_path) == sizeof(addr->u.sockname));
759 memcpy(sun->sun_path, addr->u.sockname, sizeof(addr->u.sockname));
760 return true;
761}
762
763struct addrinfo *wireaddr_internal_to_addrinfo(const tal_t *ctx,
764 const struct wireaddr_internal *wireaddr)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected