MCPcopy Create free account
hub / github.com/ElementsProject/elements / UtilBuildAddress

Function UtilBuildAddress

src/test/net_tests.cpp:772–780  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

770}
771
772CNetAddr UtilBuildAddress(unsigned char p1, unsigned char p2, unsigned char p3, unsigned char p4)
773{
774 unsigned char ip[] = {p1, p2, p3, p4};
775
776 struct sockaddr_in sa;
777 memset(&sa, 0, sizeof(sockaddr_in)); // initialize the memory block
778 memcpy(&(sa.sin_addr), &ip, sizeof(ip));
779 return CNetAddr(sa.sin_addr);
780}
781
782
783BOOST_AUTO_TEST_CASE(LimitedAndReachable_CNetAddr)

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 1

CNetAddrClass · 0.50

Tested by

no test coverage detected