| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The configuration of memory buffer size must be carefully
parsed and validated to avoid segmentation fault
Any misleading information in configuration file must be
considered as major error and dlt-daemon should stop
and raise error message to stderr
This commit also corrects error handling of
dlt_buffer_init_dynamic().
Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
|
|
|
|
|
|
| |
security-wise dlt pip(FIFO) should be exclusively readable only by owner not the dlt group
to prevent eavesdropping by clients
Signed-off-by: Mostafa Emami <mustafaemami@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
- Converting datatype to the correct one.
- As macro do not perform type-checking before, so these functions used
it with different datatype could create a lot of conversion warnings.
For this reason, these warnings could be consider as normal
information and will not be fixed.
Signed-off-by: Dinh Cong Toan <toan.dinhcong@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>
|
|
|
|
|
|
|
|
|
| |
- Correct the data type of 'headersize' and 'datasize' variables in
header 'dlt_common.h', then config those functions using this library.
- Explicit the data type.
Signed-off-by: Dinh Cong Toan(RBVH/ECM12) <Toan.DinhCong@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Runtime log level setting from dlt-viewer or dlt-control doesn't work
when logstorage is enabled.
Adding MaintainLogstorageLogLevel=ON/OFF to [General] session of
dlt_logstorage.conf to keep the current behaviour (=ON or 1 or not
defined), or allow to change log level from dlt-viewer or dlt-control
when the logstorage is enabled (=OFF or 0).
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
|
|
|
|
|
|
|
|
| |
Since order of runtime config load for app-ctx and dlt-runtime
are different from each other, so they could not be in the same
load_runtime function.
Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@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>
|
|
|
|
| |
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
|
|
|
|
|
|
|
|
| |
update client buffer overflow counter in send function.
Gather all overflow checks into dlt_daemon_client.
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dlt_common
- Add preprocessor DLT_USE_UNIX_SOCKET_IPC for dlt_log_set_fifo_basedir() and
dltFifoBaseDir variable
- Rename input parameter of dlt_log_set_fifo_basedir()
dlt-daemon
- Replace setting dltFifoBaseDir by dlt_log_set_fifo_basedir() and add preproc
DLT_USE_UNIX_SOCKET_IPC
- Update -h opt and flags.loggingFilename based on IPC type
Signed-off-by: LUONG HONG DUY KHANH(RBVH/ENG42) <KHANH.LUONGHONGDUY@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- In existing implementation, control message "message_buffer_overflow"
is sent for every incoming message which is dropped since buffer is full.
So UDP and logstorage will receive a lot of these messages.
That could be considered as unnecessary.
- In order to reduce the useless effort to send "message_buffer_overflow"
for every missing message, daemon will only send it out
right after buffer is full or right after real client is connected.
Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
|
|
|
|
|
|
|
|
|
| |
- Introduce "General" section for dlt_gateway.conf
- In new section, the interval is used for gateway timer.
This entry is optional. By default, it is set to 1 second
as the existing hardcoded value.
Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
|
|
|
|
|
|
|
|
|
| |
snprintf returns the size the resulting string would take.
In order to detect truncation, this size needs to be
checked against the buffer size.
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
|
|
|
|
|
|
|
|
|
| |
Many stringop-truncation and stringop-overflow warnings are still
there (so many).
https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
|
|
|
|
| |
Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
|
|
|
|
|
|
|
| |
New empty line was generated from daemon internal log because of '\n'.
This is removed from daemon internal log and added to dlt_vlog().
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
| |
`dlt_daemon_log_internal` is called with with a null `local_str`.
This has been introduced by mistake during a code refactoring.
Code has been reverted to the previous version:
https://github.com/GENIVI/dlt-daemon/commit/bfa7026b355db32d91374997cc86b56fedc3e861
Signed-off-by: Francesco Montefoschi <francesco.montefoschi@artgroup-spa.com>
|
|
|
|
|
|
|
| |
return without close the file descriptor.
reported by Resource leak (RESOURCE_LEAK)
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
|
|
|
|
|
|
|
|
| |
Fix the issue that DLT offline trace creating mutiple files
even after reaching MaxTrace size when filename is index based.
Related to: https://github.com/GENIVI/dlt-daemon/pull/174
Signed-off-by: Vo Trung Chi <chi.votrung@vn.bosch.com>
|
|
|
|
| |
Signed-off-by: sunil.s <sunil.s@lge.com>
|
|
|
|
| |
Signed-off-by: Sebastian Kloska <sebastian.kloska@snafu.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Symptom: no offline trace file gets created
even if runtime config LoggingMode==(2|3).
* Reason: runtime config gets read *after*
offline logging setup.
* Solution: Read runtime config *before*
offline logging setup.
* Make the "read runtime config" function
set a proper default value for logging mode
instead if the *_init_* function setting up
the logging.
Signed-off-by: Sebastian Kloska <sebastian.kloska@snafu.de>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
| |
Signed-off-by: Vo Trung Chi <chi.votrung@vn.bosch.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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
If a context is defined and loaded from runtime context config file,
that context won't be deleted/removed from dlt-daemon database
until its parent application is unregistered.
Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
|
|
|
|
|
|
| |
Do not assign fd after destroying receiver pointer
Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix compiler warnings about socket usage
Correct the data types used for the socket declaration. We use AF_UNIX
sockets so we use struct sockaddr_un, but we need to cast to struct
sockaddr for the socket API.
Fix compiler warnings about sign-compare
Fix two occurences of signed - unsigned comparison by casting the values
accordingly. Note that the cast is legal as the first parts of both
conditional statements make sure the value is not negative before
casting to unsigned.
While at it, add strtol error checking.
Fix compiler warnings about string functions
Add string.h to src/daemon/dlt_daemon_unix_socket.c, because it was
unaware of memcpy and strerror. While at it, change unsafe use of
sprintf to proper dlt_vlog and remove the char buffer.
Fix compiler warnings about unused-*
Fix two unused-variable and one unused-parameter warning. While at it,
change the #ifdef to not run into an empty block. Simply reverse the
condition and enclose the complete else with the #ifdef.
POSIX: Use memset instead of bzero
"The bzero() function is deprecated (marked as LEGACY in POSIX.1-2001);
use memset(3) in new programs."
Use memset instead of bzero and remove any occurrence from DLT. Include
of header "strings.h" that has bzero is also removed.
Signed-off-by: Simon Herkenhoff <sherkenhoff@jp.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
| |
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
| |
In previous, number of connections was output only if verbose mode
in dlt.conf was enabled. This information is basically useful
and is not output frequently. Therefore number of connections information
is made to output as default when new connection is established or
the connection is lost.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
|
|
|
| |
If /dev/null fails to open during DLT daemon's fork handling,
it is treated as an error and DLT daemon exits.
Signed-off-by: Jeevan Ramakant Nagvekar <jeevan.nagvekar1@wipro.com>
|
|
|
|
|
|
|
|
|
|
|
| |
1> While daemonizing DLT, for connecting I/O file descriptors to
/dev/NULL POSIX call dup() is used. dup2() POSIX call is now used
where explicit standard I/O descriptor number is mentioned.
2>After fork() directory changed to root in place of FIFO Base
directory - "/tmp"
Signed-off-by: Jeevan Ramakant Nagvekar <jeevan.nagvekar1@wipro.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit removes DLT's "one-instance-lock" mechanism.
In daemonized mode, on first instance, a file is created (if not
already created) and locked. If second instance is attempted
file locking fails since the file is already locked by first instance.
This prevents new instance of the DLT daemon. After analysis
its found that there is no need of any mechanism for prevention
of another instance. The same is already taken care by socket
mechanism. Since main socket is created by first instance, attempt
to create it again with same port number fails.
Signed-off-by: Jeevan Ramakant Nagvekar <jeevan.nagvekar1@wipro.com>
|
|
|
|
|
| |
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
with ll_ts API
Signed-off-by: Ravi Sankar P <ponnurangamravi.sankar@in.bosch.com>
|