1511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall/*- 2965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 3511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * The Regents of the University of California. All rights reserved. 4511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * 5965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes * This code is derived from the Stanford/CMU enet packet filter, 6965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes * (net/enet.c) distributed as part of 4.3BSD, and code contributed 7965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence 8965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes * Berkeley Laboratory. 9965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes * 10511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * Redistribution and use in source and binary forms, with or without 11511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * modification, are permitted provided that the following conditions 12511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * are met: 13511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * 1. Redistributions of source code must retain the above copyright 14511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * notice, this list of conditions and the following disclaimer. 15511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * 2. Redistributions in binary form must reproduce the above copyright 16511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * notice, this list of conditions and the following disclaimer in the 17511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * documentation and/or other materials provided with the distribution. 18511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * 3. All advertising materials mentioning features or use of this software 19511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * must display the following acknowledgement: 20965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes * This product includes software developed by the University of 21965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes * California, Berkeley and its contributors. 22511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * 4. Neither the name of the University nor the names of its contributors 23511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * may be used to endorse or promote products derived from this software 24511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * without specific prior written permission. 25511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * 26511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 27511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 30511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall * SUCH DAMAGE. 37511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall */ 38511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall 39965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes#ifndef lib_pcap_can_socketcan_h 40965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes#define lib_pcap_can_socketcan_h 41511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall 42511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall/* 43965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes * SocketCAN header, as per Documentation/networking/can.txt in the 44965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes * Linux source. 45511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall */ 46965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughestypedef struct { 47965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes u_int32_t can_id; 48965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes u_int8_t payload_length; 49965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes u_int8_t pad; 50965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes u_int8_t reserved1; 51965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes u_int8_t reserved2; 52965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes} pcap_can_socketcan_hdr; 53511eca30a483e912c274e1d8ba3a0f8f081e2227JP Abgrall 54965a4b5291eead2d8f826d2c87e58a12bb56a214Elliott Hughes#endif 55