NDIS_GET_PACKET_HEADER_SIZE (Windows CE 5.0)
This macro returns the HeaderSize value from the out-of-band data block associated with a given packet descriptor.
UINT NDIS_GET_PACKET_HEADER_SIZE(PNDIS_PACKET_Packet);
Parameters
- _Packet
Points to a packet descriptor.
Return Values
The return value is the value set in the HeaderSize member of the NDIS_PACKET_OOB_DATA block associated with the given packet descriptor.
Remarks
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
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Ndis.h.
See Also
NDIS_PACKET_OOB_DATA | NDIS_SET_PACKET_HEADER_SIZE | NdisAllocatePacket | NdisMIndicateReceivePacket | NdisSend | NdisSendPackets
Send Feedback on this topic to the authors