Skip to content

Commit

Permalink
Boost the maximum snaplen for LINKTYPE_USBPCAP/DLT_USBPCAP.
Browse files Browse the repository at this point in the history
See the referenced Wireshark bug for a discussion.

Express all the maximum values in terms of MiB while we're at it.
  • Loading branch information
guyharris committed Aug 20, 2019
1 parent 3fedbf4 commit 2299015
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pcap-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1347,25 +1347,32 @@ linktype_to_dlt(int linktype)
*
* For most link-layer types, we use MAXIMUM_SNAPLEN.
*
* For DLT_DBUS, the maximum is 134217728, as per
* For DLT_DBUS, the maximum is 128MiB, as per
*
* https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages
*
* For DLT_EBHSCR, the maximum is 8MB, as per
* For DLT_EBHSCR, the maximum is 8MiB, as per
*
* https://www.elektrobit.com/ebhscr
*
* For DLT_USBPCAP, the maximum is 1MiB, as per
*
* https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15985
*/
u_int
max_snaplen_for_dlt(int dlt)
{
switch (dlt) {

case DLT_DBUS:
return 134217728;
return 128*1024*1024;

case DLT_EBHSCR:
return 8*1024*1024;

case DLT_USBPCAP:
return 1024*1024;

default:
return MAXIMUM_SNAPLEN;
}
Expand Down

0 comments on commit 2299015

Please sign in to comment.