VirtualBox

Changeset 67566 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Jun 22, 2017 3:42:31 PM (8 years ago)
Author:
vboxsync
Message:

dropped composeIPv6Address() and composeHardwareAddress()

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/netif.h

    r67561 r67566  
    9898int NetIfAdpCtlOut(const char *pszName, const char *pszCmd, char *pszBuffer, size_t cBufSize);
    9999
    100 DECLINLINE(Bstr) composeIPv6Address(PRTNETADDRIPV6 aAddrPtr)
    101 {
    102     /* We can't use %RTnaipv6 because that function is too clever, i.e. it
    103      * shows abbreviations which the GUI isn't able to parse. */
    104     return aAddrPtr->s.Lo || aAddrPtr->s.Hi
    105         ? 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 
    123100DECLINLINE(Bstr) getDefaultIPv4Address(Bstr bstrIfName)
    124101{
  • trunk/src/VBox/Main/src-server/HostNetworkInterfaceImpl.cpp

    r67431 r67566  
    168168        m.realNetworkMask = m.networkMask = info.IPNetMask.u;
    169169        m.dhcpEnabled = info.bDhcpEnabled;
    170         m.realIPV6Address = m.IPV6Address = composeIPv6Address(&info.IPv6Address);
     170        m.realIPV6Address = m.IPV6Address = Bstr(Utf8StrFmt("%RTnaipv6", &info.IPv6Address));
    171171        RTNetMaskToPrefixIPv6(&info.IPv6NetMask, &iPrefixIPv6);
    172172        m.realIPV6PrefixLength = m.IPV6NetworkMaskPrefixLength = iPrefixIPv6;
    173         m.hardwareAddress = composeHardwareAddress(&info.MACAddress);
     173        m.hardwareAddress = Bstr(Utf8StrFmt("%RTmac", &info.MACAddress));
    174174#ifdef RT_OS_WINDOWS
    175175        m.mediumType = (HostNetworkInterfaceMediumType)info.enmMediumType;
     
    227227    m.realIPAddress = m.IPAddress = pIf->IPAddress.u;
    228228    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));
    230230    RTNetMaskToPrefixIPv6(&pIf->IPv6NetMask, &iPrefixIPv6);
    231231    m.realIPV6PrefixLength = m.IPV6NetworkMaskPrefixLength = iPrefixIPv6;
    232232    m.dhcpEnabled = pIf->bDhcpEnabled;
    233     m.hardwareAddress = composeHardwareAddress(&pIf->MACAddress);
     233    m.hardwareAddress = Bstr(Utf8StrFmt("%RTmac", &pIf->MACAddress));
    234234#ifdef RT_OS_WINDOWS
    235235    m.mediumType = (HostNetworkInterfaceMediumType)pIf->enmMediumType;
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