Microsoft Windows CE 3.0  

NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This macro sets the MediaSpecificInformationpointer and the SizeMediaSpecificInfovalue in the out-of-band data block associated with a specified packet descriptor.

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 MediaSpecificInformationmember of the NDIS_PACKET_OOB_DATAstructure associated with the specified packet descriptor. This parameter cannot be NULL.
SizeMediaSpecificInfo
Specifies the number of bytes of information supplied by the MediaSpecificInformationmember. 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_INFOmacro or, possibly, the NdisQueryReceiveIndicationfunction, to access the supplied information.

Depending on the medium of the underlying driver to which it is bound, a protocol might set MediaSpecificInformationand SizeMediaSpecificInfoin the out-of-band blocks associated with the packet descriptors that it allocates for sends. The underlying driver uses NDIS_GET_PACKET_MEDIA_SPECIFIC_INFOto 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 miniport cannot access the buffer that it sets up with out-of-band information when the NdisMIndicateReceivePacketfunction returns control if NDIS_STATUS_PENDING is set in the Statusmember of the associated structure. The driver uses NDIS_GET_PACKET_STATUSto determine whether each packet in the packet array that it just indicated has this status set or has been returned with NDIS_STATUS_SUCCESS.
  • A protocol driver cannot access the buffer that it set up with out-of-band information for a send, or anything else in the structure associated with a packet descriptor that it passes to the NdisSendfunction, until the packet descriptor is returned to its ProtocolSendCompletefunction.

    Because NDIS queues send packets and resubmits them if the MiniportSendfunction returns NDIS_STATUS_RESOURCES for the Statusof 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 the NdisQueryReceiveInformationfunction to obtain a copy of the NDIS_PACKET_OOB_DATAstructure associated with a packet descriptor when its ProtocolReceivefunction 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.

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

    Requirements

    Runs on Versions Defined in Include Link to
    Windows CE OS 2.0 and later Ndis.h    
    Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

    See Also

    NDIS_SET_PACKET_STATUS, NdisAllocatePacket, NdisSend



     Last updated on Tuesday, July 13, 2004

    © 2004 Microsoft Corporation. All rights reserved.