// netadapterpacket.h
void NET_EXTENSION_QUERY_INIT(
[_Out_] NET_EXTENSION_QUERY *Extension,
[_In_] PCWSTR Name,
[_In_] ULONG Version,
[_In_] NET_EXTENSION_TYPE Type
);
View the official Windows Driver Kit DDI referenceNo description available.
The NET_EXTENSION_QUERY_INIT function initializes a NET_EXTENSION_QUERY structure.
Extension [_Out_]A pointer to a driver-allocated NET_EXTENSION_QUERY structure.
Name [_In_]The name of the extension to be queried.
Version [_In_]The version of the extension to be queried.
Type [_In_]A NET_EXTENSION_TYPE value that specifies the type of extension being queried.
After calling this function, pass the initialized NET_EXTENSION_QUERY structure to NetTx(Rx)QueueGetExtension to get the offset to that extension in the packet or fragment descriptor.
To prevent re-querying extension offsets too often, call this function and NetTx(Rx)QueueGetExtension from the EvtNetAdapterCreateTx(Rx)Queue callback function after calling NetTx(Rx)QueueCreate, then store the offset in a queue context space.
For more info about extensions, see Packet descriptors and extensions.
For a code example of querying extension offsets, see Transmit and receive queues.
Packet descriptors and extensions