diff options
author | 2018-02-03 13:39:48 +0000 | |
---|---|---|
committer | 2018-02-03 13:39:48 +0000 | |
commit | d00b89925b5d36fa1ddffe5a820c033680c89f41 (patch) | |
tree | 5b9ad014b9a465178f4108b2fa522c6516315a48 /lib | |
parent | Add support for dumping USB transfers via bpf(4) using USBPcap headers. (diff) | |
download | wireguard-openbsd-d00b89925b5d36fa1ddffe5a820c033680c89f41.tar.xz wireguard-openbsd-d00b89925b5d36fa1ddffe5a820c033680c89f41.zip |
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.c | 4 | ||||
-rw-r--r-- | lib/libpcap/pcap.c | 3 |
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} }; |