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

unix: add constants for raw CAN sockets #41091

Closed
skladd opened this issue Aug 28, 2020 · 1 comment
Closed

unix: add constants for raw CAN sockets #41091

skladd opened this issue Aug 28, 2020 · 1 comment

Comments

@skladd
Copy link

skladd commented Aug 28, 2020

Currently these constants like SOL_CAN_RAW and CAN_RAW_FILTER are not included, neither in zerrors_linux.go nor ztypes_linux.go.

Adding #include <linux/can/raw.h> to mkerrors.sh and linux/types.go as well as adding an enum to the latter would add 7 constants.
These constants are needed to set CAN filters to receive error message frames (see chapter 4.1.2 in SocketCAN documentation):

unix.SetsockoptInt(fd, unix.SOL_CAN_RAW, unix.CAN_RAW_ERR_FILTER, unix.CAN_ERR_MASK)

@gopherbot
Copy link

Change https://golang.org/cl/251357 mentions this issue: unix: add constants for raw CAN sockets

@golang golang locked and limited conversation to collaborators Aug 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants