Bagikan melalui


NdisSetPacketFlags function

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.

NdisSetPacketFlags sets caller-determined and medium-specific information in the flags of a given packet descriptor.

Syntax

VOID NdisSetPacketFlags(
  _In_ PNDIS_PACKET Packet,
  _In_ UINT         Flags
);

Parameters

  • Packet [in]
    Pointer to the packet descriptor in which the flags should be set.

  • Flags [in]
    Specifies the value to be set in the flags, which are in the private portion of the packet descriptor reserved for use by NDIS.

    For protocols, the format of this value is specific to the medium that the underlying driver selected when the protocol called NdisOpenAdapter to set up the binding.

Return value

None

Remarks

Setting the flags in a packet descriptor allows a protocol driver to pass information, usually about about a send request, that is not included in the packet data.

A protocol driver usually calls NdisSetPacketFlags to set the flags in packets sent on any medium that transmits data in an expedited manner. Some types of media include flags information in the packet header contained in buffers chained to the send packet. When a protocol driver is bound to an underlying driver for these types of media, a call to NdisSetPacketFlags is unnecessary.

When a bound protocol calls NdisSetPacketFlags, an underlying driver's MiniportSendPackets function can read these flags only by calling NdisGetPacketFlags. For underlying drivers that have MiniportSend functions, a call to NdisGetPacketFlags is unnecessary because the flags are passed as an input parameter to the MiniportSend function.

All packet descriptors allocated with NdisAllocatePacket are zero-initialized, including the flags. If the value returned by NdisGetPacketFlags is zero, the underlying driver can assume that the packet has no protocol-set flags information.

However, protocols can supply far more media-specific information, such as the packet priority, in the out-of-band data block associated with each packet descriptor than a call to NdisSetPacketFlags with a single packet allows.

Requirements

Target platform

Desktop

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.

Header

Ndis.h (include Ndis.h)

IRQL

<= DISPATCH_LEVEL

See also

MiniportSend

MiniportSendPackets

NdisAllocatePacket

NdisGetPacketFlags

NdisOpenAdapter

NDIS_PACKET

NDIS_PACKET_OOB_DATA

NdisSend

NdisSendPackets

NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO

ProtocolSendComplete

 

 

Send comments about this topic to Microsoft