diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2014-06-21 15:55:31 -0400 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2014-06-22 04:11:04 +0000 |
commit | 08bd0128ed786b95021b0e4e89838e8cf0742d74 (patch) | |
tree | d3b8e4385578d3e861442fa3e058eb064963c87e /epan | |
parent | 3e5e18f55aa69fdaa6621640e814440b99e53d19 (diff) |
minor cleanups
Change-Id: Ieaa0fa5cdbe8dc8f50cf5b9ee432c786a8f9fc9a
Reviewed-on: https://code.wireshark.org/review/2540
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-usb.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c index d433dabf18..84231555b8 100644 --- a/epan/dissectors/packet-usb.c +++ b/epan/dissectors/packet-usb.c @@ -3020,6 +3020,7 @@ dissect_linux_usb_iso_transfer(packet_info *pinfo _U_, proto_tree *urb_tree, tii = proto_tree_add_uint(urb_tree, hf_usb_bInterfaceClass, tvb, offset, 0, usb_conv_info->interfaceClass); PROTO_ITEM_SET_GENERATED(tii); + /* All fields which belong to Linux usbmon headers are in host-endian * byte order. The fields coming from the USB communication are in little * endian format (see usb_20.pdf, chapter 8.1 Byte/Bit ordering). @@ -3061,10 +3062,6 @@ dissect_linux_usb_iso_transfer(packet_info *pinfo _U_, proto_tree *urb_tree, offset += 4; } - /* - * If this has a 64-byte header, process the extra 16 bytes of - * pseudo-header information. - */ if (header_info & USB_HEADER_IS_64_BYTES) offset = dissect_linux_usb_pseudo_header_ext(tvb, offset, pinfo, urb_tree); @@ -3194,17 +3191,13 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, PROTO_ITEM_SET_GENERATED(item); if (header_info & USB_HEADER_IS_LINUX) { - /* Skip setup/isochronous header - it's not applicable */ + /* bulk and interrupt transfers never contain a setup packet + XXX - bring up an expert info if usb_conv_info->is_setup==TRUE? */ proto_tree_add_item(tree, hf_usb_urb_unused_setup_header, tvb, offset, 8, ENC_NA); offset += 8; - } - /* - * If this has a 64-byte header, process the extra 16 bytes of - * pseudo-header information. - */ - if (header_info & USB_HEADER_IS_64_BYTES) { - offset = dissect_linux_usb_pseudo_header_ext(tvb, offset, pinfo, tree); + if (header_info & USB_HEADER_IS_64_BYTES) + offset = dissect_linux_usb_pseudo_header_ext(tvb, offset, pinfo, tree); } break; |