aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/pcap-common.c
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-10-21 17:48:42 +0100
committerAidan MacDonald <amachronic@protonmail.com>2021-10-24 22:48:20 +0100
commit9c322f5b5590ee9e5bdf6408f6f4d3cf2d35d610 (patch)
tree09de850150075bf218b6bce1cd7620b805dd70e5 /wiretap/pcap-common.c
parent923ae6acca1a479435e95ed25f6fe1720029bc56 (diff)
Increase max packet size for all USB encapsulation formats
Each "packet" in the USB encapsulation formats for at least Linux and Darwin corresponds to an OS-level USB request, so the packets can be much larger than a USB-level packet. The default max packet length of 256 KiB prevents Wireshark from loading capture files that contain requests >256 KiB. (Saving such a capture already works fine.) Fix this by making the Linux, Darwin, and FreeBSD formats use the same max packet length as the USBPCap format, which is 128 MiB.
Diffstat (limited to 'wiretap/pcap-common.c')
-rw-r--r--wiretap/pcap-common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wiretap/pcap-common.c b/wiretap/pcap-common.c
index 045800e7ec..2f9a1dcfab 100644
--- a/wiretap/pcap-common.c
+++ b/wiretap/pcap-common.c
@@ -766,6 +766,10 @@ wtap_max_snaplen_for_encap(int wtap_encap)
return WTAP_MAX_PACKET_SIZE_EBHSCR;
case WTAP_ENCAP_USBPCAP:
+ case WTAP_ENCAP_USB_LINUX:
+ case WTAP_ENCAP_USB_LINUX_MMAPPED:
+ case WTAP_ENCAP_USB_DARWIN:
+ case WTAP_ENCAP_USB_FREEBSD:
return WTAP_MAX_PACKET_SIZE_USBPCAP;
default: