ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] USB Attached SCSI dissector

From: Aidan MacDonald <amachronic@xxxxxxxxxxxxxx>
Date: Sat, 23 Oct 2021 01:06:53 +0000
I'm starting to write a USB Attached SCSI dissector, since Wireshark seems to be lacking one. It's my first time contributing to Wireshark. I'm in the very early phases, I have it dissecting some UASP-specific descriptors and packet header fields but I'm not yet handing off any SCSI stuff.

I have two questions. First, is it fine to open a merge request early on and keep updating it as I add functionality? Or is it preferred to wait until it's more complete?

Second, the hooks provided by the generic USB dissector seemingly aren't a good fit. Basically, it seems to use only the interface class to decide what sub-dissector to call, but UASP uses the mass storage class like the existing Bulk-Only transport dissector. So that dissector is essentially sitting in the way and preventing me from hooking in UASP. (Or at least I think so. Currently I'm just commenting it out the conflicting hooks during testing.)

I need to look at the interface protocol to determine if the traffic is UASP or not. I think the simplest way to do this is adding a shim dissector for mass storage class which invokes either the BOT or UASP dissector depending on the interface protocol (if known). Does that sound like a good approach?

Thanks,
Aidan