4 * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
6 * Support for Busmaster log file format
7 * Copyright (c) 2019 by Maksim Salau <maksim.salau@gmail.com>
9 * SPDX-License-Identifier: GPL-2.0-or-later
17 #define CAN_MAX_DLEN 8
18 #define CANFD_MAX_DLEN 64
20 typedef struct can_frame
{
21 uint32_t can_id
; /* 32 bit CAN_ID + EFF/RTR/ERR flags */
22 uint8_t can_dlc
; /* frame payload length in byte (0 .. CAN_MAX_DLEN) */
23 uint8_t __pad
; /* padding */
24 uint8_t __res0
; /* reserved / padding */
25 uint8_t __res1
; /* reserved / padding */
26 uint8_t data
[CAN_MAX_DLEN
];
29 typedef struct canfd_frame
{
30 uint32_t can_id
; /* 32 bit CAN_ID + EFF flag */
31 uint8_t len
; /* frame payload length in byte */
32 uint8_t flags
; /* additional flags for CAN FD */
33 uint8_t __res0
; /* reserved / padding */
34 uint8_t __res1
; /* reserved / padding */
35 uint8_t data
[CANFD_MAX_DLEN
];
38 #endif /* SOCKETCAN_H__ */