Most WAN NIC drivers indicate status with some special status codes and buffer contents. A WAN miniport calls NdisMIndicateStatus when changes in the status of a network adapter occur. 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. Such a status change is passed to a bound protocol’s ProtocolStatus handler (or to a configuration manager) to log the change in status or to take corrective action.
The following four types of WAN-specific indications can be sent to bound protocol drivers with NdisMIndicateStatus:
The status indication provides two basic pieces of information:
WAN status indications use a general status of NDIS_STATUS_WAN_XXX. The three types of WAN indications are NDIS_STATUS_LINE_UP, NDIS_STATUS_LINE_DOWN, and NDIS_STATUS_FRAGMENT.
All TAPI status indications must use a GeneralStatus value of NDIS_STATUS_TAPI_INDICATION. The specific event that is the reason for the status indication is reported in a structure of type NDIS_TAPI_EVENT. The general type of TAPI status indications of interest to miniport developers are changes in line states, changes in call states, the arrival of an incoming call or the closing by a remote node or by the miniport of an existing call or line. See Chapter 6 for more details.
A WAN miniport calls NdisMIndicateStatus with a GeneralStatus value of NDIS_STATUS_WAN_LINE_UP to indicate that a new data channel has become active. Until this occurs, the NIC will accept frames and can let them succeed or fail, but it is unlikely that such packets will actually be received by any remote-node process. Until a line is up, protocols should reduce their timers and retry counts so that any outgoing connection attempts quickly fail.
A WAN miniport makes a line-up indication before it returns from an OID_TAPI_GET_ID request. The line-up indication is made if OID_TAPI_GET_ID request contains a new DeviceClass and ulSelect is set to LINECALLSELECT_CALL. The NdisLinkContext returned from NdisMIndicateStatus for the line-up indication is passed back in the NDIS_TAPI_GET_ID structure as the DeviceID when the WAN miniport returns from the OID_TAPI_GET_ID request. See Chapter 6, Section 6.12 for a discussion of making a line-up indication.
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. The NdisLinkHandle for the line is no longer valid. 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 a remote peer. Otherwise, NDIS will be unaware of this particular error. The protocol should send frames to the remote that notify the remote of the fragment indication, 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 the link.