NDIS_GET_PACKET_TIME_SENT

ULONGLONG
   NDIS_GET_PACKET_TIME_SENT(
       IN PNDIS_PACKET Packet
       );

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

Parameters

Packet

Points to a packet descriptor.

Return Value

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

Comments

When a protocol driver’s ProtocolReceivePacket function is called with an indication, it can use this macro to retrieve the TimeSent timestamp using the Packet pointer it is given on entry. This value was set originally by a protocol on the remote node that transmitted the packet as the TimeToSend timestamp.

A protocol driver can call NdisQueryReceiveInformation 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, this call is 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 packets 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.

Callers of NDIS_GET_PACKET_TIME_SENT run at IRQL <= DISPATCH_LEVEL.

See Also

MiniportHandleInterrupt, MiniportTimer, NdisGetCurrentSystemTime, NDIS_GET_PACKET_TIME_RECEIVED, NdisMIndicateReceivePacket, NDIS_OOB_DATA_FROM_PACKET, NDIS_PACKET_OOB_DATA, NdisQueryReceiveInformation, NDIS_SET_PACKET_TIME_SENT, ProtocolReceive, ProtocolReceivePacket