summaryrefslogtreecommitdiff
path: root/src/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/CMakeLists.txt2
-rw-r--r--src/daemon/dlt-daemon.c162
-rw-r--r--src/daemon/dlt-daemon.h13
-rw-r--r--src/daemon/dlt.conf5
-rw-r--r--src/daemon/dlt_daemon_common_cfg.h6
-rw-r--r--src/daemon/dlt_daemon_connection.c12
-rw-r--r--src/daemon/dlt_daemon_connection_types.h4
-rw-r--r--src/daemon/dlt_daemon_unix_socket.c109
-rw-r--r--src/daemon/dlt_daemon_unix_socket.h67
9 files changed, 375 insertions, 5 deletions
diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt
index 70758cd..f665a4d 100644
--- a/src/daemon/CMakeLists.txt
+++ b/src/daemon/CMakeLists.txt
@@ -20,7 +20,7 @@ if(WITH_SYSTEMD_WATCHDOG OR WITH_SYSTEMD)
message( STATUS "Added ${systemd_SRCS} to dlt-daemon")
endif(WITH_SYSTEMD_WATCHDOG OR WITH_SYSTEMD)
-set(dlt_daemon_SRCS dlt-daemon.c dlt_daemon_common.c dlt_daemon_connection.c dlt_daemon_event_handler.c dlt_daemon_socket.c dlt_daemon_serial.c dlt_daemon_client.c dlt_daemon_offline_logstorage.c ${CMAKE_SOURCE_DIR}/src/shared/dlt_user_shared.c ${CMAKE_SOURCE_DIR}/src/shared/dlt_common.c ${CMAKE_SOURCE_DIR}/src/shared/dlt_shm.c ${CMAKE_SOURCE_DIR}/src/shared/dlt_offline_trace.c ${CMAKE_SOURCE_DIR}/src/offlinelogstorage/dlt_offline_logstorage.c ${CMAKE_SOURCE_DIR}/src/shared/dlt_config_file_parser.c)
+set(dlt_daemon_SRCS dlt-daemon.c dlt_daemon_common.c dlt_daemon_connection.c dlt_daemon_event_handler.c dlt_daemon_socket.c dlt_daemon_unix_socket.c dlt_daemon_serial.c dlt_daemon_client.c dlt_daemon_offline_logstorage.c ${CMAKE_SOURCE_DIR}/src/shared/dlt_user_shared.c ${CMAKE_SOURCE_DIR}/src/shared/dlt_common.c ${CMAKE_SOURCE_DIR}/src/shared/dlt_shm.c ${CMAKE_SOURCE_DIR}/src/shared/dlt_offline_trace.c ${CMAKE_SOURCE_DIR}/src/offlinelogstorage/dlt_offline_logstorage.c ${CMAKE_SOURCE_DIR}/src/shared/dlt_config_file_parser.c)
add_executable(dlt-daemon ${dlt_daemon_SRCS} ${systemd_SRCS})
target_link_libraries(dlt-daemon rt ${CMAKE_THREAD_LIBS_INIT})
diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c
index 4e6b4b4..20dda80 100644
--- a/src/daemon/dlt-daemon.c
+++ b/src/daemon/dlt-daemon.c
@@ -31,6 +31,7 @@
#include <ctype.h>
#include <stdio.h> /* for printf() and fprintf() */
#include <sys/socket.h> /* for socket(), connect(), (), and recv() */
+#include <sys/un.h>
#include <arpa/inet.h> /* for sockaddr_in and inet_addr() */
#include <stdlib.h> /* for atoi() and exit() */
#include <string.h> /* for memset() */
@@ -56,6 +57,7 @@
#include "dlt_daemon_common_cfg.h"
#include "dlt_daemon_socket.h"
+#include "dlt_daemon_unix_socket.h"
#include "dlt_daemon_serial.h"
#include "dlt_daemon_client.h"
@@ -229,6 +231,9 @@ int option_file_parser(DltDaemonLocal *daemon_local)
memset(daemon_local->flags.pathToECUSoftwareVersion, 0, sizeof(daemon_local->flags.pathToECUSoftwareVersion));
daemon_local->flags.sendTimezone = 0;
daemon_local->flags.offlineLogstorageMaxDevices = 0;
+ strncpy(daemon_local->flags.ctrlSockPath,
+ DLT_DAEMON_DEFAULT_CTRL_SOCK_PATH,
+ sizeof(daemon_local->flags.ctrlSockPath) - 1);
/* open configuration file */
if(daemon_local->flags.cvalue[0])
@@ -420,6 +425,17 @@ int option_file_parser(DltDaemonLocal *daemon_local)
{
daemon_local->flags.offlineLogstorageMaxDevices = atoi(value);
}
+ else if(strcmp(token,"ControlSocketPath")==0)
+ {
+ memset(
+ daemon_local->flags.ctrlSockPath,
+ 0,
+ DLT_DAEMON_FLAG_MAX);
+ strncpy(
+ daemon_local->flags.ctrlSockPath,
+ value,
+ DLT_DAEMON_FLAG_MAX-1);
+ }
else
{
fprintf(stderr, "Unknown option: %s=%s\n",token,value);
@@ -753,6 +769,12 @@ int dlt_daemon_local_init_p2(DltDaemon *daemon, DltDaemonLocal *daemon_local, in
dlt_log(LOG_ERR,"Could not initialize receiver for socket\n");
return -1;
}
+ if (dlt_receiver_init(&(daemon_local->receiverCtrlSock),
+ daemon_local->ctrlsock, DLT_DAEMON_RCVBUFSIZESOCK)==-1)
+ {
+ dlt_log(LOG_ERR,"Could not initialize receiver for control socket\n");
+ return -1;
+ }
if (daemon_local->flags.yvalue[0])
{
if (dlt_receiver_init(&(daemon_local->receiverSerial),daemon_local->fdserial,DLT_DAEMON_RCVBUFSIZESERIAL) == DLT_RETURN_ERROR)
@@ -939,6 +961,16 @@ int dlt_daemon_local_connection_init(DltDaemon *daemon,
return -1;
}
+ /* create and open unix socket to receive incoming connections from
+ * control application */
+ if (dlt_daemon_unix_socket_open(
+ &(daemon_local->ctrlsock),
+ daemon_local->flags.ctrlSockPath))
+ {
+ dlt_log(LOG_ERR, "Could not initialize control socket.\n");
+ return -1;
+ }
+
/* Init serial */
if (dlt_daemon_init_serial(daemon_local) < 0)
{
@@ -1502,6 +1534,136 @@ int dlt_daemon_process_client_messages_serial(DltDaemon *daemon, DltDaemonLocal
return 0;
}
+int dlt_daemon_process_control_connect(
+ DltDaemon *daemon,
+ DltDaemonLocal *daemon_local,
+ int verbose)
+{
+ socklen_t ctrl_size;
+ struct sockaddr_un ctrl;
+ int in_sock = -1;
+
+ PRINT_FUNCTION_VERBOSE(verbose);
+
+ if ((daemon==0) || (daemon_local==0))
+ {
+ dlt_log(LOG_ERR, "Invalid function parameters used for function dlt_daemon_process_control_connect()\n");
+ return -1;
+ }
+
+ /* event from UNIX server socket, new connection */
+ ctrl_size = sizeof(ctrl);
+ if ((in_sock = accept(daemon_local->ctrlsock, &ctrl, &ctrl_size)) < 0)
+ {
+ dlt_log(LOG_ERR, "accept() on UNIX socket failed!\n");
+ return -1 ;
+ }
+
+ /* check if file file descriptor was already used, and make it invalid if it is reused */
+ /* This prevents sending messages to wrong file descriptor */
+ dlt_daemon_applications_invalidate_fd(daemon,in_sock,verbose);
+ dlt_daemon_contexts_invalidate_fd(daemon,in_sock,verbose);
+
+ if (dlt_connection_create(daemon_local,
+ &daemon_local->pEvent,
+ in_sock,
+ EPOLLIN,
+ DLT_CONNECTION_CONTROL_MSG))
+ {
+ dlt_log(LOG_ERR, "Failed to register new client. \n");
+ /* TODO: Perform clean-up */
+ return -1;
+ }
+
+ if (verbose)
+ {
+ snprintf(str,DLT_DAEMON_TEXTBUFSIZE, "New connection to client established, #connections: %d\n",
+ daemon_local->client_connections);
+ dlt_log(LOG_INFO, str);
+ }
+
+ return 0;
+}
+
+// FIXME: More or less copy of dlt_daemon_process_control_messages
+int dlt_daemon_process_control_messages(
+ DltDaemon *daemon,
+ DltDaemonLocal *daemon_local,
+ int verbose)
+{
+ int bytes_to_be_removed=0;
+
+ PRINT_FUNCTION_VERBOSE(verbose);
+
+ if ((daemon==0) || (daemon_local==0))
+ {
+ dlt_log(LOG_ERR, "Invalid function parameters used for function dlt_daemon_process_control_messages()\n");
+ return -1;
+ }
+
+ if (dlt_receiver_receive_socket(&(daemon_local->receiverCtrlSock)) <= 0)
+ {
+ dlt_daemon_close_socket(daemon_local->receiverCtrlSock.fd,
+ daemon,
+ daemon_local,
+ verbose);
+ daemon_local->receiverCtrlSock.fd = -1;
+ /* FIXME: Why the hell do we need to close the socket
+ * on control message reception ??
+ */
+ //return 0;
+ }
+
+ /* Process all received messages */
+ while (dlt_message_read(
+ &(daemon_local->msg),
+ (uint8_t*)daemon_local->receiverCtrlSock.buf,
+ daemon_local->receiverCtrlSock.bytesRcvd,
+ daemon_local->flags.nflag,
+ daemon_local->flags.vflag) == DLT_MESSAGE_ERROR_OK)
+ {
+ /* Check for control message */
+ if (daemon_local->receiverCtrlSock.fd > 0 &&
+ DLT_MSG_IS_CONTROL_REQUEST(&(daemon_local->msg)))
+ {
+ dlt_daemon_client_process_control(
+ daemon_local->receiverCtrlSock.fd,
+ daemon,daemon_local,
+ &(daemon_local->msg),
+ daemon_local->flags.vflag);
+ }
+
+ bytes_to_be_removed =
+ daemon_local->msg.headersize+daemon_local->msg.datasize -
+ sizeof(DltStorageHeader);
+
+ if (daemon_local->msg.found_serialheader)
+ {
+ bytes_to_be_removed += sizeof(dltSerialHeader);
+ }
+ if (daemon_local->msg.resync_offset)
+ {
+ bytes_to_be_removed += daemon_local->msg.resync_offset;
+ }
+
+ if (dlt_receiver_remove(&(daemon_local->receiverCtrlSock),bytes_to_be_removed)==-1)
+ {
+ dlt_log(LOG_WARNING,"Can't remove bytes from receiver for sockets\n");
+ return -1;
+ }
+
+ } /* while */
+
+
+ if (dlt_receiver_move_to_begin(&(daemon_local->receiverCtrlSock)) == -1)
+ {
+ dlt_log(LOG_WARNING,"Can't move bytes to beginning of receiver buffer for sockets\n");
+ return -1;
+ }
+
+ return 0;
+}
+
int dlt_daemon_process_user_messages(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose)
{
int offset=0;
diff --git a/src/daemon/dlt-daemon.h b/src/daemon/dlt-daemon.h
index 0e2fe37..ab18d1f 100644
--- a/src/daemon/dlt-daemon.h
+++ b/src/daemon/dlt-daemon.h
@@ -80,6 +80,7 @@
#include <sys/time.h>
#include "dlt_daemon_offline_logstorage.h"
+#define DLT_DAEMON_FLAG_MAX 256
/**
* The flags of a dlt daemon.
@@ -102,20 +103,21 @@ typedef struct
char cvalue[NAME_MAX + 1]; /**< (String: Directory) Filename of DLT configuration file (Default: /etc/dlt.conf) */
int sharedMemorySize; /**< (int) Size of shared memory (Default: 100000) */
int sendMessageTime; /**< (Boolean) Send periodic Message Time if client is connected (Default: 0) */
- char offlineTraceDirectory[256]; /**< (String: Directory) Store DLT messages to local directory (Default: /etc/dlt.conf) */
+ char offlineTraceDirectory[DLT_DAEMON_FLAG_MAX]; /**< (String: Directory) Store DLT messages to local directory (Default: /etc/dlt.conf) */
int offlineTraceFileSize; /**< (int) Maximum size in bytes of one trace file (Default: 1000000) */
int offlineTraceMaxSize; /**< (int) Maximum size of all trace files (Default: 4000000) */
int offlineTraceFilenameTimestampBased; /**< (int) timestamp based or index based (Default: 1 Timestamp based) */
int loggingMode; /**< (int) The logging console for internal logging of dlt-daemon (Default: 0) */
int loggingLevel; /**< (int) The logging level for internal logging of dlt-daemon (Default: 6) */
- char loggingFilename[256]; /**< (String: Filename) The logging filename if internal logging mode is log to file (Default: /tmp/log) */
+ char loggingFilename[DLT_DAEMON_FLAG_MAX]; /**< (String: Filename) The logging filename if internal logging mode is log to file (Default: /tmp/log) */
int sendECUSoftwareVersion; /**< (Boolean) Send ECU software version perdiodically */
- char pathToECUSoftwareVersion[256]; /**< (String: Filename) The file from which to read the ECU version from. */
+ char pathToECUSoftwareVersion[DLT_DAEMON_FLAG_MAX]; /**< (String: Filename) The file from which to read the ECU version from. */
int sendTimezone; /**< (Boolean) Send Timezone perdiodically */
int offlineLogstorageMaxDevices; /**< (int) Maximum devices to be used as offline logstorage devices */
char userPipesDir[NAME_MAX + 1]; /**< (String: Directory) directory where dltpipes reside (Default: /tmp/dltpipes) */
char daemonFifoName[NAME_MAX + 1]; /**< (String: Filename) name of local fifo (Default: /tmp/dlt) */
unsigned int port; /**< port number */
+ char ctrlSockPath[DLT_DAEMON_FLAG_MAX]; /**< Path to Control socket */
} DltDaemonFlags;
/**
@@ -127,12 +129,14 @@ typedef struct
int fp; /**< handle for own fifo */
int sock; /**< handle for tcp connection to client */
int fdserial; /**< handle for serial connection */
+ int ctrlsock; /**< handle for control socket connection */
DltFile file; /**< struct for file access */
DltEventHandler pEvent; /**< struct for message producer event handling */
DltMessage msg; /**< one dlt message */
DltReceiver receiver; /**< receiver for fifo connection */
DltReceiver receiverSock; /**< receiver for socket connection */
DltReceiver receiverSerial; /**< receiver for serial connection */
+ DltReceiver receiverCtrlSock; /**< receiver for control socket */
int client_connections; /**< counter for nr. of client connections */
size_t baudrate; /**< Baudrate of serial connection */
#ifdef DLT_SHM_ENABLE
@@ -187,6 +191,9 @@ int dlt_daemon_process_one_s_timer(DltDaemon *daemon, DltDaemonLocal *daemon_loc
int dlt_daemon_process_sixty_s_timer(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
int dlt_daemon_process_systemd_timer(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
+int dlt_daemon_process_control_connect(DltDaemon *daemon, DltDaemonLocal *daemon_local,int verbose);
+int dlt_daemon_process_control_messages(DltDaemon *daemon, DltDaemonLocal *daemon_local,int verbose);
+
int dlt_daemon_process_user_message_overflow(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
int dlt_daemon_send_message_overflow(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
int dlt_daemon_process_user_message_register_application(DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose);
diff --git a/src/daemon/dlt.conf b/src/daemon/dlt.conf
index d9b0987..23d40ec 100644
--- a/src/daemon/dlt.conf
+++ b/src/daemon/dlt.conf
@@ -54,6 +54,11 @@ RingbufferMaxSize = 10000000
RingbufferStepSize = 500000
########################################################################
+# Control Application #
+########################################################################
+ControlSocketPath = /tmp/dlt-ctrl.sock
+
+########################################################################
# Offline Trace memory #
########################################################################
diff --git a/src/daemon/dlt_daemon_common_cfg.h b/src/daemon/dlt_daemon_common_cfg.h
index e0f99da..d08a20e 100644
--- a/src/daemon/dlt_daemon_common_cfg.h
+++ b/src/daemon/dlt_daemon_common_cfg.h
@@ -74,6 +74,7 @@
/* Changable */
/*************/
+
/* Default Path for runtime configuration */
#define DLT_RUNTIME_DEFAULT_DIRECTORY "/tmp"
/* Path and filename for runtime configuration (applications) */
@@ -83,6 +84,10 @@
/* Path and filename for runtime configuration */
#define DLT_RUNTIME_CONFIGURATION "/dlt-runtime.cfg"
+/* Default Path for control socket */
+#define DLT_DAEMON_DEFAULT_CTRL_SOCK_PATH DLT_RUNTIME_DEFAULT_DIRECTORY \
+ "/dlt-ctrl.sock"
+
/* Size of text buffer */
#define DLT_DAEMON_COMMON_TEXTBUFSIZE 255
@@ -120,4 +125,3 @@
#define DLT_DAEMON_REMO_STRING "remo"
#endif /* DLT_DAEMON_COMMON_CFG_H */
-
diff --git a/src/daemon/dlt_daemon_connection.c b/src/daemon/dlt_daemon_connection.c
index 0eee668..1a7af3f 100644
--- a/src/daemon/dlt_daemon_connection.c
+++ b/src/daemon/dlt_daemon_connection.c
@@ -200,6 +200,12 @@ static DltReceiver *dlt_connection_get_receiver(DltDaemonLocal *daemon_local,
ret = &daemon_local->timer_wd;
break;
#endif
+ case DLT_CONNECTION_CONTROL_CONNECT:
+ /* FALL THROUGH */
+ /* There must be the same structure for this case */
+ case DLT_CONNECTION_CONTROL_MSG:
+ ret = &daemon_local->receiverCtrlSock;
+ break;
default:
ret = NULL;
}
@@ -253,6 +259,12 @@ void *dlt_connection_get_callback(DltConnection *con)
ret = dlt_daemon_process_systemd_timer;
break;
#endif
+ case DLT_CONNECTION_CONTROL_CONNECT:
+ ret = dlt_daemon_process_control_connect;
+ break;
+ case DLT_CONNECTION_CONTROL_MSG:
+ ret = dlt_daemon_process_control_messages;
+ break;
default:
ret = NULL;
}
diff --git a/src/daemon/dlt_daemon_connection_types.h b/src/daemon/dlt_daemon_connection_types.h
index 4f4bb1c..c35b43e 100644
--- a/src/daemon/dlt_daemon_connection_types.h
+++ b/src/daemon/dlt_daemon_connection_types.h
@@ -39,6 +39,8 @@ typedef enum {
DLT_CONNECTION_ONE_S_TIMER,
DLT_CONNECTION_SIXTY_S_TIMER,
DLT_CONNECTION_SYSTEMD_TIMER,
+ DLT_CONNECTION_CONTROL_CONNECT,
+ DLT_CONNECTION_CONTROL_MSG,
DLT_CONNECTION_TYPE_MAX
} DltConnectionType;
@@ -49,6 +51,8 @@ typedef enum {
#define DLT_CON_MASK_ONE_S_TIMER (1 << DLT_CONNECTION_ONE_S_TIMER)
#define DLT_CON_MASK_SIXTY_S_TIMER (1 << DLT_CONNECTION_SIXTY_S_TIMER)
#define DLT_CON_MASK_SYSTEMD_TIMER (1 << DLT_CONNECTION_SYSTEMD_TIMER)
+#define DLT_CON_MASK_CONTROL_CONNECT (1 << DLT_CONNECTION_CONTROL_CONNECT)
+#define DLT_CON_MASK_CONTROL_MSG (1 << DLT_CONNECTION_CONTROL_MSG)
#define DLT_CON_MASK_ALL (0xff)
/* TODO: squash the DltReceiver structure in there
diff --git a/src/daemon/dlt_daemon_unix_socket.c b/src/daemon/dlt_daemon_unix_socket.c
new file mode 100644
index 0000000..05af5cb
--- /dev/null
+++ b/src/daemon/dlt_daemon_unix_socket.c
@@ -0,0 +1,109 @@
+/*
+ * @licence app begin@
+ * SPDX license identifier: MPL-2.0
+ *
+ * Copyright (C) 2015, Advanced Driver Information Technology
+ * Copyright of Advanced Driver Information Technology, Bosch and Denso
+ *
+ * This file is part of GENIVI Project DLT - Diagnostic Log and Trace.
+ *
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License (MPL), v. 2.0.
+ * If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * For further information see http://www.genivi.org/.
+ * @licence end@
+ */
+
+/*!
+ * \author
+ * Christoph Lipka <clipka@jp.adit-jv.com>
+ *
+ * \copyright Copyright © 2015 ADIT. \n
+ * License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/.
+ *
+ * \file dlt_daemon_unix_socket.c
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/un.h>
+#include <sys/socket.h>
+#include <syslog.h>
+#include <errno.h>
+#include "dlt-daemon.h"
+#include "dlt_common.h"
+#include "dlt-daemon_cfg.h"
+#include "dlt_daemon_socket.h"
+#include "dlt_daemon_unix_socket.h"
+
+char err_string[DLT_DAEMON_TEXTBUFSIZE];
+
+int dlt_daemon_unix_socket_open(int *sock, char *sock_path)
+{
+ struct sockaddr_un addr;
+
+ if (sock == NULL || sock_path == NULL)
+ {
+ dlt_log(LOG_ERR, "dlt_daemon_unix_socket_open: arguments invalid");
+ return -1;
+ }
+
+ if ((*sock = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
+ {
+ dlt_log(LOG_WARNING, "unix socket: socket() error");
+ return -1;
+ }
+
+ memset(&addr, 0, sizeof(addr));
+ addr.sun_family = AF_UNIX;
+ memcpy(addr.sun_path, sock_path, sizeof(addr.sun_path));
+
+ unlink(sock_path);
+
+ if (bind(*sock, (struct sockaddr *) &addr, sizeof(addr)) == -1)
+ {
+ dlt_log(LOG_WARNING, "unix socket: bind() error");
+ return -1;
+ }
+
+ if (listen(*sock, 1) == -1)
+ {
+ dlt_log(LOG_WARNING, "unix socket: listen error");
+ return -1;
+ }
+
+ return 0;
+}
+
+int dlt_daemon_unix_socket_close(int sock)
+{
+ int ret = close(sock);
+
+ if (ret != 0)
+ {
+ sprintf(err_string, "unix socket close failed: %s", strerror(errno));
+ dlt_log(LOG_WARNING, err_string);
+ }
+
+ return ret;
+}
+
+int dlt_daemon_unix_socket_send(
+ int sock,
+ void *data1,
+ int size1,
+ void *data2,
+ int size2,
+ char serialheader)
+{
+ /* re-use socket send function */
+ return dlt_daemon_socket_send(
+ sock,
+ data1,
+ size1,
+ data2,
+ size2,
+ serialheader);
+}
diff --git a/src/daemon/dlt_daemon_unix_socket.h b/src/daemon/dlt_daemon_unix_socket.h
new file mode 100644
index 0000000..5db4145
--- /dev/null
+++ b/src/daemon/dlt_daemon_unix_socket.h
@@ -0,0 +1,67 @@
+/*
+ * @licence app begin@
+ * SPDX license identifier: MPL-2.0
+ *
+ * Copyright (C) 2015, Advanced Driver Information Technology
+ * Copyright of Advanced Driver Information Technology, Bosch and Denso.
+ *
+ * This file is part of GENIVI Project DLT - Diagnostic Log and Trace.
+ *
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License (MPL), v. 2.0.
+ * If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * For further information see http://www.genivi.org/.
+ * @licence end@
+ */
+
+/*!
+ * \author Christoph Lipka <clipka@jp.adit-jv.com>
+ *
+ * \copyright Copyright © 2015 ADIT. \n
+ * License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/.
+ *
+ * \file dlt_daemon_unix_socket.h
+ */
+
+
+/*******************************************************************************
+** **
+** SRC-MODULE: dlt_daemon_unix_socket.h **
+** **
+** TARGET : linux **
+** **
+** PROJECT : DLT **
+** **
+** AUTHOR : Christoph Lipka clipka@jp.adit-jv.com **
+** **
+** PURPOSE : **
+** **
+** REMARKS : **
+** **
+** PLATFORM DEPENDANT [yes/no]: yes **
+** **
+** TO BE CHANGED BY USER [yes/no]: no **
+** **
+*******************************************************************************/
+
+/*******************************************************************************
+** Author Identity **
+********************************************************************************
+** **
+** Initials Name Company **
+** -------- ------------------------- ---------------------------------- **
+** cl Christoph Lipka ADIT **
+*******************************************************************************/
+
+#ifndef DLT_DAEMON_UNIX_SOCKET_H
+#define DLT_DAEMON_UNIX_SOCKET_H
+
+int dlt_daemon_unix_socket_open(int *sock, char *socket_path);
+int dlt_daemon_socket_close(int sock);
+
+int dlt_daemon_unix_socket_send(int sock,void* data1,int size1,void* data2,
+ int size2,char serialheader);
+
+#endif /* DLT_DAEMON_UNIX_SOCKET_H */