aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/usrp2_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-26 17:52:57 -0800
committerJosh Blum <josh@joshknows.com>2010-03-26 17:52:57 -0800
commitae02148f12615ab4f8e326dac5cf388ab976ec7f (patch)
tree1c89914d05965e02730504eb17c22ac907348e52 /host/lib/usrp/usrp2/usrp2_impl.cpp
parent72927d983f1f84127e83bf2d80db6b8ee882bad7 (diff)
downloaduhd-ae02148f12615ab4f8e326dac5cf388ab976ec7f.tar.gz
uhd-ae02148f12615ab4f8e326dac5cf388ab976ec7f.tar.bz2
uhd-ae02148f12615ab4f8e326dac5cf388ab976ec7f.zip
get interface addresses on windows
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_impl.cpp')
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index f04ae8d2c..35a4aeb20 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -41,6 +41,9 @@ uhd::device_addrs_t usrp2::discover(const device_addr_t &hint){
//if no address was specified, send a broadcast on each interface
if (not hint.has_key("addr")){
BOOST_FOREACH(const if_addrs_t &if_addrs, get_if_addrs()){
+ //avoid the loopback device
+ if (if_addrs.inet == asio::ip::address_v4::loopback().to_string()) continue;
+
//create a new hint with this broadcast address
device_addr_t new_hint = hint;
new_hint["addr"] = if_addrs.bcast;