Can anyone help me out how to use -r parameter in the candump utility?
-r (set socket receive buffer to size)
Wanted to verify: Configurable receive buffer feature.
I verified the above as follows:
In terminal 1: cansend can0 001#001122334455
-> sending 6 bytes of data
In terminal 2: candump can0 -r 4
-> but allocated the receiver buffer size as 4
Observed all the 6 bytes have been received: can0 001 [6] 00 11 22 33 44 55
-r
option usessetsockopt()
to configure the receive buffer. The socket optionSO_RCVBUF
describes the minimum value as 256 (socket manpage). \$\endgroup\$-r
option is used for the socket driver, not your application layer. If for instance the receive buffer of the socket is too small, you can increase it:candump -r 8192 can0
\$\endgroup\$