Revision 1fef438d host/lib/usrp/usrp2/usrp2_impl.cpp
| b/host/lib/usrp/usrp2/usrp2_impl.cpp | ||
|---|---|---|
| 113 | 113 |
if (len > offsetof(usrp2_ctrl_data_t, data) and ntohl(ctrl_data_in->id) == USRP2_CTRL_ID_WAZZUP_DUDE){
|
| 114 | 114 |
|
| 115 | 115 |
//make a boost asio ipv4 with the raw addr in host byte order |
| 116 |
boost::asio::ip::address_v4 ip_addr(ntohl(ctrl_data_in->data.ip_addr)); |
|
| 117 | 116 |
device_addr_t new_addr; |
| 118 | 117 |
new_addr["type"] = "usrp2"; |
| 119 |
new_addr["addr"] = ip_addr.to_string(); |
|
| 118 |
//We used to get the address from the control packet. |
|
| 119 |
//Now now uses the socket itself to yield the address. |
|
| 120 |
//boost::asio::ip::address_v4 ip_addr(ntohl(ctrl_data_in->data.ip_addr)); |
|
| 121 |
//new_addr["addr"] = ip_addr.to_string(); |
|
| 122 |
new_addr["addr"] = udp_transport->get_recv_addr(); |
|
| 120 | 123 |
|
| 121 | 124 |
//Attempt to read the name from the EEPROM and perform filtering. |
| 122 | 125 |
//This operation can throw due to compatibility mismatch. |
Also available in: Unified diff