diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-03-21 08:40:19 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-03-21 08:40:19 +0000 |
commit | b971f1b1a0f926cdcb0513d0c04a96e2dbbc3736 (patch) | |
tree | a137a9dc0636d9517129897539e5f447d0d35110 /epan/dissectors/packet-usb.h | |
parent | 254e20855820d26144f5575bb2171500c106bb4c (diff) |
From Steve Magnani:
USB: incorrect generated bInterfaceClass for composite device CONTROL transactions.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6964
svn path=/trunk/; revision=41715
Diffstat (limited to 'epan/dissectors/packet-usb.h')
-rw-r--r-- | epan/dissectors/packet-usb.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/epan/dissectors/packet-usb.h b/epan/dissectors/packet-usb.h index 90610614ed..a47c4a7d04 100644 --- a/epan/dissectors/packet-usb.h +++ b/epan/dissectors/packet-usb.h @@ -30,6 +30,11 @@ typedef struct _usb_address_t { } usb_address_t; #define USB_ADDR_LEN (sizeof(usb_address_t)) +/* Flag used to mark usb_address_t.endpoint as an interface + * address instead of the normal endpoint address. + */ +#define INTERFACE_PORT 0x80000000 + typedef struct _usb_conv_info_t usb_conv_info_t; @@ -38,8 +43,17 @@ typedef struct _usb_trans_info_t { guint32 request_in; guint32 response_in; nstime_t req_time; - guint8 requesttype; - guint8 request; + gboolean header_len_64; + + /* Valid only for SETUP transactions */ + struct _usb_setup { + guint8 requesttype; + guint8 request; + guint16 wValue; + guint16 wIndex; + } setup; + + /* Valid only during GET DESCRIPTOR transactions */ union { struct { guint8 type; @@ -53,6 +67,7 @@ typedef struct _usb_trans_info_t { * descriptors so that we can create a * conversation with the appropriate class * once we know the endpoint. + * Valid only during GET CONFIGURATION response. */ usb_conv_info_t *interface_info; } usb_trans_info_t; @@ -133,6 +148,8 @@ typedef struct _usb_tap_data_t { #define RQT_SETUP_TYPE_CLASS 1 #define RQT_SETUP_TYPE_VENDOR 2 +#define USB_RECIPIENT_MASK 0x1F +#define USB_RECIPIENT(type) ((type) & USB_RECIPIENT_MASK) #define RQT_SETUP_RECIPIENT_DEVICE 0 #define RQT_SETUP_RECIPIENT_INTERFACE 1 #define RQT_SETUP_RECIPIENT_ENDPOINT 2 |