diff options
author | Martin Braun <martin.braun@ettus.com> | 2016-11-08 08:41:46 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-11-08 08:41:46 -0800 |
commit | 9b852f5f243e5cf68662b7152b5fa331a83e55fb (patch) | |
tree | 159ffe0761f78dd87e2ecc97abea14494abab4ff /host/lib/transport/if_addrs.cpp | |
parent | c66cb1bad0d881394f3519bd94f4693cceab4c64 (diff) | |
parent | 99c2730bc9db270560671f2d7d173768465ed51f (diff) | |
download | uhd-9b852f5f243e5cf68662b7152b5fa331a83e55fb.tar.gz uhd-9b852f5f243e5cf68662b7152b5fa331a83e55fb.tar.bz2 uhd-9b852f5f243e5cf68662b7152b5fa331a83e55fb.zip |
Merge branch 'maint'
Diffstat (limited to 'host/lib/transport/if_addrs.cpp')
-rw-r--r-- | host/lib/transport/if_addrs.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/host/lib/transport/if_addrs.cpp b/host/lib/transport/if_addrs.cpp index 2ad0c8c53..3b8be5dd5 100644 --- a/host/lib/transport/if_addrs.cpp +++ b/host/lib/transport/if_addrs.cpp @@ -17,7 +17,7 @@ #include <uhd/transport/if_addrs.hpp> #include <boost/asio/ip/address_v4.hpp> -#include <boost/cstdint.hpp> +#include <stdint.h> #include <iostream> /*********************************************************************** @@ -53,9 +53,9 @@ std::vector<uhd::transport::if_addrs_t> uhd::transport::get_if_addrs(void){ if (if_addr.inet == if_addr.bcast or sockaddr_to_ip_addr(iter->ifa_broadaddr) == boost::asio::ip::address_v4(0)){ //manually calculate broadcast address //https://svn.boost.org/trac/boost/ticket/5198 - const boost::uint32_t addr = sockaddr_to_ip_addr(iter->ifa_addr).to_ulong(); - const boost::uint32_t mask = sockaddr_to_ip_addr(iter->ifa_netmask).to_ulong(); - const boost::uint32_t bcast = (addr & mask) | ~mask; + const uint32_t addr = sockaddr_to_ip_addr(iter->ifa_addr).to_ulong(); + const uint32_t mask = sockaddr_to_ip_addr(iter->ifa_netmask).to_ulong(); + const uint32_t bcast = (addr & mask) | ~mask; if_addr.bcast = boost::asio::ip::address_v4(bcast).to_string(); } @@ -93,9 +93,9 @@ std::vector<uhd::transport::if_addrs_t> uhd::transport::get_if_addrs(void){ int nNumInterfaces = nBytesReturned / sizeof(INTERFACE_INFO); for (int i = 0; i < nNumInterfaces; ++i) { - boost::uint32_t iiAddress = ntohl(reinterpret_cast<sockaddr_in&>(InterfaceList[i].iiAddress).sin_addr.s_addr); - boost::uint32_t iiNetmask = ntohl(reinterpret_cast<sockaddr_in&>(InterfaceList[i].iiNetmask).sin_addr.s_addr); - boost::uint32_t iiBroadcastAddress = (iiAddress & iiNetmask) | ~iiNetmask; + uint32_t iiAddress = ntohl(reinterpret_cast<sockaddr_in&>(InterfaceList[i].iiAddress).sin_addr.s_addr); + uint32_t iiNetmask = ntohl(reinterpret_cast<sockaddr_in&>(InterfaceList[i].iiNetmask).sin_addr.s_addr); + uint32_t iiBroadcastAddress = (iiAddress & iiNetmask) | ~iiNetmask; if_addrs_t if_addr; if_addr.inet = boost::asio::ip::address_v4(iiAddress).to_string(); |