OID_GEN_STATISTICS (Compact 2013)

3/26/2014

As a query, NDIS and overlying drivers use this OID to obtain statistics of an adapter or a miniport driver.

Syntax

typedef struct _NDIS_STATISTICS_INFO {
  NDIS_OBJECT_HEADER  Header;
  ULONG  SupportedStatistics;
  ULONG64  ifInDiscards;
  ULONG64  ifInErrors;
  ULONG64  ifHCInOctets;
  ULONG64  ifHCInUcastPkts;
  ULONG64  ifHCInMulticastPkts;
  ULONG64  ifHCInBroadcastPkts;
  ULONG64  ifHCOutOctets;
  ULONG64  ifHCOutUcastPkts;
  ULONG64  ifHCOutMulticastPkts;
  ULONG64  ifHCOutBroadcastPkts;
  ULONG64  ifOutErrors;
  ULONG64  ifOutDiscards;
  ULONG64  ifHCInUcastOctets;
  ULONG64  ifHCInMulticastOctets;
  ULONG64  ifHCInBroadcastOctets;
  ULONG64  ifHCOutUcastOctets;
  ULONG64  ifHCOutMulticastOctets;
  ULONG64  ifHCOutBroadcastOctets;
} NDIS_STATISTICS_INFO, *PNDIS_STATISTICS_INFO;

Members

This structure contains the following members:

  • Header
    The NDIS_OBJECT_HEADER structure for the NDIS_STATISTICS_INFO structure. Set the Type member of the structure that Header specifies to NDIS_OBJECT_TYPE_DEFAULT, the Revision member to NDIS_STATISTICS_INFO_REVISION_1, and the Size member to sizeof(NDIS_STATISTICS_INFO).
  • Supported Statistics
    The set of statistics that the miniport driver supports.

    Note   NDIS 6.0 drivers must support all statistics and must report them when queried for OID_GEN_STATISTICS.

    The value is the bitwise OR of the following flags:

    • NDIS_STATISTICS_FLAGS_VALID_DIRECTED_FRAMES_RCV
      The data in the ifHCInUcastPkts member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_MULTICAST_FRAMES_RCV
      The data in the ifHCInMulticastPkts member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_BROADCAST_FRAMES_RCV
      The data in the ifHCInBroadcastPkts member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_BYTES_RCV
      The data in the ifHCInOctets member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_RCV_DISCARDS
      The data in the ifInDiscards member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_RCV_ERROR
      The data in the ifInErrors member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_DIRECTED_FRAMES_XMIT
      The data in the ifHCOutUcastPkts member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_MULTICAST_FRAMES_XMIT
      The data in the ifHCOutMulticastPkts member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_BROADCAST_FRAMES_XMIT
      The data in the ifHCOutBroadcastPkts member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_BYTES_XMIT
      The data in the ifHCOutOctets member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_XMIT_ERROR
      The data in the ifOutErrors member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_XMIT_DISCARDS
      The data in the ifOutDiscards member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_DIRECTED_BYTES_RCV
      The data in the ifHCInUcastOctets member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_MULTICAST_BYTES_RCV
      The data in the ifHCInMulticastOctets member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_BROADCAST_BYTES_RCV
      The data in the ifHCInBroadcastOctets member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_DIRECTED_BYTES_XMIT
      The data in the ifHCOutUcastOctets member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_MULTICAST_BYTES_XMIT
      The data in the ifHCOutMulticastOctets member is valid.
    • NDIS_STATISTICS_FLAGS_VALID_BROADCAST_BYTES_XMIT
      The data in the ifHCOutBroadcastOctets member is valid.
  • ifInDiscards
    The sum of the receive error count and dropped-receive-buffer error count. This sum is the same value that OID_GEN_RCV_DISCARDS returns.
  • ifInErrors
    The receive error count. This count is the same value that OID_GEN_RCV_ERROR returns.
  • ifHCInOctets
    The sum of the receive-directed byte count, receive-multicast byte count, and receive-broadcast byte count. This sum is the same value that OID_GEN_BYTES_RCV returns.
  • ifHCInUcastPkts
    The number of directed packets that are received without errors. This number is the same value that OID_GEN_DIRECTED_FRAMES_RCV returns.
  • ifHCInMulticastPkts
    The number of multicast/functional packets that are received without errors. This number is the same value that OID_GEN_MULTICAST_FRAMES_RCV returns.
  • ifHCInBroadcastPkts
    The number of broadcast packets that are received without errors. This number is the same value that OID_GEN_BROADCAST_FRAMES_RCV returns.
  • ifHCOutOctets
    The sum of the transmit-directed byte count, transmit-multicast byte count and transmit-broadcast byte count. This sum is the same value that OID_GEN_BYTES_XMIT returns.
  • ifHCOutUcastPkts
    The number of directed packets that are transmitted without errors. This number is the same value that OID_GEN_DIRECTED_FRAMES_XMIT returns.
  • ifHCOutMulticastPkts
    The number of multicast/functional packets that are transmitted without errors. This number is the same value that OID_GEN_MULTICAST_FRAMES_XMIT returns.
  • ifHCOutBroadcastPkts
    The number of broadcast packets that are transmitted without errors. This number is the same value that OID_GEN_BROADCAST_FRAMES_XMIT returns.
  • ifOutErrors
    The transmit error count. This count is the same value that OID_GEN_XMIT_ERROR returns.
  • ifOutDiscards
    The number of packets that is discarded by the interface. This is same as the value that is returned by querying the OID_GEN_XMIT_DISCARDS OID.
  • ifHCInUcastOctets
    The number of bytes in directed packets that are received without errors. This count is the same value that OID_GEN_DIRECTED_BYTES_RCV returns.
  • ifHCInMulticastOctets
    The number of bytes in multicast/functional packets that are received without errors. This count is the same value that OID_GEN_MULTICAST_BYTES_RCV returns.
  • ifHCInBroadcastOctets
    The number of bytes in broadcast packets that are received without errors. This count is the same value that OID_GEN_BROADCAST_BYTES_RCV returns.
  • ifHCOutUcastOctets
    The number of bytes in directed packets that are transmitted without errors. This count is the same value that OID_GEN_DIRECTED_BYTES_XMIT returns.
  • ifHCOutMulticastOctets
    The number of bytes in multicast/functional packets that are transmitted without errors. This count is the same value that OID_GEN_MULTICAST_BYTES_XMIT returns.
  • ifHCOutBroadcastOctets
    The number of bytes in broadcast packets that are transmitted without errors. This count is the same value that OID_GEN_BROADCAST_BYTES_XMIT returns.

Remarks

Miniport drivers must implement the statistics counters and report the correct statistics values. The statistics counters are unsigned 64-bit values. The miniport driver returns the statistics in an NDIS_STATISTICS_INFO structure.

Requirements

Header

ntddndis.h

See Also

Reference

NDIS 6.0 General OIDs for Miniport Drivers
NDIS_OBJECT_HEADER
OID_GEN_BROADCAST_BYTES_RCV
OID_GEN_BROADCAST_BYTES_XMIT
OID_GEN_BROADCAST_FRAMES_RCV
OID_GEN_BROADCAST_FRAMES_XMIT
OID_GEN_BYTES_RCV
OID_GEN_BYTES_XMIT
OID_GEN_DIRECTED_BYTES_RCV
OID_GEN_DIRECTED_BYTES_XMIT
OID_GEN_DIRECTED_FRAMES_RCV
OID_GEN_DIRECTED_FRAMES_XMIT
OID_GEN_MULTICAST_FRAMES_RCV
OID_GEN_MULTICAST_FRAMES_XMIT
OID_GEN_MULTICAST_BYTES_RCV
OID_GEN_MULTICAST_BYTES_XMIT
OID_GEN_RCV_DISCARDS
OID_GEN_RCV_ERROR
OID_GEN_XMIT_DISCARDS
OID_GEN_XMIT_ERROR