https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15842

--- Comment #1 from Tomasz Mon <deso...@gmail.com> ---
Actually, the reassemble idea is probably the way to go. That is, leave USBPcap
intact and instead solve the issue compeltely in Wireshark.

That is, the USB dissector when dissecting USBPcap pseudoheader would:
1. If the SETUP indicates from Device to Host direction, then pass the data to
subdissectors as it is now
2. If the SETUP indicates from Host to Device direction (and wLength > 0), then
only dissect the 8 setup data bytes using generic terms (bmRequestType,
bRequest, wValue, wIndex, wLength) and mark the packet for reassembly.
3. When OUT DATA packet is seen, reassemble it with the SETUP packet, and pass
combined SETUP + Data OUT for full dissection
4. Handle IN DATA and Status as is.

While it might seem complicated, if we are going to get hardware USB sniffer
dissection at some point, we would have to do even more reassembly in such case
(Data is split in 8/1023/1024 bytes chunks for Low/Full/High speed).

The convention of "SETUP + OUT DATA" and "IN DATA" for subdissectors is pretty
much the only sensible solution. Subdissector should not really have to care of
the underlying pcap format, only about the actual meaning of data. By combining
the "SETUP + OUT DATA" the subdissectors avoid unnecessary complexity (to know
the meaning of DATA you have to know the matching SETUP).

-- 
You are receiving this mail because:
You are watching all bug changes.
___________________________________________________________________________
Sent via:    Wireshark-bugs mailing list <wireshark-bugs@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-bugs
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs
             mailto:wireshark-bugs-requ...@wireshark.org?subject=unsubscribe

Reply via email to