https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4664
Summary: USB URB hex bytes not shown in "packet bytes" pane.
Product: Wireshark
Version: SVN
Platform: All
URL: http://www.wireshark.org/lists/wireshark-dev/201004/ms
g00048.html
OS/Version: All
Status: NEW
Severity: Normal
Priority: Medium
Component: Wireshark
AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
ReportedBy: christopher.maynard@xxxxxxxxx
Chris Maynard <christopher.maynard@xxxxxxxxx> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #4516| |review_for_checkin?
Flag| |
Created an attachment (id=4516)
--> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=4516)
Patch to allow Linux USB pseudo header hex bytes to be shown.
Build Information:
SVN 32452
--
For WTAP_ENCAP_USB_LINUX and WTAP_ENCAP_USB_LINUX_MMAPPED encapsulations, the
USB URB hex bytes are not shown in the "packet bytes" pane.
After a brief discussion about this between Guy Harris and myself on the
wireshark developers mailing list, I investigated the cause, made some code
modifications and opened this bug report to submit my proposed changes.
Hopefully they are agreeable. Here is a summary of the changes I made,
contained in the attached patch:
epan/dissectors/packet-usb.c:
-> Added all language ID's from
-> http://www.usb.org/developers/docs/USB_LANGIDs.pdf
-> Use the new USB_TYPE() macro for clarity Now displays the pseudo
-> header and setup data (if relevant).
-> Make use of "sizeof()" throughout instead of using hardcoded values for the
sizes of structs.
-> Added the 2 missing sec and usec fields.
-> Protect against setup_flag possibly containing a non-printable character.
-> Minor white-space cleanup.
epan/dissectors/packet-usb.h:
-> Added USB_TYPE() macro for clarity and to hide the bitshifting like the
USB_TYPE_MASK does.
wiretap/pcap-common.c:
-> In pcap_read_linux_usb_pseudoheader(), after reading the pseudo header, back
up using file_seek() so we're positioned at it again.
-> In pcap_process_pseudo_header(), for both WTAP_ENCAP_USB_LINUX and
WTAP_ENCAP_USB_LINUX_MMAPPED, return 0 for phdr_len instead of sizeof(struct
linux_usb_phdr).
wiretap/wtap.h:
-> Added link to USB documentation:
-> http://www.usb.org/developers/docs/usb_20_122909-2.zip
-> Added a new error, WTAP_ERR_CANT_SEEK.
Attaching a couple of "before" and "after" snapshots as well. "Before" was
based on 1.2.6 and "after" was based on SVN 32452 plus the attached patch.
Notable differences:
-> Pseudo header bytes not shown in "before" but are shown in "after"
-> URB sec and usec fields not shown in "before" but are shown in "after"
-> URB setup incorrectly shown in "before" but correctly shown in "after"
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.