NDISUIO Binding and Unbinding (Windows Embedded CE 6.0)
1/6/2010
The NDISUIO driver is installed as an NDIS protocol that is bound to all devices installed with an Interfaces value in the registry of either ndis4 or ndis5. When NDISUIO is loaded, NDIS calls ProtocolBindAdapter for all devices it is configured to bind to. NDISUIO creates an NDIS binding at this point from its bind adapter function. NDISUIO unbinds the adapter when notified by NDIS regarding a triggering event, such as a disabled NIC.
NDISUIO creates a binding to an NDIS device by calling NdisOpenAdapter from its BindAdapter handler. Because NDISUIO works with Ethernet frames, the only medium type of interest is NdisMedium802_3. NDISUIO creates an NDISUIO_OPEN_CONTEXT structure to represent the protocol context for the binding. The following list shows the information contained in this structure:
- Flags that indicate state information
- The NDIS binding handle
- The device name
- A queue of received packets
- A reference count
After creating the binding, NDISUIO sets its packet filter for the binding to:
NDIS_PACKET_TYPE_DIRECTED| NDIS_PACKET_TYPE_MULTICAST| NDIS_PACKET_TYPE_BROADCAST
NDISUIO unbinds the adapter by calling NdisCloseAdapter from its UnbindAdapter function. If a file object is associated with this binding, it remains associated, but any pending or future read and write I/O request packets (IRP) on this file object will fail.
See Also
Reference
NdisCloseAdapter
NdisOpenAdapter
ProtocolBindAdapter
NDISUIO_OPEN_CONTEXT