Accessing Per-Packet Information from an Intermediate 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.
NDIS per-packet information includes items such as checksum, security and priority information. Intermediate drivers should use the NDIS_PER_PACKET_INFO_FROM_PACKETmacro to retrieve per-packet out-of-band (OOB) data. NDIS_PER_PACKET_INFO_FROM_PACKET returns a pointer to a specific type of per-packet information associated with a packet descriptor. For more information about per-packet information, see Accessing Per-Packet Information.
If NDIS indicates data to an intermediate driver's ProtocolReceivefunction, the intermediate driver calls NdisGetReceivedPacketand NDIS_GET_ORIGINAL_PACKETto retrieve the original packet.
The intermediate driver can obtain information from the OOB data associated with the packet, using NDIS-supplied macros as follows:
Media-specific information is read using NDIS_GET_MEDIA_SPECIFIC_INFO, and written using NDIS_SET_MEDIA_SPECIFIC_INFO
TimeSent is read using NDIS_GET_TIME_SENT, and written using NDIS_SET_TIME_TO_SEND
TimeReceived is read using NDIS_GET_TIME_RECEIVED
Note Most miniport drivers do not support TimeSent and TimeReceived.