dissect_usb_hid_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
    usb_conv_info_t *usb_conv_info;
    usb_trans_info_t *usb_trans_info;
    guint8 type, recip;

    usb_conv_info = (usb_conv_info_t *)data;
    if (!usb_conv_info)
        return 0;
    usb_trans_info = usb_conv_info->usb_trans_info;
    if (!usb_trans_info)
        return 0;

    type = USB_TYPE(usb_trans_info->setup.requesttype);
    recip = USB_RECIPIENT(usb_trans_info->setup.requesttype);

    if (recip == RQT_SETUP_RECIPIENT_INTERFACE) {
        if (type == RQT_SETUP_TYPE_STANDARD)
            return dissect_usb_hid_control_std_intf(tvb, pinfo, tree, usb_conv_info);
        else if (type == RQT_SETUP_TYPE_CLASS)
            return dissect_usb_hid_control_class_intf(tvb, pinfo, tree, usb_conv_info);
    }

    return dissect_usb_hid_data(tvb, pinfo, tree, data);
}
dissect_usb_hid_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
    usb_conv_info_t *usb_conv_info;
    usb_trans_info_t *usb_trans_info;
    guint8 type, recip;

    usb_conv_info = (usb_conv_info_t *)data;
    if (!usb_conv_info)
        return 0;
    usb_trans_info = usb_conv_info->usb_trans_info;
    if (!usb_trans_info)
        return 0;

    type = USB_TYPE(usb_trans_info->setup.requesttype);
    recip = USB_RECIPIENT(usb_trans_info->setup.requesttype);

    if (recip == RQT_SETUP_RECIPIENT_INTERFACE) {
        if (type == RQT_SETUP_TYPE_STANDARD)
            return dissect_usb_hid_control_std_intf(tvb, pinfo, tree, usb_conv_info);
        else if (type == RQT_SETUP_TYPE_CLASS)
            return dissect_usb_hid_control_class_intf(tvb, pinfo, tree, usb_conv_info);
    }

    return dissect_usb_hid_data(tvb, pinfo, tree, data);
}