Commit Graph

39 Commits (ceda93bd5c56927c72d48dcaa30e17d6ecea86b8)

Author SHA1 Message Date
Marc Kleine-Budde fd0837f7e6 can-calc-bit-timing: move kernel compatibility stuff into own header 2023-08-01 21:45:43 +02:00
Marc Kleine-Budde ca304faad3 can-calc-bit-timing: import bit timing calculation algorithm from v6.3 2023-08-01 14:13:43 +02:00
Dario Binacchi 5ed3b4ded6 Don't compile programs using fork() on MMU-less systems
Systems that lack a MMU cannot use fork() to create the child process.
The patch does not compile the affected programs on MMU-less systems.

Co-developed-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2023-05-08 18:30:50 +02:00
Marc Kleine-Budde b4042d0205 mcp251xfd-dump: add test data 2023-01-03 20:31:54 +01:00
Marc Kleine-Budde 0847fb34b4 mcp251xfd-gen-testdata: add script to generate mcp251xfd-dump data 2023-01-03 20:18:47 +01:00
Marc Kleine-Budde 5b5f1523c4 can-tc-init-etf: add example script to setup queuing for etf 2022-12-12 13:25:09 +01:00
Marc Kleine-Budde 7e2010a1c0 can-calc-bit-timing: import bit timing calculation algorithm from v5.19
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2022-08-11 22:42:16 +02:00
Marc Kleine-Budde 0654d4e711 can-calc-bit-timing: import bit timing calculation algorithm from v5.16
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2022-08-11 22:42:16 +02:00
Marc Kleine-Budde c1f5dc53ec can-calc-bit-timing: import bit timing calculation algorithm from v2.6.31
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2022-08-11 22:24:43 +02:00
Marc Kleine-Budde ee2f48f33b can-calc-bit-timing: move algorithms into separate files
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2022-08-11 21:47:47 +02:00
Marc Kleine-Budde 9c38c16437 can-calc-bit-timing: move into subdir
The source file will be split into several files in the next patches.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2022-08-11 20:34:40 +02:00
Marc Kleine-Budde 1792aebd8b mcp251xfd: add sample dev-coredump udev rule
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-02-13 23:36:43 +01:00
Marc Kleine-Budde 66de96d337 mcp251xfd-dump: add tool to decode chip and driver state of mcp251xfd
It works on dev coredump data generated by the mcp251xfd driver in
case of failures, as well as on regmap based register dumps.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2021-02-13 23:36:43 +01:00
Marc Kleine-Budde a726c2a57a Merge branch 'cansequence' of github.com:marckleinebudde/can-utils into master
The PTX flavour canutils have a useful utility for generating a sequence of CAN
frames with an incrementing payload and checking such a sequence for missed and
reordered frames.

Recently, it has helped finding a regression in the kernel pfifo_fast qdisc,
which led to reordered frames.

To bring the utility to a greater audience, import the current state, including
its history, into the linux-can set of utilities.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-10-19 13:44:16 +02:00
Alexander GQ Gerasiov 8106214b55 Rename j* to j1939\1
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>
2020-04-20 10:18:13 +03:00
Oleksij Rempel 9ff370ea82 include: add errqueue.h, net_tstamp.h, netlink.h
this headers are take from kernel v5.0 and needed for
error queue support.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
2019-05-09 14:36:53 +02:00
Marc Kleine-Budde c59dff1bb1 NUmakefile.am: EXTRA_DIST: add missing \
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2019-03-12 12:02:44 +01:00
Oleksij Rempel 23e5e227ac add jcat
jcat is kind of netcat for j1939
for example:
jcat can0:0x90 -r > /tmp/some_file

jcat -i some_file_to_send can0:0x80 :0x90,0x12300

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
2019-01-04 13:01:11 +01:00
Bastian Stender 1f3f2f6163 testj1939: use address to string function from libj1939
canaddr2str() from testj1939 and libj1939's libj1939_addr2str provide
the same functionality. Remove the local helper function and use
libj1939_addr2str instead.

Signed-off-by: Bastian Stender <bst@pengutronix.de>
2018-01-22 12:27:15 +01:00
Marc Kleine-Budde 8839679a4c Merge branch 'master' of https://github.com/kurt-vd/test-can-j1939 2018-01-18 14:53:38 +01:00
Marc Kleine-Budde 79d84118cb GNUmakefile: add missing files to tarball
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2018-01-18 14:51:26 +01:00
Kurt Van Dijck 58c44ea3c4 can-j1939: add jacd address claim daemon
The can-j1939 kernel part only follows & validates inbound & outbound
address claim packets. Jacd implements the part that chooses an address
and emits the address claim packet.

Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2018-01-18 13:13:31 +01:00
Kurt Van Dijck 2cd00814a1 can-j1939: add jsr program
jsr sends data on <stdin> to j1939, and received j1939 data
is put on <stdout>.

Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2018-01-18 11:04:15 +01:00
Kurt Van Dijck c50b5a39de can-j1939: add jspy 'sniffer' program
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2018-01-18 11:04:15 +01:00
Kurt Van Dijck 1d3f8a1893 can-j1939: add libj1939
libj1939 provides a parser for struct sockaddr_can with j1939 info

Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2018-01-18 11:04:15 +01:00
Kurt Van Dijck 19ee95491a can-j1939: update headers with j1939
Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2018-01-18 11:04:15 +01:00
Marc Kleine-Budde 635a04f79f travis: include config file in tarball
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2018-01-18 11:04:15 +01:00
Marc Kleine-Budde d8c86cd995 GNUmakefile.am: add missing vxcan.h to be included in tarball
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2018-01-17 15:54:43 +01:00
Marc Kleine-Budde ef968b91b3 configure: switch to new libtool-2.0 macro
It's been out for a while now.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-03-04 21:09:39 +01:00
Oliver Hartkopp c1ac5613fd can-utils: added isotpperf tool for performance measurements
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2015-02-04 10:17:38 +01:00
Alexander Stein 518faef3ac Add missing header canframelen.h to noinst_HEADERS
This is necessary so this header gets included when running make dist.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-07-08 09:18:12 +02:00
Michal Sojka 2206f92de7 canbusload: Add exact CAN frame length calculation (including bitstuffing)
This adds an algorithm for calculating the exact number of bits a CAN
frame occupies on the bus and uses this algorithm in canbusload. It
also moves the other methods for CAN frame length calculation, already
present in canbusload, to the new file.

The added algorithm calculates the exact number of stuffed bit in a
CAN frame. Note that in order to calculate that correctly, we must
also know the frame's CRC. Hence, the algorithm also includes CRC
calculation routine.

The correctness of the algorithm was verified on an oscilloscope for
several different SFF and EFF frames.

Currently only CAN frames are supported. For CANFD frames, a different
algorithm is needed. CANFD uses different CRC polynomials and
calculates the CRC from the staffed bit-stream (CAN calculates CRC
from de-stuffed bit-stream).

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-01-30 16:23:25 +01:00
Uwe Kleine-König ed7bc7d366 include: Move all includes from include/socketcan to include/linux
This makes it possible to import header from the kernel more easily, e.g.:

	cd $path_to_linux_repo
	make headers_install
	rsync -a --exclude .\* usr/include/linux/can* $path_to_can_utils/include/linux

[mkl: also move isotp.h although Uwe skipped it as it is not
      part of the upstream kernel; adapt commit log accordingly]

Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-01-23 13:48:09 +01:00
Uwe Kleine-König 5c163123e5 ioctl.h: drop unused header
This header doesn't exist in the Linux tree and it's unused by can-utils,
so drop it.

Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-01-23 13:48:08 +01:00
Uwe Kleine-König a9dbbbc214 include: Remove two unused header files
These seem to have never been used. They entered can-utils in commit
77de10356f (include: import kernel header files into tree) and already
back then only consisted in an #include of a non-existing file.

Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-01-23 13:48:07 +01:00
Marc Kleine-Budde 01fe103cf7 autotools: adopt to new location for kernel headers
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Tested-by: Jan-Niklas Meier <dschanoeh@googlemail.com>
2012-01-11 12:14:15 +01:00
Marc Kleine-Budde b2d3f4f735 add can-calc-bit-timing to Makefiles + gitignore
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2010-07-20 13:43:01 +00:00
Oliver Hartkopp 62c030b21f Added isotpserver in autotool config file and gitignore 2010-05-14 12:43:42 +00:00
Marc Kleine-Budde 84e6b373f5 add autotools infrastructure
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2010-04-19 12:12:18 +00:00