/* These dissectors are used to dissect the setup part and the data for URB_CONTROL_INPUT / GET DESCRIPTOR  */
proto_item* dissect_usb_descriptor_header(proto_tree *tree, tvbuff_t *tvb, int offset, value_string_ext *type_val_str)
/* These dissectors are used to dissect the setup part and the data for URB_CONTROL_INPUT / GET DESCRIPTOR  */
proto_item* dissect_usb_descriptor_header(proto_tree *tree, tvbuff_t *tvb, int offset, value_string_ext *type_val_str)
{
    guint8      desc_type;
    proto_item *length_item;
    proto_item *type_item;
    length_item = proto_tree_add_item(tree, hf_usb_bLength,
          tvb, offset, 1,  ENC_LITTLE_ENDIAN);
    offset++;
    desc_type = tvb_get_guint8(tvb, offset);
    type_item = proto_tree_add_item(tree, hf_usb_bDescriptorType,
          tvb, offset, 1, ENC_LITTLE_ENDIAN);
    if (!type_val_str)
          type_val_str = &std_descriptor_type_vals_ext;
    proto_item_append_text(type_item, " (%s)",
             val_to_str_ext(desc_type, type_val_str, "unknown"));
    return length_item;
}