NdisGetNextBuffer

VOID
    NdisGetNextBuffer(

        IN PNDIS_BUFFER  CurrentBuffer,
        OUT PNDIS_BUFFER  *NextBuffer
        );

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

Parameters

CurrentBuffer
Points to the current buffer descriptor.
NextBuffer
Points 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.

Comments

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.

A driver also can call NdisQueryBuffer 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.

Callers of NdisGetNextBuffer can run at any IRQL.

See Also

NdisGetFirstBufferFromPacket, NdisQueryBuffer, NdisQueryPacket