SocketCAN's description says about adding some filters to a socket:
struct can_filter rfilter[2];
rfilter[0].can_id = 0x123;
rfilter[0].can_mask = CAN_SFF_MASK;
rfilter[1].can_id = 0x200;
rfilter[1].can_mask = 0x700;
setsockopt(s, SOL_CAN_RAW, CAN_RAW_FILTER, &rfilter, sizeof(rfilter));
But it doesn't say anything abou how to remove a specific filter if I have multiple ones on the same socket. Could someone please guess/explain this for me?
(Is this thing written down somewhere or I should gain a lot of general experience with linux sockets first before even touching SocketCAN?)