On 10/21/2010 03:30 PM, Felix Obenhuber wrote: > Hi, > > When I set two filter as in the example from can.txt: > > 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)); > > During message reception, I'd like to retrieve the indexes of the filters > that match the received frame. Is that possible? > Otherwise I've got to check in userspace...
I don't think that's possible, but you can open a second socket and apply a different filter on each socket. cheers, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Socketcan-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-users
