NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO(
IN PNDIS_PACKET Packet,
IN PVOID MediaSpecificInfo,
IN UINT SizeMediaSpecificInfo
);
NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO sets the MediaSpecificInformation pointer and the SizeMediaSpecificInfo value in the out-of-band data block associated with a given packet descriptor.
Depending on the medium, an underlying driver might set these members with NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO in the out-of-band data blocks associated with the packet descriptors it allocates for receive indications. When a bound protocol is called with the indication, it would use NDIS_GET_PACKET_MEDIA_SPECIFIC_INFO or, possibly, NdisQueryReceiveIndication, to access the supplied information.
Depending on the medium of the underlying driver to which it is bound, a protocol might set MediaSpecificInformation and SizeMediaSpecificInfo in the out-of-band blocks associated with the packet descriptors it allocates for sends. The underlying driver would use NDIS_GET_PACKET_MEDIA_SPECIFIC_INFO to access the supplied information.
In either case, while a higher-level protocol is consuming a receive indication or a lower-level miniport is processing a send, that driver must have exclusive access to the buffer at MediaSpecificInformation. This restriction implies the following:
Because NDIS queues send packets and resubmits them if the MiniportSend function returns NDIS_STATUS_RESOURCES or if the MiniportSendPackets function sets NDIS_STATUS_RESOURCES for the Status of a packet in a submitted array, the final status of each packet in a send (array) is volatile until that packet has been returned to ProtocolSendComplete.
A protocol driver can call NdisQueryReceiveInformation to obtain a copy of 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.
Callers of NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO run at IRQL <= DISPATCH_LEVEL.
MiniportHandleInterrupt, MiniportTimer, NdisAllocatePacket, NDIS_GET_PACKET_MEDIA_SPECIFIC_INFO, NDIS_GET_PACKET_STATUS, NdisMIndicateReceivePacket, NDIS_OOB_DATA_FROM_PACKET, NDIS_PACKET_OOB_DATA, NdisQueryReceiveInformation, NdisSend, NdisSendPackets, NDIS_SET_PACKET_STATUS, ProtocolReceive, ProtocolReceivePacket, ProtocolSendComplete