NDIS_GET_PACKET_HEADER_SIZE function
Note NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.
NDIS_GET_PACKET_HEADER_SIZE returns the HeaderSize value from the out-of-band data block associated with a given packet descriptor.
Syntax
UINT NDIS_GET_PACKET_HEADER_SIZE(
_In_ PNDIS_PACKET Packet
);
Parameters
- Packet [in]
Pointer to a packet descriptor.
Return value
NDIS_GET_PACKET_HEADER_SIZE returns 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 miniport driver 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_SIZE to set the header size to a value appropriate to its own medium as it translates incoming receives.
Requirements
Target platform |
Desktop |
Header |
Ndis.h (include Ndis.h) |
IRQL |
<= DISPATCH_LEVEL |
See also