On Mon, Oct 11, 2010 at 01:23:09PM +0200, Oliver Hartkopp wrote:
> On 11.10.2010 11:35, Kurt Van Dijck wrote:
> > Hi,
> > 
> > On Mon, Oct 11, 2010 at 11:01:56AM +0200, [email protected] wrote:
> >>
> >> Hello all,
> >> I would like to bring up the self-reception theme again.

> +                             if (msg.msg_flags & MSG_DONTROUTE)
> +                                     printf(" D %08X", msg.msg_flags);
+                                       printf(" L %08X", msg.msg_flags);
'L' from 'Local' ?
> +                             else
> +                                     printf(" - %08X", msg.msg_flags);
> +
>                               printf("\n");
>                       }
> 
> 
> > 
> > The idea behind socketCAN is that the CAN bus is virtually
> > extended through the linux system. (1) would deny this nature,
> > since _not_ all CAN chips/socketCAN apps are treated equal.
> > IMO, to support a 'self-reception' flag, you need a combination
> > of (1) & (3):
> > * a flag to userspace to indicate a received message was
> >   'self-reception'
> > * set the above flag (in raw.c or elsewhere) to indicate the sk_buff->sk
> >   matches the receiving socket.
> > 
> > To userspace, this differs not compared to (1), but I think
> > it respects the nature of socketCAN at kernel level.
> > 
> > Not sure if I expressed my idea clear :-)
I guess not :-)
> > 
> > How this would cooperate with the SO_RECV_OWN_MSGS option is unclear to me.
> 
> This is independent as when CAN frames come from outer world, they are not
> originated by this socket.
> 
I think I do not precisely understand what is needed in order to solve
the initial problem.

IMO, a CAN frame from another socket should be treated as coming from another
bus node.
I know (J1939 is still in the queue) that some protocols may benefit from
several sockets cooperating, but should that be exported to userspace?

Kurt
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to