On 24.01.2011 22:06, Daniele Venzano wrote:
> Let's say I have several sockets, one BCM and many RAW.
> I'm using the BCM one exclusively for the "timed send" feature, no RX
> configured or done.
> On the RAW sockets I listen for incoming messages, with some filters,
> different from socket to socket and changing over time. I configure the
> sockets with the "do not loopback" option, according to can.txt.
> 
> I have the loopback problem. What I send from the BCM socket, I receive
> on the RAW sockets. I do not want loopback (legacy application, several
> threads do different selects on different sockets and expect different
> messages).
> 
> First, is this the expected behaviour? What I send from BCM is read on
> RAW regardless of the loopback socket option?

Hi Daniele,

the BCM socket has no such socket-option to disable the loopback of sent
frames ...

But this is a valid feature request ;-)

I'll think about it and will send a patch then.

> 
> Second, it seems to me that in the bcm.c code there are some occurences of
> can_send(skb, 1). If I put there can_send(skb, 0), do I get the
> behaviour I want (no loopback on the RAW sockets)?

When you send frames via RAW sockets they are handled according the sockopts
of each used RAW socket. When you use the BCM to send the CAN frames the BCM
is hardcoded to perform the loopback (as you already found in the code).

So for your use-case this has to be changed in bcm.c - see above.

Regards,
Oliver
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to