This file contains
- 1 RAW protocol sockets with can_filters (SOCK_RAW)
- 1.1 RAW socket option CAN_RAW_FILTER
- 1.2 RAW socket option CAN_RAW_ERR_FILTER
- 1.3 RAW socket option CAN_RAW_LOOPBACK
- 1.4 RAW socket option CAN_RAW_RECV_OWN_MSGS
- 1.5 RAW socket returned message flags
+ R. RAW protocol sockets with can_filters (SOCK_RAW)
+ R.1 RAW socket option CAN_RAW_FILTER
+ R.2 RAW socket option CAN_RAW_ERR_FILTER
+ R.3 RAW socket option CAN_RAW_LOOPBACK
+ R.4 RAW socket option CAN_RAW_RECV_OWN_MSGS
+ R.5 RAW socket returned message flags
============================================================================
-1. RAW protocol sockets with can_filters (SOCK_RAW)
+R. RAW protocol sockets with can_filters (SOCK_RAW)
---------------------------------------------------
Using CAN_RAW sockets is extensively comparable to the commonly
To use the referenced definitions of the socket options for CAN_RAW
sockets, include <linux/can/raw.h>.
- 1.1 RAW socket option CAN_RAW_FILTER
+ R.1 RAW socket option CAN_RAW_FILTER
The reception of CAN frames using CAN_RAW sockets can be controlled
by defining 0 .. n filters with the CAN_RAW_FILTER socket option.
having this 'send only' use-case we may remove the receive list in the
Kernel to save a little (really a very little!) CPU usage.
- 1.2 RAW socket option CAN_RAW_ERR_FILTER
+ R.2 RAW socket option CAN_RAW_ERR_FILTER
As described in overview.txt (chapter 3.4) the CAN interface driver
can generate so called Error Frames that can optionally be passed
setsockopt(s, SOL_CAN_RAW, CAN_RAW_ERR_FILTER,
&err_mask, sizeof(err_mask));
- 1.3 RAW socket option CAN_RAW_LOOPBACK
+ R.3 RAW socket option CAN_RAW_LOOPBACK
To meet multi user needs the local loopback is enabled by default
(see overview.txt, chapter 3.2, for details). But in some embedded
setsockopt(s, SOL_CAN_RAW, CAN_RAW_LOOPBACK, &loopback, sizeof(loopback));
- 1.4 RAW socket option CAN_RAW_RECV_OWN_MSGS
+ R.4 RAW socket option CAN_RAW_RECV_OWN_MSGS
When the local loopback is enabled, all the sent CAN frames are
looped back to the open CAN sockets that registered for the CAN
setsockopt(s, SOL_CAN_RAW, CAN_RAW_RECV_OWN_MSGS,
&recv_own_msgs, sizeof(recv_own_msgs));
- 1.5 RAW socket returned message flags
+ R.5 RAW socket returned message flags
When using recvmsg() call, the msg->msg_flags may contain following flags: