Share via


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

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

Syntax

VOID NdisQueryBufferOffset(
  _In_  PNDIS_BUFFER Buffer,
  _Out_ PUINT        Offset,
  _Out_ PUINT        Length
);

Parameters

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

Return value

None

Remarks

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.

Requirements

Target platform

Universal

Version

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

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

<= DISPATCH_LEVEL

See also

NdisAllocateBuffer

NdisQueryBuffer

NdisQueryBufferSafe

NdisQueryPacket

NdisUnchainBufferAtBack

NdisUnchainBufferAtFront

 

 

Send comments about this topic to Microsoft