Skip to content
Snippets Groups Projects
Commit f9f6ebd8 authored by Reiner Hauser's avatar Reiner Hauser
Browse files

allow additional netmask for MC outgoing interface

parent ef78b654
No related branches found
No related tags found
No related merge requests found
......@@ -288,13 +288,16 @@ namespace daq {
boost::asio::ip::address NameService::find_interface(const std::string& netmask)
{
auto addr = boost::asio::ip::address::from_string(netmask).to_v4();
// hack to pass additional mask for finding the multicast interface to use
std::string local_mask(netmask);
std::string mc_mask("255.255.255.255");
if(getenv("TDAQ_ASYNCMSG_MULTICAST_MASK")) {
mc_mask = getenv("TDAQ_ASYNCMSG_MULTICAST_MASK");
}
auto n = netmask.find('/');
if (n != std::string::npos) {
local_mask = netmask.substr(0,n);
mc_mask = netmask.substr(n+1);
}
auto addr = boost::asio::ip::address::from_string(local_mask).to_v4();
auto mask = boost::asio::ip::address::from_string(mc_mask).to_v4();
auto interfaces = daq::transport::Interface::interfaces();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment