can-isotp: add SF_BROADCAST support for functional addressing
Subsystems (4)
Oliver Hartkopp
maintainerPATCH v2 1/1 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 <[email protected]>
Signed-off-by Thomas Wagner <[email protected]>
--- include/uapi/linux/can/isotp.h | 2 +- net/can/isotp.c | 42 +++++++++++++++++++++++----------- 2 files changed, 30 insertions(+), 14 deletions(-)
include/uapi/linux/can/isotp.h +1 -1
@@ -133,11 +133,11 @@ struct can_isotp_ll_options {#define CAN_ISOTP_HALF_DUPLEX 0x040/* half duplex error state handling */ #define CAN_ISOTP_FORCE_TXSTMIN 0x080/* ignore stmin from received FC */ #define CAN_ISOTP_FORCE_RXSTMIN 0x100/* ignore CFs depending on rx stmin */ #define CAN_ISOTP_RX_EXT_ADDR 0x200/* different rx extended addressing */ #define CAN_ISOTP_WAIT_TX_DONE 0x400/* wait for tx completion */ - +#define CAN_ISOTP_SF_BROADCAST 0x800/* 1-to-N functional addressing */ /* default values */ #define CAN_ISOTP_DEFAULT_FLAGS 0#define CAN_ISOTP_DEFAULT_EXT_ADDRESS 0x00
net/can/isotp.c +29 -13
110 lines not on this page · raw message
Signature · 1 line
2.29.2