From 9c357d9ed6d214bd2fc44850138c2f8861782d88 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 12 Feb 2024 13:55:22 -0800 Subject: [PATCH] LINKTYPE_CAN_SOCKETCAN: make the priority/VCID field big-endian. This is for historical and compatibility reasons. Yes, some fields in the CAN XL header are big-endian and some are little-endian; this is a mess, but fixing it would cause problems reading older captures. Fix the description of the Acceptance Field to indicate that it's little-endian. --- htmlsrc/linktypes/LINKTYPE_CAN_SOCKETCAN.html | 9 ++++----- linktypes/LINKTYPE_CAN_SOCKETCAN.html | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/htmlsrc/linktypes/LINKTYPE_CAN_SOCKETCAN.html b/htmlsrc/linktypes/LINKTYPE_CAN_SOCKETCAN.html index 88dcd792..4cdf49a6 100644 --- a/htmlsrc/linktypes/LINKTYPE_CAN_SOCKETCAN.html +++ b/htmlsrc/linktypes/LINKTYPE_CAN_SOCKETCAN.html @@ -189,13 +189,12 @@

Packet structure

Description

-Multi-byte integral-valued fields in this header are -little-endian, not big-endian as they are for fields in the classic CAN -and CAN FD header. +The Priority ID/VCID field is big-endian, but the payload length and +acceptance field are little-endian.

-The Prioritiy ID/VCID field is in little-endian byte order. +The Prioritiy ID/VCID field is in big-endian byte order. The bottom 11 bits contain the priority of the frame. The 5 bits above that are reserved. The 8 bits above that contain a virtual CAN network identifier (VCID). The 8 bits above that are reserved. @@ -225,7 +224,7 @@

Description

-The Acceptance Field is in network byte order (big-endian). +The Acceptance Field is in little-endian byte order.

diff --git a/linktypes/LINKTYPE_CAN_SOCKETCAN.html b/linktypes/LINKTYPE_CAN_SOCKETCAN.html index 19a43099..541bf1e9 100644 --- a/linktypes/LINKTYPE_CAN_SOCKETCAN.html +++ b/linktypes/LINKTYPE_CAN_SOCKETCAN.html @@ -233,13 +233,12 @@

Packet structure

Description

-Multi-byte integral-valued fields in this header are -little-endian, not big-endian as they are for fields in the classic CAN -and CAN FD header. +The Priority ID/VCID field is big-endian, but the payload length and +acceptance field are little-endian.

-The Prioritiy ID/VCID field is in little-endian byte order. +The Prioritiy ID/VCID field is in big-endian byte order. The bottom 11 bits contain the priority of the frame. The 5 bits above that are reserved. The 8 bits above that contain a virtual CAN network identifier (VCID). The 8 bits above that are reserved. @@ -269,7 +268,7 @@

Description

-The Acceptance Field is in network byte order (big-endian). +The Acceptance Field is in little-endian byte order.