6.4 Maintaining State Information

A miniport must track changes in the state of the links it manages such as the current call, address, and line state, and report any changes to NDISWAN by calling NdisMIndicateStatus.

A miniport must always send a call state-change message whenever the state of a call changes. The reported call states have the form LINECALLSTATE_XXX and LINECALLINFOSTATE_XXX. There is no filtering of call state messages.

Some typical call states a miniport reports include LINECALLSTATE_IDLE, LINECALLSTATE_CONNECTED, LINECALLSTATE_OFFERING, LINECALLSTATE_DISCONNECTED, LINECALLINFOSTATE_CALLERID and LINECALLINFOSTATE_MEDIAMODE.

Changes in the line state or the address state are only indicated if enabled by a previous OID_TAPI_SET_STATUS_MESSAGES request(s) to the miniport.

Address state changes that a miniport can be enabled to report have the form LINEADDRESSSTATE_XXX and include such states as LINEADDRESSSTATE_INUSEMANY and LINEADDRESSSTATE_FORWARD.

Line state changes a miniport can be enabled to report have the form LINEDEVSTATE_XXX and include such states as LINEDEVSTATE_RINGING, LINEDEVSTATE_CONNECTED, LINEDEVSTATE_OPEN and LINEDEVSTATE_CLOSE.

A miniport WAN NIC driver can receive one or more OID_TAPI_SET_STATUS_MESSAGES request(s) to inform the miniport of which status changes it must report. Initially, a miniport should consider all line and address status indications disabled with the exception of LINEDEVSTATE_REINIT, which is never disabled.

When a miniport calls NdisMIndicateStatus to report such state changes, the GeneralStatus argument for reporting TAPI status changes is always NDIS_STATUS_TAPI_INDICATION. The StatusBuffer parameter points to a structure of type NDIS_TAPI_EVENT. The miniport must pass the htLine and htCall members that identify the line and call to which the state change applies. The ulMsg member of the NDIS_TAPI_EVENT structure is set to, for instance, LINE_CALLSTATE and ulParam1 describes the state being reported.