You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the support for AF_CAN sockets in x/sys/unix is not very useful, because kernel message filtering is not supported due to missing availability of the relevant sockopt. This sadly defeats the purpose of using go for CAN over other languages.
It also can not be worked around easily, as the unsafe setsockopt is only available in private. (Which is reasonable, but one needs unsafe to do ioctl SIOCGIFINDEX anyway when working with CAN sockets)
So I can see this being solved either with exposition of raw Setsockopt with unsafe pointers or introduction of a separate SetSockoptCanRawFilter function:
Currently the support for AF_CAN sockets in x/sys/unix is not very useful, because kernel message filtering is not supported due to missing availability of the relevant sockopt. This sadly defeats the purpose of using go for CAN over other languages.
It also can not be worked around easily, as the unsafe setsockopt is only available in private. (Which is reasonable, but one needs unsafe to do ioctl SIOCGIFINDEX anyway when working with CAN sockets)
This comment comment on the original Request for AF_CAN sockets hints at the issue.
So I can see this being solved either with exposition of raw Setsockopt with unsafe pointers or introduction of a separate SetSockoptCanRawFilter function:
Which could be used as follows:
The text was updated successfully, but these errors were encountered: