Поделиться через


NDIS_GET_PACKET_TIME_SENT (Compact 2013)

3/26/2014

This macro returns the TimeSent value from the out-of-band (OOB) data block associated with a given packet descriptor.

Syntax

ULONGLONG NDIS_GET_PACKET_TIME_SENT(
  PNDIS_PACKET _Packet
);

Parameters

  • _Packet
    Points to a packet descriptor

Return Value

The return value is the time stamp, if any, set by the miniport when the net packet was received on the underlying network adapter.

Remarks

When a protocol driver's ProtocolReceivePacket function is called with an indication, it can use this macro to retrieve the TimeSent time stamp 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 time stamp.

A protocol driver can call NdisGetReceivedPacket followed by NDIS_GET_PACKET_TIME_SENT to obtain this time stamp 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 OOB information with its indications.

All time stamps 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 time stamps. Still higher-level drivers or system components can convert this time stamp into locale-specific values more meaningful to the end-user.

The NDIS_GET_PACKET_TIME_SENT macro is defined as follows.

#define NDIS_GET_PACKET_TIME_SENT(_Packet)                              \
                        ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) +    \
                        (_Packet)->Private.NdisPacketOobOffset))->TimeSent

Requirements

Header

ndis.h

See Also

Reference

NDIS 5.x Legacy Network Driver Macros
NDIS_GET_ORIGINAL_PACKET
NdisGetCurrentSystemTime
NdisGetReceivedPacket
NdisMIndicateReceivePacket
NDIS_PACKET_OOB_DATA
ProtocolReceive
ProtocolReceivePacket
NDIS 5.x Legacy Reference