cangw: update include files for CAN FD support
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>pull/145/head
parent
9aa993df4c
commit
0669215a4b
|
|
@ -80,6 +80,10 @@ enum {
|
||||||
CGW_DELETED, /* number of deleted CAN frames (see max_hops param) */
|
CGW_DELETED, /* number of deleted CAN frames (see max_hops param) */
|
||||||
CGW_LIM_HOPS, /* limit the number of hops of this specific rule */
|
CGW_LIM_HOPS, /* limit the number of hops of this specific rule */
|
||||||
CGW_MOD_UID, /* user defined identifier for modification updates */
|
CGW_MOD_UID, /* user defined identifier for modification updates */
|
||||||
|
CGW_FDMOD_AND, /* CAN FD frame modification binary AND */
|
||||||
|
CGW_FDMOD_OR, /* CAN FD frame modification binary OR */
|
||||||
|
CGW_FDMOD_XOR, /* CAN FD frame modification binary XOR */
|
||||||
|
CGW_FDMOD_SET, /* CAN FD frame modification set alternate values */
|
||||||
__CGW_MAX
|
__CGW_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -88,15 +92,18 @@ enum {
|
||||||
#define CGW_FLAGS_CAN_ECHO 0x01
|
#define CGW_FLAGS_CAN_ECHO 0x01
|
||||||
#define CGW_FLAGS_CAN_SRC_TSTAMP 0x02
|
#define CGW_FLAGS_CAN_SRC_TSTAMP 0x02
|
||||||
#define CGW_FLAGS_CAN_IIF_TX_OK 0x04
|
#define CGW_FLAGS_CAN_IIF_TX_OK 0x04
|
||||||
|
#define CGW_FLAGS_CAN_FD 0x08
|
||||||
|
|
||||||
#define CGW_MOD_FUNCS 4 /* AND OR XOR SET */
|
#define CGW_MOD_FUNCS 4 /* AND OR XOR SET */
|
||||||
|
|
||||||
/* CAN frame elements that are affected by curr. 3 CAN frame modifications */
|
/* CAN frame elements that are affected by curr. 3 CAN frame modifications */
|
||||||
#define CGW_MOD_ID 0x01
|
#define CGW_MOD_ID 0x01
|
||||||
#define CGW_MOD_DLC 0x02
|
#define CGW_MOD_DLC 0x02 /* contains the data length in bytes */
|
||||||
|
#define CGW_MOD_LEN CGW_MOD_DLC /* CAN FD length representation */
|
||||||
#define CGW_MOD_DATA 0x04
|
#define CGW_MOD_DATA 0x04
|
||||||
|
#define CGW_MOD_FLAGS 0x08 /* CAN FD flags */
|
||||||
|
|
||||||
#define CGW_FRAME_MODS 3 /* ID DLC DATA */
|
#define CGW_FRAME_MODS 4 /* ID DLC/LEN DATA FLAGS */
|
||||||
|
|
||||||
#define MAX_MODFUNCTIONS (CGW_MOD_FUNCS * CGW_FRAME_MODS)
|
#define MAX_MODFUNCTIONS (CGW_MOD_FUNCS * CGW_FRAME_MODS)
|
||||||
|
|
||||||
|
|
@ -105,7 +112,13 @@ struct cgw_frame_mod {
|
||||||
__u8 modtype;
|
__u8 modtype;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
|
struct cgw_fdframe_mod {
|
||||||
|
struct canfd_frame cf;
|
||||||
|
__u8 modtype;
|
||||||
|
} __attribute__((packed));
|
||||||
|
|
||||||
#define CGW_MODATTR_LEN sizeof(struct cgw_frame_mod)
|
#define CGW_MODATTR_LEN sizeof(struct cgw_frame_mod)
|
||||||
|
#define CGW_FDMODATTR_LEN sizeof(struct cgw_fdframe_mod)
|
||||||
|
|
||||||
struct cgw_csum_xor {
|
struct cgw_csum_xor {
|
||||||
__s8 from_idx;
|
__s8 from_idx;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue