VOID
NdisMIndicateStatus(
IN NDIS_HANDLE MiniportAdapterHandle,
IN NDIS_STATUS GeneralStatus,
IN PVOID StatusBuffer,
IN UINT StatusBufferSize
);
NdisMIndicateStatus indicates changes in the status of a NIC to higher-level NDIS drivers.
When a miniport calls NdisMIndicateStatus, NDIS calls each bound protocol’s ProtocolStatus function. This allows a bound protocol driver or, possibly, the configuration manager to log the change in status of an underlying NIC or to take corrective action. For example, a protocol might call NdisReset, depending on the NDIS_STATUS_XXX indicated.
When a miniport calls NdisMIndicateStatus to report a change in NIC status, NDIS can call the MiniportReset function to try restoring the NIC to a working condition. In these circumstances, NDIS can call bound protocols only with NDIS_STATUS_RESET_START and later with NDIS_STATUS_RESET_END, rather than with the GeneralStatus indicated by the miniport.
NdisMIndicateStatus provides two pieces of information:
A miniport also can call NdisMIndicateStatus to indicate problems such as cables that have been accidentally removed and then reinserted, or a ring that has temporarily failed. For example, suppose both the following conditions occur:
After such a change in status has been signaled with an indication, any associated thresholds or statistics counters remain unchanged.
Callers of NdisMIndicateStatus run at IRQL DISPATCH_LEVEL.
Most WAN NIC drivers indicate status with some special status codes and buffer contents. These status indications are generated by WAN NIC drivers, and NDIS protocol drivers bound to such a miniport can ignore these indications. However, processing these indications correctly usually results in improved performance for protocols and for WAN NIC drivers.
The following four types of WAN-specific indications can be sent to bound protocol drivers with NdisMIndicateStatus:
A WAN miniport makes a line-up indication whenever a new link becomes active. Until this occurs, the NIC will accept frames and let them succeed or fail, but it is unlikely that they will actually be received by any remote. Until this occurs, protocols should reduce their timers and retry counts so as to quickly fail any outgoing connection attempts.
The WAN miniport makes this indication with NdisMIndicateStatus before it returns from the OID_TAPI_GET_ID request.
The status code for the line-up indication is NDIS_STATUS_WAN_LINE_UP. The buffer at StatusBuffer is formatted as an NDIS_MAC_LINE_UP structure.
A WAN miniport makes a line-down indication whenever a link goes down. When this occurs, bound protocols should reduce their timers and retry counts until the next line-up indication.
The status code for the line-down indication is NDIS_STATUS_WAN_LINE_DOWN. The buffer at StatusBuffer is formatted as an NDIS_MAC_LINE_DOWN structure.
A WAN miniport makes a fragment indication whenever it receives a partial packet from the remote node. When this occurs, a bound protocol should send frames to the remote that will notify it of this situation, rather than waiting for a timeout to occur.
The status code for the fragment indication is NDIS_STATUS_WAN_FRAGMENT. The buffer at StatusBuffer is formatted as an NDIS_MAC_FRAGMENT structure.
NDISWAN monitors dropped packets by counting the number of fragment indications on each link.
A WAN miniport must use a GeneralStatus value of NDIS_STATUS_TAPI_INDICATION for TAPI status indications. The buffer at StatusBuffer is formatted as an NDIS_TAPI_EVENT structure.
MiniportInitialize, MiniportReset, NDIS_MAC_FRAGMENT, NDIS_MAC_LINE_DOWN, NDIS_MAC_LINE_UP, NdisMIndicateStatusComplete, NDIS_TAPI_EVENT, ProtocolStatus