VirtualBox

Changeset 60548 in vbox for trunk


Ignore:
Timestamp:
Apr 18, 2016 5:33:15 PM (9 years ago)
Author:
vboxsync
Message:

ValdiationKit/usb: Return bus and device ID for the created gadget to make it usable for device filters

Location:
trunk/src/VBox/ValidationKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/usb/usbgadget2.py

    r60522 r60548  
    12951295        self.sImpersonation = g_ksGadgetImpersonationInvalid;
    12961296        self.idGadget       = None;
     1297        self.iBusId         = None;
     1298        self.iDevId         = None;
    12971299        self.iUsbIpPort     = None;
    12981300
     
    13061308            fRc = self.oUtsSession.syncGadgetDestroy(self.idGadget);
    13071309            self.idGadget = None;
     1310            self.iBusId   = None;
     1311            self.iDevId   = None;
    13081312
    13091313        return fRc;
     
    13401344                fRc = True;
    13411345                self.idGadget = getU32(abPayload, 16);
     1346                self.iBusId   = getU32(abPayload, 20);
     1347                self.iDevId   = getU32(abPayload, 24);
    13421348        else:
    13431349            reporter.log('Invalid or unsupported impersonation');
     
    13511357        """
    13521358        return self.iUsbIpPort;
     1359
     1360    def getGadgetBusAndDevId(self):
     1361        """
     1362        Returns the bus ad device ID of the gadget as a tuple.
     1363        """
     1364        return (self.iBusId, self.iDevId);
    13531365
    13541366    def connectTo(self, cMsTimeout, sHostname, uPort = None, fUsbIpSupport = True, cMsIdleFudge = 0):
  • trunk/src/VBox/ValidationKit/utils/usb/UsbTestService.cpp

    r60522 r60548  
    703703
    704704        Rep.idGadget = 0;
     705        Rep.u32BusId = utsGadgetGetBusId(pClient->hGadget);
     706        Rep.u32DevId = utsGadgetGetDevId(pClient->hGadget);
    705707        rc = utsReplyInternal(pClient, &Rep.Sts, "ACK     ", sizeof(Rep) - sizeof(UTSPKTSTS));
    706708    }
  • trunk/src/VBox/ValidationKit/utils/usb/UsbTestServiceProtocol.h

    r60488 r60548  
    221221    /** The gadget ID on success. */
    222222    uint32_t        idGadget;
    223     /** Padding - reserved. */
    224     uint8_t         au8Padding[12];
     223    /** Bus ID the gadget is attached to */
     224    uint32_t        u32BusId;
     225    /** Device ID of the gadget on the bus. */
     226    uint32_t        u32DevId;
     227    /** Padding - reserved. */
     228    uint8_t         au8Padding[4];
    225229} UTSPKTREPGDGTCTOR;
    226230AssertCompileSizeAlignment(UTSPKTREPGDGTCTOR, UTSPKT_ALIGNMENT);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette