+ int i,j,k;
+ ugdd->dwBytes = sizeof(struct usb_device_info);
+
+ for (i=0; i<usb_cable->descriptor.bNumConfigurations; i++)
+ {
+ struct usb_config_descriptor *conf_desc = &usb_cable->config[i];
+ ugdd->dwBytes+=sizeof(WDU_CONFIGURATION);
+ ugdd->dwBytes+=sizeof(WDU_INTERFACE) * conf_desc->bNumInterfaces;
+
+ for (j=0; j<conf_desc->bNumInterfaces; j++)
+ {
+ struct usb_interface *interface = &usb_cable->config[i].interface[j];
+ for(k=0; k<interface->num_altsetting; k++)
+ {
+ unsigned char bNumEndpoints;
+ bNumEndpoints = interface->altsetting[k].bNumEndpoints;
+ ugdd->dwBytes+=sizeof(WDU_ALTERNATE_SETTING);
+ ugdd->dwBytes+=(sizeof(WDU_ENDPOINT_DESCRIPTOR)+sizeof(WDU_PIPE_INFO))*bNumEndpoints;
+ }
+ }
+ }
+
+