Indicating NDIS WAN Miniport Driver Status (NDIS 5.1)
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.
After changes in the status of a WAN NIC occur, the miniport driver calls NdisMIndicateStatusto indicate these changes up to bound protocol drivers. The miniport driver indicates status with status codes and buffer contents.
Bound protocol drivers can ignore status indications. However, processing these indications typically results in improved performance for protocols and the miniport driver.
The NDISWAN intermediate driver forwards status indications to bound protocols or to a configuration manager. These protocols or configuration manager can log these indications and possibly take corrective action.
For an NDIS WAN miniport driver, the call to NdisMIndicateStatusis the same as in a non-WAN connectionless miniport driver, except that the WAN miniport driver indicates a WAN-specific set of statistics.
Each status indication provides two basic pieces of information:
A status code that specifies the general status. There are a limited number of defined general status codes; this list is subject to future expansion.
A buffer that contains the status information. This status information can be specific to a NIC. For example, a buffer might contain the new transmit speed of an X.25 connection, which recently decreased by a factor of two. For an NDIS WAN miniport driver, this buffer might indicate that a new link is becoming active or that an existing link is changing to the idle state.
The NDIS WAN status indications include:
NDIS_STATUS_WAN_LINE_UP
An NDIS WAN miniport driver calls NdisMIndicateStatus to indicate that a new data channel has become active or to indicate that an existing channel's parameters have changed. In this call, the miniport driver passes NDIS_STATUS_WAN_LINE_UP in the GeneralStatus parameter and a pointer to an NDIS_MAC_LINE_UP structure in the StatusBuffer parameter. NDIS_MAC_LINE_UP identifies the data channel for a particular link and describes parameters for the link. Until this status indication occurs, the WAN NIC accepts packets and can let them succeed or fail, but it is unlikely that any remote-node process will receive such packets. Until a data channel becomes active, protocols should reduce their timers and retry counts so that any outgoing connection attempts quickly fail.
An NDIS WAN miniport driver must make the initial line-up indication before it returns from an OID_TAPI_GET_ID request. This request uses an NDIS_TAPI_GET_ID structure. The line-up indication is made if NDIS_TAPI_GET_ID contains the NDIS value in the DeviceClass member and LINECALLSELECT_CALL in the ulSelect member. Before the OID_TAPI_GET_ID request completes, the miniport driver sets the value of the DeviceID member of NDIS_TAPI_GET_ID to the value of the NdisLinkContext member of NDIS_MAC_LINE_UP that was returned from the line-up indication.
NDIS_STATUS_WAN_LINE_DOWN
An NDIS WAN miniport driver calls NdisMIndicateStatus whenever a link goes down. In this call, the miniport driver passes NDIS_STATUS_WAN_LINE_DOWN in the GeneralStatus parameter, and a pointer to an NDIS_MAC_LINE_DOWN structure in the StatusBuffer parameter. The NdisLinkContext member of NDIS_MAC_LINE_DOWN identifies the link that is no longer valid.
After this status indication occurs, bound protocols should reduce their timers and retry counts until the next line-up indication.
NDIS_STATUS_WAN_FRAGMENT
An NDIS WAN miniport driver calls NdisMIndicateStatus whenever it receives a partial packet from a remote peer. In this call, the miniport driver passes NDIS_STATUS_WAN_FRAGMENT in the GeneralStatus parameter and a pointer to an NDIS_MAC_FRAGMENT structure in the StatusBuffer parameter. NDIS_MAC_FRAGMENT identifies a particular link and describes the reason that the partial packet was received.
If the miniport driver does not make a fragment indication when it receives a partial packet from a remote peer, NDISWAN will be unaware of the particular error. After a fragment indication occurs, the protocol should send frames to the remote peer to notify the remote peer of the fragment indication, rather than waiting for a time-out to occur.
NDISWAN monitors dropped packets by counting the number of fragment indications on the link.
An NDIS WAN miniport driver can also indicate TAPI status. The miniport driver calls NdisMIndicateStatusto indicate TAPI status. In this call, the miniport driver passes NDIS_STATUS_TAPI_INDICATION in the GeneralStatusparameter and a pointer to an NDIS_TAPI_EVENT structure in the StatusBufferparameter. NDIS_TAPI_EVENT describes the TAPI line or call event that occurs. The general type of TAPI-status indications of interest to miniport driver developers are changes in line and call states, the arrival of an incoming call, and the closing by a remote node or by the miniport driver of an existing call or line. For more information, see NDIS WAN Operations That Support Telephonic Services.