mirror_ubuntu-kernels/include/uapi/linux/can
Oliver Hartkopp c83c22ec14 can: canxl: add virtual CAN network identifier support
CAN XL data frames contain an 8-bit virtual CAN network identifier (VCID).
A VCID value of zero represents an 'untagged' CAN XL frame.

To receive and send these optional VCIDs via CAN_RAW sockets a new socket
option CAN_RAW_XL_VCID_OPTS is introduced to define/access VCID content:

- tx: set the outgoing VCID value by the kernel (one fixed 8-bit value)
- tx: pass through VCID values from the user space (e.g. for traffic replay)
- rx: apply VCID receive filter (value/mask) to be passed to the user space

With the 'tx pass through' option CAN_RAW_XL_VCID_TX_PASS all valid VCID
values can be sent, e.g. to replay full qualified CAN XL traffic.

The VCID value provided for the CAN_RAW_XL_VCID_TX_SET option will
override the VCID value in the struct canxl_frame.prio defined for
CAN_RAW_XL_VCID_TX_PASS when both flags are set.

With a rx_vcid_mask of zero all possible VCID values (0x00 - 0xFF) are
passed to the user space when the CAN_RAW_XL_VCID_RX_FILTER flag is set.
Without this flag only untagged CAN XL frames (VCID = 0x00) are delivered
to the user space (default).

The 8-bit VCID is stored inside the CAN XL prio element (only in CAN XL
frames!) to not interfere with other CAN content or the CAN filters
provided by the CAN_RAW sockets and kernel infrastruture.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/all/20240212213550.18516-1-socketcan@hartkopp.net
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2024-02-13 11:47:13 +01:00
..
bcm.h treewide: uapi: Replace zero-length arrays with flexible-array members 2022-06-28 21:26:05 +02:00
error.h can: error: add definitions for the different CAN error thresholds 2022-07-20 09:27:51 +02:00
gw.h can: gw: support modification of Classical CAN DLCs 2020-11-20 12:05:14 +01:00
isotp.h can: isotp: support dynamic flow control parameters 2024-02-12 16:55:40 +01:00
j1939.h can: j1939: extend UAPI to notify about RX status 2021-08-04 12:11:52 +02:00
netlink.h can: netlink: report the CAN controller mode supported flags 2022-01-05 12:09:06 +01:00
raw.h can: canxl: add virtual CAN network identifier support 2024-02-13 11:47:13 +01:00
vxcan.h can: don't use deprecated license identifiers 2019-11-05 12:44:34 +01:00