NetPacketGetExtension function

Warning

Some information in this topic relates to prereleased product, which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

NetAdapterCx is preview only in Windows 10, version 1903.

The NetPacketGetExtension method retrieves information stored in one of a packet's extensions.

Syntax

void * NetPacketGetExtension(
  const NET_PACKET *packet,
  SIZE_T           offset
);

Parameters

packet

A pointer to a NET_PACKET structure.

offset

The offset, in bytes, to the desired NET_PACKET_EXTENSION from the beginning of the packet's descriptor.

Return Value

Returns a pointer to a structure at the given extension offset that represents packet extension information.

Remarks

NIC client drivers typically query offsets for packet extensions during datapath queue creation, then store them in their queue context space so they don't have to query them too often. For an example of this, see Transmit and receive queues. These offsets are then passed to NetPacketGetExtension to retrieve data for each packet extension.

Requirements

   
Target Platform Universal
Minimum KMDF version 1.29
Header packet.h (include netadaptercx.h)
IRQL Any level as long as target memory is resident

See Also

Packet descriptors and extensions

Transmit and receive queues