From 0f41b3acc9705c642fb4f79dec01d30c2b7b5a4f Mon Sep 17 00:00:00 2001 From: Rex Schilasky <49162693+rex-schilasky@users.noreply.github.com> Date: Fri, 17 Nov 2023 16:33:33 +0100 Subject: [PATCH] core: cleanup udp configuration and sender/receiver attributes (#1253) --- ecal/core/src/ecal_log_impl.cpp | 10 +- ecal/core/src/ecal_process.cpp | 10 +- ecal/core/src/ecal_registration_provider.cpp | 7 +- ecal/core/src/ecal_registration_receiver.cpp | 5 +- ecal/core/src/io/ecal_receiver.h | 19 +-- ecal/core/src/io/snd_sample.cpp | 2 +- ecal/core/src/io/udp_configurations.cpp | 113 ++++++++++++++---- ecal/core/src/io/udp_configurations.h | 18 ++- ecal/core/src/io/udp_receiver_asio.cpp | 16 +-- ecal/core/src/io/udp_receiver_asio.h | 1 - ecal/core/src/io/udp_receiver_npcap.cpp | 12 +- ecal/core/src/io/udp_receiver_npcap.h | 2 +- ecal/core/src/io/udp_sender.cpp | 16 +-- ecal/core/src/io/udp_sender.h | 3 +- ecal/core/src/mon/ecal_monitoring_threads.cpp | 21 +--- .../core/src/readwrite/ecal_reader_udp_mc.cpp | 14 +-- .../core/src/readwrite/ecal_writer_udp_mc.cpp | 12 +- ecal/core/src/readwrite/ecal_writer_udp_mc.h | 1 - 18 files changed, 152 insertions(+), 130 deletions(-) diff --git a/ecal/core/src/ecal_log_impl.cpp b/ecal/core/src/ecal_log_impl.cpp index 0639ec0b57..2d5f726532 100644 --- a/ecal/core/src/ecal_log_impl.cpp +++ b/ecal/core/src/ecal_log_impl.cpp @@ -25,10 +25,7 @@ #include #include -#include "ecal_def.h" - #include "ecal_log_impl.h" - #include "io/udp_configurations.h" #include @@ -152,12 +149,11 @@ namespace eCAL if(m_filter_mask_udp != 0) { SSenderAttr attr; - // for local only communication we switch to local broadcasting to bypass vpn's or firewalls + attr.address = UDP::GetLoggingMulticastAddress(); + attr.port = UDP::GetLoggingPort(); attr.broadcast = !Config::IsNetworkEnabled(); - attr.ipaddr = UDP::GetLoggingMulticastAddress(); - attr.port = Config::GetUdpMulticastPort() + NET_UDP_MULTICAST_PORT_LOG_OFF; attr.loopback = true; - attr.ttl = Config::GetUdpMulticastTtl(); + attr.ttl = UDP::GetMulticastTtl(); attr.sndbuf = Config::GetUdpMulticastSndBufSizeBytes(); m_udp_sender = std::make_unique(attr); diff --git a/ecal/core/src/ecal_process.cpp b/ecal/core/src/ecal_process.cpp index 83ffb3a3d8..b69aa9d491 100644 --- a/ecal/core/src/ecal_process.cpp +++ b/ecal/core/src/ecal_process.cpp @@ -26,10 +26,10 @@ #include "ecal_def.h" #include "ecal_config_reader_hlp.h" -#include "ecal_registration_provider.h" #include "ecal_registration_receiver.h" #include "ecal_globals.h" #include "ecal_process.h" +#include "io/udp_configurations.h" #include #include @@ -42,8 +42,8 @@ #include "sys_usage.h" -#include -#include +#include +#include #include #include #include @@ -229,7 +229,7 @@ namespace eCAL { sstream << "Network mode : local" << std::endl; } - sstream << "Network ttl : " << Config::GetUdpMulticastTtl() << std::endl; + sstream << "Network ttl : " << UDP::GetMulticastTtl() << std::endl; sstream << "Network sndbuf : " << GetBufferStr(Config::GetUdpMulticastSndBufSizeBytes()) << std::endl; sstream << "Network rcvbuf : " << GetBufferStr(Config::GetUdpMulticastRcvBufSizeBytes()) << std::endl; sstream << "Multicast cfg version : v" << static_cast(Config::GetUdpMulticastConfigVersion()) << std::endl; @@ -549,7 +549,7 @@ namespace eCAL creation_flag = CREATE_NEW_CONSOLE; } - short win_state; + short win_state = 0; switch (process_mode_) { case 0: diff --git a/ecal/core/src/ecal_registration_provider.cpp b/ecal/core/src/ecal_registration_provider.cpp index d75d02649e..dbab4c0aa6 100644 --- a/ecal/core/src/ecal_registration_provider.cpp +++ b/ecal/core/src/ecal_registration_provider.cpp @@ -82,10 +82,9 @@ namespace eCAL { // set network attributes SSenderAttr attr; - attr.ipaddr = UDP::GetRegistrationMulticastAddress(); - attr.port = Config::GetUdpMulticastPort() + NET_UDP_MULTICAST_PORT_REG_OFF; - attr.ttl = Config::GetUdpMulticastTtl(); - // for local only communication we switch to local broadcasting to bypass vpn's or firewalls + attr.address = UDP::GetRegistrationMulticastAddress(); + attr.port = UDP::GetRegistrationPort(); + attr.ttl = UDP::GetMulticastTtl(); attr.broadcast = !Config::IsNetworkEnabled(); attr.loopback = true; attr.sndbuf = Config::GetUdpMulticastSndBufSizeBytes(); diff --git a/ecal/core/src/ecal_registration_receiver.cpp b/ecal/core/src/ecal_registration_receiver.cpp index 7eb3534a04..0007325764 100644 --- a/ecal/core/src/ecal_registration_receiver.cpp +++ b/ecal/core/src/ecal_registration_receiver.cpp @@ -137,10 +137,9 @@ namespace eCAL { // start registration receive thread SReceiverAttr attr; - // for local only communication we switch to local broadcasting to bypass vpn's or firewalls + attr.address = UDP::GetRegistrationMulticastAddress(); + attr.port = UDP::GetRegistrationPort(); attr.broadcast = !Config::IsNetworkEnabled(); - attr.ipaddr = UDP::GetRegistrationMulticastAddress(); - attr.port = Config::GetUdpMulticastPort() + NET_UDP_MULTICAST_PORT_REG_OFF; attr.loopback = true; attr.rcvbuf = Config::GetUdpMulticastRcvBufSizeBytes(); diff --git a/ecal/core/src/io/ecal_receiver.h b/ecal/core/src/io/ecal_receiver.h index 808fa9c2e7..6d29dee2f8 100644 --- a/ecal/core/src/io/ecal_receiver.h +++ b/ecal/core/src/io/ecal_receiver.h @@ -45,20 +45,11 @@ namespace eCAL //////////////////////////////////////////////////////// struct SReceiverAttr { - SReceiverAttr() : - port(0), - broadcast(false), - unicast(false), - loopback(true), - rcvbuf(1024 * 1024) - {}; - - std::string ipaddr; - int port; - bool broadcast; - bool unicast; - bool loopback; - int rcvbuf; + std::string address; + int port = 0; + bool broadcast = false; + bool loopback = true; + int rcvbuf = 1024 * 1024; }; class CReceiver diff --git a/ecal/core/src/io/snd_sample.cpp b/ecal/core/src/io/snd_sample.cpp index b4b1ec9784..2a71e0af36 100644 --- a/ecal/core/src/io/snd_sample.cpp +++ b/ecal/core/src/io/snd_sample.cpp @@ -52,7 +52,7 @@ namespace eCAL if (data_size > 0) { // and send it - sent_sum = SendSampleBuffer(m_payload.data(), data_size, bandwidth_, std::bind(TransmitToUDP, std::placeholders::_1, std::placeholders::_2, m_udp_sender, m_attr.ipaddr)); + sent_sum = SendSampleBuffer(m_payload.data(), data_size, bandwidth_, std::bind(TransmitToUDP, std::placeholders::_1, std::placeholders::_2, m_udp_sender, m_attr.address)); #ifndef NDEBUG // log it diff --git a/ecal/core/src/io/udp_configurations.cpp b/ecal/core/src/io/udp_configurations.cpp index 7f6b739b52..984df9e831 100644 --- a/ecal/core/src/io/udp_configurations.cpp +++ b/ecal/core/src/io/udp_configurations.cpp @@ -1,36 +1,97 @@ +/* ========================= eCAL LICENSE ================================= + * + * Copyright (C) 2016 - 2019 Continental Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ========================= eCAL LICENSE ================================= +*/ + #include "io/udp_configurations.h" #include -#include "topic2mcast.h" - -const std::string localhost_udp_address{ "127.255.255.255" }; +#include "ecal_def.h" +#include "topic2mcast.h" -std::string eCAL::UDP::GetRegistrationMulticastAddress() +namespace eCAL { - const bool local_only = !Config::IsNetworkEnabled(); - if (local_only) + namespace UDP { - return localhost_udp_address; - } - else - { - // both in v1 and v2, the mulicast group is returned as the adress for the registration layer - return Config::GetUdpMulticastGroup(); - } -} + std::string LocalBroadcastAddress() + { + // the specific address 127.255.255.255 is the broadcast address within the loopback range (127.0.0.0 to 127.255.255.255) + return "127.255.255.255"; + } -std::string eCAL::UDP::GetLoggingMulticastAddress() -{ - //TODO: At the moment, both logging and monitoring addresses seem to be the same - // Should it be kept or changed? - return GetRegistrationMulticastAddress(); -} + std::string GetRegistrationMulticastAddress() + { + const bool local_only = !Config::IsNetworkEnabled(); + if (local_only) + { + return LocalBroadcastAddress(); + } + else + { + // both in v1 and v2, the mulicast group is returned as the adress for the registration layer + return Config::GetUdpMulticastGroup(); + } + } -std::string eCAL::UDP::GetTopicMulticastAddress(const std::string& topic_name) -{ - if (Config::GetUdpMulticastConfigVersion() == Config::UdpConfigVersion::V1) - return UDP::V1::topic2mcast(topic_name, Config::GetUdpMulticastGroup(), Config::GetUdpMulticastMask()); - // v2 - return UDP::V2::topic2mcast(topic_name, Config::GetUdpMulticastGroup(), Config::GetUdpMulticastMask()); + int GetRegistrationPort() + { + return Config::GetUdpMulticastPort() + NET_UDP_MULTICAST_PORT_REG_OFF; + } + + std::string GetLoggingMulticastAddress() + { + // both logging and monitoring use the same addresses but different ports + return GetRegistrationMulticastAddress(); + } + + int GetLoggingPort() + { + return Config::GetUdpMulticastPort() + NET_UDP_MULTICAST_PORT_LOG_OFF; + } + + std::string GetPayloadMulticastAddress(const std::string& topic_name) + { + // v1 + if (Config::GetUdpMulticastConfigVersion() == Config::UdpConfigVersion::V1) + { + return UDP::V1::topic2mcast(topic_name, Config::GetUdpMulticastGroup(), Config::GetUdpMulticastMask()); + } + + // v2 + return UDP::V2::topic2mcast(topic_name, Config::GetUdpMulticastGroup(), Config::GetUdpMulticastMask()); + } + + int GetPayloadPort() + { + return Config::GetUdpMulticastPort() + NET_UDP_MULTICAST_PORT_SAMPLE_OFF; + } + + int GetMulticastTtl() + { + const bool local_only = !Config::IsNetworkEnabled(); + if (local_only) + { + return 1; + } + else + { + return Config::GetUdpMulticastTtl(); + } + } + } } diff --git a/ecal/core/src/io/udp_configurations.h b/ecal/core/src/io/udp_configurations.h index fb67baee26..b4bd093162 100644 --- a/ecal/core/src/io/udp_configurations.h +++ b/ecal/core/src/io/udp_configurations.h @@ -29,12 +29,22 @@ namespace eCAL { namespace UDP { - // Return the Multicast Adress used for sending Registration information + // return local broadcast address + std::string LocalBroadcastAddress(); + + // return the multicast adress/port used for sending/receiving the registration information std::string GetRegistrationMulticastAddress(); + int GetRegistrationPort(); + // return the multicast adress/port used for sending/receiving the logging information std::string GetLoggingMulticastAddress(); + int GetLoggingPort(); - std::string GetTopicMulticastAddress(const std::string& topic_name); - } + // return the multicast adress/port used for sending/receiving the topic payload + std::string GetPayloadMulticastAddress(const std::string& topic_name); + int GetPayloadPort(); -} \ No newline at end of file + // return multicast udp package time to live setting + int GetMulticastTtl(); + } +} diff --git a/ecal/core/src/io/udp_receiver_asio.cpp b/ecal/core/src/io/udp_receiver_asio.cpp index 86c01f5408..f86ee7ba91 100644 --- a/ecal/core/src/io/udp_receiver_asio.cpp +++ b/ecal/core/src/io/udp_receiver_asio.cpp @@ -33,15 +33,8 @@ namespace eCAL CUDPReceiverBase(attr_), m_created(false), m_broadcast(attr_.broadcast), - m_unicast(attr_.unicast), m_socket(m_iocontext) { - if (m_broadcast && m_unicast) - { - std::cerr << "CUDPReceiverAsio: Setting broadcast and unicast option true is not allowed." << std::endl; - return; - } - // create socket const asio::ip::udp::endpoint listen_endpoint(asio::ip::udp::v4(), static_cast(attr_.port)); { @@ -75,9 +68,8 @@ namespace eCAL } } - if (!m_unicast) + // set loopback option { - // set loopback option const asio::ip::multicast::enable_loopback loopback(attr_.loopback); asio::error_code ec; m_socket.set_option(loopback, ec); @@ -101,7 +93,7 @@ namespace eCAL } // join multicast group - AddMultiCastGroup(attr_.ipaddr.c_str()); + AddMultiCastGroup(attr_.address.c_str()); // state successful creation m_created = true; @@ -109,7 +101,7 @@ namespace eCAL bool CUDPReceiverAsio::AddMultiCastGroup(const char* ipaddr_) { - if (!m_broadcast && !m_unicast) + if (!m_broadcast) { // join multicast group #ifdef __linux__ @@ -145,7 +137,7 @@ namespace eCAL bool CUDPReceiverAsio::RemMultiCastGroup(const char* ipaddr_) { - if (!m_broadcast && !m_unicast) + if (!m_broadcast) { // Leave multicast group #ifdef __linux__ diff --git a/ecal/core/src/io/udp_receiver_asio.h b/ecal/core/src/io/udp_receiver_asio.h index 44b4a0ded3..e885d5c640 100644 --- a/ecal/core/src/io/udp_receiver_asio.h +++ b/ecal/core/src/io/udp_receiver_asio.h @@ -49,7 +49,6 @@ namespace eCAL bool m_created; bool m_broadcast; - bool m_unicast; asio::io_context m_iocontext; asio::ip::udp::socket m_socket; asio::ip::udp::endpoint m_sender_endpoint; diff --git a/ecal/core/src/io/udp_receiver_npcap.cpp b/ecal/core/src/io/udp_receiver_npcap.cpp index b750e9ba2c..7a8efcbcef 100644 --- a/ecal/core/src/io/udp_receiver_npcap.cpp +++ b/ecal/core/src/io/udp_receiver_npcap.cpp @@ -26,7 +26,7 @@ namespace eCAL CUDPReceiverPcap::CUDPReceiverPcap(const SReceiverAttr& attr_) : CUDPReceiverBase(attr_) , m_created(false) - , m_unicast(attr_.unicast) + , m_broadcast(attr_.broadcast) { // set receive buffer size (default = 1 MB) int rcvbuf = 1024 * 1024; @@ -46,14 +46,14 @@ namespace eCAL return; } - if (!m_unicast) + // set loopback option + if (!m_broadcast) { - // set loopback option m_socket.setMulticastLoopbackEnabled(attr_.loopback); } // join multicast group - AddMultiCastGroup(attr_.ipaddr.c_str()); + AddMultiCastGroup(attr_.address.c_str()); // state successful creation m_created = true; @@ -61,7 +61,7 @@ namespace eCAL bool CUDPReceiverPcap::AddMultiCastGroup(const char* ipaddr_) { - if (!m_unicast) + if (!m_broadcast) { // join multicast group if (!m_socket.joinMulticastGroup(Udpcap::HostAddress(ipaddr_))) @@ -75,7 +75,7 @@ namespace eCAL bool CUDPReceiverPcap::RemMultiCastGroup(const char* ipaddr_) { - if (!m_unicast) + if (!m_broadcast) { // leave multicast group if (!m_socket.leaveMulticastGroup(Udpcap::HostAddress(ipaddr_))) diff --git a/ecal/core/src/io/udp_receiver_npcap.h b/ecal/core/src/io/udp_receiver_npcap.h index 843e9abf27..2bba378614 100644 --- a/ecal/core/src/io/udp_receiver_npcap.h +++ b/ecal/core/src/io/udp_receiver_npcap.h @@ -43,7 +43,7 @@ namespace eCAL protected: bool m_created; - bool m_unicast; + bool m_broadcast; Udpcap::UdpcapSocket m_socket; }; diff --git a/ecal/core/src/io/udp_sender.cpp b/ecal/core/src/io/udp_sender.cpp index c0f968fa71..6a89a0f7d5 100644 --- a/ecal/core/src/io/udp_sender.cpp +++ b/ecal/core/src/io/udp_sender.cpp @@ -5,9 +5,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -48,7 +48,6 @@ namespace eCAL protected: bool m_broadcast; - bool m_unicast; asio::io_context m_iocontext; asio::ip::udp::endpoint m_endpoint; asio::ip::udp::socket m_socket; @@ -57,18 +56,11 @@ namespace eCAL CUDPSenderImpl::CUDPSenderImpl(const SSenderAttr& attr_) : m_broadcast(attr_.broadcast), - m_unicast(attr_.unicast), - m_endpoint(asio::ip::make_address(attr_.ipaddr), static_cast(attr_.port)), + m_endpoint(asio::ip::make_address(attr_.address), static_cast(attr_.port)), m_socket(m_iocontext, m_endpoint.protocol()), m_port(static_cast(attr_.port)) { - if (m_broadcast && m_unicast) - { - std::cerr << "CUDPSender: Setting broadcast and unicast option true is not allowed." << std::endl; - return; - } - - if (m_broadcast || m_unicast) + if (m_broadcast) { // set unicast packet TTL const asio::ip::unicast::hops ttl(attr_.ttl); diff --git a/ecal/core/src/io/udp_sender.h b/ecal/core/src/io/udp_sender.h index 5797ee181d..3c49743d4d 100644 --- a/ecal/core/src/io/udp_sender.h +++ b/ecal/core/src/io/udp_sender.h @@ -30,11 +30,10 @@ namespace eCAL { struct SSenderAttr { - std::string ipaddr; + std::string address; int port = 0; int ttl = 0; bool broadcast = false; - bool unicast = false; bool loopback = true; int sndbuf = 1024 * 1024; }; diff --git a/ecal/core/src/mon/ecal_monitoring_threads.cpp b/ecal/core/src/mon/ecal_monitoring_threads.cpp index bed0bbd628..3a30187a11 100644 --- a/ecal/core/src/mon/ecal_monitoring_threads.cpp +++ b/ecal/core/src/mon/ecal_monitoring_threads.cpp @@ -28,9 +28,7 @@ #include "io/msg_type.h" #include "io/udp_configurations.h" -#include "ecal_config_reader_hlp.h" #include "ecal_monitoring_threads.h" -#include "ecal_global_accessors.h" namespace eCAL { @@ -46,20 +44,11 @@ namespace eCAL m_network_mode(false), m_log_cb(log_cb_) { SReceiverAttr attr; - bool local_only = !Config::IsNetworkEnabled(); - // for local only communication we switch to local broadcasting to bypass vpn's or firewalls - if (local_only) - { - attr.broadcast = true; - } - else - { - attr.broadcast = false; - } - attr.ipaddr = UDP::GetLoggingMulticastAddress(); - attr.port = Config::GetUdpMulticastPort() + NET_UDP_MULTICAST_PORT_LOG_OFF; - attr.loopback = true; - attr.rcvbuf = Config::GetUdpMulticastRcvBufSizeBytes(); + attr.address = UDP::GetLoggingMulticastAddress(); + attr.port = UDP::GetLoggingPort(); + attr.broadcast = !Config::IsNetworkEnabled(); + attr.loopback = true; + attr.rcvbuf = Config::GetUdpMulticastRcvBufSizeBytes(); m_log_rcv.Create(attr); m_log_rcv_thread.Start(0, std::bind(&CLoggingReceiveThread::ThreadFun, this)); diff --git a/ecal/core/src/readwrite/ecal_reader_udp_mc.cpp b/ecal/core/src/readwrite/ecal_reader_udp_mc.cpp index 6b99a414dc..0af9648991 100644 --- a/ecal/core/src/readwrite/ecal_reader_udp_mc.cpp +++ b/ecal/core/src/readwrite/ecal_reader_udp_mc.cpp @@ -60,11 +60,11 @@ namespace eCAL void CUDPReaderLayer::Initialize() { SReceiverAttr attr; - attr.ipaddr = Config::GetUdpMulticastGroup(); - attr.port = Config::GetUdpMulticastPort() + NET_UDP_MULTICAST_PORT_SAMPLE_OFF; - attr.unicast = false; - attr.loopback = true; - attr.rcvbuf = Config::GetUdpMulticastRcvBufSizeBytes(); + attr.address = Config::GetUdpMulticastGroup(); + attr.port = UDP::GetPayloadPort(); + attr.broadcast = false; + attr.loopback = true; + attr.rcvbuf = Config::GetUdpMulticastRcvBufSizeBytes(); rcv.Create(attr); } @@ -76,7 +76,7 @@ namespace eCAL started = true; } // add topic name based multicast address - const std::string mcast_address = UDP::GetTopicMulticastAddress(topic_name_); + const std::string mcast_address = UDP::GetPayloadMulticastAddress(topic_name_); if (topic_name_mcast_map.find(mcast_address) == topic_name_mcast_map.end()) { topic_name_mcast_map.emplace(std::pair(mcast_address, 0)); @@ -87,7 +87,7 @@ namespace eCAL void CUDPReaderLayer::RemSubscription(const std::string& /*host_name_*/, const std::string& topic_name_, const std::string& /*topic_id_*/) { - const std::string mcast_address = UDP::GetTopicMulticastAddress(topic_name_); + const std::string mcast_address = UDP::GetPayloadMulticastAddress(topic_name_); if (topic_name_mcast_map.find(mcast_address) == topic_name_mcast_map.end()) { // this should never happen diff --git a/ecal/core/src/readwrite/ecal_writer_udp_mc.cpp b/ecal/core/src/readwrite/ecal_writer_udp_mc.cpp index cf70cdcc8b..7695dc0c48 100644 --- a/ecal/core/src/readwrite/ecal_writer_udp_mc.cpp +++ b/ecal/core/src/readwrite/ecal_writer_udp_mc.cpp @@ -24,9 +24,7 @@ #include #include -#include "ecal_def.h" #include "ecal_writer_udp_mc.h" - #include "io/udp_configurations.h" namespace eCAL @@ -62,14 +60,12 @@ namespace eCAL m_topic_name = topic_name_; m_topic_id = topic_id_; - m_udp_ipaddr = UDP::GetTopicMulticastAddress(topic_name_); - // set network attributes SSenderAttr attr; - attr.ipaddr = m_udp_ipaddr; - attr.port = Config::GetUdpMulticastPort() + NET_UDP_MULTICAST_PORT_SAMPLE_OFF; - attr.ttl = Config::GetUdpMulticastTtl(); - attr.sndbuf = Config::GetUdpMulticastSndBufSizeBytes(); + attr.address = UDP::GetPayloadMulticastAddress(topic_name_); + attr.port = UDP::GetPayloadPort(); + attr.ttl = UDP::GetMulticastTtl(); + attr.sndbuf = Config::GetUdpMulticastSndBufSizeBytes(); // create udp/sample sender with activated loop-back attr.loopback = true; diff --git a/ecal/core/src/readwrite/ecal_writer_udp_mc.h b/ecal/core/src/readwrite/ecal_writer_udp_mc.h index f6db78fc91..b8ab8d7af6 100644 --- a/ecal/core/src/readwrite/ecal_writer_udp_mc.h +++ b/ecal/core/src/readwrite/ecal_writer_udp_mc.h @@ -56,7 +56,6 @@ namespace eCAL bool Write(const void* buf_, const SWriterAttr& attr_) override; protected: - std::string m_udp_ipaddr; eCAL::pb::Sample m_ecal_sample; std::shared_ptr m_sample_sender_loopback;