Skip to content

Conversation

@samuelbrian
Copy link
Contributor

Hi,

I needed to filter received frames by CAN ID so I've added a WithFilterReceivedFramesByID() option for socketcan Dial.
Thought it might be more generally useful. Let me know what you think.

Sam


Provides received frame filtering by ID using the CAN_RAW_FILTER socket option on Linux
See https://docs.kernel.org/networking/can.html#raw-socket-option-can-raw-filter

This is useful when there are multiple devices on the CAN bus and you don't want to dedicate a goroutine to reading and throwing away frames from devices that you're not interested in just so the receive buffer doesn't fill up.

Provides received frame filtering by ID using the CAN_RAW_FILTER
socket option on Linux
See https://docs.kernel.org/networking/can.html#raw-socket-option-can-raw-filter

This is useful when there are multiple devices on the CAN bus and you
don't want to dedicate a goroutine to reading and throwing away frames
from devices that you're not interested in just so the receive buffer
doesn't fill up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant