diff --git a/Library/MeasureNet.h b/Library/MeasureNet.h index f2040782..ffd76d08 100644 --- a/Library/MeasureNet.h +++ b/Library/MeasureNet.h @@ -19,141 +19,10 @@ #ifndef __MEASURENET_H__ #define __MEASURENET_H__ -#include "Measure.h" +#include +#include #include - -// -// Medium the Ndis Driver is running on (OID_GEN_MEDIA_SUPPORTED/ OID_GEN_MEDIA_IN_USE). -// -typedef enum _NDIS_MEDIUM -{ - NdisMedium802_3, - NdisMedium802_5, - NdisMediumFddi, - NdisMediumWan, - NdisMediumLocalTalk, - NdisMediumDix, // defined for convenience, not a real medium - NdisMediumArcnetRaw, - NdisMediumArcnet878_2, - NdisMediumAtm, - NdisMediumWirelessWan, - NdisMediumIrda, - NdisMediumBpc, - NdisMediumCoWan, - NdisMedium1394, - NdisMediumInfiniBand, -#if ((NTDDI_VERSION >= NTDDI_LONGHORN) || NDIS_SUPPORT_NDIS6) - NdisMediumTunnel, - NdisMediumNative802_11, - NdisMediumLoopback, -#endif // (NTDDI_VERSION >= NTDDI_LONGHORN) - NdisMediumMax // Not a real medium, defined as an upper-bound -} NDIS_MEDIUM, *PNDIS_MEDIUM; - -// -// Physical Medium Type definitions. Used with OID_GEN_PHYSICAL_MEDIUM. -// -typedef enum _NDIS_PHYSICAL_MEDIUM -{ - NdisPhysicalMediumUnspecified, - NdisPhysicalMediumWirelessLan, - NdisPhysicalMediumCableModem, - NdisPhysicalMediumPhoneLine, - NdisPhysicalMediumPowerLine, - NdisPhysicalMediumDSL, // includes ADSL and UADSL (G.Lite) - NdisPhysicalMediumFibreChannel, - NdisPhysicalMedium1394, - NdisPhysicalMediumWirelessWan, - NdisPhysicalMediumNative802_11, - NdisPhysicalMediumBluetooth, - NdisPhysicalMediumInfiniband, - NdisPhysicalMediumWiMax, - NdisPhysicalMediumUWB, - NdisPhysicalMedium802_3, - NdisPhysicalMedium802_5, - NdisPhysicalMediumIrda, - NdisPhysicalMediumWiredWAN, - NdisPhysicalMediumWiredCoWan, - NdisPhysicalMediumOther, - NdisPhysicalMediumMax // Not a real physical type, defined as an upper-bound -} NDIS_PHYSICAL_MEDIUM, *PNDIS_PHYSICAL_MEDIUM; - -typedef struct _MIB_IF_ROW2 { - // - // Key structure. Sorted by preference. - // - NET_LUID InterfaceLuid; - NET_IFINDEX InterfaceIndex; - - // - // Read-Only fields. - // - GUID InterfaceGuid; - WCHAR Alias[IF_MAX_STRING_SIZE + 1]; - WCHAR Description[IF_MAX_STRING_SIZE + 1]; - ULONG PhysicalAddressLength; - UCHAR PhysicalAddress[IF_MAX_PHYS_ADDRESS_LENGTH]; - UCHAR PermanentPhysicalAddress[IF_MAX_PHYS_ADDRESS_LENGTH]; - - ULONG Mtu; - IFTYPE Type; // Interface Type. - TUNNEL_TYPE TunnelType; // Tunnel Type, if Type = IF_TUNNEL. - NDIS_MEDIUM MediaType; - NDIS_PHYSICAL_MEDIUM PhysicalMediumType; - NET_IF_ACCESS_TYPE AccessType; - NET_IF_DIRECTION_TYPE DirectionType; - struct { - BOOLEAN HardwareInterface : 1; - BOOLEAN FilterInterface : 1; - BOOLEAN ConnectorPresent : 1; - BOOLEAN NotAuthenticated : 1; - BOOLEAN NotMediaConnected : 1; - BOOLEAN Paused : 1; - BOOLEAN LowPower : 1; - BOOLEAN EndPointInterface : 1; - } InterfaceAndOperStatusFlags; - - IF_OPER_STATUS OperStatus; - NET_IF_ADMIN_STATUS AdminStatus; - NET_IF_MEDIA_CONNECT_STATE MediaConnectState; - NET_IF_NETWORK_GUID NetworkGuid; - NET_IF_CONNECTION_TYPE ConnectionType; - - // - // Statistics. - // - ULONG64 TransmitLinkSpeed; - ULONG64 ReceiveLinkSpeed; - - ULONG64 InOctets; - ULONG64 InUcastPkts; - ULONG64 InNUcastPkts; - ULONG64 InDiscards; - ULONG64 InErrors; - ULONG64 InUnknownProtos; - ULONG64 InUcastOctets; - ULONG64 InMulticastOctets; - ULONG64 InBroadcastOctets; - ULONG64 OutOctets; - ULONG64 OutUcastPkts; - ULONG64 OutNUcastPkts; - ULONG64 OutDiscards; - ULONG64 OutErrors; - ULONG64 OutUcastOctets; - ULONG64 OutMulticastOctets; - ULONG64 OutBroadcastOctets; - ULONG64 OutQLen; -} MIB_IF_ROW2, *PMIB_IF_ROW2; - -typedef struct _MIB_IF_TABLE2 { - ULONG NumEntries; - MIB_IF_ROW2 Table[ANY_SIZE]; -} MIB_IF_TABLE2, *PMIB_IF_TABLE2; - -typedef enum _MIB_IF_TABLE_LEVEL { - MibIfTableNormal, - MibIfTableRaw -} MIB_IF_TABLE_LEVEL, *PMIB_IF_TABLE_LEVEL; +#include "Measure.h" typedef NETIO_STATUS (NETIOAPI_API_ * FPGETIFTABLE2EX)(MIB_IF_TABLE_LEVEL Level, PMIB_IF_TABLE2* Table); typedef VOID (NETIOAPI_API_ * FPFREEMIBTABLE)(PVOID Memory); diff --git a/Library/StdAfx.h b/Library/StdAfx.h index 433ae65c..b97bb979 100644 --- a/Library/StdAfx.h +++ b/Library/StdAfx.h @@ -26,6 +26,8 @@ #include // WINAPI +#include +#include #include #include #include