NDIS_HARDWARE_CROSSTIMESTAMP structure (ntddndis.h)

The NDIS_HARDWARE_CROSSTIMESTAMP structure describes the cross timestamp between a NIC’s hardware clock and a system clock.

Syntax

typedef struct _NDIS_HARDWARE_CROSSTIMESTAMP {
  NDIS_OBJECT_HEADER Header;
  ULONG              Flags;
  ULONG64            SystemTimestamp1;
  ULONG64            HardwareClockTimestamp;
  ULONG64            SystemTimestamp2;
} NDIS_HARDWARE_CROSSTIMESTAMP, *PNDIS_HARDWARE_CROSSTIMESTAMP;

Members

Header

The NDIS_OBJECT_HEADER structure that describes this NDIS_HARDWARE_CROSSTIMESTAMP structure. Set the members of the NDIS_OBJECT_HEADER structure as follows:

  • Set the Type member to NDIS_OBJECT_TYPE_DEFAULT.

  • Set the Revision member to NDIS_HARDWARE_CROSSTIMESTAMP_REVISION_1.

  • Set the Size member to NDIS_SIZEOF_HARDWARE_CROSSTIMESTAMP_REVISION_1.

Flags

Reserved for future use. The miniport driver must not change this value.

SystemTimestamp1

The performance counter value (QPC) obtained by calling KeQueryPerformanceCounter.

HardwareClockTimestamp

The NIC hardware clock’s current value. This should be the raw hardware clock value of the NIC.

SystemTimestamp2

Another performance counter value (QPC) obtained by calling KeQueryPerformanceCounter.

Remarks

When a miniport driver receives the OID request of OID_TIMESTAMP_GET_CROSSTIMESTAMP, the driver completes the OID by filling the InformationBuffer in the QUERY_INFORMATION with an NDIS_HARDWARE_CROSSTIMESTAMP structure.

The driver should fill the SystemTimestamp1, HardwareClockTimestamp and SystemTimestamp2 fields with timestamps taken as close to each other as possible and in the following order:

  1. SystemTimestamp1

  2. HardwareClockTimestamp

  3. SystemTimestamp2

The miniport driver and hardware are free to optimize the collection of these timestamps depending on any advanced hardware capabilities. However, the SystemTimestamp1 and SystemTimestamp2 values returned on OID completion must accurately correspond to the performance counter (QPC) value at the time of capture. The HardwareClockTimestamp must correspond to the NIC’s hardware clock value at the point of capture. If a particular implementation can more accurately determine two timestamps rather than three (for example, one system timestamp and the corresponding NIC hardware clock timestamp), then it should set the SystemTimestamp2 field to the same value as SystemTimestamp1.

The miniport driver should not set the SystemTimestamp1, HardwareClockTimestamp, or SystemTimestamp2 values to zero.

Requirements

Requirement Value
Minimum supported client Windows 11
Minimum supported server Windows Server 2022. Supported in NDIS 6.82 and later.
Header ntddndis.h (include ndis.h)

See also

OID_TIMESTAMP_GET_CROSSTIMESTAMP

KeQueryPerformanceCounter

NDIS_OBJECT_HEADER