Commit Graph

20 Commits (e44db7366b61d8573a44918a92326036bf46196c)

Author SHA1 Message Date
Oliver Hartkopp dfb607c807 remove obsolete char pointer casts
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2022-03-14 18:21:45 +01:00
Oliver Hartkopp 84d3294132 isotp: support Linux 5.18 features
- update isotp.h include file
- update maximum PDU (buffer) size to 64kByte buffer
- support setting of N_As (frame_txtime) to zero

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2022-03-12 18:09:48 +01:00
Oliver Hartkopp f7307b8290 can-utils: check for return values of if_nametoindex()
if_nametoindex() returns zero and a specific errno in the case the network
interface does not exist. The missing check leads to the use of the 'any'
CAN device but leaves the user alone as the user gets no error message.

Reported-by: Lothar Rubusch <lotophagon@protonmail.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2021-10-18 09:37:46 +02:00
Rosen Penev b153fe3f35
clang-tidy: sort includes alphabetically
Found with llvm-include-order

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-10-12 23:28:58 -07:00
Alexander GQ Gerasiov 1cf4d86874 isotprecv.c: Reformat help/usage output to be compatible with help2man.
Gbp-Pq: Name 0014-isotprecv.c-Reformat-help-usage-output-to-be-compati.patch
2020-04-27 08:20:09 +03: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
Yegor Yefremov 7b7331976a Add SPDX identifiers
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2019-06-19 12:24:24 +02:00
Sven Schmitt f5fb7317aa treewide: use if_nametoindex to avoid overflows
replaced strcpy(if_name, argv[x]) + ioctl by if_idx = if_nametoindex(argv[x])
to avoid overflows caused by long user input.

Signed-off-by: Sven Schmitt <sven.schmitt@gmx.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-06-30 21:00:04 +02:00
Oliver Hartkopp a51be177d8 isotp[send|recv]: change command line option for padding bytes
Allow to specify the TX and RX padding content separately.
Due to the optional values it is possible to provide either TX or RX values
which enables and set the given values.

-p 55:AA => TX padding 0x55, RX padding 0xAA
-p 55    => TX padding 0x55
-p 55:   => TX padding 0x55
-p :AA   => RX padding 0xAA

Additionally the comment for the -P <mode> option was updated to point out the
checking mode of the padding in the received PDUs (rx padding).

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2014-11-20 23:13:37 +01:00
Oliver Hartkopp 523f3d8fc0 isotp[send|recv]: change command line option for extended addressing
Enable to pass the optional second extended address with the '-x' option and
do not pollute the command line options with just another '-X' option.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2014-11-19 20:44:41 +01:00
Oliver Hartkopp 8150e21a11 isotp: add tool support for ISO 15765-2:2015 with CAN FD
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2014-11-16 22:24:04 +01:00
Oliver Hartkopp 4ffb7fe5c7 isotp: added support for separate extended address in rx path
As requested by Laurent Vaudoit the extended address can be different in the
tx and he rx path:

(..) how can i have a segmented transfer like this:
0x6a7  0x55 0x10 0x08 ........
0x687  0xAA 0x30 0x00 0x00
0x6a7  0x55 0x21 .....

The connection i need is between two ECU, using IDs 0x6a7/687 and one has
adress extension 0x55, the other 0xAA (this adressing method is used on some
FIAT ECUs for example).

http://marc.info/?l=linux-can&m=140354647413513&w=2

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2014-11-16 20:38:31 +01:00
Oliver Hartkopp 2fa9b0005b isotp[send|recv]: support PDU sizes greater than 4095
Allow PDU sizes greater than 4095 to be able to check the correct
implementation of the kernel socket API error handlings.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2014-10-24 20:41:11 +02:00
Oliver Hartkopp 9c5bfab229 isotp: fix copy paste error for isotp padding config
Thanks for the anonymous hint, Mr X ;-)

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2014-10-23 19:07:54 +02:00
Oliver Hartkopp 836d3cc012 remove obsolete SVN ID tags
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
2012-11-14 20:57:16 +01:00
Marc Kleine-Budde 722a09116d treewide: replace berlios contact email by linux-can@vger.kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2012-01-11 12:14:15 +01:00
Oliver Hartkopp 6aeb7d1faa Added new socketoptions to force the isotp protocol to intentionally
misbehave for regression tests.

CAN_ISOTP_TX_STMIN:
Set a value in nano secs that's used as minimum CF gap by the sender.
This value is used instead of the value provided by the receiver inside the FC.

CAN_ISOTP_RX_STMIN:
Ignores received CF frames which timestamps differ less than this value in nano
secs. This is used to test the receivers misbehaviour when the receiver
provides a lower stmin value that he's able to cope with. Received CF frames
are silently dropped when they come faster than specified by this value.
2010-11-14 08:55:06 +00:00
Oliver Hartkopp 4369ac1c55 Consistencely allow '-?' to get a help text. 2009-01-13 09:32:45 +00:00
Oliver Hartkopp 4e41082935 Added Id keyword propertiy on new files. 2008-11-05 14:20:52 +00:00
Oliver Hartkopp f1d4ebbbba Added ISO 15765-2 CAN transport protocol for protocol family CAN.
Including some tools and coarse documentation README.isotp
2008-11-05 11:34:23 +00:00