summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-03-14 20:22:28 -0700
committerJosh Blum <josh@joshknows.com>2011-03-14 20:22:28 -0700
commitd3e336f4177962daf56520fcb759df8a313599ac (patch)
tree95c399ca384193b68271dd98df6889603c96e529 /host
parente5b625a59b047481e648a3d9f8871e226d6ab7aa (diff)
downloaduhd-d3e336f4177962daf56520fcb759df8a313599ac.tar.gz
uhd-d3e336f4177962daf56520fcb759df8a313599ac.tar.bz2
uhd-d3e336f4177962daf56520fcb759df8a313599ac.zip
usrp2: minor fix to use more ntohl
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 505df662a..0d0d582fa 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -31,6 +31,7 @@
#include <boost/lexical_cast.hpp>
#include <boost/bind.hpp>
#include <boost/asio/ip/address_v4.hpp>
+#include <boost/asio.hpp> //used for htonl and ntohl
#include <iostream>
#include <vector>
@@ -103,9 +104,9 @@ static device_addrs_t usrp2_find(const device_addr_t &hint_){
while(true){
size_t len = udp_transport->recv(asio::buffer(usrp2_ctrl_data_in_mem));
//std::cout << len << "\n";
- if (len > offsetof(usrp2_ctrl_data_t, data) and uhd::ntohx(ctrl_data_in->id) == USRP2_CTRL_ID_WAZZUP_DUDE){
+ if (len > offsetof(usrp2_ctrl_data_t, data) and ntohl(ctrl_data_in->id) == USRP2_CTRL_ID_WAZZUP_DUDE){
//make a boost asio ipv4 with the raw addr in host byte order
- boost::asio::ip::address_v4 ip_addr(uhd::ntohx(ctrl_data_in->data.ip_addr));
+ boost::asio::ip::address_v4 ip_addr(ntohl(ctrl_data_in->data.ip_addr));
device_addr_t new_addr;
new_addr["type"] = "usrp2";
new_addr["addr"] = ip_addr.to_string();