From 5adde5ab9c369e9c0389949c82804e9f23e39541 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 15 Dec 2017 19:02:45 -0800 Subject: mpmd: Add get_mtu() API and MTU discovery for UDP transports The mpmd_xport_mgr classes can now return their own MTU. The UDP xport manager is a special case, it doesn't actually know its MTU, and thus runs an MTU discovery, using the MPM-ECHO command to discover MTU by sending variable-size packets as a probing mechanism. Reviewed-by: Trung Tran --- host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.hpp') diff --git a/host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.hpp b/host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.hpp index 0c8c19479..fad775c39 100644 --- a/host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.hpp +++ b/host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.hpp @@ -34,11 +34,18 @@ public: const mpmd_xport_mgr::xport_info_t& xport_info ) const; + size_t get_mtu( + const uhd::direction_t dir + ) const; + private: const uhd::device_addr_t _mb_args; const uhd::dict _recv_args; const uhd::dict _send_args; + //! A list of IP addresses we can connect our CHDR connections to const std::vector _available_addrs; + //! MTU + size_t _mtu; }; }}} /* namespace uhd::mpmd::xport */ -- cgit v1.2.3