diff options
author | Tomasz Moń <desowin@gmail.com> | 2022-05-31 06:24:25 +0200 |
---|---|---|
committer | Tomasz Moń <desowin@gmail.com> | 2022-06-29 05:56:03 +0200 |
commit | 88c8bb19e54a9b35f1079bfadd455f03a86bb21b (patch) | |
tree | 4adb1dddc24c25d5b490fd45c75c20bca8ae1949 /wiretap | |
parent | d41127602ae6213bea6909c47fa8734cb4bd8213 (diff) |
USBLL: Dissect speed specific linktypes
USB 2.0/1.1/1.0 devices (or 3.x and newer when connected to hosts that
are not Super-Speed capable) operate at one of three speeds:
* Low-Speed (1.5 Mbps)
* Full-Speed (12 Mbps)
* High-Speed (480 Mbps)
Supporting speed specific linktypes allows speed specific dissection
without the need for user to manually set the speed.
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/pcap-common.c | 5 | ||||
-rw-r--r-- | wiretap/wtap.c | 8 | ||||
-rw-r--r-- | wiretap/wtap.h | 3 |
3 files changed, 16 insertions, 0 deletions
diff --git a/wiretap/pcap-common.c b/wiretap/pcap-common.c index 5e23fe5dc0..773da52068 100644 --- a/wiretap/pcap-common.c +++ b/wiretap/pcap-common.c @@ -488,6 +488,11 @@ static const struct { /* Serial NCP (Network Co-Processor) protocol for Zigbee stack ZBOSS */ { 292, WTAP_ENCAP_ZBNCP }, + /* USB 2.0/1.1/1.0 packets captured on Low/Full/High speed link */ + { 293, WTAP_ENCAP_USB_2_0_LOW_SPEED }, + { 294, WTAP_ENCAP_USB_2_0_FULL_SPEED }, + { 295, WTAP_ENCAP_USB_2_0_HIGH_SPEED }, + /* * To repeat: * diff --git a/wiretap/wtap.c b/wiretap/wtap.c index 847bbd54ab..7063dee683 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -1180,6 +1180,14 @@ static struct encap_type_info encap_table_base[] = { /* WTAP_ENCAP_ZBNCP */ { "zbncp", "ZBOSS NCP" }, + /* WTAP_ENCAP_USB_2_0_LOW_SPEED */ + { "usb-20-low", "Low-Speed USB 2.0/1.1/1.0 packets" }, + + /* WTAP_ENCAP_USB_2_0_FULL_SPEED */ + { "usb-20-full", "Full-Speed USB 2.0/1.1/1.0 packets" }, + + /* WTAP_ENCAP_USB_2_0_HIGH_SPEED */ + { "usb-20-high", "High-Speed USB 2.0 packets" }, }; WS_DLL_LOCAL diff --git a/wiretap/wtap.h b/wiretap/wtap.h index 162f8b7228..c20cccf548 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -290,6 +290,9 @@ extern "C" { #define WTAP_ENCAP_ETW 212 #define WTAP_ENCAP_ERI_ENB_LOG 213 #define WTAP_ENCAP_ZBNCP 214 +#define WTAP_ENCAP_USB_2_0_LOW_SPEED 215 +#define WTAP_ENCAP_USB_2_0_FULL_SPEED 216 +#define WTAP_ENCAP_USB_2_0_HIGH_SPEED 217 /* After adding new item here, please also add new item to encap_table_base array */ |