Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: ((GPL-2.0-only WITH Linux-syscall-note) OR BSD-3-Clause) */
0002 /*
0003  * linux/can/raw.h
0004  *
0005  * Definitions for raw CAN sockets
0006  *
0007  * Authors: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
0008  *          Urs Thuermann   <urs.thuermann@volkswagen.de>
0009  * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
0010  * All rights reserved.
0011  *
0012  * Redistribution and use in source and binary forms, with or without
0013  * modification, are permitted provided that the following conditions
0014  * are met:
0015  * 1. Redistributions of source code must retain the above copyright
0016  *    notice, this list of conditions and the following disclaimer.
0017  * 2. Redistributions in binary form must reproduce the above copyright
0018  *    notice, this list of conditions and the following disclaimer in the
0019  *    documentation and/or other materials provided with the distribution.
0020  * 3. Neither the name of Volkswagen nor the names of its contributors
0021  *    may be used to endorse or promote products derived from this software
0022  *    without specific prior written permission.
0023  *
0024  * Alternatively, provided that this notice is retained in full, this
0025  * software may be distributed under the terms of the GNU General
0026  * Public License ("GPL") version 2, in which case the provisions of the
0027  * GPL apply INSTEAD OF those given above.
0028  *
0029  * The provided data structures and external interfaces from this code
0030  * are not restricted to be used by modules with a GPL compatible license.
0031  *
0032  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0033  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0034  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
0035  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0036  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0037  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0038  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0039  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0040  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0041  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0042  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
0043  * DAMAGE.
0044  */
0045 
0046 #ifndef _UAPI_CAN_RAW_H
0047 #define _UAPI_CAN_RAW_H
0048 
0049 #include <linux/can.h>
0050 
0051 #define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW)
0052 enum {
0053     SCM_CAN_RAW_ERRQUEUE = 1,
0054 };
0055 
0056 /* for socket options affecting the socket (not the global system) */
0057 
0058 enum {
0059     CAN_RAW_FILTER = 1, /* set 0 .. n can_filter(s)          */
0060     CAN_RAW_ERR_FILTER, /* set filter for error frames       */
0061     CAN_RAW_LOOPBACK,   /* local loopback (default:on)       */
0062     CAN_RAW_RECV_OWN_MSGS,  /* receive my own msgs (default:off) */
0063     CAN_RAW_FD_FRAMES,  /* allow CAN FD frames (default:off) */
0064     CAN_RAW_JOIN_FILTERS,   /* all filters must match to trigger */
0065 };
0066 
0067 #endif /* !_UAPI_CAN_RAW_H */