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.
NdisQueryBufferOffset returns the offset within a physical page at which a given buffer begins. Usually, the buffer descriptor was part of a packet chain.
VOID NdisQueryBufferOffset( _In_ PNDIS_BUFFER Buffer, _Out_ PUINT Offset, _Out_ PUINT Length );
- Buffer [in]
Pointer to the buffer descriptor.
- Offset [out]
Pointer to a caller-supplied variable in which this function returns the zero-based byte offset within the physical page containing the buffer.
- Length [out]
Pointer to a caller-supplied variable in which this function returns the size in bytes of the given buffer.
NdisQueryBufferOffset runs faster than NdisQueryBuffer or NdisQueryBufferSafe. NDIS drivers call NdisQueryBufferOffset in situations where they need to constrain packets by certain criteria. For example, NdisQueryBufferOffset can be used to determine if a buffer crosses a page boundary, if it is odd-byte aligned, and so forth.
|Not supported for NDIS 6.0 drivers in Windows Vista. Use NdisQueryMdlOffsetinstead. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.|