共用方式為


NDIS_GET_PACKET_TIME_RECEIVED function

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

NDIS_GET_PACKET_TIME_RECEIVED returns the TimeReceived value from the out-of-band data block associated with a given packet descriptor.

Syntax

ULONGLONG NDIS_GET_PACKET_TIME_RECEIVED(
  _In_ PNDIS_PACKET Packet
);

Parameters

  • Packet [in]
    Pointer to a packet descriptor.

Return value

NDIS_GET_PACKET_TIME_RECEIVED returns the timestamp, if any, set by the miniport driver when the net packet was received on the underlying NIC.

Remarks

When a protocol driver's ProtocolReceivePacket function is called with an indication, it can use this macro to retrieve the TimeReceived timestamp using the Packet pointer it is given on entry.

A protocol driver can call NdisGetReceivedPacket and NDIS_GET_ORIGINAL_PACKET to obtain this timestamp from the NDIS_PACKET_OOB_DATA block associated with a packet descriptor when its ProtocolReceive function is given an indication. However, these calls are superfluous if the protocol is bound to an underlying driver that does not supply out-of-band information with its indications.

All timestamps set in the NDIS_PACKET_OOB_DATA blocks associated with packet descriptors are expressed in system time units as the number of 100-nanosecond intervals since January 1, 1601.

A highest-level protocol driver might use this macro before it forwards a received net packet to clients if its clients expect timestamps. Still higher-level drivers or system components can convert this timestamp into locale-specific values more meaningful to the end user.

Requirements

Target platform

Desktop

Header

Ndis.h (include Ndis.h)

IRQL

<= DISPATCH_LEVEL

See also

MiniportHandleInterrupt

MiniportTimer

NdisGetCurrentSystemTime

NDIS_GET_ORIGINAL_PACKET

NDIS_GET_PACKET_TIME_SENT

NdisGetReceivedPacket

NdisMIndicateReceivePacket

NDIS_OOB_DATA_FROM_PACKET

NDIS_PACKET_OOB_DATA

NDIS_SET_PACKET_TIME_RECEIVED

ProtocolReceive

ProtocolReceivePacket

 

 

Send comments about this topic to Microsoft