NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO

This macro sets the MediaSpecificInformation pointer and the SizeMediaSpecificInfo value in the out-of-band data block associated with a specified packet descriptor.

At a Glance

Header file: Ndis.h
Windows CE versions: 2.0 and later

Syntax

NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO(
IN PNDIS_PACKET
Packet, IN PVOID MediaSpecificInfo,
IN UINT SizeMediaSpecificInfo );

Parameters

Packet
Pointer to a driver-allocated packet descriptor.
MediaSpecificInfo
Pointer to a caller-supplied buffer containing medium-specific information, such as packet priority, to be set in the MediaSpecificInformation member of the NDIS_PACKET_OOB_DATA structure associated with the specified packet descriptor. This parameter cannot be NULL.
SizeMediaSpecificInfo
Specifies the number of bytes of information supplied by the MediaSpecificInformation member. This parameter cannot be 0.

Remarks

Depending on the medium, an underlying driver might set these members with this macro in the out-of-band data blocks associated with the packet descriptors that it allocates for receive indications. When a bound protocol is called with the indication, it uses the NDIS_GET_PACKET_MEDIA_SPECIFIC_INFO macro or, possibly, the NdisQueryReceiveIndication function, 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 that it allocates for sends. The underlying driver uses 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:

A protocol driver can call the NdisQueryReceiveInformation function to obtain a copy of the NDIS_PACKET_OOB_DATA structure 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 ou-of-band information with its indications.

A driver that uses this macro runs at IRQL <=DISPATCH_LEVEL.

See Also

NdisAllocatePacket, NdisSend, NDIS_SET_PACKET_STATUS