Using j*smthng* for j1939-related tools is not very good for 2 reasons:
1. j prefix is not very informative;
2. jcat name is used by journal cat tool from popular sleuthkit toolkit;
2`. jacd sounds very similar to jackd.
2``. Possible future name conflicts for new tools.
Thus I renamed j* to j1939\1 to deal with this issue.
Signed-off-by: Alexander GQ Gerasiov <gq@cs.msu.su>
In commit da33f96edf ("isotpsniffer: Add support for llopts") the
setsockopt() syscall for the link layer options CAN_ISOTP_LL_OPTS
has been added.
Unfortunately the syscall has been invoked even if there were no values
given on the command line and 'zero values' have been passed to the
kernel which correctly answered with -EINVAL.
And a missing check for a mandatory non-zero value for the MTU.
Fixes: da33f96edf ("isotpsniffer: Add support for llopts")
Reported by: https://github.com/ikuyas
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
In commit da33f96edf ("isotpsniffer: Add support for llopts") the setsockopt
call has been executed twice. (copy & paste issue?)
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
The tool 'candump' is used to dump CAN traffic to stdout or logfile.
In early days where the in-kernel CAN gateway (can-gw) with the cangw tool was
not yet implemented the bridging functionality allowed to send received (and
filtered) CAN frames to another outgoing CAN interface.
As we now have can-gw and sending CAN frames from a 'reading tool' seems wrong
especially from the Unix philosophy "Write programs that do one thing and do
it well." this patch removes the obsolete functionality from candump.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This was used in the non mainline stack version.
Removing this call allows to use jacd without root permissions.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Upstream version of J1939 stack has different UAPI. To make documented
testj1939 examples work again we need at least boradcast flag.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Include err.h and remove the unneeded parameter errno and
its header include.
Fixes: 791b6de ("treewide: Fix compilation on libmusl, replace error() by err()")
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
When -Wformat-overflow= is enabled the gcc notes ...
"‘sprintf’ output between 30 and 82 bytes into a destination of size xx"
Increasing the buffer for the file name to 83 bytes removes the warning.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
As seen in https://github.com/linux-can/can-utils/issues/150 the logfile
format switch ignores the silent mode switch.
Fix this by checking the silent mode when using logfile format on stdout.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
As remarked by Victor in https://github.com/linux-can/can-utils/issues/150
the output in the case of silent mode has puzzled line feeds.
Reported-by: Victor Cushman <VictorSCushman@gmail.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>