summaryrefslogtreecommitdiffstats
path: root/lib/device_addr.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-01-29 19:22:40 -0800
committerJosh Blum <josh@joshknows.com>2010-01-29 19:22:40 -0800
commit5e455ca92280e3c22f5484cb81a2aef0cdfb5de4 (patch)
treed32d5aeebbef8fc2d15c42b281c893940f7f6b5b /lib/device_addr.cpp
parentaa2c904d7a6dad83f4a516a5a38ee9e765b9dfac (diff)
downloaduhd-5e455ca92280e3c22f5484cb81a2aef0cdfb5de4.tar.gz
uhd-5e455ca92280e3c22f5484cb81a2aef0cdfb5de4.tar.bz2
uhd-5e455ca92280e3c22f5484cb81a2aef0cdfb5de4.zip
Minimal framework in place to handle udp discovery.
Added usrp2 stuff, udp wrapper, discovery function. Added app called discover usrps (usrp2 only for now).
Diffstat (limited to 'lib/device_addr.cpp')
-rw-r--r--lib/device_addr.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/device_addr.cpp b/lib/device_addr.cpp
index 784795444..e11d51580 100644
--- a/lib/device_addr.cpp
+++ b/lib/device_addr.cpp
@@ -70,24 +70,6 @@ std::ostream& operator<<(std::ostream &os, const usrp_uhd::mac_addr_t &x){
return os;
}
-//----------------------- u2 ipv4 wrapper ----------------------------//
-usrp_uhd::ip_addr_t::ip_addr_t(const std::string &ip_addr_str_){
- std::string ip_addr_str = (ip_addr_str_ == "")? "255.255.255.255" : ip_addr_str_;
- int ret = inet_pton(AF_INET, ip_addr_str.c_str(), &ip_addr);
- if (ret == 0) throw std::runtime_error("Invalid ip address: " + ip_addr_str);
-}
-
-std::string usrp_uhd::ip_addr_t::to_string(void) const{
- char addr_buf[128];
- inet_ntop(AF_INET, &ip_addr, addr_buf, INET_ADDRSTRLEN);
- return std::string(addr_buf);
-}
-
-std::ostream& operator<<(std::ostream &os, const usrp_uhd::ip_addr_t &x){
- os << x.to_string();
- return os;
-}
-
//----------------------- usrp device_addr_t wrapper -------------------------//
usrp_uhd::device_addr_t::device_addr_t(device_addr_type_t device_addr_type){
type = device_addr_type;