Changeset 17322 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 4, 2009 7:20:59 AM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk
r17104 r17322 43 43 $(if $(VBOX_WITH_HOSTNETIF_API), VBOX_WITH_HOSTNETIF_API) 44 44 VBoxManage_DEFS.win = _WIN32_WINNT=0x0500 45 ifdef VBOX_WITH_NETFLT 46 VBoxManage_DEFS += VBOX_WITH_NETFLT 47 endif 45 48 VBoxManage_SOURCES = \ 46 49 VBoxManage.cpp \ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r17103 r17322 76 76 { 77 77 RTPrintf("VBoxManage list [--long|-l] vms|runningvms|ostypes|hostdvds|hostfloppies|\n" 78 " hostifs|hostinfo|hddbackends|hdds|dvds|floppies|\n" 78 #if (defined(RT_OS_WINDOWS) && defined(VBOX_WITH_NETFLT)) 79 " bridgedifs|hostonlyifs|hostinfo|hddbackends|hdds|dvds|floppies|\n" 80 #else 81 " bridgedifs|hostinfo|hddbackends|hdds|dvds|floppies|\n" 82 #endif 83 79 84 " usbhost|usbfilters|systemproperties\n" 80 85 "\n"); … … 157 162 " [-floppy disabled|empty|<uuid>|\n" 158 163 " <filename>|host:<drive>]\n" 159 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) 160 " [-nic<1-N> none|null|nat| hostif|intnet|hostonly]\n"164 #if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || (defined(RT_OS_WINDOWS) && defined(VBOX_WITH_NETFLT)) 165 " [-nic<1-N> none|null|nat|bridged|intnet|hostonly]\n" 161 166 #else /* !RT_OS_LINUX && !RT_OS_DARWIN */ 162 " [-nic<1-N> none|null|nat| hostif|intnet]\n"167 " [-nic<1-N> none|null|nat|bridged|intnet]\n" 163 168 #endif /* !RT_OS_LINUX && !RT_OS_DARWIN */ 164 169 " [-nictype<1-N> Am79C970A|Am79C973" … … 171 176 " [-nictracefile<1-N> <filename>]\n" 172 177 " [-nicspeed<1-N> <kbps>]\n" 173 " [-hostifdev<1-N> none|<devicename>]\n" 178 " [-bridgeddev<1-N> none|<devicename>]\n" 179 #if (defined(RT_OS_WINDOWS) && defined(VBOX_WITH_NETFLT)) 180 " [-hostonlydev<1-N> none|<devicename>]\n" 181 #endif 174 182 " [-intnet<1-N> <network name>]\n" 175 183 " [-natnet<1-N> <network>|default]\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r17275 r17322 685 685 case NetworkAttachmentType_Bridged: 686 686 { 687 Bstr str HostIfDev;688 nic->COMGETTER(HostInterface)(str HostIfDev.asOutParam());687 Bstr strBridgedDev; 688 nic->COMGETTER(HostInterface)(strBridgedDev.asOutParam()); 689 689 if (details == VMINFO_MACHINEREADABLE) 690 690 { 691 RTPrintf(" hostifdev%d=\"%lS\"\n", currentNIC + 1, strHostIfDev.raw());692 strAttachment = " hostif";691 RTPrintf("bridgeddev%d=\"%lS\"\n", currentNIC + 1, strBridgedDev.raw()); 692 strAttachment = "bridged"; 693 693 } 694 694 else 695 strAttachment = Utf8StrFmt(" Host Interface '%lS'", strHostIfDev.raw());695 strAttachment = Utf8StrFmt("Bridged Interface '%lS'", strBridgedDev.raw()); 696 696 break; 697 697 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r17311 r17322 44 44 45 45 #ifdef VBOX_WITH_HOSTNETIF_API 46 static const char *getHostIf TypeText(HostNetworkInterfaceMediumType_T enmType)46 static const char *getHostIfMediumTypeText(HostNetworkInterfaceMediumType_T enmType) 47 47 { 48 48 switch (enmType) … … 73 73 LISTHOSTDVDS, 74 74 LISTHOSTFLOPPIES, 75 LISTHOSTIFS, 75 LISTBRIDGEDIFS, 76 #if (defined(RT_OS_WINDOWS) && defined(VBOX_WITH_NETFLT)) 77 LISTHOSTONLYIFS, 78 #endif 76 79 LISTHOSTINFO, 77 80 LISTHDDBACKENDS, … … 92 95 { "hostdvds", LISTHOSTDVDS, RTGETOPT_REQ_NOTHING }, 93 96 { "hostfloppies", LISTHOSTFLOPPIES, RTGETOPT_REQ_NOTHING }, 94 { "hostifs", LISTHOSTIFS, RTGETOPT_REQ_NOTHING }, 97 { "hostifs", LISTBRIDGEDIFS, RTGETOPT_REQ_NOTHING }, /* backward compatibility */ 98 { "bridgedifs", LISTBRIDGEDIFS, RTGETOPT_REQ_NOTHING }, 99 #if (defined(RT_OS_WINDOWS) && defined(VBOX_WITH_NETFLT)) 100 { "hostonlyifs", LISTHOSTONLYIFS, RTGETOPT_REQ_NOTHING }, 101 #endif 95 102 { "hostinfo", LISTHOSTINFO, RTGETOPT_REQ_NOTHING }, 96 103 { "hddbackends", LISTHDDBACKENDS, RTGETOPT_REQ_NOTHING }, … … 128 135 case LISTHOSTDVDS: 129 136 case LISTHOSTFLOPPIES: 130 case LISTHOSTIFS: 137 case LISTBRIDGEDIFS: 138 #if (defined(RT_OS_WINDOWS) && defined(VBOX_WITH_NETFLT)) 139 case LISTHOSTONLYIFS: 140 #endif 131 141 case LISTHOSTINFO: 132 142 case LISTHDDBACKENDS: … … 283 293 break; 284 294 285 case LISTHOSTIFS: 295 case LISTBRIDGEDIFS: 296 #if (defined(RT_OS_WINDOWS) && defined(VBOX_WITH_NETFLT)) 297 case LISTHOSTONLYIFS: 298 #endif 286 299 { 287 300 ComPtr<IHost> host; 288 301 CHECK_ERROR(a->virtualBox, COMGETTER(Host)(host.asOutParam())); 289 302 com::SafeIfaceArray <IHostNetworkInterface> hostNetworkInterfaces; 303 #if (defined(RT_OS_WINDOWS) && defined(VBOX_WITH_NETFLT)) 304 CHECK_ERROR(host, 305 FindHostNetworkInterfacesOfType ( 306 command == LISTBRIDGEDIFS ? HostNetworkInterfaceType_Bridged : HostNetworkInterfaceType_HostOnly, 307 ComSafeArrayAsOutParam (hostNetworkInterfaces))); 308 #else 290 309 CHECK_ERROR(host, 291 310 COMGETTER(NetworkInterfaces) (ComSafeArrayAsOutParam (hostNetworkInterfaces))); 311 #endif 292 312 for (size_t i = 0; i < hostNetworkInterfaces.size(); ++i) 293 313 { … … 334 354 HostNetworkInterfaceMediumType_T Type; 335 355 networkInterface->COMGETTER(MediumType)(&Type); 336 RTPrintf(" Type: %s\n", getHostIfTypeText(Type));356 RTPrintf("MediumType: %s\n", getHostIfMediumTypeText(Type)); 337 357 HostNetworkInterfaceStatus_T Status; 338 358 networkInterface->COMGETTER(Status)(&Status); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r17281 r17322 442 442 i++; 443 443 } 444 else if (strncmp(a->argv[i], "-hostifdev", 10) == 0) 444 else if ( strncmp(a->argv[i], "-bridgeddev", 11) == 0 445 || strncmp(a->argv[i], "-hostonlydev", 12) == 0 446 || strncmp(a->argv[i], "-hostifdev", 10) == 0) /* backward compatibility */ 445 447 { 446 448 unsigned n = parseNum(&a->argv[i][10], NetworkAdapterCount, "NIC"); … … 1381 1383 CHECK_ERROR_RET(nic, AttachToNAT(), 1); 1382 1384 } 1383 else if (strcmp(nics[n], "hostif") == 0) 1385 else if ( strcmp(nics[n], "bridged") == 0 1386 || strcmp(nics[n], "hostif") == 0) /* backward compatibility */ 1384 1387 { 1385 1388 CHECK_ERROR_RET(nic, COMSETTER(Enabled) (TRUE), 1);
Note:
See TracChangeset
for help on using the changeset viewer.