From 5e455ca92280e3c22f5484cb81a2aef0cdfb5de4 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 29 Jan 2010 19:22:40 -0800 Subject: Minimal framework in place to handle udp discovery. Added usrp2 stuff, udp wrapper, discovery function. Added app called discover usrps (usrp2 only for now). --- lib/device_addr.cpp | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'lib/device_addr.cpp') 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; -- cgit v1.2.3