Share via


NDIS_SET_PACKET_HEADER_SIZE

This macro sets the HeaderSize member in the NDIS_OOB_DATA structure associated with a specified packet descriptor for a subsequent receive indication.

NDIS_SET_PACKET_HEADER_SIZE(
IN PNDIS_PACKET Packet, 
IN UINT HdrSize );

Parameters

  • Packet
    Pointer to a driver-allocated packet descriptor.
  • HdrSize
    Specifies the medium-specific number of bytes in the net packet header.

Remarks

The HeaderSize member in NDIS_PACKET_OOB_DATA associated with a packet descriptor specifies the number of bytes of medium-specific header in the buffer mapped by the initial buffer descriptor chained to the packet descriptor.

A lower-level driver sets this member with this macro in the out-of-band data blocks for the receive packets it subsequently indicates with the NdisMIndicateReceivePacket function. Typically, a miniport sets the HeaderSize once for each packet descriptor that it allocates with the NdisAllocatePacket function for subsequent receive indications, depending on the medium that it selects during initializaiton. If such a driver clears the out-of-band data block with the NDIS_OOB_DATA_FROM_PACKET macro and the NdisZeroMemory function when it regains ownership of its receive packet descriptors. That driver must call this macro before it reuses each packet descriptor in a subsequent indication.

When such an indication is made, bound protocols can retrieve this information with the NDIS_GET_PACKET_HEADER_SIZE macro.

A driver that calls 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

NdisAllocatePacket, NdisMIndicateReceivePacket, NdisSend, NdisZeroMemory

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.