Hi,

I played a little with various ways to manipulate tx/rxqueuesizes with 
SocketCAN.
I ended up with some questions:

1) Does setsockopt(... ,SOL_SOCKET, SO_SNDBUF, ....) have any impact on CAN_RAW 
sockets?
My result: no!

2) Does setsockopt(... ,SOL_SOCKET, SO_RCVBUF, ....) have any impact on CAN_RAW 
sockets?
Yes, that's also used by candump to prevent losing rx frames.

1+2 brings me to the conclusion that setsockopt(..., SO_RCVBUF, ...) configures 
receive
behavior and "ip link set can0 txqueuelen <whatever>" configures tx behavior. 
Did I miss 
anything?

3) Do we have a way to make write() on CAN_RAW sockets block when there is
no more buffer space? Typical behavior is returning ENOBUFS. I haven't tried to
use select() for sending. Does this work?

4) Do we have a way to flush the txqueue and block until all messages are on 
the bus?
fsync() does not seem to be the right choice.

5) Is there any special reason why read/write can only handle single messages?
Is it just because nobody asked? It should be possible with our
fixed size stuct can_frame. It could even speed thing up.

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

Reply via email to