NDIS_PACKET_LAST_NDIS_BUFFER macro

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.

NDIS_PACKET_LAST_NDIS_BUFFER is a macro that returns a pointer to the last buffer descriptor that is chained to a specified packet descriptor.

Syntax

PVOID NDIS_PACKET_LAST_NDIS_BUFFER(
   PNDIS_PACKET Packet
);

Parameters

  • Packet
    Pointer to a packet descriptor.

Return value

NDIS_PACKET_LAST_NDIS_BUFFER returns a pointer to the last buffer descriptor that is chained to the packet descriptor referenced by Packet.

Remarks

An NDIS buffer is a memory descriptor list (MDL). An MDL is an opaque structure, defined by the memory manager, that uses an array of physical page frame numbers (PFNs) to describe the pages that contain a virtual memory range.

After modifying the contents of a buffer or modifying the NDIS buffer chain, a driver must call the NDIS_PACKET_VALID_COUNTS macro to set the ValidCounts member of the packet descriptor to FALSE.

Requirements

Target platform

Desktop

Header

Ndis.h (include Ndis.h)

IRQL

Any level

See also

NDIS_PACKET

NDIS_PACKET_FIRST_NDIS_BUFFER

NDIS_PACKET_VALID_COUNTS

Send comments about this topic to Microsoft