can: isotp: add SF_BROADCAST support for functional addressing
authorOliver Hartkopp <socketcan@hartkopp.net>
Sun, 6 Dec 2020 14:47:31 +0000 (15:47 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 10 Dec 2020 08:31:40 +0000 (09:31 +0100)
commit921ca574cd382142add8b12d0a7117f495510de5
treeedae2ce5e6c85a043d879c7d72e1d0c2842eec90
parenta7105e3472bf6bb3099d1293ea7d70e7783aa582
can: isotp: add SF_BROADCAST support for functional addressing

When CAN_ISOTP_SF_BROADCAST is set in the CAN_ISOTP_OPTS flags the CAN_ISOTP
socket is switched into functional addressing mode, where only single frame
(SF) protocol data units can be send on the specified CAN interface and the
given tp.tx_id after bind().

In opposite to normal and extended addressing this socket does not register a
CAN-ID for reception which would be needed for a 1-to-1 ISOTP connection with a
segmented bi-directional data transfer.

Sending SFs on this socket is therefore a TX-only 'broadcast' operation.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Thomas Wagner <thwa1@web.de>
Link: https://lore.kernel.org/r/20201206144731.4609-1-socketcan@hartkopp.net
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
include/uapi/linux/can/isotp.h
net/can/isotp.c