NDIS_SET_PACKET_HEADER_SIZE(
IN PNDIS_PACKET Packet,
IN UINT HdrSize
);
NDIS_SET_PACKET_HEADER_SIZE sets the HeaderSize value in the out-of-band data block associated with a given packet descriptor for a subsequent receive indication.
The HeaderSize member in the NDIS_PACKET_OOB_DATA block 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 value with NDIS_SET_PACKET_HEADER_SIZE in the out-of-band data blocks for the receive packets it will subsequently indicate with NdisMIndicateReceivePacket. Typically, a miniport sets the HeaderSize once for each packet descriptor it allocates with NdisAllocatePacket for subsequent receive indications, depending on the medium it selected during initialization. If such a driver clears the out-of-band data block with NDIS_OOB_DATA_FROM_PACKET and NdisZeroMemory when it regains ownership of its receive packet descriptors, that driver must call NDIS_SET_PACKET_HEADER_SIZE 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.
Callers of NDIS_SET_PACKET_HEADER_SIZE run at IRQL <= DISPATCH_LEVEL.
MiniportHandleInterrupt, MiniportInitialize, MiniportReturnPacket, MiniportTimer, NdisAllocatePacket, NDIS_GET_PACKET_HEADER_SIZE, NdisMIndicateReceivePacket, NDIS_OOB_DATA_FROM_PACKET, NDIS_PACKET_OOB_DATA, NdisSend, NdisSendPackets, NdisZeroMemory, ProtocolReceive, ProtocolReceivePacket