Skip to content

Latest commit

 

History

History
139 lines (98 loc) · 5.72 KB

nc-ndis-protocol_status_ex.md

File metadata and controls

139 lines (98 loc) · 5.72 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_STATUS_EX
PROTOCOL_STATUS_EX (ndis.h)
The ProtocolStatusEx function indicates status-changes from underlying connectionless drivers or NDIS.Note  You must declare the function by using the PROTOCOL_STATUS_EX type.
netvista\protocolstatusex.htm
netvista
05/02/2018
PROTOCOL_STATUS_EX callback function
PROTOCOL_STATUS_EX, PROTOCOL_STATUS_EX callback, ProtocolStatusEx, ProtocolStatusEx callback function [Network Drivers Starting with Windows Vista], ndis/ProtocolStatusEx, ndis_status_ref_c14c8c6e-b2ed-41a7-a4da-c7415ee8b290.xml, netvista.protocolstatusex
ndis.h
Ndis.h
Windows
Supported in NDIS 6.0 and later.
<= DISPATCH_LEVEL
Windows
PROTOCOL_STATUS_EX
ndis/PROTOCOL_STATUS_EX
APIRef
kbSyntax
UserDefined
Ndis.h
PROTOCOL_STATUS_EX

PROTOCOL_STATUS_EX callback function

-description

The ProtocolStatusEx function indicates status-changes from underlying connectionless drivers or NDIS.

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

-parameters

-param ProtocolBindingContext [in]

A handle to a context area that the protocol driver allocated. The protocol driver maintains the per-binding context information in this context area. The driver supplied this handle to NDIS when the driver called the NdisOpenAdapterEx function.

-param StatusIndication [in]

A pointer to an NDIS_STATUS_INDICATION structure that contains the status information.

-remarks

A call to ProtocolStatusEx notifies the protocol driver about changes in status of an underlying driver.

To determine link status, use the status indications from underlying drivers instead of OID queries. These status indications will improve system performance and avoid possible race conditions.

NDIS calls the ProtocolStatusEx function of all bound protocol drivers when an underlying driver is resetting a NIC. First NDIS specifies the NDIS_STATUS_RESET_START code and later, when the reset operation is complete, NDIS specifies the NDIS_STATUS_RESET_END code.

NDIS will not accept send requests and OID requests for a miniport adapter while a reset operation is in progress, the NDIS_STATUS_RESET_START notification warns bound protocol drivers to stop such requests on the affected binding until they receive the corresponding NDIS_STATUS_RESET_END notification.

NDIS calls ProtocolStatusEx at IRQL <= DISPATCH_LEVEL.

Examples

To define a ProtocolStatusEx 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 ProtocolStatusEx function that is named "MyStatusEx", use the PROTOCOL_STATUS_EX type as shown in this code example:

PROTOCOL_STATUS_EX MyStatusEx;

Then, implement your function as follows:

_Use_decl_annotations_
VOID
 MyStatusEx(
    NDIS_HANDLE  ProtocolBindingContext,
    PNDIS_STATUS_INDICATION  StatusIndication
    )
  {...}

The PROTOCOL_STATUS_EX 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_STATUS_EX 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

MiniportResetEx

NDIS_STATUS_INDICATION

NDIS_STATUS_RESET_END

NDIS_STATUS_RESET_START

NdisOpenAdapterEx