Summary of NetAdapterCx objects
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 1809.
The following figure shows the default parent-child relationships for NetAdapterCx objects. Parent objects are at the top of the figure, so for example the NETADAPTER object is by default a child of the WDFDEVICE object. Objects that can have multiple instances are denoted by a double box.
A WDFDEVICE object is a standard framework object that represents a device. A NETADAPTER object represents a network interface, which is the endpoint for all networking I/O. You can have multiple NETADAPTER objects per WDFDEVICE, with the WDFDEVICE being the parent object of each NETADAPTER.
The primary NETADAPTER is called the default adapter. Most network interface card (NIC) drivers only have one NETADAPTER for their physical device, but some client drivers might have more than one NETADAPTER if they manage a server NIC with multiple slots. As another example, Mobile Broadband WDF Class Extension (MBBCx) client drivers might manage more than one NETADAPTER object, each representing an additional Packet Data Protocol (PDP) context.
Currently, the default adapter is the only one visible to user mode applications.
The default adapter must be initialized and created from within the client driver's EVT_WDF_DRIVER_DEVICE_ADD callback function by calling NetDefaultAdapterInitAllocate and NetAdapterCreate. Then, it must be started from within the driver's EVT_WDF_DEVICE_PREPARE_HARDWARE callback function by calling NetAdapterStart. Before calling NetAdapterStart, the driver can optionally set the adapter's capabilities such as link layer capabilities, power capabilities, datapath capabilities, receive scaling capabilities, and hardware offload capabilities.
You can add more NETADAPTER objects as needed during EvtDeviceAdd. Each new NETADAPTER in addition to the default one is initialized with NetAdapterInitAllocate instead of NetDefaultAdapterInitAllocate. Otherwise, the procedure to create them is the same, and they are started the same way later in EvtDevicePrepareHardware.
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.