Oleksij Rempel
fc3d6afa80
Merge 62d223a4d6 into da65fdfe0d
2020-02-14 16:14:08 +01:00
Oliver Hartkopp
da65fdfe0d
isotpsniffer: only invoke LL_OPTS setsockopt when set on commandline
...
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>
2020-02-04 17:28:11 +01:00
Oliver Hartkopp
ae69062657
isotpsniffer: remove duplicated code
...
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>
2020-02-04 08:31:48 +01:00
Oliver Hartkopp
8027b498cf
Merge pull request #191 from hartkopp/candump-remove-bridging
...
candump: remove bridging functionality
2020-02-01 09:55:23 +01:00
Oliver Hartkopp
a9985c7652
candump: remove bridging functionality
...
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>
2020-01-04 14:11:34 +01:00
Marc Kleine-Budde
665d8699eb
Merge pull request #172 from jluebbe/jluebbe-actions
...
add github actions
2019-12-06 13:55:33 +01:00
Marc Kleine-Budde
4e36059f6a
Merge pull request #175 from olerem/testj1938
...
sync testj1939 with latest kernel UAPI
2019-12-06 11:41:10 +01:00
Marc Kleine-Budde
6831eeeb62
Merge pull request #180 from olerem/jacd
...
jacd: remove SO_BINDTODEVICE setsockopt call
2019-12-06 11:31:53 +01:00
Oleksij Rempel
a8456276df
jacd: remove SO_BINDTODEVICE setsockopt call
...
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>
2019-12-06 11:24:44 +01:00
Marc Kleine-Budde
6eeedb0e66
Merge pull request #177 from marckleinebudde/fix-error-handling
...
isotpsniffer: fix error handling, "0" is a valid filedescriptor
2019-12-02 19:16:55 +01:00
Marc Kleine-Budde
b6a44803fd
isotpsniffer: fix error handling, "0" is a valid filedescriptor
...
Fixes: b04108c615 ("isotpsniffer: Fix error handling")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2019-12-02 11:20:03 +01:00
Oleksij Rempel
153501c0ab
can-j1939-kickstart: remove "Use source address" example
...
This example do not really demonstrate UAPI or testj1939 functionality.
So, remove it.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
2019-12-02 08:29:45 +01:00
Oleksij Rempel
8cf6353039
can-j1939-kickstart: update documentation for testj1939
...
testj1939 need to use -B (broadcast) flag to be able to send or receive
broadcast packages.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
2019-11-29 14:16:04 +01:00
Oleksij Rempel
5d3f8073b2
testj1939: add optional promiscuous mode and boradcast support
...
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>
2019-11-29 13:53:55 +01:00
Jan Luebbe
d75122f649
add github actions
2019-11-25 15:29:47 +01:00
Oliver Hartkopp
9ae877ce32
Merge pull request #169 from rumpelsepp/isotpsniffer
...
isotpsniffer: add llopts support, use isprint() instead of open coded check and clean up error paths.
2019-11-14 13:54:05 +01:00
Stefan Tatschner
da33f96edf
isotpsniffer: Add support for llopts
2019-11-14 13:10:49 +01:00
Stefan Tatschner
b04108c615
isotpsniffer: Fix error handling
2019-11-14 13:00:21 +01:00
Stefan Tatschner
ecf80e8f91
isotpsniffer: Use isprint() instead of manual check
2019-11-14 07:23:28 +01:00
Yegor Yefremov
bf30a4bc01
Merge pull request #167 from yegorich/err-handling
...
libj1939: fix missing include and syntax
2019-11-12 10:05:48 +01:00
Yegor Yefremov
63d9a3d87b
libj1939: fix missing include and syntax
...
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>
2019-11-12 10:04:24 +01:00
Yegor Yefremov
c0dba0a454
Merge pull request #166 from yegorich/sync-headers
...
include: import header files from kernel v5.4-rc7
2019-11-12 10:02:20 +01:00
Yegor Yefremov
a67bf7aa89
Merge pull request #168 from yegorich/typo
...
jacd: fix typo in a comment
2019-11-12 10:01:57 +01:00
Yegor Yefremov
276077de00
jacd: fix typo in a comment
...
s/ourselve/ourselves
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-12 09:06:17 +01:00
Yegor Yefremov
ffd60c9b74
include: import header files from kernel v5.4-rc7
...
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-12 08:59:58 +01:00
Yegor Yefremov
8426d63ecf
Merge pull request #165 from yegorich/spelling
...
Fix spelling in various files
2019-11-11 14:40:26 +01:00
Yegor Yefremov
14ccc06eba
Fix spelling in various files
...
codespell parameters:
codespell -q 3 --skip="*.in,*.sh,*.m4,config,configure,autom4te.cache"
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-11-11 14:21:49 +01:00
Marc Kleine-Budde
35b2ef691c
Merge pull request #163 from marckleinebudde/libmusl-fix
...
treewide: Fix compilation on libmusl, replace error() by err()
2019-10-31 08:57:29 +01:00
Marc Kleine-Budde
a08b61621d
Merge pull request #162 from josemic/patch-1
...
Update can-j1939-kickstart.md
2019-10-31 08:52:13 +01:00
josemic
275f606a1f
Update can-j1939-kickstart.md
...
Added the padding to the candump output.
2019-10-30 19:22:23 +01:00
Marc Kleine-Budde
791b6de786
treewide: Fix compilation on libmusl, replace error() by err()
...
Reported-by: Brandon Ros <brandonros1@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2019-10-30 11:59:49 +01:00
Oliver Hartkopp
7e9bc7719b
Merge pull request #155 from yegorich/reuse-fixes
...
Reuse fixes
2019-09-26 20:14:40 +02:00
Yegor Yefremov
0b93e9836f
libj1939.h: add missing license and copyright header
...
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-09-26 15:46:20 +02:00
Yegor Yefremov
d66295ee75
Add license texts as files
...
Add license texts mentioned by REUSE tool.
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-09-26 15:45:43 +02:00
Oliver Hartkopp
26ae1fffa8
Merge pull request #154 from yegorich/readme-fix
...
README: update the list of CAN over IP tools
2019-09-19 19:17:15 +02:00
Yegor Yefremov
de8bb5fd8f
README: update the list of CAN over IP tools
...
Fix socketcand URL and add cannelloni.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-09-19 14:14:36 +02:00
Marc Kleine-Budde
a8d4827d0f
Merge pull request #151 from olerem/recvown
2019-08-26 14:16:05 +02:00
Oleksij Rempel
7337cb12de
j1939: drop SO_J1939_RECV_OWN support
...
SO_J1939_RECV_OWN is no longer supported by the kernel. So, sync the
headers and rework jacd.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
2019-08-26 11:03:36 +02:00
Oleksij Rempel
d5ba0e2d23
can/j1939.h: sync with latest kernel state
...
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
2019-08-26 11:03:36 +02:00
Oliver Hartkopp
226d6393b8
slcan tools: fix stringop-truncation warnings
...
Rework string handling for ioctl() syscalls for netdev name operations.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2019-08-25 18:25:35 +02:00
Oliver Hartkopp
1331c56393
isotptun: fix stringop-truncation warnings
...
Rework string handling for ioctl() syscalls for netdev name operations.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2019-08-25 18:20:37 +02:00
Oliver Hartkopp
319bd5de45
candump: silence format-overflow warning
...
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>
2019-08-23 19:57:06 +02:00
Oliver Hartkopp
83a1210b75
candump: preserve silent mode with enabled log file output format
...
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>
2019-08-23 19:40:27 +02:00
Oliver Hartkopp
818dacd78f
candump: fix formatting of status messages regarding standard output
...
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>
2019-08-23 19:34:10 +02:00
Oliver Hartkopp
d45f3f46bd
cangw: add CAN FD support
...
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2019-08-16 15:32:16 +02:00
Oliver Hartkopp
07054c06f5
cangw: remove sanity checks that are better handled in the kernel
...
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2019-08-16 15:26:58 +02:00
Oliver Hartkopp
24923df749
cangw: add new command line option '-X' to handle CAN FD rules
...
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2019-08-16 15:26:50 +02:00
Oliver Hartkopp
0669215a4b
cangw: update include files for CAN FD support
...
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2019-08-16 15:26:41 +02:00
jogo-
9aa993df4c
isotpdump: fix service 0x23 naming according to UDS specification
...
Fix Service 0x23 naming according to the standard
"ReadDataByMemory" -> "ReadMemoryByAddress"
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2019-07-30 22:09:50 +02:00
Marc Kleine-Budde
c10c049ce7
Merge pull request #147 from ffontaine/master
...
fix include to find SIOCGSTAMP with latest kernel
2019-07-15 08:34:00 +02:00