Skip to content

Latest commit

 

History

History
219 lines (170 loc) · 7.9 KB

nc-ndis-protocol_cl_notify_close_af.md

File metadata and controls

219 lines (170 loc) · 7.9 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NC:ndis.PROTOCOL_CL_NOTIFY_CLOSE_AF
PROTOCOL_CL_NOTIFY_CLOSE_AF (ndis.h)
The ProtocolClNotifyCloseAf function notifies a CoNDIS client that the client should close the associated address family (AF).Note  You must declare the function by using the PROTOCOL_CL_NOTIFY_CLOSE_AF type.
netvista\protocolclnotifycloseaf.htm
netvista
05/02/2018
PROTOCOL_CL_NOTIFY_CLOSE_AF callback function
PROTOCOL_CL_NOTIFY_CLOSE_AF, PROTOCOL_CL_NOTIFY_CLOSE_AF callback, ProtocolClNotifyCloseAf, ProtocolClNotifyCloseAf callback function [Network Drivers Starting with Windows Vista], condis_client_ref_0b778346-7d48-4d72-807d-16d8be2da913.xml, ndis/ProtocolClNotifyCloseAf, netvista.protocolclnotifycloseaf
ndis.h
Ndis.h
Windows
Supported in NDIS 6.0 and later.
<= DISPATCH_LEVEL
Windows
PROTOCOL_CL_NOTIFY_CLOSE_AF
ndis/PROTOCOL_CL_NOTIFY_CLOSE_AF
APIRef
kbSyntax
UserDefined
Ndis.h
PROTOCOL_CL_NOTIFY_CLOSE_AF

PROTOCOL_CL_NOTIFY_CLOSE_AF callback function

-description

The ProtocolClNotifyCloseAf function notifies a CoNDIS client that the client should close the associated address family (AF).

Note  You must declare the function by using the PROTOCOL_CL_NOTIFY_CLOSE_AF type. For more information, see the following Examples section.
 

-parameters

-param ClientAfContext [in]

A client-supplied handle to its context area for the associated AF. The client allocated this context area and passed this handle to NDIS in its call to the NdisClOpenAddressFamilyEx function.

-returns

ProtocolClNotifyCloseAf can return one of the following:

Return code Description
NDIS_STATUS_SUCCESS
The client successfully closed the address family.
NDIS_STATUS_PENDING
The client is handling this request asynchronously, and it will call the NdisClNotifyCloseAddressFamilyComplete function when the close operation is complete.
NDIS_STATUS_XXX
The client failed the request for some driver-determined reason.

-remarks

The ProtocolClNotifyCloseAf function is required for CoNDIS clients. NDIS calls ProtocolClNotifyCloseAf when a call manager notifies NDIS that the address family (AF) that the ProtocolAfContext parameter specifies should be closed. In response, the client should:

  1. Call the NdisClDropParty function as many times as necessary until only a single party remains active on each multipoint virtual connection (VC), if the client has any active multipoint connections.
  2. Call the NdisClCloseCall function as many times as necessary to close all of the calls that are still open and are associated with the AF.
  3. Call the NdisClDeregisterSap function as many times as necessary to deregister all service access points (SAPs) that the client has registered with the call manager.
  4. Call the NdisClCloseAddressFamily function to close the AF.
The client can complete these actions asynchronously by returning NDIS_STATUS_PENDING. If the client completes the call asynchronously, it must subsequently call the NdisClNotifyCloseAddressFamilyComplete function when the close operation is complete. If the client does not return NDIS_STATUS_PENDING, the close operation is complete when ProtocolClNotifyCloseAf returns.

NDIS calls ProtocolClNotifyCloseAf at IRQL <= DISPATCH_LEVEL.

The client may use the NdisAfHandle while the AF is open or while a ProtocolClNotifyCloseAf operation is pending. If the ProtocolClNotifyCloseAf function returns NDIS_STATUS_PENDING, use the handle in the NdisClNotifyCloseAddressFamilyComplete call after the close operation completes.

Examples

To define a ProtocolClNotifyCloseAf function, you must first provide a function declaration that identifies the type of function you're defining. Windows provides a set of function types for drivers. Declaring a function using the function types helps Code Analysis for Drivers, Static Driver Verifier (SDV), and other verification tools find errors, and it's a requirement for writing drivers for the Windows operating system.

For example, to define a ProtocolClNotifyCloseAf function that is named "MyClNotifyCloseAf", use the PROTOCOL_CL_NOTIFY_CLOSE_AF type as shown in this code example:

PROTOCOL_CL_NOTIFY_CLOSE_AF MyClNotifyCloseAf;

Then, implement your function as follows:

_Use_decl_annotations_
NDIS_STATUS
 MyClNotifyCloseAf(
    NDIS_HANDLE  ProtocolAfContext
    )
  {...}

The PROTOCOL_CL_NOTIFY_CLOSE_AF function type is defined in the Ndis.h header file. To more accurately identify errors when you run the code analysis tools, be sure to add the Use_decl_annotations annotation to your function definition. The Use_decl_annotations annotation ensures that the annotations that are applied to the PROTOCOL_CL_NOTIFY_CLOSE_AF function type in the header file are used. For more information about the requirements for function declarations, see Declaring Functions by Using Function Role Types for NDIS Drivers.

For information about Use_decl_annotations, see Annotating Function Behavior.

-see-also

NdisClCloseAddressFamily

NdisClCloseCall

NdisClDeregisterSap

NdisClDropParty

NdisClNotifyCloseAddressFamilyComplete

NdisClOpenAddressFamilyEx