Compartir a través de


ProtocolClIncomingCloseCall (NDIS 5.1) function

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.

The ProtocolClIncomingCloseCall function is used by all connection-oriented NDIS clients. All such clients must have fully functional ProtocolClIncomingCloseCall functions.

Syntax

VOID ProtocolClIncomingCloseCall(
  _In_     NDIS_STATUS CloseStatus,
  _In_     NDIS_HANDLE ProtocolVcContext,
  _In_opt_ PVOID       CloseData,
  _In_opt_ UINT        Size
);

Parameters

  • CloseStatus [in]
    Specifies the status that indicates the cause of the connection teardown, which is usually NDIS_STATUS_SUCCESS to indicate that the remote party to the call requested that the connection be closed. Any other value indicates that problems on the network caused the call manager to terminate the connection.

  • ProtocolVcContext [in]
    Specifies the handle to the client's per-VC context area for the VC on which the connection is being closed. Whatever the value of CloseStatus, the client can neither send nor receive data on the VC designated by the NdisVcHandle that it stored in this context area.

  • CloseData [in, optional]
    Pointer to a buffer containing a protocol-specific close message, possibly one supplied by the remote client that the call manager received over the network, or this parameter can be NULL.

    When CloseStatus is NDIS_STATUS_SUCCESS, this parameter is NULL if the underlying network medium does not support transfers of data when closing a connection. However, any particular call manager might define a structure to pass additional diagnostic information to its clients on call teardowns caused by problems on the network.

  • Size [in, optional]
    Specifies the size in bytes of the buffer at CloseData, zero if CloseData is NULL.

Return value

None

Remarks

A call to ProtocolClIncomingCloseCall indicates that the one of the following has occurred:

  • The call manager has received a request over the network to close an established connection, identified by the NdisVcHandle that the client stored in its per-VC context area at ProtocolVcContext.

  • The call manager has detected that network problems will prevent further data transfers on the established connection.

In either case, ProtocolClIncomingCloseCall should carry out any protocol-determined operations, such as notifying the client's own client(s) that the connection is being broken. For example, if the call to be closed is a multipoint VC created by the client, ProtocolClIncomingCloseCall must call NdisClDropParty one or more times until only a single party remains on its multipoint VC.

Whether the given VC is a single-point or multipoint connection, ProtocolClIncomingCloseCall must call NdisClCloseCall to acknowledge that the client will neither attempt to send nor expect to receive data on this particular VC. If the call manager created this VC, ProtocolClIncomingCloseCall should return control after it calls NdisClCloseCall. It is the responsibility of the call manager to destroy or reuse any VC that it created.

If the client originally created this VC for an outgoing call, ProtocolClIncomingCloseCall can do one of the following after it calls NdisClDropParty as many times as necessary, if any, and NdisClCloseCall:

  • If CloseStatus is NDIS_STATUS_SUCCESS, tear down the VC with NdisCoDeleteVc and either release the client's per-VC context area or prepare it for reuse in a subsequent call to NdisCoCreateVc.

  • If CloseStatus is NDIS_STATUS_SUCCESS, retain the VC that the client created and prepare its per-VC context area for reuse in a subsequent call to NdisClMakeCall.

  • Otherwise, tear down the VC with NdisCoDeleteVc and release its per-VC context area if the call manager indicated that the network has become inoperative.

Requirements

Target platform

Desktop

Version

See ProtocolClIncomingCloseCall.

Header

Ndis.h (include Ndis.h)

IRQL

<= DISPATCH_LEVEL

See also

NdisClCloseCall

NdisClDropParty

NdisClMakeCall

NdisCmDispatchIncomingCloseCall

NdisCoDeleteVc

NdisCoCreateVc

NdisFreeMemory

NdisFreeToNPagedLookasideList

NdisMCmDispatchIncomingCloseCall

ProtocolClDropPartyComplete

ProtocolCoDeleteVc

 

 

Send comments about this topic to Microsoft