Поделиться через


NDIS_SET_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_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.

Syntax

VOID NDIS_SET_PACKET_HEADER_SIZE(
  _In_ PNDIS_PACKET Packet,
  _In_ UINT         HdrSize
);

Parameters

  • Packet [in]
    Pointer to a driver-allocated packet descriptor.

  • HdrSize [in]
    Specifies the medium-specific number of bytes in the net packet header.

Return value

None

Remarks

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 driver 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.

Requirements

Target platform

Desktop

Header

Ndis.h (include Ndis.h)

IRQL

<= DISPATCH_LEVEL

See also

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

 

 

Send comments about this topic to Microsoft