Share via


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

NdisGetNextBuffer returns the next buffer descriptor in a chain, given a pointer to the current buffer descriptor.

Syntax

VOID NdisGetNextBuffer(
  _In_  PNDIS_BUFFER CurrentBuffer,
  _Out_ PNDIS_BUFFER *NextBuffer
);

Parameters

  • CurrentBuffer [in]
    Pointer to the current buffer descriptor.

  • NextBuffer [out]
    Pointer to a caller-supplied variable in which this function returns a pointer to the buffer descriptor, if any, that follows CurrentBuffer in the buffer descriptor chain.

Return value

None

Remarks

NdisGetNextBuffer returns NULL at NextBuffer if CurrentBuffer points to the last buffer descriptor in the chain.

A driver usually calls this function after it calls NdisQueryPacket, or NdisGetFirstBufferFromPacket or NdisGetFirstBufferFromPacketSafe.

A driver also can call NdisQueryBuffer or NdisQueryBufferSafe to get details about a buffer descriptor that NdisGetNextBuffer finds.

NdisGetNextBuffer does not perform any synchronization. Therefore, a caller must handle any synchronization issues internally if more than one driver function can access buffer descriptors chained to a packet simultaneously.

Requirements

Target platform

Desktop

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Use NdisGetNextMdlinstead. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.

Header

Ndis.h (include Ndis.h)

IRQL

Any level

See also

NdisGetFirstBufferFromPacket

NdisGetFirstBufferFromPacketSafe

NdisQueryBuffer

NdisQueryBufferSafe

NdisQueryPacket

 

 

Send comments about this topic to Microsoft