Hello Oliver,

>>> My understanding of "self-reception" per-socket option is that the
>>> messages send over the specific socket are not only received by
>>> other sockets on the same HW, but also by the original socket (so
>>> "echo" may be even better name for that). And the reason why I
>>> want to receive (some of) my own Tx messages is because I want
>>> to know *exactly* when whose messages where physically send over
>>> CAN bus. And that I am getting by reading the timestamp of my
>>> self-received message. And the per-message self-receive flag helps
>>> me to distinguish between Rx messages (coming from other CAN nodes
>>> or other sockets on the same CAN node) and my own Tx messages.
>> 
>> Thanks for the update. Seems like my understanding was right.
>
> Ah, ok. So it's not to know, whether the CAN frame came from outside
> BUT to know, when my originated CAN frame from this socket touched 
> the bus.


Well yes, for me at the moment is important to know, when my own Tx
message has leaved the CAN controller. 

I can imagine however, that for some special applications (routing, 
bridging etc) it *may* be interesting to know, if message was from 
"outside" or just from another socket. If I understand the mechanism
right, using SO_MARK may allow to distinguish messages received from
other CAN node (massage has no SO_MARK), message from other sockets 
opened on the same HW as we are (message has corresponding SO_MARK 
from that other socket) and our own self-received messages (message
has our own SO_MARK).
Just an another idea: each process set SO_MARK option to its PID and 
candump shows the SO_MARK values in the output. Then you can 
immediately see in the log, if the message was originated from outside 
or from local process, knowing even from which specific process.


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

Reply via email to