NDIS_STATUS
NdisIMQueueMiniportCallback(
IN NDIS_HANDLE MiniportAdapterHandle,
IN W_MINIPORT_CALLBACK CallbackRoutine,
IN PVOID CallbackContext
);
NdisIMQueueMiniportCallback calls an intermediate driver’s callback function when it can execute in a MiniportXxx context, as, for example, to forward an indication to higher level protocols.
VOID
MiniportCallback(
IN NDIS_HANDLE MiniportAdapterContext,
IN PVOID CallbackContext
);
Parameters to the MiniportCallback function include the following:
For example, this parameter might point to a caller-allocated area containing an array of pointers to packets to be indicated to higher-level protocols.
NdisIMQueueMiniportCallback can return one of the following:
An NDIS intermediate driver must be executing as if it were a NIC miniport when it indicates up to bound protocols.
For example, packet arrays indicated up to an NDIS intermediate driver’s ProtocolReceivePackets function cannot be forwarded directly to higher-level bound protocols with a call to NdisMIndicateReceivePacket.
When an intermediate driver’s call to NdisIMSwitchToMiniport returns FALSE, the driver calls NdisIMQueueMiniportCallback.
First, such a driver’s ProtocolXxx function should call NdisIMSwitchToMiniport. If this call succeeds, it is safe for the ProtocolXxx function to call miniport-only NdisMXxx functions and to call the reciprocal NdisIMRevertBack as soon as ProtocolXxx no longer has any more miniport-only processing to be done. If its call to NdisIMSwitchToMiniport returns FALSE, ProtocolXxx must call NdisIMQueueMiniportCallback with a driver function that essentially does exactly what ProtocolXxx would have done if its call to NdisIMSwitchToMiniport succeeded. However, the supplied MiniportCallback function also might return status to the caller in the CallbackContext or MiniportAdapterContext area.
If NdisIMQueueMiniportCallback returns NDIS_STATUS_SUCCESS, the ProtocolXxx function resumes execution with all necessary miniport-only work already done by the supplied function at CallbackRoutine.
The MiniportCallback function passed to NdisIMQueueMiniportCallback runs, by default, at IRQL DISPATCH_LEVEL.
Callers of NdisIMQueueMiniportCallback run at IRQL DISPATCH_LEVEL.
NdisIMRevertBack, NdisIMSwitchToMiniport, NdisMArcIndicateReceive, NdisMEthIndicateReceive, NdisMFddiIndicateReceive, NdisMIndicateReceivePacket, NdisMIndicateStatus, NdisMTrIndicateReceive, NdisMWanIndicateReceive, ProtocolReceive, ProtocolReceivePacket, ProtocolStatus