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
I saw your comment to s177oke77 referenced here in regrades to how creating two filter jobs with inverted filters will always let something pass. However, creating positive filters for my application would be pretty big challenge. There is a lot of traffic coming over the can bus and I have a use case where I want to prevent can messages intended for two different devices to be filtered out.
My Question:
In candump land this is what I am trying to accomplish
In cangw land this is what I would hope to use, but it will always lets something pass:
cangw -A -s can0 -d can0New -e -f 91200000~DFE00000,82048000~FFFFF000
Is there an alternative way to write this expression? How would one go about filtering out multiple canIDs on a line where there positive canids (the ones we want to continue on their merry way) are not known/can change.
Happy Thanksgiving!
Thank You,
David
The text was updated successfully, but these errors were encountered:
dlackner
changed the title
Getting Around Multiple Inverted Filters
CANGW: Getting Around Multiple Inverted Filters
Nov 22, 2023
the cangw kernel module only supports ONE filter that may be inverse.
The can_raw sockets support MULTIPLE filters that can be passed to the kernel with the CAN_RAW_FILTER sockopt syscall.
The can_raw socket implements a tricky per_cpu mechanism ... torvalds/linux@514ac99 torvalds/linux@a5581ef
that might be implemented into gw.c to implement logic AND filters too.
But with the current implementation you need to express your filter requirements with (independent) multiple positive filters. So there is some hex filter calculating magic to do ...
Hello (I assume hartkopp)!
I saw your comment to s177oke77 referenced here in regrades to how creating two filter jobs with inverted filters will always let something pass. However, creating positive filters for my application would be pretty big challenge. There is a lot of traffic coming over the can bus and I have a use case where I want to prevent can messages intended for two different devices to be filtered out.
My Question:
In candump land this is what I am trying to accomplish
candump vcan3,91200000~DFE00000,82048000~DFFFF000,j
In cangw land this is what I would hope to use, but it will always lets something pass:
cangw -A -s can0 -d can0New -e -f 91200000~DFE00000,82048000~FFFFF000
Is there an alternative way to write this expression? How would one go about filtering out multiple canIDs on a line where there positive canids (the ones we want to continue on their merry way) are not known/can change.
Happy Thanksgiving!
Thank You,
David
The text was updated successfully, but these errors were encountered: