mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-05 06:20:00 +02:00
isotp: add tool support for ISO 15765-2:2015 with CAN FD
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This commit is contained in:
@@ -66,6 +66,8 @@
|
||||
/* ignore received CF frames which */
|
||||
/* timestamps differ less than val */
|
||||
|
||||
#define CAN_ISOTP_LL_OPTS 5 /* pass struct can_isotp_ll_options */
|
||||
|
||||
struct can_isotp_options {
|
||||
|
||||
__u32 flags; /* set flags for isotp behaviour. */
|
||||
@@ -103,6 +105,24 @@ struct can_isotp_fc_options {
|
||||
/* __u8 value : 0 = omit FC N_PDU WT */
|
||||
};
|
||||
|
||||
struct can_isotp_ll_options {
|
||||
|
||||
__u8 mtu; /* generated & accepted CAN frame type */
|
||||
/* __u8 value : */
|
||||
/* CAN_MTU (16) -> standard CAN 2.0 */
|
||||
/* CANFD_MTU (72) -> CAN FD frame */
|
||||
|
||||
__u8 tx_dl; /* tx link layer data length in bytes */
|
||||
/* (configured maximum payload length) */
|
||||
/* __u8 value : 8,12,16,20,24,32,48,64 */
|
||||
/* => rx path supports all LL_DL values */
|
||||
|
||||
__u8 tx_flags; /* set into struct canfd_frame.flags */
|
||||
/* at frame creation: e.g. CANFD_BRS */
|
||||
/* Obsolete when the BRS flag is fixed */
|
||||
/* by the CAN netdriver configuration */
|
||||
};
|
||||
|
||||
|
||||
/* flags for isotp behaviour */
|
||||
|
||||
@@ -122,13 +142,16 @@ struct can_isotp_fc_options {
|
||||
|
||||
#define CAN_ISOTP_DEFAULT_FLAGS 0
|
||||
#define CAN_ISOTP_DEFAULT_EXT_ADDRESS 0x00
|
||||
#define CAN_ISOTP_DEFAULT_RXPAD_CONTENT 0x00
|
||||
#define CAN_ISOTP_DEFAULT_TXPAD_CONTENT 0x00
|
||||
#define CAN_ISOTP_DEFAULT_PAD_CONTENT 0xCC /* prevent bit-stuffing */
|
||||
#define CAN_ISOTP_DEFAULT_FRAME_TXTIME 0
|
||||
#define CAN_ISOTP_DEFAULT_RECV_BS 0
|
||||
#define CAN_ISOTP_DEFAULT_RECV_STMIN 0x00
|
||||
#define CAN_ISOTP_DEFAULT_RECV_WFTMAX 0
|
||||
|
||||
#define CAN_ISOTP_DEFAULT_LL_MTU CAN_MTU
|
||||
#define CAN_ISOTP_DEFAULT_LL_TX_DL CAN_MAX_DLEN
|
||||
#define CAN_ISOTP_DEFAULT_LL_TX_FLAGS 0
|
||||
|
||||
/*
|
||||
* Remark on CAN_ISOTP_DEFAULT_RECV_* values:
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user