VirtualBox

Changeset 53062 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Oct 15, 2014 12:34:18 PM (10 years ago)
Author:
vboxsync
Message:

USB: Integrate USB sniffer. Make it possible to specify a file to dump the traffic to when attaching a USB device with VBoxManage

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp

    r52978 r53062  
    933933                break;
    934934            }
     935            else if (a->argc == 4 || a->argc > 5)
     936            {
     937                errorSyntax(USAGE_CONTROLVM, "Wrong number of arguments");
     938                rc = E_FAIL;
     939                break;
     940            }
    935941
    936942            bool attach = !strcmp(a->argv[1], "usbattach");
    937943
    938944            Bstr usbId = a->argv[2];
     945            Bstr captureFilename;
     946
     947            if (a->argc == 5)
     948            {
     949                if (!strcmp(a->argv[3], "--capturefile"))
     950                    captureFilename = a->argv[4];
     951                else
     952                {
     953                    errorArgument("Invalid parameter '%s'", a->argv[3]);
     954                    rc = E_FAIL;
     955                    break;
     956                }
     957            }
    939958
    940959            Guid guid(usbId);
     
    971990
    972991            if (attach)
    973                 CHECK_ERROR_BREAK(console, AttachUSBDevice(usbId.raw()));
     992                CHECK_ERROR_BREAK(console, AttachUSBDevice(usbId.raw(), captureFilename.raw()));
    974993            else
    975994            {
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r52312 r53062  
    372372                     "                            [--autostart-enabled on|off]\n"
    373373                     "                            [--autostart-delay <seconds>]\n"
    374 #if 0 /* Disabled until the feature is implemented. */
     374#if 0
    375375                     "                            [--autostop-type disabled|savestate|poweroff|\n"
    376376                     "                                             acpishutdown]\n"
     
    468468                     "                            natpf<1-N> delete <rulename> |\n"
    469469                     "                            guestmemoryballoon <balloonsize in MB> |\n"
    470                      "                            usbattach <uuid>|<address> |\n"
     470                     "                            usbattach <uuid>|<address>\n"
     471                     "                                      [--capturefile <filename>] |\n"
    471472                     "                            usbdetach <uuid>|<address> |\n"
    472473                     "                            clipboard disabled|hosttoguest|guesttohost|\n"
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r53046 r53062  
    16401640    {
    16411641        /* Try to attach corresponding device: */
    1642         console().AttachUSBDevice(target.id);
     1642        console().AttachUSBDevice(target.id, QString(""));
    16431643        /* Check if console is OK: */
    16441644        if (!console().isOk())
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