While the Classical CAN frame can transport only 8 byte of data the
4 bit data length code (DLC) has the ability to have a value range
from 0 to 15. To be able to send and receive DLC values from 9 to 15
the struct can_frame contains an additional len8dlc element which
can have values from 9 to 15
Display the officially defined bits for CAN XL and CAN FD.
While CANXL_XLF is a mandatory set bit value for CAN XL frames
the CANFD_FDF bit might be set based on the used Linux kernel
version. So both bits present valuable content for the user.
Signed-off-by: Oliver Hartkopp
---
epan/dissectors/
This patchset simplifies the CAN packet type detection as it focusses
on the rules to distiguish the different CAN CC/FD/XL frames from the
Linux kernel API.
Additionally some more content is shown in the dissector and the
CAN CiA 611-1 definitions have been cleaned up and extended by CiA.
Oliver
The different CAN frame types are defined by Linux SLL_P types in the
sll_protocol field and the length of the frame.
LINUX_SLL_P_CANXL:
The frame length for CAN XL can be 12 + 1 to 12 + 2048 (13 .. 2060) byte.
Additionally the CANXL_XLF flag has to be set.
LINUX_SLL_P_CAN and LINUX_SLL_P_CANFD:
Signed-off-by: Oliver Hartkopp
---
epan/dissectors/packet-socketcan.c | 13 -
epan/dissectors/packet-socketcan.h | 17 ++---
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/epan/dissectors/packet-socketcan.c
b/epan/dissectors/packet-socketcan.c
index 4ca0
The different CAN frame types are defined by Linux SLL_P types in the
sll_protocol field and the length of the frame.
LINUX_SLL_P_CANXL:
The frame length for CAN XL can be 12 + 1 to 12 + 2048 (13 .. 2060) byte.
Additionally the CANXL_XLF flag has to be set.
LINUX_SLL_P_CAN and LINUX_SLL_P_CANFD:
Thanks for your contribution! Can you submit a merge request at
https://gitlab.com/wireshark/wireshark/ ?
Complete documentation on contributing code to Wireshark can be found in our
Developer's Guide at
https://www.wireshark.org/docs/wsdg_html/#ChSrcContribute
On 3/18/24 3:46 AM, Oliver Hart