// packet.h
void * NetPacketGetExtension(
const NET_PACKET *packet,
SIZE_T offset
);
View the official Windows Driver Kit DDI referenceNo description available.
The NetPacketGetExtension function retrieves information stored in one of a packet's extensions.
packetA pointer to a NET_PACKET structure.
offsetThe offset, in bytes, to the desired NET_EXTENSION from the beginning of the packet's descriptor.
Returns a pointer to a structure at the given extension offset that represents packet extension information.
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.
Packet descriptors and extensions