diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-01-03 15:05:48 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-01-04 14:17:09 -0800 |
commit | 83dd47dc882421f96830fa55bd86405d1d80907f (patch) | |
tree | d4dd5f75c027f25351ba0bcb652e6a5a547706f7 /host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp | |
parent | f25b37900561a50b816d545605b898207d4ca5b5 (diff) | |
download | uhd-83dd47dc882421f96830fa55bd86405d1d80907f.tar.gz uhd-83dd47dc882421f96830fa55bd86405d1d80907f.tar.bz2 uhd-83dd47dc882421f96830fa55bd86405d1d80907f.zip |
mpmd: Allow user-overrides for MPM ports
Adds two device args: discovery_port and rpc_port. Both are integers
which override the respective constants.
Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com>
Diffstat (limited to 'host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp')
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp b/host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp index 4d1306f82..3b02073c5 100644 --- a/host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp +++ b/host/lib/usrp/mpmd/mpmd_xport_ctrl_udp.cpp @@ -159,10 +159,14 @@ mpmd_xport_ctrl_udp::mpmd_xport_ctrl_udp( , _available_addrs(get_addrs_from_mb_args(mb_args)) , _mtu(MPMD_10GE_DATA_FRAME_MAX_SIZE) { - auto discover_mtu_for_ip = [](const std::string &ip_addr){ + const std::string mpm_discovery_port = _mb_args.get( + mpmd_impl::MPM_DISCOVERY_PORT_KEY, + std::to_string(mpmd_impl::MPM_DISCOVERY_PORT) + ); + auto discover_mtu_for_ip = [mpm_discovery_port](const std::string &ip_addr){ return discover_mtu( ip_addr, - std::to_string(mpmd_impl::MPM_DISCOVERY_PORT), + mpm_discovery_port, IP_PROTOCOL_MIN_MTU_SIZE-IP_PROTOCOL_UDP_PLUS_IP_HEADER, MPMD_10GE_DATA_FRAME_MAX_SIZE, MPMD_MTU_DISCOVERY_TIMEOUT |