Protocol Driver Binding Operations (NDIS 5.1)

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

When a NIC becomes available, NDIS calls the ProtocolBindAdapterfunction of any protocol driver that can bind itself to that NIC.

NDIS supplies the name of the newly-available adapter for ProtocolBindAdapterto open in the DeviceNameparameter. The DeviceNameparameter can refer to a NIC managed by an underlying miniport driver, or it can be the name of a virtual miniport exported by an intermediate driver. NDIS passes a handle in the BindContextparameter that represents the adapter's context for the bind request.

The SystemSpecific1parameter of ProtocolBindAdapterpoints to a registry path if the protocol driver stores adapter-specific information in the registry. This value is passed to NdisOpenProtocolConfigurationto obtain a handle that is used to read and possibly to write such information.

The SystemSpecific2parameter of ProtocolBindAdapteris reserved for system use. It is the physical device object of the adapter to which the protocol is requested to bind.

The protocol driver must retain the BindContextparameter and pass it back to NDIS as a parameter to NdisCompleteBindAdapterwhen the driver has completed its binding-related activities and is ready to transmit and receive packets.

The protocol driver can store the BindContextparameter in the allocated binding-related context area or in another driver-accessible location. The value of the BindContextparameter must be stored if NdisOpenAdapterreturns NDIS_STATUS_PENDING. In this case, the protocol driver cannot call NdisCompleteBindAdapteruntil the open-adapter operation is complete and NDIS calls the protocol driver's ProtocolOpenAdapterCompletefunction. BindContextmust then be retrieved from a known location and passed by ProtocolOpenAdapterCompleteto NdisCompleteBindAdapter.

Binding-time operations include allocating and initializing an adapter-specific context area for the binding, and calling NdisOpenAdapterto open the adapter passed in the DeviceNameparameter.

If NdisOpenAdapterreturns NDIS_STATUS_PENDING, the protocol driver cannot call NdisCompleteBindAdapteruntil the open operation is complete. The open operation is complete when NDIS calls the protocol driver's ProtocolOpenAdapterCompletefunction.

For additional information about opening an underlying adapter, see Opening an Adapter Underlying a Protocol Driver.

 

 

Send comments about this topic to Microsoft