NDIS_GET_PACKET_HEADER_SIZE (Windows Embedded CE 6.0)
This macro returns the HeaderSize value from the out-of-band data block associated with a given packet descriptor.
The return value is the value set in the HeaderSize member of the NDIS_PACKET_OOB_DATA block associated with the given packet descriptor.
The HeaderSize specifies the number of bytes of medium-specific header mapped by the initial buffer descriptor chained to the packet descriptor. A NIC driver sets this value with NDIS_SET_PACKET_HEADER_SIZE in the out-of-band data block for the receive packets it will indicate with NdisMIndicateReceivePacket. Typically, a NIC miniport sets the HeaderSize once in each packet descriptor it allocates with NdisAllocatePacket for subsequent receive indications, and the value it sets depends on the medium it selected during initialization.
An NDIS intermediate driver that translates indicated packets to another medium for still higher level protocols would use NDIS_SET_PACKET_HEADER to set the header size to a value appropriate to its own medium as it translates incoming receives.
The NDIS_GET_PACKET_HEADER_SIZE macro is defined as follows.
#define NDIS_GET_PACKET_HEADER_SIZE(_Packet) \ ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \ (_Packet)->Private.NdisPacketOobOffset))->HeaderSize