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.

At a Glance

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

Syntax

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.

See Also

NdisAllocatePacket, NdisMIndicateReceivePacket, NdisSend, NdisZeroMemory