summary refs log tree commit diff stats
path: root/include/hw/usb.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-01-23 14:40:45 +0000
committerPeter Maydell <peter.maydell@linaro.org>2021-01-23 14:40:45 +0000
commite93c65a6c64fa18b0c61fb9338d364cbea32b6ef (patch)
tree5f1c30bca7461c74fdb80ae941adae550aea8d1b /include/hw/usb.h
parent0e32462630687a18039464511bd0447ada5709c3 (diff)
parent2980a316734c420e7398aec026909dcfc8614c1d (diff)
downloadfocaccia-qemu-e93c65a6c64fa18b0c61fb9338d364cbea32b6ef.tar.gz
focaccia-qemu-e93c65a6c64fa18b0c61fb9338d364cbea32b6ef.zip
Merge remote-tracking branch 'remotes/kraxel/tags/usb-20210122-pull-request' into staging
usb: cleanups and fixes.
usb: add pcap support.

# gpg: Signature made Fri 22 Jan 2021 17:48:35 GMT
# gpg:                using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/usb-20210122-pull-request:
  usb-host: map LIBUSB_SPEED_SUPER_PLUS to USB_SPEED_SUPER
  usb: add pcap support.
  hw/usb/dev-uas: Report command additional adb length as unsupported
  scsi/utils: Add INVALID_PARAM_VALUE sense code definition
  hw/usb/hcd-xhci: Fix extraneous format-truncation error on 32-bit hosts
  hw/usb: Convert to qdev_realize()
  hw/usb: Fix bad printf format specifiers
  hw/usb/host-libusb.c: fix build with kernel < 5.0

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/usb.h')
-rw-r--r--include/hw/usb.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/hw/usb.h b/include/hw/usb.h
index a70a72e917..abfbfc5284 100644
--- a/include/hw/usb.h
+++ b/include/hw/usb.h
@@ -231,6 +231,9 @@ struct USBDevice {
     void *opaque;
     uint32_t flags;
 
+    char *pcap_filename;
+    FILE *pcap;
+
     /* Actual connected speed */
     int speed;
     /* Supported speeds, not in info because it may be variable (hostdevs) */
@@ -570,4 +573,9 @@ int usb_get_quirks(uint16_t vendor_id, uint16_t product_id,
                    uint8_t interface_class, uint8_t interface_subclass,
                    uint8_t interface_protocol);
 
+/* pcap.c */
+void usb_pcap_init(FILE *fp);
+void usb_pcap_ctrl(USBPacket *p, bool setup);
+void usb_pcap_data(USBPacket *p, bool setup);
+
 #endif