Changeset 18017 in vbox
- Timestamp:
- Mar 17, 2009 12:20:49 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 44608
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp
r17759 r18017 172 172 bool bDhcp = false; 173 173 bool bNetmasklengthv6 = false; 174 uint32_t uNetmasklengthv6 = -1;174 uint32_t uNetmasklengthv6 = (uint32_t)-1; 175 175 const char *pIpv6 = NULL; 176 const char * 177 const char * 176 const char *pIp = NULL; 177 const char *pNetmask = NULL; 178 178 179 179 int c; … … 266 266 CHECK_ERROR(host, FindHostNetworkInterfaceByName(name, hif.asOutParam())); 267 267 268 if (FAILED(rc))268 if (FAILED(rc)) 269 269 return errorArgument("could not find interface '%s'", a->argv[iStart]); 270 270 271 if (bDhcp)271 if (bDhcp) 272 272 { 273 273 CHECK_ERROR(hif, EnableDynamicIpConfig ()); 274 274 } 275 else if (pIp)276 { 277 if (!pNetmask)275 else if (pIp) 276 { 277 if (!pNetmask) 278 278 pNetmask = "255.255.255.0"; /* ?? */ 279 279 280 CHECK_ERROR(hif, EnableStaticIpConfig 281 } 282 else if (pIpv6)283 { 284 if (uNetmasklengthv6 ==-1)280 CHECK_ERROR(hif, EnableStaticIpConfig(Bstr(pIp), Bstr(pNetmask))); 281 } 282 else if (pIpv6) 283 { 284 if (uNetmasklengthv6 == (uint32_t)-1) 285 285 uNetmasklengthv6 = 64; /* ?? */ 286 286 287 287 BOOL bIpV6Supported; 288 CHECK_ERROR(hif, COMGETTER(IPV6Supported) 289 if (!bIpV6Supported)288 CHECK_ERROR(hif, COMGETTER(IPV6Supported)(&bIpV6Supported)); 289 if (!bIpV6Supported) 290 290 { 291 291 RTPrintf("IPv6 setting is not supported for this adapter\n"); … … 295 295 296 296 Bstr ipv6str(pIpv6); 297 CHECK_ERROR(hif, EnableStaticIpConfigV6 297 CHECK_ERROR(hif, EnableStaticIpConfigV6(ipv6str, (ULONG)uNetmasklengthv6)); 298 298 } 299 299 else
Note:
See TracChangeset
for help on using the changeset viewer.