Compartir a través de


Closing an Address Family (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.

A connection-oriented client calls NdisClCloseAddressFamilyto delete the association between itself, a call manager, and a particular underlying NIC.

The following figure shows a client of a call manager closing an address family.

The following figure shows a client of an MCM driver closing an address family.

A client commonly calls NdisClCloseAddressFamilyfrom its ProtocolUnbindAdapter function after it closes all its open VCs on the binding (see Client-Initiated Request to Close a Call) and deregisters any SAPs (see Deregistering a SAP). NDIS calls a client's ProtocolUnbindAdapterfunction whenever an underlying NIC to which that client is bound is removed from the machine or is reconfigured. A client can also call NdisClCloseAddressFamilyin the context of processing an OID_CO_AF_CLOSE request.

The call to NdisClCloseAddressFamilycauses NDIS to call the ProtocolCmCloseAf function of the call manager or MCM driver that the client originally used to open the address family. ProtocolCmCloseAf releases and/or deactivates any resources that were allocated by the call manager in its ProtocolCmOpenAf function. The call manager also should undo any other actions it took on behalf of the connection-oriented client when the address family was opened by that client.

ProtocolCmCloseAf can complete synchronously or asynchronously. To complete asynchronously, the ProtocolCmCloseAf function of a call manager calls NdisCmCloseAddressFamilyComplete. The ProtocolCmCloseAf function of an MCM driver calls NdisMCmCloseAddressFamilyComplete.

If any outstanding requests or connections remain open on an address family, a call manager can respond to a client's request to close the address family in either of the following ways:

  • The call manager or MCM driver can fail the request with NDIS_STATUS_NOT_ACCEPTED.

  • The call manager or MCM driver can return NDIS_STATUS_PENDING. After the client has closed all calls and deregistered all SAPs, the call manager or MCM driver can then close the address family and call Ndis(M)CmCloseAddressFamilyComplete to notify the client. This is the preferred response.

The call to Ndis(M)CmCloseAddressFamilyComplete causes NDIS to call the ProtocolClCloseAfCompletefunction of the connection-oriented client that originally called NdisClCloseAddressFamily.

 

 

Send comments about this topic to Microsoft