Accessing OOB Information from a Connectionless Protocol Driver (NDIS 5.1)
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.
When a received network packet is indicated to ProtocolReceive, the protocol driver must copy the received data into a protocol-supplied buffer. If such an indication has associated media-specific and/or time stamp information in the OOB block, associated with the packet descriptor, a protocol driver can call NdisGetReceivedPacketand NDIS_GET_ORIGINAL_PACKETto copy the media-specific information, as well as any TimeSentand TimeReceivedtime stamps.
If a received packet is passed to ProtocolReceivePacket, the protocol driver can copy the information from the associated OOB block using NDIS-supplied macros as follows:
Copy media-specific information using NDIS_GET_MEDIA_SPECIFIC_INFO.
Copy TimeSent using NDIS_GET_TIME_SENT.
Copy TimeReceived using NDIS_GET_TIME_RECEIVED.
Note Most miniport drivers do not support TimeSent and TimeReceived.
TimeSentis the time a packet was sent by the miniport driver on the remote node, and is retrieved and stored by the underlying miniport driver on the local node, if available. TimeReceivedis the time that the incoming packet was received on the underlying NIC on the local node.
The current system time can be determined using NdisGetCurrentSystemTimeor KeQuerySystemTimeif the protocol converts these time stamps into another format.