Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align with the new CAN frame structure for socketcan adding optional DLC element #1780

Open
rahagal opened this issue May 15, 2024 · 0 comments

Comments

@rahagal
Copy link

rahagal commented May 15, 2024

Is your feature request related to a problem? Please describe.

SocketCAN allows for passing an optional DLC element in its can_frame structure in addition to the length element, this allow accessing the raw DLC value that can be 0-15 (with 9-15 interpreted as 8 in classic CAN).
This feature is good for testing compliance with the ISO.
To enable this some changes are implemented in the Linux kernel and in can-utils.
You can see the change being introduced to can-utils in here: linux-can/can-utils@c398e56

Describe the solution you'd like

I would like to suggest an adaptation to the way CAN_FRAME_HEADER_STRUCT is being defined and un/packed.

Describe alternatives you've considered

I did not find a way to achieve this with the current implementation.

Additional context

See a patch used in a fork I've created that allowed me to achieve this capability.
socktcan_over8_dlc.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant