File tree Expand file tree Collapse file tree 4 files changed +808
-0
lines changed Expand file tree Collapse file tree 4 files changed +808
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * linux/can/raw.h
3+ *
4+ * Definitions for raw CAN sockets
5+ *
6+ * Authors: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
7+ * Urs Thuermann <urs.thuermann@volkswagen.de>
8+ * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
9+ * All rights reserved.
10+ *
11+ * Send feedback to <socketcan-users@lists.berlios.de>
12+ *
13+ */
14+
15+ #ifndef CAN_RAW_H
16+ #define CAN_RAW_H
17+
18+ #include <linux/can.h>
19+
20+ #define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW)
21+
22+ /* for socket options affecting the socket (not the global system) */
23+
24+ enum {
25+ CAN_RAW_FILTER = 1 , /* set 0 .. n can_filter(s) */
26+ CAN_RAW_ERR_FILTER , /* set filter for error frames */
27+ CAN_RAW_LOOPBACK , /* local loopback (default:on) */
28+ CAN_RAW_RECV_OWN_MSGS /* receive my own msgs (default:off) */
29+ };
30+
31+ #endif
Original file line number Diff line number Diff line change @@ -15,3 +15,14 @@ menuconfig CAN
1515
1616 If you want CAN support you should say Y here and also to the
1717 specific driver for your controller(s) below.
18+
19+ config CAN_RAW
20+ tristate "Raw CAN Protocol (raw access with CAN-ID filtering)"
21+ depends on CAN
22+ default N
23+ ---help---
24+ The raw CAN protocol option offers access to the CAN bus via
25+ the BSD socket API. You probably want to use the raw socket in
26+ most cases where no higher level protocol is being used. The raw
27+ socket has several filter options e.g. ID masking / error frames.
28+ To receive/send raw CAN messages, use AF_CAN with protocol CAN_RAW.
Original file line number Diff line number Diff line change 44
55obj-$(CONFIG_CAN) += can.o
66can-objs := af_can.o proc.o
7+
8+ obj-$(CONFIG_CAN_RAW) += can-raw.o
9+ can-raw-objs := raw.o
You can’t perform that action at this time.
0 commit comments