summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Add option in dlt.conf for bindAddress to specific IPs (#130)AdrianStoenescu2019-09-031-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Add the possibility to have in dlt.conf an option that specifies a set of IP addresses. The daemon will do a socket bind only for this list, therefore external connections will be limited to this set of IP addresses. If this option is not given, the default INADDR_ANY is used ("0.0.0.0") as before. The option in dlt.conf can look like this: BindAddress = 160.48.199.98;160.48.199.97;160.48.199.226,160.48.199.186;160.48.199.139;172.16.222.99 There can be as many addresses but only specified on one single line. They have to be delimited by ',' or ';'. ' ' (space) delimiter does not work. IPv6 addresses are supported as well. For instance: BindAddress = fe80::255:7bff:feb5:7df7 IPv6 addresses are acceptable only if DLT_USE_IPv6 flag is ON at compile time. IPv4 addresses are acceptable only if DLT_USE_IPv6 flag is OFF at compile time. One cannot have both IPv4 and IPv6 format in the same time. Signed-off-by: Adrian Stoenescu Adrian.Stoenescu@harman.com
* protocol: Remove non supported user service ID (#159)Saya Sugiura2019-09-021-6/+8
| | | | | | | | | | 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>
* using POSIX shared memory APIs (#90) (#151)Vo Trung Chi2019-08-012-23/+23
| | | | | Replace all Linux specific shared memory APIs with POSIX alternatives. Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
* Revert "Add option in dlt.conf for bindAddress to specific IPs (#130)"Saya Sugiura2019-08-011-12/+0
| | | | This reverts commit e8716cc5c950e50411b23a7a6cafa3c063c59e90.
* Add option in dlt.conf for bindAddress to specific IPs (#130)AdrianStoenescu2019-07-251-0/+12
| | | | | | | | | | | | | | | | | | | | | | | Add the possibility to have in dlt.conf an option that specifies a set of IP addresses. The daemon will do a socket bind only for this list, therefore external connections will be limited to this set of IP addresses. If this option is not given, the default INADDR_ANY is used ("0.0.0.0") as before. The option in dlt.conf can look like this: BindAddress = 160.48.199.98;160.48.199.97;160.48.199.226,160.48.199.186;160.48.199.139;172.16.222.99 There can be as many addresses but only specified on one single line. They have to be delimited by ',' or ';'. ' ' (space) delimiter does not work. IPv6 addresses are supported as well. For instance: BindAddress = fe80::255:7bff:feb5:7df7 IPv6 addresses are acceptable only if DLT_USE_IPv6 flag is ON at compile time. IPv4 addresses are acceptable only if DLT_USE_IPv6 flag is OFF at compile time. One cannot have both IPv4 and IPv6 format in the same time. Signed-off-by: Adrian Stoenescu Adrian.Stoenescu@harman.com
* doxygen: Align variable for apid and ctidSaya Sugiura2019-07-191-2/+2
| | | | | | | 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-1914-28/+0
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* doxygen: Get rid of warningsSaya Sugiura2019-07-194-26/+30
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* define DLT_PATH_MAX for max path buffer lengthRadoslaw Kaczorowski2019-07-031-1/+9
| | | | | | | | DLT limits the path length and does not do anything else to determine the actual value, because the least that is supported on any system that DLT runs on is 1024 bytes. Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
* cmake-improvements (#135)Vo Trung Chi2019-07-031-6/+9
| | | | | | | | | | | | | | | 1. Allow building as a subproject of another cmake project (CMAKE_* vs PROJECT_* variables) 2. Do not generate header files within source – bad practice, use build directory for that(e.g. change location where dlt_version.h is being generated) 3. Use add_compile_options() instead of *_C/CXX_FLAGS variables for proper compile environment definition, also bad practice, also see p.2 4. Add WITH_DLT_PKGCONFIG – add generate pkgconfig .pc files as switchable option, should probably be part of headers install routine. Signed-off-by: Radoslaw Kaczorowski <external.radoslaw.kaczorowski@bosch-softtec.com>
* cleanup: Use dlt_vlog()Saya Sugiura2019-06-191-4/+1
| | | | | | | 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-0/+5
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Remove dlt_forward_msgSaya Sugiura2019-06-181-8/+0
| | | | | | Since dlt_forward_msg() is not used anywhere, we will remove it. Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* network trace: Define package ID macroSaya Sugiura2019-06-181-0/+8
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* daemon: Remove bytes_sentSaya Sugiura2019-06-181-1/+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>
* unix socket: IPC code isolationChristoph Lipka2019-05-062-0/+4
| | | | | Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com> Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
* lib: daemon: Fix sem lock potential issueSaya Sugiura2019-04-241-2/+5
| | | | | | | | sem_wait may return an error if a signal is received while waiting for the lock,and therefore not take the lock before returning. Changed to have a while loop. Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Fixed memory leak when receiving network traces of 0xFFFF lengthjiripopek2019-04-111-1/+1
| | | | | | | | 0xFFFF was used as a magic number in the length field of a network message in order to trigger a resend. DLT library will now use the nw_trace_type field and a custom type to do this, thus assuring no external client of the library can reach this value(DLT_NW_TRACE_RESEND).
* Code beautification using uncrustifyChristoph Lipka2018-12-2111-1357/+1736
| | | | Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* libdlt: Add error handlingSaya Sugiura2018-12-211-0/+7
| | | | | | | Error handling was added in case it failed to send to daemon. Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* UnitTest: UpdatesManikandanC2018-12-211-1/+30
| | | | | | | | | | | | 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-0/+1
| | | | | | | | 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>
* Logging: avoided missing of log level change callback Added new context ↵Manikandan C2018-12-211-0/+10
| | | | | | registration Macro and API which has option to register log level change callback along with it. This will avoid missing of initial log level change callback when daemon sends the log level change control msg during context registration Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* Injection: New callback with private data Added new injection callback with ↵ManikandanC2018-12-212-0/+12
| | | | | | private data as argument Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* Dynamic allocation of msg bufferManikandanC2018-12-103-29/+42
| | | | | | | | | | | | | It is possible to change the default buffer size for log message creation via environment variable: export DLT_LOG_MSG_BUF_LEN=<value> Instead of using a static buffer with size of 1390 bytes, the buffer is allocated dynamically with the specified value.The max size is restricted to approx 65k. Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* rename #define STATIC to DLT_STATICManikandan C2018-12-061-2/+2
| | | | Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* Use poll in the dlt-daemon for POSIX complianceManikandanC2018-11-303-0/+17
| | | | | | | | | | | The poll system call is now used in the daemon to enable DLT use in POSIX compliant systems. Also added introduced new unregister_app macro to avoid missing of logs in startup buffer. Signed-off-by: Frederic Berat <fberat@de.adit-jv.com> 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>
* dlt-client: logging: Extended the receiver buffer sizeManikandan C2018-11-232-3/+14
| | | | | | | | | | | - dlt-control couldn't receive all the GET_LOG_INFO response message when many applications and contexts are registered. Therefore the receiver buffer size was extended to 65K. Also the receive buffer size macros are reduced to one variable. - Code cleanup and improvements Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Protocol: DLT Service ID Enum instead of definesManikandan C2018-11-231-31/+48
| | | | Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Gateway ImprovementsManikandan C2018-11-233-0/+139
| | | | | | | | | | | | | -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-0/+3
| | | | | | | | | | - 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>
* IPC: Unix socket added (#43)ManikandanChockalingam2018-05-183-0/+25
| | | | | | | | | * IPC: Unix socket added The user can select either FIFO or UNIX socket as IPC between user library and daemon through CMakelist option. Socket path configurable for both FIFO and Unix Socket now configurable in CMake Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* Introduce controlling entire system trace status feature from dlt-control (#57)Yusuke Sato2018-05-182-2/+10
| | | | | | | | | | | | | | | | | | | | | * 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>
* Update dlt_user.h (#22)Jens Lorenz2017-08-071-2/+2
| | | | | | | The dlt_user_log_write_start* function description mention the verbose/non-verbose option. According to my understanding verbose means that the code contains the verbose version of message (message as full string). The non-verbose version uses identifiers in order to reduce the message content and the interpretation of ids will be done by the viewer. Therefore the comments should be modified to capture this correctly.
* dlt-client: fix dlt_client_cleanup memory handlingOnkar Palkar2017-02-061-0/+24
| | | | | | | Setter function introduced for seting up string parameters which are free'd in dlt_client_cleanup Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Provision to test static functionOnkar Palkar2016-10-241-0/+9
|
* DLT_PTR macro: Improve implementation and function API addedChristoph Lipka2016-10-242-7/+11
| | | | | | | | The original implementation result in a compile error when DLT_PTR is used with other macros like DLT_STRING. This patch overcomes that problem. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* process user message: Fix bound handlingFrederic Berat2016-10-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | On context and application registration, the data needs to be read in 2 parts. If the first part was at the end of the receiver buffer, it was wrongly removed whereas the complete data is not full received and therefore interpretable. This has to be fixed by not removing the data before everything is checked. Thus, while readjusting the buffer to the first found header, the offset was not properly updated. Signed-off-by: Frederic Berat <fberat@de.adit-jv.com> Process User Messages: Fix buffer handling In case application and context registration the buffer need to be read two times. But before removing the data, the data need to be readjusted to its origin. This was missing in a previous fix. Furthermore, in case of corrupted description field, applications and contexts will be registered anyway with the dummy description "Unknown". Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Remove C99 style comments in include directoryS. Hameed2016-10-242-21/+19
| | | | Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Add dlt_user_is_logLevel_enabled APIChristoph Lipka2016-09-233-8/+41
| | | | | | | | | | This function allows an application developer to check if the DLT LogLevel is enabled before starting any log string creation. It can be used in application specific logging wrapper functions. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com> Change-Id: I4c269b12bfdeae29a4e795385cdbc54a579ba621
* CommonControl: Unix socket path and ecuid parsing for control applicationsManikandan C2016-04-281-0/+1
| | | | | | Signed-off-by: Manikandan C <Manikandan.Chockalingam@in.bosch.com> Change-Id: I023c6bccbe3977d50b77bb601df80643d8e2d82c
* dlt-control: Provision to control entire system log levelManikandan C2016-04-282-0/+8
| | | | | | | | 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_PTR: User macro to print pointersChristoph Lipka2016-04-281-0/+12
| | | | | | | | This macro internally checks the size of a void pointer to decide if the pointer address is sent with DLT_HEX32 or DLT_HEX64 macro. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com> Change-Id: Ie316ac411f2174e0760e09244d04b83c8006f55d
* dlt-daemon: receiver reworkFrederic Berat2016-04-281-0/+13
| | | | | | | | | | 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
* MultiNode: Add support for port configurationFrederic Berat2016-04-271-0/+10
| | | | | | Signed-off-by:Frederic Berat <fberat@de.adit-jv.com> Change-Id: I9b387d5713f5ae7b6fcfadb22d804fdb97534e44
* MultiNode: Send control messages after connectionChristoph Lipka2016-04-261-0/+5
| | | | | | | | | | | | | | | | | A list of control messages can be specified in the dlt_gateway.conf. These messages then are send immediately to the passive node after the connection has been established. Currently supported control messages are - GET_LOG_INFO - GET_SOFTWARE_VERSION Having the "SendControl" property is now mandatory for a passive node configuration, but the list of control messages might be empty. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com> Change-Id: I0ae4501449bf264c2d6f32724b0f035926115611
* DLT_RETURN_USER_BUFFER_FULL is returned when user buffer fullLutz Helwing2016-04-221-0/+1
| | | | | | | | | A new return value DLT_RETURN_USER_BUFFER_FULL is introduced which is returned by all dlt_user_log_write_* and dlt_log_* functions when the data to be added to the user buffer exceeds its size (datasize > DLT_USER_BUF_MAX_SIZE) Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
* Dlt MultiNodeChristoph Lipka2015-12-072-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-4/+9
| | | | | | | | | | | | | | 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-1/+10
| | | | | | | | | | | | | | | | 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>