| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Enhance dlt logging such that multiple files are used as it is done
for the offline traces. Add limit-specific config values for logging.
For this purpose the pattern of index-based file names is used only.
This approach of logging to multiple files and rotating in order
to keep the limits ensures that dlt logs take care of available
space on the underlying file system and do not grow infinitely.
Signed-off-by: Daniel Weber <daniel.w.weber@daimler.com>
Co-authored-by: Oleg Tropmann <oleg.tropmann@daimler.com>
|
|
|
|
|
|
| |
if an application sends a message with a level below context level
and the level enforcement is on, the message will be dropped
Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit is to revert the following commits:
- de4a4234
- fb9ff078
- db9917b3
- e4467f0e
- a567e01d
Those commits are from improvement but they seem to
break the dlt message header in some cases.
Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Instead of casting frequently, change the data type of 'to_remove' to
'uint32_t' for the correct format, also adding temp variable to check
return value.
- Change data type of 2 variable 'offset' and 'sizecont' to 'size_t'
(dlt_daemon_client.c), because these variable using many time with
function 'sizeof', and they was used as local variable so it will not
effect dlt library.
Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
|
|
|
|
|
|
|
| |
There is no timerfd_create in QNX so try to use threads to sleep and
notify to main thread via unamed pipes.
Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For more information about VSOCK, see "man vsock"
( https://man7.org/linux/man-pages/man7/vsock.7.html ).
Makes it possible for processes in a virtual machine to log directly in
DLT running on host without setting up a network connection between
guest and host. It is also probably more efficient. Have not done any
performance measurements (not main reason for patch), but no forwarding
is required as when running DLT in a multi-node setup.
When building dlt-daemon for host, WITH_DLT_DAEMON_VSOCK_IPC should be
enabled for daemon to listen on incoming VSOCK requests. Local
communication method between applications and daemon is still determined
with DLT_IPC. When building for guest, WITH_DLT_LIB_VSOCK_IPC should be
enabled and DLT_IPC will be ignored, which will make libdlt open a VSOCK
socket to the deamon for logging messages.
VSOCK can be tested without a virtual machine. Since VMADDR_CID_HOST is
used by libdlt when connecting, see vsock man page, clients can be run
on host to test VSOCK communication.
Some modifications has been done to be able to handle logging through
FIFO pipe and socket in the same build of dlt-daemon:
- dlt_receiver_init/free_unix_socket() is renamed to
dlt_receiver_init/free_global_buffer() and used for FIFO as well.
Also fixes memory leak since dlt_receiver_free_unix_socket() was used
regardless of whether DLT_USE_UNIX_SOCKET was defined or not.
- Pass type to dlt_receiver_init() instead of dlt_receiver_receive().
And remove preprocessor conditionals for handling
DLT_CONNECTION_APP_MSG in dlt_daemon_process_user_messages(). Also
fixes wrong enum type being passed to dlt_receiver_receive() in
dlt_client.c (DltClient::mode was used as a DltReceiverType enum but
it is a DltClientMode enum).
- Add a flag to DltDaemonApplication to indicate whether file descriptor
is "owned" by the DltDaemonApplication or not. When
dlt_daemon_application_add() is called due to message received on a
socket, fd is passed as an argument (app does not own fd). For FIFO,
a per application FIFO is opened (app owns the fd). Also fixes so that
user handle is reset for both application and all its contexts when
resetting any. Prevents fd from being used by accident after it has
been closed.
dlt_mkdir_recursive() is moved to src/daemon since it is only used in
the daemon. Minimizes use of DLT_USE_UNIX_SOCKET_IPC.
Other bugfixes:
- Call DLT_SEM_FREE() if setting socket to O_NONBLOCK fails in
src/lib/dlt_user.c:dlt_initialize_socket_connection().
- Close socket if dlt_receiver_init() fails in
src/lib/dlt_user.c:dlt_initialize_socket_connection().
Signed-off-by: Martin Ejdestig <martin.ejdestig@volvocars.com>
|
|
|
|
|
|
| |
A new option named "InjectionMode" allows to select if
we want to enable / disable the feature
Signed-off-by: Sebastien RAILLET <sebastien.raillet@marelli.com>
|
|
|
|
|
|
|
|
| |
After dlt-client connects to dlt-daemon successfully, all the stored
dlt messages in daemon was not flushed to dlt client when using shared
memory as IPC. It is harmonized with dlt_daemon_process_user_message_log().
Signed-off-by: Vo Trung Chi <chi.votrung@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
The feature can be enabled by setting WITH_UDP_CONNECTION to ON.
Signed-off-by: sunil.s <sunil.s@lge.com>
|
|
|
|
|
| |
Replace all Linux specific shared memory APIs with POSIX alternatives.
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
| |
This reverts commit e8716cc5c950e50411b23a7a6cafa3c063c59e90.
|
|
|
|
|
|
|
|
|
|
| |
New option to set owner group of daemon FIFO (Default: /tmp/dlt)
is added in dlt.conf. If this option is used properly, more
secure tracing can be realized.
Only application that is in dlt_user_apps_group can write log
message to daemon FIFO.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
|
|
|
|
|
| |
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
| |
registration
Option of get log info response during context registration was fixed to 7.
This modification enables to change that option.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
Change-Id: Ia75f15cdb33e0bffd77c5ba71a1960e820714e61
|
|
|
|
|
|
|
| |
Configuration of daemon FIFO (default: /tmp/dlt) size is added to dlt.conf.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
Change-Id: I05cc56b9a05e4c3a0a1af49c374f35ae10f4674d
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using DltLogstorage on internal storage device, it is needed to
reduce writing to internal storage device as much as possible.
This patch introduces sync strategies to Logstorage to provide that
functionality.
The ON_MSG strategy is the default sync strategy that flushes every
written log message to the storage device (fflush).
The ON_DAEMON_EXIT strategy only flushes data to disk when the daemon
exits.
The strategy can be defined per filter in the dlt_logstorage.conf
configuration file by adding
SyncBehavior=<Strategy> to a configuration.
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 - 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
| |
- remove compiler warnings
- fix file permissions
Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
|
|
|
|
| |
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
|
|
| |
Scan findings. Renamed and cleanup further files.
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|
|
|
|
| |
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
|