On Sat, Jan 29, 2011 at 09:06:43PM +0100, Oliver Hartkopp wrote: > But coming back to your original request. > > AFAICS your major problem is to distinguish whether a specific CAN ID was > received from the 'real' CAN bus. > > Since 2.6.37 some new flags can be read via recvmsg(), see: > > http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.37.y.git;a=commitdiff;h=1e55659ce6ddb5247cee0b1f720d77a799902b85 > > The patch from this commit applies to older kernels very well also. > > So maybe it's the best to use the defaults (with loopback enabled), so that > you can see the correct traffic on your Linux host, when running candump, etc. > > And if you need to check whether the received CAN traffic comes from outside > your host, you can look at the message flags retrieved by recvmsg(). > > Would that help to meet your requirements?
Yes, if we can backport the patch, then we could use the standard loopback behaviour with a few more lines of code in our application library. Thanks, Daniele -- Daniele Venzano http://www.brownhat.org _______________________________________________ Socketcan-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-users
