summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2018-02-03 13:39:49 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2018-02-03 13:39:49 +0000
commit2152210f4fda57812f2a534e1e227dbc4cd64301 (patch)
tree2613b4a9bc5bb7fb2e9e452843f4b8c2ec3d007b /lib
parent8805f2fa766becf4dbfef99c216b1b1d57056023 (diff)
Simple USBPcap parser for tcpdump(8). Raw dumps can be nicely analysed
in wireshark. ok deraadt@, dlg@
Diffstat (limited to 'lib')
-rw-r--r--lib/libpcap/gencode.c4
-rw-r--r--lib/libpcap/pcap.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/libpcap/gencode.c b/lib/libpcap/gencode.c
index fcc3ebf7b92..fed5811dd24 100644
--- a/lib/libpcap/gencode.c
+++ b/lib/libpcap/gencode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gencode.c,v 1.46 2016/11/20 12:45:26 reyk Exp $ */
+/* $OpenBSD: gencode.c,v 1.47 2018/02/03 13:39:48 mpi Exp $ */
/*
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
@@ -787,6 +787,8 @@ init_linktype(type)
off_nl = 12;
return;
+ case DLT_USBPCAP:
+ /* FALLTHROUGH */
case DLT_RAW:
off_linktype = -1;
off_nl = 0;
diff --git a/lib/libpcap/pcap.c b/lib/libpcap/pcap.c
index 41bda730f4d..fe6f4b88a19 100644
--- a/lib/libpcap/pcap.c
+++ b/lib/libpcap/pcap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcap.c,v 1.20 2016/11/16 13:47:27 reyk Exp $ */
+/* $OpenBSD: pcap.c,v 1.21 2018/02/03 13:39:48 mpi Exp $ */
/*
* Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998
@@ -326,6 +326,7 @@ DLT_CHOICE(DLT_IEEE802_11, "IEEE 802.11 wireless"),
DLT_CHOICE(DLT_PFLOG, "Packet filter logging, by pcap people"),
DLT_CHOICE(DLT_IEEE802_11_RADIO, "IEEE 802.11 plus WLAN header"),
DLT_CHOICE(DLT_OPENFLOW, "OpenFlow"),
+DLT_CHOICE(DLT_USBPCAP, "USB"),
#undef DLT_CHOICE
{ NULL, NULL, -1}
};