1 #include <linux/types.h>
2 #include <linux/ioctl.h>
5 #define PACKED __attribute__((packed))
8 #define CAN_MSG_LENGTH 8
14 unsigned long timestamp;
16 unsigned char data[CAN_MSG_LENGTH];
19 /* Definitions to use for canmsg_t flags */
20 #define MSG_RTR (1<<0)
21 #define MSG_OVR (1<<1)
22 #define MSG_EXT (1<<2)
24 /* CAN ioctl magic number */
25 #define CAN_IOC_MAGIC 'd'
27 typedef unsigned long bittiming_t;
28 typedef unsigned short channel_t;
30 /* CAN ioctl functions */
31 #define CMD_START _IOW(CAN_IOC_MAGIC, 1, channel_t)
32 #define CMD_STOP _IOW(CAN_IOC_MAGIC, 2, channel_t)
35 #define CONF_BAUD _IOW(CAN_IOC_MAGIC, 4, bittiming_t)
37 //#define CONF_XTDACCM
40 #define CONF_FILTER _IOW(CAN_IOC_MAGIC, 8, unsigned char)
41 //#define CONF_FENABLE
42 //#define CONF_FDISABLE
45 #define STAT _IO(CAN_IOC_MAGIC, 9)