diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2013-09-02 14:33:16 +0000 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2013-09-02 14:33:16 +0000 |
commit | 8ac76c0f198c446af440ffe051f29f2fd9776f54 (patch) | |
tree | bde5fc7ed263a4bf1d41bbe6d25588e2e34cb004 /epan/dissectors/packet-usb-hid.c | |
parent | 97985b6d54b7b51be7435a1f53fbff5919580492 (diff) |
descriptor type value string for HID
svn path=/trunk/; revision=51643
Diffstat (limited to 'epan/dissectors/packet-usb-hid.c')
-rw-r--r-- | epan/dissectors/packet-usb-hid.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/epan/dissectors/packet-usb-hid.c b/epan/dissectors/packet-usb-hid.c index 7330b56f45..3a9bef7321 100644 --- a/epan/dissectors/packet-usb-hid.c +++ b/epan/dissectors/packet-usb-hid.c @@ -118,6 +118,17 @@ struct usb_hid_global_state { unsigned int usage_page; }; + +/* HID class specific descriptor types */ +#define USB_DT_HID 33 +static const value_string hid_descriptor_type_vals[] = { + {USB_DT_HID, "HID"}, + {0,NULL} +}; +static value_string_ext hid_descriptor_type_vals_ext = + VALUE_STRING_EXT_INIT(hid_descriptor_type_vals); + + #define USBHID_SIZE_MASK 0x03 #define USBHID_TYPE_MASK 0x0C #define USBHID_TAG_MASK 0xF0 @@ -825,7 +836,8 @@ dissect_usb_hid_class_descriptors(tvbuff_t *tvb, packet_info *pinfo _U_, ti = proto_tree_add_text(tree, tvb, offset, -1, "HID DESCRIPTOR"); desc_tree = proto_item_add_subtree(ti, ett_usb_hid_descriptor); - dissect_usb_descriptor_header(desc_tree, tvb, offset, NULL); + dissect_usb_descriptor_header(desc_tree, tvb, offset, + &hid_descriptor_type_vals_ext); offset += 2; proto_tree_add_item(desc_tree, hf_usb_hid_bcdHID, tvb, offset, 2, ENC_LITTLE_ENDIAN); |