summaryrefslogtreecommitdiff
path: root/cethcan
diff options
context:
space:
mode:
Diffstat (limited to 'cethcan')
-rw-r--r--cethcan/socketcan.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/cethcan/socketcan.c b/cethcan/socketcan.c
index 5aeaa2b..21b10fa 100644
--- a/cethcan/socketcan.c
+++ b/cethcan/socketcan.c
@@ -8,6 +8,21 @@
#include <linux/can.h>
#include <linux/can/raw.h>
+#ifndef CANFD_MAX_DLEN
+#define CANFD_MAX_DLEN 64
+#endif
+#ifndef CAN_RAW_FD_FRAMES
+#define CAN_RAW_FD_FRAMES 5
+struct canfd_frame {
+ canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */
+ __u8 len; /* frame payload length in byte */
+ __u8 flags; /* additional flags for CAN FD */
+ __u8 __res0; /* reserved / padding */
+ __u8 __res1; /* reserved / padding */
+ __u8 data[CANFD_MAX_DLEN] __attribute__((aligned(8)));
+};
+#endif
+
struct socan {
struct can_user *u;
struct event *ev;