summaryrefslogtreecommitdiff
path: root/include/dlt/dlt_common.h
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
* using POSIX shared memory APIs (#90) (#151)Vo Trung Chi2019-08-011-0/+7
| | | | | 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: Remove licenceSaya Sugiura2019-07-191-2/+0
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* doxygen: Get rid of warningsSaya Sugiura2019-07-191-5/+6
| | | | 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>
* 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>
* 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>
* Code beautification using uncrustifyChristoph Lipka2018-12-211-971/+988
| | | | 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>
* 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>
* Dynamic allocation of msg bufferManikandanC2018-12-101-9/+22
| | | | | | | | | | | | | 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-301-0/+4
| | | | | | | | | | | 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-231-1/+12
| | | | | | | | | | | - 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>
* Gateway ImprovementsManikandan C2018-11-231-0/+103
| | | | | | | | | | | | | -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
* IPC: Unix socket added (#43)ManikandanChockalingam2018-05-181-0/+14
| | | | | | | | | * 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>
* Provision to test static functionOnkar Palkar2016-10-241-0/+9
|
* 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>
* 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: 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 MultiNodeChristoph Lipka2015-12-071-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* DLT daemon improvement - dlt_init()-checkLutz Helwing2015-10-071-54/+69
| | | | | | | | | | 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>
* Allow multiple instances of dlt-daemonStefan Vacek2015-10-071-2/+13
| | | | | | | | | | | | | | | | - 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>
* Cleanup masterStefan Vacek2015-10-071-0/+0
| | | | | | | - remove compiler warnings - fix file permissions Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Offline Logstorage [1/4]: DLT preparation to enable offline logstorageS. Hameed2015-07-301-0/+11
| | | | Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
* Removed all trailing whitespacesLutz Helwing2015-07-211-1/+1
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Replaced all tabs with spaces in all files in include folderLutz Helwing2015-07-211-103/+103
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fix compilation warnings and possible misuse of snprintStefan Vacek2015-07-211-3/+3
| | | | | | | | | - 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-12/+16
| | | | | | Scan findings. Renamed and cleanup further files. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Added new API to send marker message from application.Alexander Wenzel2014-09-111-0/+9
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed: all possible malloc, sprintf and strcpy problemsAlexander Wenzel2014-04-011-3/+6
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Defined return value for dlt_message_read().Alexander Wenzel2014-01-101-0/+5
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Added new control message timezone.Alexander Wenzel2014-01-101-0/+11
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Environement variables added to configure internal logging in library.Alexander Wenzel2014-01-101-0/+12
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Added conntection info and unregister context control messages.Alexander Wenzel2014-01-101-0/+23
| | | | 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-0/+1
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Bug 85 - Include of dlt.h leads to compiler warning.Alexander Wenzel2013-07-251-0/+4
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* [GDLT-94]: Send periodic software version messages.Lassi Marttala2012-06-131-1/+1
| | | | Signed-off-by: Christian Muck <christian.muck@bmw.de>
* Added define statement for initial value of file descriptor and (-1). ↵Christian Muck2012-05-301-0/+7
| | | | | | Updated the user_handle of the daemon and user Signed-off-by: Christian Muck <christian.muck@bmw.de>
* GENDLT-15, Avoid buffer overrun with snprintf().Lassi Marttala2012-04-041-1/+2
| | | | | | | | | | Check return value of dlt_user_log_write_start(_id) correctly. Reduce the number of applications if allocation fails. Make dlt_user_log_write_start inline Improve error checking in dlt_user_log_write_start_id Use databuffersize to avoid reallocations Signed-off-by: Christian Muck <christian.muck@bmw.de>
* Corrected email of Alexander WenzelChristian Muck2012-03-271-1/+1
| | | | Signed-off-by: Christian Muck <christian.muck@bmw.de>
* GDLT-38, Update <FILE> fields in licenses.Lassi Marttala2012-03-261-1/+1
|
* GDLT-38, Update licenses in includeLassi Marttala2012-03-261-32/+16
|
* Changed to uint32_t to match the specification.Lassi Marttala2012-01-261-1/+1
|
* [GSW-141] Tracefile content stored different under Ubuntu 64 bit versionLassi Marttala2012-01-261-1/+1
| | | | | compared to Ubuntu/Win 32 Bit version Modified DltStorageHeader to use int32_t instead of time_t.