NDIS_GET_PACKET_TIME_RECEIVED (Windows Embedded CE 6.0)
This function returns the TimeReceived value from the out-of-band (OOB) data block associated with a given packet descriptor.
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 the NDIS_GET_ORIGINAL_PACKET macro to obtain this time stamp from the NDIS_PACKET_OOB_DATA structure 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.
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_RECEIVED macro is defined as follows.
#define NDIS_GET_PACKET_TIME_RECEIVED(_Packet) \ ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \ (_Packet)->Private.NdisPacketOobOffset))->TimeReceived