/*
* Return the maximum snapshot length for a given DLT_ value.
*
- * For most link-layer types, we use MAXIMUM_SNAPLEN, but for DLT_DBUS,
- * the maximum is 134217728, as per
+ * For most link-layer types, we use MAXIMUM_SNAPLEN.
+ *
+ * For DLT_DBUS, the maximum is 134217728, as per
*
* https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages
+ *
+ * For DLT_EBHSCR, the maximum is 8MB, as per
+ *
+ * https://www.elektrobit.com/ebhscr
*/
u_int
max_snaplen_for_dlt(int dlt)
{
- if (dlt == DLT_DBUS)
+ switch (dlt) {
+
+ case DLT_DBUS:
return 134217728;
- else
+
+ case DLT_EBHSCR:
+ return 8*1024*1024;
+
+ default:
return MAXIMUM_SNAPLEN;
+ }
}
/*