summaryrefslogtreecommitdiff
path: root/src/daemon/dlt-daemon.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Offline logstorage: Offline logstorage featureS. Hameed2015-11-241-2/+46
| | | | | | | | | | | | | | Features: 1. Offline log storage to internal and external devices (PATH based trigger) 2. File options configurable in dlt.conf a : Appends timestamp in log file name (OfflineLogstorageTimestamp) b : Appends delimiter in log file name (OfflineLogstorageDelimiter) c : Wrap around value for log file count in file name (OfflineLogstorageMaxCounter) 3. Common config file parser support Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Unix socket control interfaceChristoph Lipka2015-11-241-0/+162
| | | | | | | | | | | | | | | | Control applications running in the same Linux OS should be able to communicate with the DLT Daemon via a socket connection. To be able to do that, the DLT Client library need to be extended. DLT Clients connected via this UNIX socket are not handled as normal DLT Clients and no log messages will be forwarded to them. This avoids problems in situations when a control application is connected to the DLT Daemon before any other 'real' DLT Client (e.g. DLT Viewer) is connected. In this situations, all already stored log messages are flushed to the control application and therefore lost, because the control application most likely ignore all incoming messages besides the one in which it is interested in. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* offline trace: supported trace file name configuration based on indexManikandan C2015-11-181-1/+11
| | | | | | | | | Changes made for trace file name configuration based on index and made it configurable from dlt.conf file. Using this configuration one can select either timestamp based or index based log file creation for offline trace. Signed-off-by: Manikandan C <Manikandan.Chockalingam@in.bosch.com>
* dlt-daemon: Implement epoll based event handlingFrederic Berat2015-11-111-283/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | The event handling has been reworked in order to use epoll and restructure the code. There are 2 new structures. The DltConnection which contains all basic connection information, like the type, the file descriptor, and the receiver structure corresponding. The DltEventHandler that manages the DltConnections and the associated events. The concept is basically the following. The daemon will create different connections, serial connections, socket connections, fifos etc ... Each of them will then register itself to the event handler, and give it the ownership of this connection. From this point in time, the daemon can act on the connections. Once an event is triggered, the event handler will call the connection specific callback, creates new connections when clients arrives, and potentially destroy the connection in case of hangup. On exit, the daemon cleanup the event handler, which leads to the destruction of the connections. The work there is a first step for a global restructuring. Several modification will follow, in order to rationalize the different daemon structures, and avoid variable and code duplication. Signed-off-by: Frederic Berat <fberat@de.adit-jv.com>
* DLT daemon improvement - dlt_init()-checkLutz Helwing2015-10-071-875/+875
| | | | | | | | | | DLT daemon improvement - parameter value range check Adapt unit tests to check for enum return values Changed C version to gnu99 and C++ version to gnu++0c Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed INTERNAL-mode connection bug in dlt-daemonSven Hassler2015-10-071-1/+1
| | | | | | | | | | | When logging-mode of the DLT-daemon was set to DLT_USER_MODE_INTERNAL or DLT_USER_MODE_OFF and a client tried to connect to the daemon, the socket for accepting new connections would be closed. This would make connecting to the daemon impossible, even if the logging mode was reset to DLT_USER_MODE_EXTERNAL or DLT_USER_MODE_BOTH. Fixed this by removing conditional check on the logging mode - clients connections are always accepted now. If the logging-mode is being switched from INTERNAL to EXTERNAL or BOTH while a client is connected, the client will then start to receive messages normally. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Allow multiple instances of dlt-daemonStefan Vacek2015-10-071-20/+75
| | | | | | | | | | | | | | | | - Make dlt-daemon configurable to specify directory of fifos and port of dlt-daemon, this allows to run multiple instances of dlt-daemon at one node at the same time. This is useful in testing environment where simultanous tests should not interfere due to the same instance of dlt-daemon - dlt-daemon: add option -t <dir> to specify a directory where all fifos will be created - dlt-daemon: add option -p <port> to specify the port under which dlt-daemon can be connected - client-library: add environment variable DLT_PIPE_DIR to specify a non-default directory of fifos for logging applications - client-library: add environment variable DLT_DAEMON_TCP_PORT to specify the port under which dlt-daemon can be reached (especially when using dlt-receive) Signed-off-by: Stefan Vacek <stefan.vacek@intel.com> Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
* Offline Logstorage [1/4]: DLT preparation to enable offline logstorageS. Hameed2015-07-301-0/+27
| | | | Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
* Removed all trailing whitespacesLutz Helwing2015-07-211-31/+31
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fix compilation warnings and possible misuse of snprintStefan Vacek2015-07-211-3/+0
| | | | | | | | | - sprintf was used were snprint was intended - make proper usage of 64bit values in printf-formatting - remove some not used variables - make some casts to make printf happy Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Fixed license headers and copyright doxygen commentsLutz Helwing2015-06-171-2/+2
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Updated license headers to latest GENIVI license policy. Fixed further LRT ↵Lutz Helwing2015-06-171-11/+15
| | | | | | Scan findings. Renamed and cleanup further files. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* dlt-daemon: Explicitly set the default loggingLevel to LOG_INFOSid Heroor2015-06-171-1/+1
| | | | Signed-off-by: Sid Heroor <heroor@heptaxel.com>
* dlt-daemon: Explicitly set the default loggingMode to DLT_LOG_TO_CONSOLESid Heroor2015-06-171-1/+1
| | | | Signed-off-by: Sid Heroor <heroor@heptaxel.com>
* Remove absolute installation paths so that DLT can be installed at any ↵Jacques GUILLOU2015-04-021-2/+2
| | | | | | location (not only "/usr"). Signed-off-by: Jacques GUILLOU <jacques.guillou@pelagicore.com>
* Change daemon state handling to have all traces in online trace even when ↵Sascha Philipp2015-03-251-4/+8
| | | | | | | offline trace is active Change-Id: Ic212c4956582b18e05739d593bf5c792d60d9c00 Signed-off-by: Sascha Philipp <sascha.philipp@continental-corporation.com>
* Fix content of offline traceSascha Philipp2015-03-251-39/+33
| | | | | Change-Id: Id1fe0f438161fc81c5caee3c9c9627d9ddf5dbbf Signed-off-by: Sascha Philipp <sascha.philipp@continental-corporation.com>
* Fix daemon state handling with offline traceSascha Philipp2015-03-251-2/+6
| | | | | Change-Id: I630f8131c26452a31cfbd825404cd34ea80ea80d Signed-off-by: Sascha Philipp <sascha.philipp@continental-corporation.com>
* Fix watchdog timeoutSascha Philipp2015-03-251-0/+26
| | | | | | | Change-Id: Id6fe1a4948c7ca87e53042829f6b7eb7b9eec975 Signed-off-by: Ralf Anton Beier <ralf.anton.beier@continental-corporation.com> Signed-off-by: Sascha Philipp <sascha.philipp@continental-corporation.com> (cherry picked from commit 7f7afbb8d49cbdb8f571ece8aac24bf584326910)
* Reworked internal outputSascha Philipp2015-03-251-91/+242
| | | | | | Change-Id: I371c1b234929fda46608f563f08cae141b97d0a9 Signed-off-by: Ralf Anton Beier <ralf.anton.beier@continental-corporation.com> Signed-off-by: Sascha Philipp <sascha.philipp@continental-corporation.com>
* Workaround for duplicated log messages in offline trace file issueChristoph Lipka2015-03-171-2/+2
| | | | Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* Added new API to send marker message from application.Alexander Wenzel2014-09-111-0/+37
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Make daemon buffer size configurableAlexander Wenzel2014-05-161-1/+16
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed missing variable declaration when systemd not enabled.v2.10.0_rc1Alexander Wenzel2014-04-011-3/+0
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed: all possible malloc, sprintf and strcpy problemsAlexander Wenzel2014-04-011-32/+56
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed: Creation of dltpipes directory is too late.Alexander Wenzel2014-04-011-17/+16
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Updated authors information.Alexander Wenzel2014-04-011-45/+5
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Cygwin port: cygwin patch, signal handling patch and cppcheck and install ↵Alexander Wenzel2014-04-011-6/+17
| | | | | | lib dll to correct location on Windows. Originally from Mikko Rapeli <mikko.rapeli@bmw.de>. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed: Fixed offline trace and new send functions issuesAlexander Wenzel2014-04-011-11/+7
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed missing dlt_receiver_remove in dlt_daemon_process_user_xxx functions.Alexander Wenzel2014-04-011-5/+35
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Defined return value for dlt_message_read().Alexander Wenzel2014-01-101-96/+98
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Cleanup of send return values. Further cleanup of send restructure.Alexander Wenzel2014-01-101-49/+58
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Moved daemon client functions to new source file.Alexander Wenzel2014-01-101-1621/+32
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Centralised send function to client. Introduced connection state to dlt daemon.Alexander Wenzel2014-01-101-342/+1546
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Added new control message timezone.Alexander Wenzel2014-01-101-3/+20
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Close socket when send fails.Alexander Wenzel2014-01-101-28/+57
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Replace threads by timing fds for ecu version, timing packets and watchdog.Alexander Wenzel2014-01-101-278/+222
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Added conntection info and unregister context control messages.Alexander Wenzel2014-01-101-0/+31
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Configurable Timeout on send.Alexander Wenzel2014-01-101-0/+13
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Security fix on DLT pipes.Alexander Wenzel2014-01-101-1/+18
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Changes after review.Alexander Wenzel2013-08-071-1/+1
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Bug 44 - Don't print "Buffer full" message from DLT daemon for each trace.Alexander Wenzel2013-08-071-4/+76
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Invalid Sock is set to -1 instead 0 (stdin). Consequent error handling in ↵Simon Brandner2013-07-191-3/+3
| | | | | | fseek failure cases Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Removed possible recursive call of dlt_user_log_file_errorMessage. Added ↵Simon Brandner2013-07-191-1/+6
| | | | | | | | | | some return value checks for system calls (stat,fseek) and error logging in those cases. Conflicts: src/lib/dlt_filetransfer.c Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Semaphores and Pointer passing insteasd by value and otehr coverity issue fixesSimon Brandner2013-07-191-5/+9
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Close filehandle on early existsLassi Marttala2013-07-191-0/+2
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fix compiler warningsLassi Marttala2013-07-191-5/+11
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Unify ECU version sending functionsLassi Marttala2013-07-191-47/+75
| | | | | | | | | | Review changes: Lower log level when opening fails. It might be deliberately set to non-existent file. Give name to period time in ECU version sending Merge branch 'LM-GSWD-162' Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Watchdog: Review changes.Lassi Marttala2013-07-191-21/+14
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Watchdog: Watch the main thread.Lassi Marttala2013-07-191-6/+56
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>