Поделиться через


NdisMCoIndicateStatus function

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.

NdisMCoIndicateStatus indicates a change in the status of a connection-oriented NIC to bound protocols, or a change in the status of a particular VC active on the NIC.

Syntax

VOID NdisMCoIndicateStatus(
  _In_     NDIS_HANDLE MiniportAdapterHandle,
  _In_opt_ NDIS_HANDLE NdisVcHandle,
  _In_     NDIS_STATUS GeneralStatus,
  _In_opt_ PVOID       StatusBuffer,
  _In_     ULONG       StatusBufferSize
);

Parameters

  • MiniportAdapterHandle [in]
    Specifies the NDIS-supplied handle originally input to MiniportInitialize.

  • NdisVcHandle [in, optional]
    Specifies the handle to the VC for which VC-specific status is being indicated. The miniport driver originally obtained this handle as an input parameter to its MiniportCoCreateVc function. To make a notification of a general status change in the NIC to all bound protocols, this handle should be NULL.

  • GeneralStatus [in]
    Specifies the NDIS_STATUS_XXX value that describes the change in status.

  • StatusBuffer [in, optional]
    Pointer to a caller-allocated buffer containing medium- and status-specific information, if any, supplemental to the value at GeneralStatus. This parameter can be NULL.

  • StatusBufferSize [in]
    Specifies the size in bytes of the buffer at StatusBuffer, zero if StatusBuffer is NULL

Return value

None

Remarks

A call to NdisMCoIndicateStatus with a NULLNdisVcHandle causes NDIS to forward the miniport driver's status-change notification to all bound protocols by calling each bound protocol's ProtocolCoStatus function in turn. A call with an explicit NdisVcHandle restricts such a notification only to the client and/or, possibly, call manager, with which the miniport driver shares this VC handle.

In either case, such a notification makes it possible for protocols to log the change in status or to take corrective action. For example, a protocol might call NdisReset, depending on the NDIS_STATUS_XXX indicated by the underlying NIC driver.

When a miniport driver senses that the network connection has been lost, it should call NdisMCoIndicateStatus with NDIS_STATUS_MEDIA_DISCONNECT. When the connection is restored, the miniport driver should call NdisMCoIndicateStatus with NDIS_STATUS_MEDIA_CONNECT.

When a miniport driver calls NdisMCoIndicateStatus to report operational problems in its NIC, NDIS itself can call the MiniportReset function to try restoring the NIC to a working condition. In these circumstances, NDIS calls bound protocols only with NDIS_STATUS_RESET_START and later with NDIS_STATUS_RESET_END, rather that forwarding the GeneralStatus that the miniport driver passed to NdisMCoIndicateStatus.

A miniport driver cannot call NdisMCoIndicateStatus in the context of its MiniportInitialize, MiniportISR, MiniportHalt, or MiniportShutdown function.

WAN Miniport Driver Calls to NdisMCoIndicateStatus

A CoNDIS WAN miniport driver indicates VC status with specific status codes and buffer contents. These status indications are generated by a CoNDIS WAN miniport driver. A connection-oriented client (protocol) that shares the VC with such a miniport driver can ignore these indications. However, processing these indications typically results in improved performance for a protocol and miniport driver.

The following types of CoNDIS-WAN-specific indications can be sent to connection-oriented clients with NdisMCoIndicateStatus:

  • Link parameters

  • Fragment

NDIS_STATUS_WAN_CO_LINKPARAMS

A CoNDIS WAN miniport driver makes a link-parameters indication whenever parameters for a particular VC that is active on the NIC change.

The status code for the link-parameters indication is NDIS_STATUS_WAN_CO_LINKPARAMS. The buffer at StatusBuffer is formatted as an WAN_CO_LINKPARAMS structure.

NDIS_STATUS_WAN_CO_FRAGMENT

A CoNDIS WAN miniport driver makes a fragment indication whenever it receives a partial packet from the endpoint of a virtual connection. After this indication occurs, a connection-oriented client should send frames to the connection-oriented client at the other end of the VC. These frames will notify the opposite endpoint of this partial-packet situation, rather than waiting for a time-out to occur.

The status code for the fragment indication is NDIS_STATUS_WAN_CO_FRAGMENT. The buffer at StatusBuffer is formatted as an NDIS_WAN_CO_FRAGMENT structure.

NDISWAN monitors dropped packets by counting the number of fragment indications on each link.

Requirements

Target platform

Universal

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Use NdisMCoIndicateStatusExinstead. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

<= DISPATCH_LEVEL

See also

MiniportInitialize

MiniportReset

NdisReset

NDIS_WAN_CO_FRAGMENT

ProtocolCoStatus

WAN_CO_LINKPARAMS

 

 

Send comments about this topic to Microsoft