diff options
| author | Martin Braun <martin.braun@ettus.com> | 2016-10-31 14:30:52 -0700 |
|---|---|---|
| committer | Martin Braun <martin.braun@ettus.com> | 2016-11-08 08:02:22 -0800 |
| commit | 99c2730bc9db270560671f2d7d173768465ed51f (patch) | |
| tree | bc4df495734a075ebe2f7917cf67dec6fb7d8177 /host/lib/transport/if_addrs.cpp | |
| parent | 218f4b0b63927110df9dbbaa8353c346eee2d98a (diff) | |
| download | uhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.gz uhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.bz2 uhd-99c2730bc9db270560671f2d7d173768465ed51f.zip | |
Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width types)
- Also removes all references to boost/cstdint.hpp and replaces it with
stdint.h (The 'correct' replacement would be <cstdint>, but not all of our
compilers support that).
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(); |
