Changeset 67566 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jun 22, 2017 3:42:31 PM (8 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/netif.h
r67561 r67566 98 98 int NetIfAdpCtlOut(const char *pszName, const char *pszCmd, char *pszBuffer, size_t cBufSize); 99 99 100 DECLINLINE(Bstr) composeIPv6Address(PRTNETADDRIPV6 aAddrPtr)101 {102 /* We can't use %RTnaipv6 because that function is too clever, i.e. it103 * shows abbreviations which the GUI isn't able to parse. */104 return aAddrPtr->s.Lo || aAddrPtr->s.Hi105 ? Bstr(Utf8StrFmt("%02x%02x:%02x%02x:%02x%02x:%02x%02x:"106 "%02x%02x:%02x%02x:%02x%02x:%02x%02x",107 aAddrPtr->au8[0], aAddrPtr->au8[1],108 aAddrPtr->au8[2], aAddrPtr->au8[3],109 aAddrPtr->au8[4], aAddrPtr->au8[5],110 aAddrPtr->au8[6], aAddrPtr->au8[7],111 aAddrPtr->au8[8], aAddrPtr->au8[9],112 aAddrPtr->au8[10], aAddrPtr->au8[11],113 aAddrPtr->au8[12], aAddrPtr->au8[13],114 aAddrPtr->au8[14], aAddrPtr->au8[15]))115 : Bstr("");116 }117 118 DECLINLINE(Bstr) composeHardwareAddress(PRTMAC aMacPtr)119 {120 return Bstr(Utf8StrFmt("%RTmac", aMacPtr));121 }122 123 100 DECLINLINE(Bstr) getDefaultIPv4Address(Bstr bstrIfName) 124 101 { -
trunk/src/VBox/Main/src-server/HostNetworkInterfaceImpl.cpp
r67431 r67566 168 168 m.realNetworkMask = m.networkMask = info.IPNetMask.u; 169 169 m.dhcpEnabled = info.bDhcpEnabled; 170 m.realIPV6Address = m.IPV6Address = composeIPv6Address(&info.IPv6Address);170 m.realIPV6Address = m.IPV6Address = Bstr(Utf8StrFmt("%RTnaipv6", &info.IPv6Address)); 171 171 RTNetMaskToPrefixIPv6(&info.IPv6NetMask, &iPrefixIPv6); 172 172 m.realIPV6PrefixLength = m.IPV6NetworkMaskPrefixLength = iPrefixIPv6; 173 m.hardwareAddress = composeHardwareAddress(&info.MACAddress);173 m.hardwareAddress = Bstr(Utf8StrFmt("%RTmac", &info.MACAddress)); 174 174 #ifdef RT_OS_WINDOWS 175 175 m.mediumType = (HostNetworkInterfaceMediumType)info.enmMediumType; … … 227 227 m.realIPAddress = m.IPAddress = pIf->IPAddress.u; 228 228 m.realNetworkMask = m.networkMask = pIf->IPNetMask.u; 229 m.realIPV6Address = m.IPV6Address = composeIPv6Address(&pIf->IPv6Address);229 m.realIPV6Address = m.IPV6Address = Bstr(Utf8StrFmt("%RTnaipv6", &pIf->IPv6Address)); 230 230 RTNetMaskToPrefixIPv6(&pIf->IPv6NetMask, &iPrefixIPv6); 231 231 m.realIPV6PrefixLength = m.IPV6NetworkMaskPrefixLength = iPrefixIPv6; 232 232 m.dhcpEnabled = pIf->bDhcpEnabled; 233 m.hardwareAddress = composeHardwareAddress(&pIf->MACAddress);233 m.hardwareAddress = Bstr(Utf8StrFmt("%RTmac", &pIf->MACAddress)); 234 234 #ifdef RT_OS_WINDOWS 235 235 m.mediumType = (HostNetworkInterfaceMediumType)pIf->enmMediumType;
Note:
See TracChangeset
for help on using the changeset viewer.