⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 status.c

📁 ndis windows网络驱动程序的范例
💻 C
字号:
/*++

Copyright (c) 1996  Microsoft Corporation

Module Name:

    status.c

Abstract:

    status indications handled in here....

Author:

    Jim MAteer 4-1-97

Environment:

    Kernel Mode

Revision History:

--*/

#include "ImSamp.h"
#pragma hdrstop

VOID
CLStatusIndication(
    IN  NDIS_HANDLE ProtocolBindingContext,
    IN  NDIS_STATUS GeneralStatus,
    IN  PVOID       StatusBuffer,
    IN  UINT        StatusBufferSize
    );

//STATIC VOID
//LinkSpeedQueryComplete(
//    PADAPTER Adapter,
//    PIM_NDIS_REQUEST PSReqBuffer,
//    NDIS_STATUS Status
//    );

VOID
CLStatusIndicationComplete(
    IN  NDIS_HANDLE BindingContext
    );


VOID
CLStatusIndication(
    IN  NDIS_HANDLE ProtocolBindingContext,
    IN  NDIS_STATUS GeneralStatus,
    IN  PVOID       StatusBuffer,
    IN  UINT        StatusBufferSize
    )

/*++

Routine Description:

    Called by the NIC via NdisIndicateStatus

Arguments:

    See the DDK...

Return Values:

    None

--*/

{
    PADAPTER Adapter = (PADAPTER)ProtocolBindingContext;
    NDIS_STATUS Status;
    ULONG ErrorLogData[2];

    ImDbgOut(DBG_TRACE, DBG_PROTOCOL, ("(%08X) CLStatusIndication: Status %08X\n",
                                       Adapter, GeneralStatus));

   //
    // now indicate the status to the upper layer
    //

    if ( Adapter->IMMPState & ADAPTER_STATE_RUNNING ) {

        NdisMIndicateStatus( Adapter->IMNdisHandle, GeneralStatus, StatusBuffer, StatusBufferSize );
    }

} // CLStatusIndication


VOID
CLStatusIndicationComplete(
    IN  NDIS_HANDLE ProtocolBindingContext
    )

/*++

Routine Description:

    Called by the NIC via NdisIndicateStatusComplete

Arguments:

    See the DDK...

Return Values:

    None

--*/

{
    PADAPTER Adapter = (PADAPTER)ProtocolBindingContext;

    ImDbgOut(DBG_TRACE, DBG_PROTOCOL, ("(%08X) CLStatusIndicationComplete\n", Adapter));

    if ( Adapter->IMMPState & ADAPTER_STATE_RUNNING ) {

        NdisMIndicateStatusComplete( Adapter->IMNdisHandle );
    }

} // CLStatusIndication

/* end status.c */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -