aboutsummaryrefslogtreecommitdiff
path: root/pcap-can-linux.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-08-25 13:26:43 -0700
committerGuy Harris <guy@alum.mit.edu>2016-08-25 13:26:43 -0700
commit93ca5ff7030aaf1219e1de05ec89a68384bfc50b (patch)
tree3db074cb78c17f25208875e0b9ea2e99691a8dd1 /pcap-can-linux.h
parent4c9aed03ed8c10215839a8fb845e8893790d0948 (diff)
On Linux, handle all CAN captures with pcap-linux.c, in cooked mode.
There's no need to support capturing on PF_CAN sockets; CAN interfaces show up as regular interfaces on which you can capture with PF_PACKET sockets, so just let pcap-linux.c handle them, and get rid of pcap-can-linux.c. Capture on them in cooked mode, so we get the protocol field and can distinguish between "classic" CAN and CAN FD. The hardware for which pcap-canusb-linux.c was intended never reached production: https://github.com/axos88/libpcap/commit/f3edbb599b8cbcc7e4560000dcba8e992dc11a31#commitcomment-18716617 so we don't need pcap-canusb-linux.c, either. This all removes the need for the "host-endian" link-layer header type; it never made it into a libpcap release, so we just remove it. The "big-endian" link-layer header type is kept for the benefit of packets captured with the old pcap-can-linux.c code; we revert it to its old name.
Diffstat (limited to 'pcap-can-linux.h')
-rw-r--r--pcap-can-linux.h36
1 files changed, 0 insertions, 36 deletions
diff --git a/pcap-can-linux.h b/pcap-can-linux.h
deleted file mode 100644
index fe806ff9..00000000
--- a/pcap-can-linux.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2009 Felix Obenhuber
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-/*
- * Prototypes for SocketCAN related functions
- */
-pcap_t* can_create(const char *device, char *ebuf, int *is_ours);
-int can_findalldevs(pcap_if_t **devlistp, char *errbuf);