datapath-windows/ovsext/Oid.c
/*
 * --------------------------------------------------------------------------
 * Implements filter driver's FilterOidRequestComplete function.
 * --------------------------------------------------------------------------
 */
Implements filter driver's FilterOidRequestComplete function.
Implements filter driver ' s FilterOidRequestComplete function .
VOID
OvsExtOidRequestComplete(NDIS_HANDLE filterModuleContext,
                         PNDIS_OID_REQUEST oidRequest,
                         NDIS_STATUS status)
{
    POVS_SWITCH_CONTEXT switchObject = (POVS_SWITCH_CONTEXT)filterModuleContext;
    PNDIS_OID_REQUEST origReq = OvsOidGetOrigRequest(oidRequest);
    POVS_OID_CONTEXT oidContext = OvsOidGetContext(oidRequest);
    ASSERT(origReq != NULL || oidContext != NULL);
    ASSERT(oidContext != NULL || origReq != NULL);
    OVS_LOG_TRACE("Enter: oidRequest %p, reqType: %d",
                  oidRequest, oidRequest->RequestType);
    if (origReq == NULL) {
        NdisInterlockedDecrement(&(switchObject->pendingOidCount));
        oidContext->status = status;
        NdisSetEvent(&oidContext->oidComplete);
        OVS_LOG_INFO("Internally generated request");
        goto done;
    }
    switch(oidRequest->RequestType) {
    case NdisRequestMethod:
        OvsOidRequestCompleteMethod(switchObject, oidRequest,
                                    origReq, status);
        break;
    case NdisRequestSetInformation:
        OvsOidRequestCompleteSetInfo(switchObject, oidRequest,
                                     origReq, status);
        break;
    case NdisRequestQueryInformation:
    case NdisRequestQueryStatistics:
    default:
        OvsOidRequestCompleteQuery(switchObject, oidRequest,
                                   origReq, status);
        break;
    }
    OvsOidSetOrigRequest(oidRequest, NULL);
    NdisFreeCloneOidRequest(switchObject->NdisFilterHandle, oidRequest);
    NdisFOidRequestComplete(switchObject->NdisFilterHandle, origReq, status);
    NdisInterlockedDecrement(&(switchObject->pendingOidCount));
done:
    OVS_LOG_TRACE("Exit");
}
VOID OvsExtOidRequestComplete ( NDIS_HANDLE filterModuleContext , PNDIS_OID_REQUEST oidRequest , NDIS_STATUS status ) { POVS_SWITCH_CONTEXT switchObject = ( POVS_SWITCH_CONTEXT ) filterModuleContext ; PNDIS_OID_REQUEST origReq = OvsOidGetOrigRequest ( oidRequest ) ; POVS_OID_CONTEXT oidContext = OvsOidGetContext ( oidRequest ) ; ASSERT ( origReq != NULL || oidContext != NULL ) ; ASSERT ( oidContext != NULL || origReq != NULL ) ; OVS_LOG_TRACE ( " " , oidRequest , oidRequest -> RequestType ) ; if ( origReq == NULL ) { NdisInterlockedDecrement ( & ( switchObject -> pendingOidCount ) ) ; oidContext -> status = status ; NdisSetEvent ( & oidContext -> oidComplete ) ; OVS_LOG_INFO ( " " ) ; goto done ; } switch ( oidRequest -> RequestType ) { case NdisRequestMethod : OvsOidRequestCompleteMethod ( switchObject , oidRequest , origReq , status ) ; break ; case NdisRequestSetInformation : OvsOidRequestCompleteSetInfo ( switchObject , oidRequest , origReq , status ) ; break ; case NdisRequestQueryInformation : case NdisRequestQueryStatistics : default : OvsOidRequestCompleteQuery ( switchObject , oidRequest , origReq , status ) ; break ; } OvsOidSetOrigRequest ( oidRequest , NULL ) ; NdisFreeCloneOidRequest ( switchObject -> NdisFilterHandle , oidRequest ) ; NdisFOidRequestComplete ( switchObject -> NdisFilterHandle , origReq , status ) ; NdisInterlockedDecrement ( & ( switchObject -> pendingOidCount ) ) ; done : OVS_LOG_TRACE ( " " ) ; }
Implements filter driver's FilterOidRequestComplete function.
Implements filter driver ' s FilterOidRequestComplete function .
/* Only one of the two should be set */