summaryrefslogtreecommitdiff
path: root/src/daemon/dlt_daemon_client.c
Commit message (Collapse)AuthorAgeFilesLines
* protocol: Remove non supported user service ID (#159)Saya Sugiura2019-09-021-11/+11
| | | | | | | | | | With this commit, following DLT user service IDs are now free to use: - 0xF0A - 0xF0F to 0xFFE Also the cases in dlt_daemon_client_process_control() is reordered so that it matches the order of dlt_user_services enum. Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* UDP Multicast implementation (#155)Sunil-K-S2019-08-231-0/+15
| | | | | The feature can be enabled by setting WITH_UDP_CONNECTION to ON. Signed-off-by: sunil.s <sunil.s@lge.com>
* Correct sa findingsSaya Sugiura2019-07-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dlt_offline_logstorage.c - Parameter to isdigit is not correct - Handle the size of memset() and strncpy() properly dlt-test-stress-user.c - Parameter d is duplicated dlt_env_ll.c - Parameter env is used before NULL check - Remove redundant line dlt-control-common.c dlt_daemon_event_handler.c - Do not use NULL variable to print log dlt_config_file_parser.c - Remove unnecessary loop dlt_daemon_client.c - Return error in NULL check dlt_user.c - Free allocated memory in error case Related commit: 5c8f88d logstorage: fix compile error Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* doxygen: Align variable for apid and ctidSaya Sugiura2019-07-191-24/+24
| | | | | | | The variables used for application id and context id are aligned with "apid" and "ctid". Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* doxygen: Remove licenceSaya Sugiura2019-07-191-2/+0
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* cleanup: Use dlt_vlog()Saya Sugiura2019-06-191-52/+16
| | | | | | | There were a couple of places which used snprintf-dlt_log. It is now replaced with dlt_vlog(). Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Fix alerts from lgtmSaya Sugiura2019-06-191-8/+8
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* daemon: Loop for client fdsVo Trung Chi2019-06-181-12/+16
| | | | | | | | | | | | In dlt_daemon_client_send_all_multiple(), while in the loop, the connection to client may be destroyed by recursive call to dlt_daemon_close_socket(). So in some scenario we still use the removed connection, which is unexpected behavior. Solution: loop on the fds array and find the client connection corresponds to. Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
* daemon: Remove bytes_sentSaya Sugiura2019-06-181-28/+0
| | | | | | | | | | | | | | | | | | | | | When it fails to send a log message to connected client, daemon tries to store the remaining partial message to internal ring buffer and send again later. When calculating the number of bytes which were sent to client, it had a bug which it keeps on incrementing instead of initializing the variable on every message, which never reached to the condition mentioned above and had a possibility to overflow and access invalid memory. On the other hand, daemon doesn't need to store the unsent partial message, as the socket to the client will be closed on failure and the sent partial message will be dropped anyways. This commit removes the lines where the daemon tries to store the partial message to ring buffer. With this, variable bytes_sent is now removed. Related commit: 2262f8b Made socket send reliable Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Code beautification using uncrustifyChristoph Lipka2018-12-211-1012/+1005
| | | | Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* UnitTest: UpdatesManikandanC2018-12-211-12/+10
| | | | | | | | | | | | Gateway Logstorage Event Handler Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com> Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Signed-off-by: Aditya Paluri <venkataaditya.paluri@in.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* Made socket send reliableManikandan C2018-12-211-7/+28
| | | | | | | | Made TCP socket send reliable by storing the unsent/partial message in the ring buffer. This will avoid the corrupted messages/Gaps in Viewer side Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* Gateway ImprovementsManikandan C2018-11-231-11/+0
| | | | | | | | | | | | | -Support to send and parse periodic control messages -add application/contexts to passive ECU list -Refactor dlt_gateway_send_control_message -Gateway issues with corrupted data and on demand connection -Unit Test update Signed-off-by: Saya Sugiura ssugiura@jp.adit-jv.com Signed-off-by: Christoph Lipka clipka@jp.adit-jv.com Signed-off-by: S. Hameed shameed@jp.adit-jv.com Signed-off-by: ManikandanC Manikandan.Chockalingam@in.bosch.com
* Log storage - Updates (#82)ManikandanChockalingam2018-11-151-43/+123
| | | | | | | | | | - improvements and refactor key creation - Sync strategies added Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Signed-off-by: Ravi Sankar P <ponnurangamravi.sankar@in.bosch.com> Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* dlt-daemon: per ECU list of user information (#80)ManikandanChockalingam2018-10-301-41/+85
| | | | | | Prepare daemon to store applications/context information of other ECUs as well. This commit prepares the dlt-daemon to store logs from passive nodes in a logstorage device. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* Fix compiler warning PR #77Christoph Lipka2018-09-251-1/+1
| | | | | | warning: extra tokens at end of #ifdef directive Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* Fix compilation with glibc 2.28 (#77)Oleksndr Kravchuk2018-09-251-1/+1
| | | | | | | | Package compilation fails with GLIBC 2.28: stat.h:56:8: error: redefinition of 'struct statx_timestamp' stat.h:99:8: error: redefinition of 'struct statx' Signed-off-by: Oleksandr Kravchuk <oleksandr.kravchuk@pelagicore.com>
* Introduce controlling entire system trace status feature from dlt-control (#57)Yusuke Sato2018-05-181-38/+192
| | | | | | | | | | | | | | | | | | | | | * dlt-control: Provision to control entire system trace status 1. support for setting trace status using wildcards for both app and context 2. support for setting entire system trace status *This Logic is as same as for changing log level. (SHA: a966393ad7003d02870bceffa08df5ddf4bbf864 dlt-control: Provision to control entire system log level) * dlt-daemon: Fix control entire log level / trace status issue In previous, dlt-control could send request to set all log level / trace status with DLT_LOG_DEFAULT / DLT_TRACE_STATUS_DEFAULT(-1). However, dlt-daemon could not accept these value. This change fix this issue so that setting log level/trace status of all registered contexts become possible. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
* dlt-daemon: Fix infinite loop on set log level using wildcards (#55)Yusuke Sato2018-05-081-1/+1
| | | | | | dlt-daemon entered to infinite loop when set log level request with wildcards came from dlt-control due to variable size. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
* Fix ForceContextLogLevelAndTraceStatus handling in dlt_daemon_client.c (#50)kundatipradeep2018-04-271-4/+33
| | | | | Even Forcing log level and trace status of context to not exceed "ContextLogLevel" and "ContextTraceStatus" in dlt.conf file with ForceContextLogLevelAndTraceStatus = 1, the default log level is being overwritten with high value than expected by client(DLT_Viewer when default trace data request is sent ) and by dlt-control application on usage of (dlt-control -d loglevel IP_ADDRESS) With provided patch/changes in place, when ForceContextLogLevelAndTraceStatus is enabled the requested log level is checked with ContextLogLevel and if it satisfied the daemon default loglevel gets updated. Added a conditional checks to not to overwrite the individual contextLoglevel and ContextTracesStatus when ForceContextLogLevelAndTraceStatus is enabled in dlt.conf file and taken care of review comments.
* Minor fixes: corrected typo in CMakeLists.txt - WTIH_DLT_ADAPTOR, removed ↵Stefan Badura2017-08-301-1/+1
| | | | character from merge - +
* dlt-daemon: Fix use after free potential issueFrederic Berat2017-02-011-1/+3
| | | | | | | | | | | | | In dlt_daemon_send_all_multiple, if the connection was broken, we closed it before getting the next available connection. This must be avoided by having a temporary next pointer. The same kind of problem is valid for pointers coming from the epoll interface. The kernel can provide back connection pointer that are not valid any longer. Therefore, we need to use an ID instead of the pointer value to retrieve the connections. Signed-off-by: Frederic Berat <fberat@de.adit-jv.com> Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* daemon: check payload length before cast to structChristoph Lipka2017-01-311-15/+66
| | | | Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* dlt-control: Provision to control entire system log levelManikandan C2016-04-281-25/+136
| | | | | | | | 1. support for setting log level using wildcards for both app and context 2. support for setting entire system log level Signed-off-by: Manikandan C <Manikandan.Chockalingam@in.bosch.com> Change-Id: I92f8c5461903f092cd50f05f644013432940a87b
* dlt-daemon: receiver reworkFrederic Berat2016-04-281-1/+1
| | | | | | | | | | The receiver structures have been removed from the dlt-daemon structure, they are now part of the connection. The overall usage of the receiver structrure has also been reviewed in the daemon. Signed-off-by: Frederic Berat <fberat@de.adit-jv.com> Change-Id: I7cf80d79ed73bd6d4f370bb3f278d26ccc9d8d7a
* Offline logstorage: On Demand triggering for syncing Logstorage cache and ↵Christoph Lipka2016-04-251-1/+28
| | | | | | | | support long options Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com> Change-Id: I2bac5e48a5d210b544a96fe96dc322f28ac472fe
* dlt-daemon: Fix injection message handlingS. Hameed2015-12-161-1/+1
| | | | Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
* Set default log-levels in dlt.confStefan Vacek2015-12-091-12/+12
| | | | | | | | - feature: allow to define a default-log-level in dlt.conf (see dlt.conf for documentation) - bugfix: make dlt_unlock_mutex not inline to fix linkage - bugfix: initial log-level was not set correctly when no dlt-daemon was running Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Fix register context before application is registeredStefan Vacek2015-12-081-0/+4
| | | | | | | | Additional: - include sd-daemon.h if watchdog is enabled - fix formatting for printf 64bit values Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* MultiNode: Logstorage: ECUid as filter attributeChristoph Lipka2015-12-071-1/+2
| | | | | | | | | This patch enables the user to specify the ECU identifier as another filter attribute for a Logstorage filter configuration. This attribute is optional. If not specified, the ECUid will not be checked during message filtering within the Logstorage component. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Dlt MultiNodeChristoph Lipka2015-12-071-8/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MultiNode allows to connect DLT Daemons running on different operating systems, e.g. in a virtualized environment. The central component is the Gateway DLT Daemon which connects external DLT Clients, like the DLT Viewer running on a host computer, with Passive DLT Daemons running on nodes without a physical connection to external DLT clients. The Gateway DLT Daemon itself acts as a DLT client when connecting to a Passive DLT Daemon. To use the Gateway functionality, it has to be enabled in dlt.conf: GatewayMode = 1 All communication between passive nodes and DLT Viewer has to be send via the Gateway node. The Gateway node forwards log messages coming from passive nodes to all connected DLT clients. It also forwards command and control requests coming from DLT clients to the corresponding passive node. The Gateway DLT Daemon read a configuration file (dlt_gateway.conf) at startup with information about Passive DLT Daemon connections. Afterwards, the Daemon will try to connect to the passive DLT Daemons. If the connection cannot be established after the configured timeout, the Gateway DLT Daemon will give up connecting. The configuration file has to contain the following information about a passive node: [PassiveNode1] IPaddress = 192.168.2.35 Port = 3490 EcuID = ECU2 Connect = OnStartup ; timeout in seconds Timeout = 10 Precondition is, that the passive node is configured with the correct ECU id, ECU2 in this case. If the passive node sends messages with another than configured ECU id, the Gateway DLT Daemon will shut down the connection. It is also possible to connect to a passive DLT daemon using the dlt-passive-node-ctrl application. In this case "Connect=OnDemand" has to be configured in the configuration file. To connect to PassiveNode1, "dlt-passive-node-ctrl -n ECU2 -c 1" has to be executed. With "dlt-passive-node-ctrl -s" the status of passive node connections can be retrieved. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Offline logstorage: Offline logstorage featureS. Hameed2015-11-241-19/+44
| | | | | | | | | | | | | | 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>
* dlt-daemon: Implement epoll based event handlingFrederic Berat2015-11-111-49/+325
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Got rid of warnings from some older compilersLutz Helwing2015-10-281-1/+1
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* DLT daemon improvement - dlt_init()-checkLutz Helwing2015-10-071-14/+14
| | | | | | | | | | 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>
* Offline Logstorage [1/4]: DLT preparation to enable offline logstorageS. Hameed2015-07-301-1/+88
| | | | Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
* Removed all trailing whitespacesLutz Helwing2015-07-211-2/+2
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* 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/+16
| | | | | | Scan findings. Renamed and cleanup further files. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Add Service ID Last entry to avoid further modifications in dependent codeS. Hameed2015-04-011-1/+1
| | | | | Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* Change daemon state handling to have all traces in online trace even when ↵Sascha Philipp2015-03-251-1/+4
| | | | | | | 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-7/+6
| | | | | Change-Id: Id1fe0f438161fc81c5caee3c9c9627d9ddf5dbbf Signed-off-by: Sascha Philipp <sascha.philipp@continental-corporation.com>
* Reworked internal outputSascha Philipp2015-03-251-3/+3
| | | | | | 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-4/+4
| | | | Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* Added new API to send marker message from application.Alexander Wenzel2014-09-111-0/+51
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed: all possible malloc, sprintf and strcpy problemsAlexander Wenzel2014-04-011-7/+7
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Updated authors information.Alexander Wenzel2014-04-011-32/+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-1/+6
| | | | | | 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-47/+52
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed serial port not working anymore.Alexander Wenzel2014-01-231-10/+1
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>