mirror of
https://github.com/linux-can/can-utils.git
synced 2026-11-04 07:21:13 +01:00
The isobusfs protocol structures describe the message layout defined in ISO 11783-13 but were not packed. The compiler added padding bytes in front of 16/32 bit values which follow an odd number of bytes, e.g. the Read File Request (8 bytes according to C.3.5.2) had a size of 10 bytes and the count value at the wrong position. Server and client of the can-utils used the same structures and understood each other but the messages were not compatible to other ISOBUS devices. Additionally the padding bytes sent uninitialized content. Add __attribute__((__packed__)) to all protocol structures as it is already done in j1939_vehicle_position. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>