VirtualBox

Changeset 43507 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Oct 2, 2012 1:22:31 PM (12 years ago)
Author:
vboxsync
Message:

Main/Metrics: Alternative way to get link speed for old kernels (#6345)

Location:
trunk/src/VBox/Main/include
Files:
3 edited

Legend:

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

    r43445 r43507  
    110110        HostNetworkInterfaceMediumType_T mediumType;
    111111        HostNetworkInterfaceStatus_T status;
     112        ULONG speedMbytes;
    112113    } m;
    113114
  • trunk/src/VBox/Main/include/Performance.h

    r43456 r43507  
    361361        /** Returns CPU usage counters in platform-specific units. */
    362362        virtual int getRawHostCpuLoad(uint64_t *user, uint64_t *kernel, uint64_t *idle);
    363         /** Returns received and transmitted bytes as well as link speed. */
    364         virtual int getRawHostNetworkLoad(const char *name, uint64_t *rx, uint64_t *tx, uint64_t *speed);
     363        /** Returns received and transmitted bytes. */
     364        virtual int getRawHostNetworkLoad(const char *name, uint64_t *rx, uint64_t *tx);
    365365        /** Returns process' CPU usage counter in platform-specific units. */
    366366        virtual int getRawProcessCpuLoad(RTPROCESS process, uint64_t *user, uint64_t *kernel, uint64_t *total);
     
    496496    {
    497497    public:
    498         HostNetworkLoadRaw(CollectorHAL *hal, ComPtr<IUnknown> object, com::Utf8Str name, com::Utf8Str ifname, SubMetric *rx, SubMetric *tx)
    499             : BaseMetric(hal, name, object), mInterfaceName(ifname), mRx(rx), mTx(tx), mRxPrev(0), mTxPrev(0), mRc(VINF_SUCCESS) {};
     498        HostNetworkLoadRaw(CollectorHAL *hal, ComPtr<IUnknown> object, com::Utf8Str name, com::Utf8Str ifname, uint32_t speed, SubMetric *rx, SubMetric *tx)
     499            : BaseMetric(hal, name, object), mInterfaceName(ifname), mRx(rx), mTx(tx), mRxPrev(0), mTxPrev(0), mRc(VINF_SUCCESS) { mSpeed = (uint64_t)speed * (1000000/8); /* Convert to bytes/sec */ };
    500500        ~HostNetworkLoadRaw() { delete mRx; delete mTx; };
    501501
     
    515515        uint64_t      mRxPrev;
    516516        uint64_t      mTxPrev;
     517        uint64_t      mSpeed;
    517518        int           mRc;
    518519    };
  • trunk/src/VBox/Main/include/netif.h

    r36057 r43507  
    7272    NETIFTYPE      enmMediumType;
    7373    NETIFSTATUS    enmStatus;
     74    uint32_t       uSpeedMbytes;
    7475    RTUUID         Uuid;
    7576    char           szShortName[VBOXNET_MAX_SHORT_NAME];
     
    9293int NetIfGetConfigByName(PNETIFINFO pInfo);
    9394int NetIfDhcpRediscover(VirtualBox *pVbox, HostNetworkInterface * pIf);
     95int NetIfAdpCtlOut(const char * pcszName, const char * pcszCmd, char *pszBuffer, size_t cBufSize);
    9496
    9597DECLINLINE(Bstr) composeIPv6Address(PRTNETADDRIPV6 aAddrPtr)
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