18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: ((GPL-2.0-only WITH Linux-syscall-note) OR BSD-3-Clause) */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * linux/can/raw.h
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Definitions for raw CAN sockets
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * Authors: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
88c2ecf20Sopenharmony_ci *          Urs Thuermann   <urs.thuermann@volkswagen.de>
98c2ecf20Sopenharmony_ci * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
108c2ecf20Sopenharmony_ci * All rights reserved.
118c2ecf20Sopenharmony_ci *
128c2ecf20Sopenharmony_ci * Redistribution and use in source and binary forms, with or without
138c2ecf20Sopenharmony_ci * modification, are permitted provided that the following conditions
148c2ecf20Sopenharmony_ci * are met:
158c2ecf20Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright
168c2ecf20Sopenharmony_ci *    notice, this list of conditions and the following disclaimer.
178c2ecf20Sopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright
188c2ecf20Sopenharmony_ci *    notice, this list of conditions and the following disclaimer in the
198c2ecf20Sopenharmony_ci *    documentation and/or other materials provided with the distribution.
208c2ecf20Sopenharmony_ci * 3. Neither the name of Volkswagen nor the names of its contributors
218c2ecf20Sopenharmony_ci *    may be used to endorse or promote products derived from this software
228c2ecf20Sopenharmony_ci *    without specific prior written permission.
238c2ecf20Sopenharmony_ci *
248c2ecf20Sopenharmony_ci * Alternatively, provided that this notice is retained in full, this
258c2ecf20Sopenharmony_ci * software may be distributed under the terms of the GNU General
268c2ecf20Sopenharmony_ci * Public License ("GPL") version 2, in which case the provisions of the
278c2ecf20Sopenharmony_ci * GPL apply INSTEAD OF those given above.
288c2ecf20Sopenharmony_ci *
298c2ecf20Sopenharmony_ci * The provided data structures and external interfaces from this code
308c2ecf20Sopenharmony_ci * are not restricted to be used by modules with a GPL compatible license.
318c2ecf20Sopenharmony_ci *
328c2ecf20Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
338c2ecf20Sopenharmony_ci * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
348c2ecf20Sopenharmony_ci * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
358c2ecf20Sopenharmony_ci * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
368c2ecf20Sopenharmony_ci * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
378c2ecf20Sopenharmony_ci * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
388c2ecf20Sopenharmony_ci * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
398c2ecf20Sopenharmony_ci * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
408c2ecf20Sopenharmony_ci * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
418c2ecf20Sopenharmony_ci * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
428c2ecf20Sopenharmony_ci * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
438c2ecf20Sopenharmony_ci * DAMAGE.
448c2ecf20Sopenharmony_ci */
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci#ifndef _UAPI_CAN_RAW_H
478c2ecf20Sopenharmony_ci#define _UAPI_CAN_RAW_H
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci#include <linux/can.h>
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci#define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW)
528c2ecf20Sopenharmony_cienum {
538c2ecf20Sopenharmony_ci	SCM_CAN_RAW_ERRQUEUE = 1,
548c2ecf20Sopenharmony_ci};
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci/* for socket options affecting the socket (not the global system) */
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_cienum {
598c2ecf20Sopenharmony_ci	CAN_RAW_FILTER = 1,	/* set 0 .. n can_filter(s)          */
608c2ecf20Sopenharmony_ci	CAN_RAW_ERR_FILTER,	/* set filter for error frames       */
618c2ecf20Sopenharmony_ci	CAN_RAW_LOOPBACK,	/* local loopback (default:on)       */
628c2ecf20Sopenharmony_ci	CAN_RAW_RECV_OWN_MSGS,	/* receive my own msgs (default:off) */
638c2ecf20Sopenharmony_ci	CAN_RAW_FD_FRAMES,	/* allow CAN FD frames (default:off) */
648c2ecf20Sopenharmony_ci	CAN_RAW_JOIN_FILTERS,	/* all filters must match to trigger */
658c2ecf20Sopenharmony_ci};
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci#endif /* !_UAPI_CAN_RAW_H */
68