| 770 | } |
| 771 | |
| 772 | CNetAddr 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 | |
| 783 | BOOST_AUTO_TEST_CASE(LimitedAndReachable_CNetAddr) |
no test coverage detected