diff options
Diffstat (limited to 'host/lib/transport/udp_wsa_zero_copy.cpp')
-rw-r--r-- | host/lib/transport/udp_wsa_zero_copy.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/host/lib/transport/udp_wsa_zero_copy.cpp b/host/lib/transport/udp_wsa_zero_copy.cpp index 68e94d319..4d054f2e0 100644 --- a/host/lib/transport/udp_wsa_zero_copy.cpp +++ b/host/lib/transport/udp_wsa_zero_copy.cpp @@ -197,7 +197,10 @@ public: check_registry_for_fast_send_threshold(this->get_send_frame_size()); #endif /*CHECK_REG_SEND_THRESH*/ - UHD_LOGGER_INFO("UDP") << boost::format("Creating WSA UDP transport for %s:%s") % addr % port ; + UHD_LOGGER_TRACE("UDP") + << boost::format("Creating WSA UDP transport to %s:%s") + % addr % port; + static uhd_wsa_control uhd_wsa; //makes wsa start happen via lazy initialization UHD_ASSERT_THROW(_num_send_frames <= WSA_MAXIMUM_WAIT_EVENTS); @@ -233,6 +236,10 @@ public: throw uhd::os_error(str(boost::format("WSAConnect() failed with error %d") % error)); } + UHD_LOGGER_TRACE("UDP") + << boost::format("Local WSA UDP socket endpoint: %s:%s") + % get_local_addr() % get_local_port(); + //allocate re-usable managed receive buffers for (size_t i = 0; i < get_num_recv_frames(); i++){ _mrb_pool.push_back(boost::shared_ptr<udp_zero_copy_asio_mrb>( @@ -275,6 +282,7 @@ public: size_t get_num_send_frames(void) const {return _num_send_frames;} size_t get_send_frame_size(void) const {return _send_frame_size;} + uint16_t get_local_port(void) const { struct sockaddr_in addr_info; int addr_len = sizeof(addr_info); @@ -352,10 +360,12 @@ void check_usr_buff_size( size_t user_buff_size, // Set this to zero for no user-defined preference const std::string tx_rx ){ - UHD_LOGGER_DEBUG("UDP") << boost::format( - "Target %s sock buff size: %d bytes\n" - "Actual %s sock buff size: %d bytes" - ) % tx_rx % user_buff_size % tx_rx % actual_buff_size ; + UHD_LOGGER_DEBUG("UDP") + << boost::format("Target/actual %s sock buff size: %d/%d bytes") + % tx_rx + % user_buff_size + % actual_buff_size + ; if ((user_buff_size != 0.0) and (actual_buff_size < user_buff_size)) UHD_LOGGER_WARNING("UDP") << boost::format( "The %s buffer could not be resized sufficiently.\n" "Target sock buff size: %d bytes.\n" |