summaryrefslogtreecommitdiff
path: root/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp')
-rw-r--r--src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp320
1 files changed, 206 insertions, 114 deletions
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
index 6c28c3b5..cc3ab446 100644
--- a/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
+++ b/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
@@ -4,7 +4,7 @@
*/
/*
- * Copyright (C) 2006-2012 Oracle Corporation
+ * Copyright (C) 2006-2014 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -46,7 +46,7 @@ void showLogo(PRTSTREAM pStrm)
}
}
-void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
+void printUsage(USAGECATEGORY fCategory, uint32_t fSubCategory, PRTSTREAM pStrm)
{
bool fDumpOpts = false;
#ifdef RT_OS_LINUX
@@ -80,7 +80,7 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
bool fVBoxSDL = false;
#endif
- if (u64Cmd == USAGE_DUMPOPTS)
+ if (fCategory == USAGE_DUMPOPTS)
{
fDumpOpts = true;
fLinux = true;
@@ -89,14 +89,14 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
fFreeBSD = true;
fDarwin = true;
fVBoxSDL = true;
- u64Cmd = USAGE_ALL;
+ fCategory = USAGE_ALL;
}
RTStrmPrintf(pStrm,
"Usage:\n"
"\n");
- if (u64Cmd == USAGE_ALL)
+ if (fCategory == USAGE_ALL)
RTStrmPrintf(pStrm,
" VBoxManage [<general option>] <command>\n"
" \n \n"
@@ -110,7 +110,7 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
const char *pcszSep1 = " ";
const char *pcszSep2 = " ";
- if (u64Cmd != USAGE_ALL)
+ if (fCategory != USAGE_ALL)
{
pcszSep1 = "VBoxManage";
pcszSep2 = "";
@@ -118,37 +118,37 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
#define SEP pcszSep1, pcszSep2
- if (u64Cmd & USAGE_LIST)
+ if (fCategory & USAGE_LIST)
RTStrmPrintf(pStrm,
"%s list [--long|-l]%s vms|runningvms|ostypes|hostdvds|hostfloppies|\n"
#if defined(VBOX_WITH_NETFLT)
- " bridgedifs|hostonlyifs|dhcpservers|hostinfo|\n"
+ " intnets|bridgedifs|hostonlyifs|natnets|dhcpservers|\n"
#else
- " bridgedifs|dhcpservers|hostinfo|\n"
+ " intnets|bridgedifs|natnets|dhcpservers|hostinfo|\n"
#endif
- " hostcpuids|hddbackends|hdds|dvds|floppies|\n"
+ " hostinfo|hostcpuids|hddbackends|hdds|dvds|floppies|\n"
" usbhost|usbfilters|systemproperties|extpacks|\n"
- " groups\n"
+ " groups|webcams\n"
"\n", SEP);
- if (u64Cmd & USAGE_SHOWVMINFO)
+ if (fCategory & USAGE_SHOWVMINFO)
RTStrmPrintf(pStrm,
- "%s showvminfo %s <uuid>|<name> [--details]\n"
+ "%s showvminfo %s <uuid|vmname> [--details]\n"
" [--machinereadable]\n"
- "%s showvminfo %s <uuid>|<name> --log <idx>\n"
+ "%s showvminfo %s <uuid|vmname> --log <idx>\n"
"\n", SEP, SEP);
- if (u64Cmd & USAGE_REGISTERVM)
+ if (fCategory & USAGE_REGISTERVM)
RTStrmPrintf(pStrm,
"%s registervm %s <filename>\n"
"\n", SEP);
- if (u64Cmd & USAGE_UNREGISTERVM)
+ if (fCategory & USAGE_UNREGISTERVM)
RTStrmPrintf(pStrm,
- "%s unregistervm %s <uuid>|<name> [--delete]\n"
+ "%s unregistervm %s <uuid|vmname> [--delete]\n"
"\n", SEP);
- if (u64Cmd & USAGE_CREATEVM)
+ if (fCategory & USAGE_CREATEVM)
RTStrmPrintf(pStrm,
"%s createvm %s --name <name>\n"
" [--groups <group>, ...]\n"
@@ -158,13 +158,14 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" [--uuid <uuid>]\n"
"\n", SEP);
- if (u64Cmd & USAGE_MODIFYVM)
+ if (fCategory & USAGE_MODIFYVM)
{
RTStrmPrintf(pStrm,
- "%s modifyvm %s <uuid|name>\n"
+ "%s modifyvm %s <uuid|vmname>\n"
" [--name <name>]\n"
" [--groups <group>, ...]\n"
" [--ostype <ostype>]\n"
+ " [--iconfile <filename>]\n"
" [--memory <memorysize in MB>]\n"
" [--pagefusion on|off]\n"
" [--vram <vramsize in MB>]\n"
@@ -175,13 +176,15 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" [--pcidetach 03:04.0]\n"
#endif
" [--ioapic on|off]\n"
- " [--pae on|off]\n"
" [--hpet on|off]\n"
+ " [--triplefaultreset on|off]\n"
" [--hwvirtex on|off]\n"
- " [--hwvirtexexcl on|off]\n"
" [--nestedpaging on|off]\n"
" [--largepages on|off]\n"
" [--vtxvpid on|off]\n"
+ " [--vtxux on|off]\n"
+ " [--pae on|off]\n"
+ " [--longmode on|off]\n"
" [--synthcpu on|off]\n"
" [--cpuidset <leaf> <eax> <ebx> <ecx> <edx>]\n"
" [--cpuidremove <leaf>]\n"
@@ -193,6 +196,11 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" [--unplugcpu <id>]\n"
" [--cpuexecutioncap <1-100>]\n"
" [--rtcuseutc on|off]\n"
+#ifdef VBOX_WITH_VMSVGA
+ " [--graphicscontroller none|vboxvga|vmsvga]\n"
+#else
+ " [--graphicscontroller none|vboxvga]\n"
+#endif
" [--monitorcount <number>]\n"
" [--accelerate3d on|off]\n"
#ifdef VBOX_WITH_VIDEOHWACCEL
@@ -213,7 +221,7 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
"|hostonly"
#endif
"|\n"
- " generic"
+ " generic|natnetwork"
"]\n"
" [--nictype<1-N> Am79C970A|Am79C973"
#ifdef VBOX_WITH_E1000
@@ -236,8 +244,9 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" [--hostonlyadapter<1-N> none|<devicename>]\n"
#endif
" [--intnet<1-N> <network name>]\n"
- " [--natnet<1-N> <network>|default]\n"
+ " [--nat-network<1-N> <network name>]\n"
" [--nicgenericdrv<1-N> <driver>\n"
+ " [--natnet<1-N> <network>|default]\n"
" [--natsettings<1-N> [<mtu>],[<socksnd>],\n"
" [<sockrcv>],[<tcpsnd>],\n"
" [<tcprcv>]]\n"
@@ -254,7 +263,7 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" [--nataliasmode<1-N> default|[log],[proxyonly],\n"
" [sameports]]\n"
" [--macaddress<1-N> auto|<mac>]\n"
- " [--mouse ps2|usb|usbtablet\n"
+ " [--mouse ps2|usb|usbtablet|usbmultitouch]\n"
" [--keyboard ps2|usb\n"
" [--uart<1-N> off|<I/O base> <IRQ>]\n"
" [--uartmode<1-N> disconnected|\n"
@@ -267,7 +276,6 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" [--lptmode<1-N> <devicename>]\n"
#endif
" [--guestmemoryballoon <balloonsize in MB>]\n"
- " [--gueststatisticsinterval <seconds>]\n"
" [--audio none|null", SEP);
if (fWin)
{
@@ -340,7 +348,7 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" [--teleporterport <port>]\n"
" [--teleporteraddress <address|empty>\n"
" [--teleporterpassword <password>]\n"
- " [--teleporterpasswordfile <file>|stdin]\n"
+ " [--teleporterpasswordfile <file>|stdin]\n"
" [--tracing-enabled on|off]\n"
" [--tracing-config <config-string>]\n"
" [--tracing-allow-vm-access on|off]\n"
@@ -364,12 +372,22 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" [--autostop-type disabled|savestate|poweroff|\n"
" acpishutdown]\n"
#endif
+#ifdef VBOX_WITH_VPX
+ " [--vcpenabled on|off]\n"
+ " [--vcpscreens [<display>],...\n"
+ " [--vcpfile <filename>]\n"
+ " [--vcpwidth <width>]\n"
+ " [--vcpheight <height>]\n"
+ " [--vcprate <rate>]\n"
+ " [--vcpfps <fps>]\n"
+#endif
+ " [--defaultfrontend default|<name>]\n"
"\n");
}
- if (u64Cmd & USAGE_CLONEVM)
+ if (fCategory & USAGE_CLONEVM)
RTStrmPrintf(pStrm,
- "%s clonevm %s <uuid>|<name>\n"
+ "%s clonevm %s <uuid|vmname>\n"
" [--snapshot <uuid>|<name>]\n"
" [--mode machine|machineandchildren|all]\n"
" [--options link|keepallmacs|keepnatmacs|\n"
@@ -381,34 +399,37 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" [--register]\n"
"\n", SEP);
- if (u64Cmd & USAGE_IMPORTAPPLIANCE)
+ if (fCategory & USAGE_IMPORTAPPLIANCE)
RTStrmPrintf(pStrm,
- "%s import %s <ovf/ova>\n"
+ "%s import %s <ovfname/ovaname>\n"
" [--dry-run|-n]\n"
" [--options keepallmacs|keepnatmacs]\n"
" [more options]\n"
" (run with -n to have options displayed\n"
" for a particular OVF)\n\n", SEP);
- if (u64Cmd & USAGE_EXPORTAPPLIANCE)
+ if (fCategory & USAGE_EXPORTAPPLIANCE)
RTStrmPrintf(pStrm,
"%s export %s <machines> --output|-o <name>.<ovf/ova>\n"
" [--legacy09|--ovf09|--ovf10|--ovf20]\n"
" [--manifest]\n"
+ " [--iso]\n"
+ " [--options manifest|iso|nomacs|nomacsbutnat]\n"
" [--vsys <number of virtual system>]\n"
" [--product <product name>]\n"
" [--producturl <product url>]\n"
" [--vendor <vendor name>]\n"
" [--vendorurl <vendor url>]\n"
" [--version <version info>]\n"
+ " [--description <description info>]\n"
" [--eula <license text>]\n"
" [--eulafile <filename>]\n"
"\n", SEP);
- if (u64Cmd & USAGE_STARTVM)
+ if (fCategory & USAGE_STARTVM)
{
RTStrmPrintf(pStrm,
- "%s startvm %s <uuid>|<name>...\n"
+ "%s startvm %s <uuid|vmname>...\n"
" [--type gui", SEP);
if (fVBoxSDL)
RTStrmPrintf(pStrm, "|sdl");
@@ -417,43 +438,44 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
"\n");
}
- if (u64Cmd & USAGE_CONTROLVM)
+ if (fCategory & USAGE_CONTROLVM)
{
RTStrmPrintf(pStrm,
- "%s controlvm %s <uuid>|<name>\n"
+ "%s controlvm %s <uuid|vmname>\n"
" pause|resume|reset|poweroff|savestate|\n"
" acpipowerbutton|acpisleepbutton|\n"
" keyboardputscancode <hex> [<hex> ...]|\n"
" setlinkstate<1-N> on|off |\n"
#if defined(VBOX_WITH_NETFLT)
- " nic<1-N> null|nat|bridged|intnet|hostonly|generic"
- "\n"
- " [<devicename>] |\n"
+ " nic<1-N> null|nat|bridged|intnet|hostonly|generic|\n"
+ " natnetwork [<devicename>] |\n"
#else /* !VBOX_WITH_NETFLT */
- " nic<1-N> null|nat|bridged|intnet|generic\n"
+ " nic<1-N> null|nat|bridged|intnet|generic|natnetwork\n"
" [<devicename>] |\n"
#endif /* !VBOX_WITH_NETFLT */
- " nictrace<1-N> on|off\n"
- " nictracefile<1-N> <filename>\n"
- " nicproperty<1-N> name=[value]\n"
+ " nictrace<1-N> on|off |\n"
+ " nictracefile<1-N> <filename> |\n"
+ " nicproperty<1-N> name=[value] |\n"
+ " nicpromisc<1-N> deny|allow-vms|allow-all |\n"
" natpf<1-N> [<rulename>],tcp|udp,[<hostip>],\n"
- " <hostport>,[<guestip>],<guestport>\n"
- " natpf<1-N> delete <rulename>\n"
- " guestmemoryballoon <balloonsize in MB>]\n"
- " gueststatisticsinterval <seconds>]\n"
+ " <hostport>,[<guestip>],<guestport> |\n"
+ " natpf<1-N> delete <rulename> |\n"
+ " guestmemoryballoon <balloonsize in MB> |\n"
" usbattach <uuid>|<address> |\n"
" usbdetach <uuid>|<address> |\n"
" clipboard disabled|hosttoguest|guesttohost|\n"
- " bidirectional]\n"
- " draganddrop disabled|hosttoguest]\n"
+ " bidirectional |\n"
+ " draganddrop disabled|hosttoguest |\n"
" vrde on|off |\n"
" vrdeport <port> |\n"
" vrdeproperty <name=[value]> |\n"
- " vrdevideochannelquality <percent>\n"
+ " vrdevideochannelquality <percent> |\n"
" setvideomodehint <xres> <yres> <bpp>\n"
- " [[<display>] [<enabled:yes|no>\n"
+ " [[<display>] [<enabled:yes|no> |\n"
" [<xorigin> <yorigin>]]] |\n"
" screenshotpng <file> [display] |\n"
+ " vcpenabled on|off |\n"
+ " vcpscreens all|none|<screen>,[<screen>...] |\n"
" setcredentials <username>\n"
" --passwordfile <file> | <password>\n"
" <domain>\n"
@@ -461,52 +483,53 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" teleport --host <name> --port <port>\n"
" [--maxdowntime <msec>]\n"
" [--passwordfile <file> |\n"
- " --password <password>]\n"
- " plugcpu <id>\n"
- " unplugcpu <id>\n"
+ " --password <password>] |\n"
+ " plugcpu <id> |\n"
+ " unplugcpu <id> |\n"
" cpuexecutioncap <1-100>\n"
+ " webcam <attach [path [settings]]> | <detach [path]> | <list>\n"
"\n", SEP);
}
- if (u64Cmd & USAGE_DISCARDSTATE)
+ if (fCategory & USAGE_DISCARDSTATE)
RTStrmPrintf(pStrm,
- "%s discardstate %s <uuid>|<name>\n"
+ "%s discardstate %s <uuid|vmname>\n"
"\n", SEP);
- if (u64Cmd & USAGE_ADOPTSTATE)
+ if (fCategory & USAGE_ADOPTSTATE)
RTStrmPrintf(pStrm,
- "%s adoptstate %s <uuid>|<name> <state_file>\n"
+ "%s adoptstate %s <uuid|vmname> <state_file>\n"
"\n", SEP);
- if (u64Cmd & USAGE_SNAPSHOT)
+ if (fCategory & USAGE_SNAPSHOT)
RTStrmPrintf(pStrm,
- "%s snapshot %s <uuid>|<name>\n"
- " take <name> [--description <desc>] [--pause] |\n"
- " delete <uuid>|<name> |\n"
- " restore <uuid>|<name> |\n"
+ "%s snapshot %s <uuid|vmname>\n"
+ " take <name> [--description <desc>] [--live] |\n"
+ " delete <uuid|snapname> |\n"
+ " restore <uuid|snapname> |\n"
" restorecurrent |\n"
- " edit <uuid>|<name>|--current\n"
+ " edit <uuid|snapname>|--current\n"
" [--name <name>]\n"
" [--description <desc>] |\n"
" list [--details|--machinereadable]\n"
- " showvminfo <uuid>|<name>\n"
+ " showvminfo <uuid|snapname>\n"
"\n", SEP);
- if (u64Cmd & USAGE_CLOSEMEDIUM)
+ if (fCategory & USAGE_CLOSEMEDIUM)
RTStrmPrintf(pStrm,
- "%s closemedium %s disk|dvd|floppy <uuid>|<filename>\n"
+ "%s closemedium %s disk|dvd|floppy <uuid|filename>\n"
" [--delete]\n"
"\n", SEP);
- if (u64Cmd & USAGE_STORAGEATTACH)
+ if (fCategory & USAGE_STORAGEATTACH)
RTStrmPrintf(pStrm,
"%s storageattach %s <uuid|vmname>\n"
" --storagectl <name>\n"
" [--port <number>]\n"
" [--device <number>]\n"
" [--type dvddrive|hdd|fdd]\n"
- " [--medium none|emptydrive|\n"
- " <uuid>|<filename>|host:<drive>|iscsi]\n"
+ " [--medium none|emptydrive|additions|\n"
+ " <uuid|filename>|host:<drive>|iscsi]\n"
" [--mtype normal|writethrough|immutable|shareable|\n"
" readonly|multiattach]\n"
" [--comment <text>]\n"
@@ -529,20 +552,20 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" [--intnet]\n"
"\n", SEP);
- if (u64Cmd & USAGE_STORAGECONTROLLER)
+ if (fCategory & USAGE_STORAGECONTROLLER)
RTStrmPrintf(pStrm,
"%s storagectl %s <uuid|vmname>\n"
" --name <name>\n"
" [--add ide|sata|scsi|floppy|sas]\n"
" [--controller LSILogic|LSILogicSAS|BusLogic|\n"
" IntelAHCI|PIIX3|PIIX4|ICH6|I82078]\n"
- " [--sataportcount <1-30>]\n"
+ " [--portcount <1-30>]\n"
" [--hostiocache on|off]\n"
" [--bootable on|off]\n"
" [--remove]\n"
"\n", SEP);
- if (u64Cmd & USAGE_BANDWIDTHCONTROL)
+ if (fCategory & USAGE_BANDWIDTHCONTROL)
RTStrmPrintf(pStrm,
"%s bandwidthctl %s <uuid|vmname>\n"
" add <name> --type disk|network\n"
@@ -555,12 +578,12 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" K=kilobyte, M=megabyte, G=gigabyte)\n"
"\n", SEP);
- if (u64Cmd & USAGE_SHOWHDINFO)
+ if (fCategory & USAGE_SHOWHDINFO)
RTStrmPrintf(pStrm,
- "%s showhdinfo %s <uuid>|<filename>\n"
+ "%s showhdinfo %s <uuid|filename>\n"
"\n", SEP);
- if (u64Cmd & USAGE_CREATEHD)
+ if (fCategory & USAGE_CREATEHD)
RTStrmPrintf(pStrm,
"%s createhd %s --filename <filename>\n"
" [--size <megabytes>|--sizebyte <bytes>]\n"
@@ -569,25 +592,26 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" [--variant Standard,Fixed,Split2G,Stream,ESX]\n"
"\n", SEP);
- if (u64Cmd & USAGE_MODIFYHD)
+ if (fCategory & USAGE_MODIFYHD)
RTStrmPrintf(pStrm,
- "%s modifyhd %s <uuid>|<filename>\n"
+ "%s modifyhd %s <uuid|filename>\n"
" [--type normal|writethrough|immutable|shareable|\n"
" readonly|multiattach]\n"
" [--autoreset on|off]\n"
+ " [--property <name=[value]>]\n"
" [--compact]\n"
" [--resize <megabytes>|--resizebyte <bytes>]\n"
"\n", SEP);
- if (u64Cmd & USAGE_CLONEHD)
+ if (fCategory & USAGE_CLONEHD)
RTStrmPrintf(pStrm,
- "%s clonehd %s <uuid>|<filename> <uuid>|<outputfile>\n"
+ "%s clonehd %s <uuid|inputfile> <uuid|outputfile>\n"
" [--format VDI|VMDK|VHD|RAW|<other>]\n"
" [--variant Standard,Fixed,Split2G,Stream,ESX]\n"
" [--existing]\n"
"\n", SEP);
- if (u64Cmd & USAGE_CONVERTFROMRAW)
+ if (fCategory & USAGE_CONVERTFROMRAW)
RTStrmPrintf(pStrm,
"%s convertfromraw %s <filename> <outputfile>\n"
" [--format VDI|VMDK|VHD]\n"
@@ -599,33 +623,35 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" [--uuid <uuid>]\n"
"\n", SEP, SEP);
- if (u64Cmd & USAGE_GETEXTRADATA)
+ if (fCategory & USAGE_GETEXTRADATA)
RTStrmPrintf(pStrm,
- "%s getextradata %s global|<uuid>|<name>\n"
+ "%s getextradata %s global|<uuid|vmname>\n"
" <key>|enumerate\n"
"\n", SEP);
- if (u64Cmd & USAGE_SETEXTRADATA)
+ if (fCategory & USAGE_SETEXTRADATA)
RTStrmPrintf(pStrm,
- "%s setextradata %s global|<uuid>|<name>\n"
+ "%s setextradata %s global|<uuid|vmname>\n"
" <key>\n"
" [<value>] (no value deletes key)\n"
"\n", SEP);
- if (u64Cmd & USAGE_SETPROPERTY)
+ if (fCategory & USAGE_SETPROPERTY)
RTStrmPrintf(pStrm,
"%s setproperty %s machinefolder default|<folder> |\n"
+ " hwvirtexclusive on|off |\n"
" vrdeauthlibrary default|<library> |\n"
" websrvauthlibrary default|null|<library> |\n"
" vrdeextpack null|<library> |\n"
" autostartdbpath null|<folder> |\n"
" loghistorycount <value>\n"
+ " defaultfrontend default|<name>\n"
"\n", SEP);
- if (u64Cmd & USAGE_USBFILTER_ADD)
+ if (fCategory & USAGE_USBFILTER_ADD)
RTStrmPrintf(pStrm,
"%s usbfilter %s add <index,0-N>\n"
- " --target <uuid>|<name>|global\n"
+ " --target <uuid|vmname>|global\n"
" --name <string>\n"
" --action ignore|hold (global filters only)\n"
" [--active yes|no] (yes)\n"
@@ -639,10 +665,10 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" [--maskedinterfaces <XXXXXXXX>]\n"
"\n", SEP);
- if (u64Cmd & USAGE_USBFILTER_MODIFY)
+ if (fCategory & USAGE_USBFILTER_MODIFY)
RTStrmPrintf(pStrm,
"%s usbfilter %s modify <index,0-N>\n"
- " --target <uuid>|<name>|global\n"
+ " --target <uuid|vmname>|global\n"
" [--name <string>]\n"
" [--action ignore|hold] (global filters only)\n"
" [--active yes|no]\n"
@@ -656,39 +682,39 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" [--maskedinterfaces <XXXXXXXX>]\n"
"\n", SEP);
- if (u64Cmd & USAGE_USBFILTER_REMOVE)
+ if (fCategory & USAGE_USBFILTER_REMOVE)
RTStrmPrintf(pStrm,
"%s usbfilter %s remove <index,0-N>\n"
- " --target <uuid>|<name>|global\n"
+ " --target <uuid|vmname>|global\n"
"\n", SEP);
- if (u64Cmd & USAGE_SHAREDFOLDER_ADD)
+ if (fCategory & USAGE_SHAREDFOLDER_ADD)
RTStrmPrintf(pStrm,
- "%s sharedfolder %s add <vmname>|<uuid>\n"
+ "%s sharedfolder %s add <uuid|vmname>\n"
" --name <name> --hostpath <hostpath>\n"
" [--transient] [--readonly] [--automount]\n"
"\n", SEP);
- if (u64Cmd & USAGE_SHAREDFOLDER_REMOVE)
+ if (fCategory & USAGE_SHAREDFOLDER_REMOVE)
RTStrmPrintf(pStrm,
- "%s sharedfolder %s remove <vmname>|<uuid>\n"
+ "%s sharedfolder %s remove <uuid|vmname>\n"
" --name <name> [--transient]\n"
"\n", SEP);
#ifdef VBOX_WITH_GUEST_PROPS
- if (u64Cmd & USAGE_GUESTPROPERTY)
+ if (fCategory & USAGE_GUESTPROPERTY)
usageGuestProperty(pStrm, SEP);
#endif /* VBOX_WITH_GUEST_PROPS defined */
#ifdef VBOX_WITH_GUEST_CONTROL
- if (u64Cmd & USAGE_GUESTCONTROL)
- usageGuestControl(pStrm, SEP);
+ if (fCategory & USAGE_GUESTCONTROL)
+ usageGuestControl(pStrm, SEP, fSubCategory);
#endif /* VBOX_WITH_GUEST_CONTROL defined */
- if (u64Cmd & USAGE_DEBUGVM)
+ if (fCategory & USAGE_DEBUGVM)
{
RTStrmPrintf(pStrm,
- "%s debugvm %s <uuid>|<name>\n"
+ "%s debugvm %s <uuid|vmname>\n"
" dumpguestcore --filename <name> |\n"
" info <item> [args] |\n"
" injectnmi |\n"
@@ -707,7 +733,7 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" [--descriptions]\n"
"\n", SEP);
}
- if (u64Cmd & USAGE_METRICS)
+ if (fCategory & USAGE_METRICS)
RTStrmPrintf(pStrm,
"%s metrics %s list [*|host|<vmname> [<metric_list>]]\n"
" (comma-separated)\n\n"
@@ -731,8 +757,39 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
" [*|host|<vmname> [<metric_list>]]\n"
"\n", SEP, SEP, SEP, SEP, SEP, SEP);
+#if defined(VBOX_WITH_NAT_SERVICE)
+ if (fCategory & USAGE_NATNETWORK)
+ {
+ RTStrmPrintf(pStrm,
+ "%s natnetwork %s add --netname <name>\n"
+ " --network <network>\n"
+ " [--enable|--disable]\n"
+ " [--dhcp on|off]\n"
+ " [--port-forward-4 <rule>]\n"
+ " [--loopback-4 <rule>]\n"
+ " [--ipv6 on|off]\n"
+ " [--port-forward-6 <rule>]\n"
+ " [--loopback-6 <rule>]\n\n"
+ "%s natnetwork %s remove --netname <name>\n\n"
+ "%s natnetwork %s modify --netname <name>\n"
+ " [--network <network>]\n"
+ " [--enable|--disable]\n"
+ " [--dhcp on|off]\n"
+ " [--port-forward-4 <rule>]\n"
+ " [--loopback-4 <rule>]\n"
+ " [--ipv6 on|off]\n"
+ " [--port-forward-6 <rule>]\n"
+ " [--loopback-6 <rule>]\n\n"
+ "%s natnetwork %s start --netname <name>\n\n"
+ "%s natnetwork %s stop --netname <name>\n"
+ "\n", SEP, SEP, SEP, SEP, SEP);
+
+
+ }
+#endif
+
#if defined(VBOX_WITH_NETFLT)
- if (u64Cmd & USAGE_HOSTONLYIFS)
+ if (fCategory & USAGE_HOSTONLYIFS)
{
RTStrmPrintf(pStrm,
"%s hostonlyif %s ipconfig <name>\n"
@@ -747,7 +804,7 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
}
#endif
- if (u64Cmd & USAGE_DHCPSERVER)
+ if (fCategory & USAGE_DHCPSERVER)
{
RTStrmPrintf(pStrm,
"%s dhcpserver %s add|modify --netname <network_name> |\n"
@@ -765,7 +822,7 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
#endif
"\n", SEP, SEP);
}
- if (u64Cmd & USAGE_EXTPACK)
+ if (fCategory & USAGE_EXTPACK)
{
RTStrmPrintf(pStrm,
"%s extpack %s install [--replace] <tarball> |\n"
@@ -779,15 +836,35 @@ void printUsage(USAGECATEGORY u64Cmd, PRTSTREAM pStrm)
* Print a usage synopsis and the syntax error message.
* @returns RTEXITCODE_SYNTAX.
*/
-RTEXITCODE errorSyntax(USAGECATEGORY u64Cmd, const char *pszFormat, ...)
+RTEXITCODE errorSyntax(USAGECATEGORY fCategory, const char *pszFormat, ...)
+{
+ va_list args;
+ showLogo(g_pStdErr); // show logo even if suppressed
+#ifndef VBOX_ONLY_DOCS
+ if (g_fInternalMode)
+ printUsageInternal(fCategory, g_pStdErr);
+ else
+ printUsage(fCategory, ~0U, g_pStdErr);
+#endif /* !VBOX_ONLY_DOCS */
+ va_start(args, pszFormat);
+ RTStrmPrintf(g_pStdErr, "\nSyntax error: %N\n", pszFormat, &args);
+ va_end(args);
+ return RTEXITCODE_SYNTAX;
+}
+
+/**
+ * Print a usage synopsis and the syntax error message.
+ * @returns RTEXITCODE_SYNTAX.
+ */
+RTEXITCODE errorSyntaxEx(USAGECATEGORY fCategory, uint32_t fSubCategory, const char *pszFormat, ...)
{
va_list args;
showLogo(g_pStdErr); // show logo even if suppressed
#ifndef VBOX_ONLY_DOCS
if (g_fInternalMode)
- printUsageInternal(u64Cmd, g_pStdErr);
+ printUsageInternal(fCategory, g_pStdErr);
else
- printUsage(u64Cmd, g_pStdErr);
+ printUsage(fCategory, fSubCategory, g_pStdErr);
#endif /* !VBOX_ONLY_DOCS */
va_start(args, pszFormat);
RTStrmPrintf(g_pStdErr, "\nSyntax error: %N\n", pszFormat, &args);
@@ -800,11 +877,12 @@ RTEXITCODE errorSyntax(USAGECATEGORY u64Cmd, const char *pszFormat, ...)
*
* @returns RTEXITCODE_SYNTAX.
*
- * @param fUsageCategory The usage category of the command.
+ * @param fCategory The usage category of the command.
+ * @param fSubCategory The usage sub-category of the command.
* @param rc The RTGetOpt return code.
* @param pValueUnion The value union.
*/
-RTEXITCODE errorGetOpt(USAGECATEGORY fUsageCategory, int rc, union RTGETOPTUNION const *pValueUnion)
+RTEXITCODE errorGetOptEx(USAGECATEGORY fCategory, uint32_t fSubCategory, int rc, union RTGETOPTUNION const *pValueUnion)
{
/*
* Check if it is an unhandled standard option.
@@ -820,9 +898,9 @@ RTEXITCODE errorGetOpt(USAGECATEGORY fUsageCategory, int rc, union RTGETOPTUNION
showLogo(g_pStdErr);
#ifndef VBOX_ONLY_DOCS
if (g_fInternalMode)
- printUsageInternal(fUsageCategory, g_pStdOut);
+ printUsageInternal(fCategory, g_pStdOut);
else
- printUsage(fUsageCategory, g_pStdOut);
+ printUsage(fCategory, fSubCategory, g_pStdOut);
#endif
return RTEXITCODE_SUCCESS;
}
@@ -833,9 +911,9 @@ RTEXITCODE errorGetOpt(USAGECATEGORY fUsageCategory, int rc, union RTGETOPTUNION
showLogo(g_pStdErr); // show logo even if suppressed
#ifndef VBOX_ONLY_DOCS
if (g_fInternalMode)
- printUsageInternal(fUsageCategory, g_pStdErr);
+ printUsageInternal(fCategory, g_pStdErr);
else
- printUsage(fUsageCategory, g_pStdErr);
+ printUsage(fCategory, fSubCategory, g_pStdErr);
#endif /* !VBOX_ONLY_DOCS */
if (rc == VINF_GETOPT_NOT_OPTION)
@@ -856,6 +934,20 @@ RTEXITCODE errorGetOpt(USAGECATEGORY fUsageCategory, int rc, union RTGETOPTUNION
}
/**
+ * errorSyntax for RTGetOpt users.
+ *
+ * @returns RTEXITCODE_SYNTAX.
+ *
+ * @param fUsageCategory The usage category of the command.
+ * @param rc The RTGetOpt return code.
+ * @param pValueUnion The value union.
+ */
+RTEXITCODE errorGetOpt(USAGECATEGORY fCategory, int rc, union RTGETOPTUNION const *pValueUnion)
+{
+ return errorGetOptEx(fCategory, ~0U, rc, pValueUnion);
+}
+
+/**
* Print an error message without the syntax stuff.
*
* @returns RTEXITCODE_SYNTAX.