summaryrefslogtreecommitdiff
path: root/src/daemon/dlt_daemon_client.c
diff options
context:
space:
mode:
authorSunil-K-S <54260601+Sunil-K-S@users.noreply.github.com>2019-08-23 10:01:08 +0530
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2019-08-23 13:31:08 +0900
commit976746f28e1c4c0a6ee24bf3f94ce66b890b3898 (patch)
tree2c617c4ee6f9a87b32b6e894f05f47361d907121 /src/daemon/dlt_daemon_client.c
parentd6baeb794e727a9194bfb28bff3c185e6d4fe631 (diff)
downloadDLT-daemon-976746f28e1c4c0a6ee24bf3f94ce66b890b3898.tar.gz
UDP Multicast implementation (#155)
The feature can be enabled by setting WITH_UDP_CONNECTION to ON. Signed-off-by: sunil.s <sunil.s@lge.com>
Diffstat (limited to 'src/daemon/dlt_daemon_client.c')
-rw-r--r--src/daemon/dlt_daemon_client.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/daemon/dlt_daemon_client.c b/src/daemon/dlt_daemon_client.c
index 0d626d7..5fe0215 100644
--- a/src/daemon/dlt_daemon_client.c
+++ b/src/daemon/dlt_daemon_client.c
@@ -81,6 +81,10 @@ static inline int8_t getStatus(uint8_t request_log, int context_log)
return (request_log <= context_log) ? request_log : context_log;
}
+#ifdef UDP_CONNECTION_SUPPORT
+# include "dlt_daemon_udp_socket.h"
+#endif
+
/** @brief Sends up to 2 messages to all the clients.
*
* Runs through the client list and sends the messages to them. If the message
@@ -284,6 +288,17 @@ int dlt_daemon_client_send(int sock,
/* send messages to daemon socket */
if ((daemon->mode == DLT_USER_MODE_EXTERNAL) || (daemon->mode == DLT_USER_MODE_BOTH)) {
+#ifdef UDP_CONNECTION_SUPPORT
+
+ if (daemon_local->UDPConnectionSetup == MULTICAST_CONNECTION_ENABLED)
+ dlt_daemon_udp_dltmsg_multicast(data1,
+ size1,
+ data2,
+ size2,
+ verbose);
+
+#endif
+
if ((sock == DLT_DAEMON_SEND_FORCE) || (daemon->state == DLT_DAEMON_STATE_SEND_DIRECT)) {
sent = dlt_daemon_client_send_all_multiple(daemon,
daemon_local,