NdisQueryBufferOffset

This function retrieves the base virtual address of the range specified in a specified buffer descriptor.

At a Glance

Header file: Ndis.h
Windows CE versions: 2.0 and later

Syntax

VOID NdisQueryBufferOffset( IN PNDIS_BUFFER Buffer,
OUT PUINT
Offset, OUT PUINT Length );

Parameters

Buffer
Pointer to the buffer descriptor.
Offset
Pointer to a caller-supplied variable in which this function returns the 0-based byte offset within the physical page containing the buffer.
Length
Pointer to a caller-supplied variable in which this function returns the size, in bytes, of the given buffer.

Remarks

This function returns the offset within a physical page at which a given buffer begins. Usually, the buffer descriptor is part of a packet chain.

This function runs faster than the NdisQueryBuffer function. NDIS drivers call this function in situations in which they need to constrain packets by certain criteria. For example, this function can be used to determine if a buffer crosses a page boundary, if it is odd-byte aligned, and so on.

A driver that calls this function runs at IRQL <= DISPATCH_LEVEL.

See Also

NdisAllocateBuffer, NdisQueryBuffer, NdisUnchainBufferAtBack, NdisUnchainBufferAtFront