// netadapter.h
typedef struct _NET_ADAPTER_RX_CAPABILITIES {
ULONG Size;
NET_RX_FRAGMENT_BUFFER_ALLOCATION_MODE AllocationMode;
NET_RX_FRAGMENT_BUFFER_ATTACHMENT_MODE AttachmentMode;
UINT32 FragmentRingNumberOfElementsHint;
SIZE_T MaximumFrameSize;
SIZE_T MaximumNumberOfQueues;
union {
struct {
PFN_NET_ADAPTER_RETURN_RX_BUFFER EvtAdapterReturnRxBuffer;
} DUMMYSTRUCTNAME;
struct {
NET_MEMORY_MAPPING_REQUIREMENT MappingRequirement;
SIZE_T FragmentBufferAlignment;
NET_ADAPTER_DMA_CAPABILITIES *DmaCapabilities;
} DUMMYSTRUCTNAME2;
} DUMMYUNIONNAME;
} NET_ADAPTER_RX_CAPABILITIES;
View the official Windows Driver Kit DDI referenceNo description available.
The NET_ADAPTER_RX_CAPABILITIES structure describes the receive capabilities of a net adapter.
SizeThe size of this structure, in bytes.
AllocationModeA NET_RX_FRAGMENT_BUFFER_ALLOCATION_MODE value that specifies how the operating system should allocate receive buffers.
UMDF drivers must set this value to NetRxFragmentBufferAllocationModeSystem.
AttachmentModeA NET_RX_FRAGMENT_BUFFER_ATTACHMENT_MODE value that specifies how the operating system should pre-attach receive buffers.
UMDF drivers must set this value to NetRxFragmentBufferAttachmentModeSystem.
FragmentRingNumberOfElementsHintA hint indicating how many elements the adapter wants for each receive queue's ring buffer of NET_FRAGMENTs. This member must be a power of 2.
MaximumFrameSizeThe maximum frame size, in bytes, that the adapter can receive. This value should include the maximum transmission unit (MTU) size that your hardware supports for an IP packet, plus additional space your driver might need for packet metadata. For more information, see the receive example in the Remarks section of EVT_PACKET_QUEUE_ADVANCE.
MaximumNumberOfQueuesThe maximum number of receive queues that the adapter supports.
DUMMYUNIONNAMEA union that contains the following members:
DUMMYUNIONNAME.DUMMYSTRUCTNAMEA struct that contains the following member:
DUMMYUNIONNAME.DUMMYSTRUCTNAME.EvtAdapterReturnRxBufferA pointer to the driver's EVT_NET_ADAPTER_RETURN_RX_BUFFER callback function. This member is required if the AllocationMode member is set to NetRxFragmentBufferAllocationModeDriver for the operating system to invoke once the system is finished with the receive buffer.
DUMMYUNIONNAME.DUMMYSTRUCTNAME2A struct that contains the following members:
DUMMYUNIONNAME.DUMMYSTRUCTNAME2.MappingRequirementA NET_MEMORY_MAPPING_REQUIREMENT value that specifies how the operating system should map receive data buffers.
UMDF drivers must set MappingRequirement to NetMemoryMappingRequirementNone.
DUMMYUNIONNAME.DUMMYSTRUCTNAME2.FragmentBufferAlignmentThe minimum alignment for packet fragments. This member must be a power of 2.
DUMMYUNIONNAME.DUMMYSTRUCTNAME2.DmaCapabilitiesA pointer to a driver-allocated and initialized NET_ADAPTER_DMA_CAPABILITIES structure that describes the adapter's DMA capabilities on the receive path. This member is ignored by NetAdapterCx if MappingRequirement is not set to NetMemoryMappingRequirementDmaMapped.
UMDF NetAdapterCX doesn't support DmaCapabilities. UMDF drivers must set this member to NULL.
Call one of the NET_ADAPTER_RX_CAPABILITIES_INIT_XXX functions to initialize this structure. For more info about each initialization function, see the links in the See Also section. An initialized NET_ADAPTER_RX_CAPABILITIES structure is passed as a parameter to NetAdapterSetDatapathCapabilities.
Typically, a client driver either performs both allocation and attachment itself or specifies that the operating system perform both. In most cases, we recommend that the operating system allocates and attaches receive buffers.
If the client does specify driver-allocated and attached receive buffers, it must supply both a custom return context structure in the RxBufferReturnContext member of each NET_FRAGMENT during buffer allocation, as well as an EVT_NET_ADAPTER_RETURN_RX_BUFFER callback function in this NET_ADAPTER_RX_CAPABILITIES structure for the operating system to invoke once it has finished with the buffer.
NET_ADAPTER_RX_CAPABILITIES_INIT_DRIVER_MANAGED
NET_ADAPTER_RX_CAPABILITIES_INIT_SYSTEM_MANAGED
NET_ADAPTER_RX_CAPABILITIES_INIT_SYSTEM_MANAGED_DMA
NetAdapterSetDatapathCapabilities