24 #include <boost/lexical_cast.hpp>
25 #include <boost/algorithm/string.hpp>
26 #include <boost/asio/ip/address_v4.hpp>
32 ip = boost::asio::detail::socket_ops::network_to_host_long(ip);
33 boost::asio::ip::address_v4 address_v4 = boost::asio::ip::address_v4(ip);
34 return address_v4.to_string();
40 return boost::asio::detail::socket_ops::host_to_network_long(address_v4.to_ulong());
45 std::vector<uint32> list;
48 for(
uint32 i = 0; i <= bitmask; i++) {
49 uint32 ip = boost::asio::detail::socket_ops::host_to_network_long((boost::asio::detail::socket_ops::network_to_host_long(address) & (~bitmask)) | i);
50 if((ip >> 24) != 0 && (ip >> 24) != 0xFF)
55 list.push_back(address);