// poll.h
NDIS_POLL NdisPoll;
void() NdisPoll(
[_In_] void *Context,
[_Inout_] NDIS_POLL_DATA *PollData
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
Miniport drivers implement the NdisPoll callback function that NDIS will poll for receive indications and send completions.
Context [_In_]A pointer to the context information that the driver provided when it created the Poll object.
PollData [_Inout_]A pointer to an NDIS_POLL_DATA structure that the driver should use to perform receive indications and send completions. It also contains details about how many NBLs need to be indicated.
Miniport drivers register the NdisPoll callback during miniport adapter initialization. Drivers specify an entry point for the NdisPoll function at the PollHandler parameter of the NDIS_POLL_CHARACTERISTICS structure before calling NdisRegisterPoll.
NDIS will first invoke the NdisPoll callback when the driver calls NdisRequestPoll. NDIS will keep invoking NdisPoll while the driver is making forward progress on receive indications or transmit completions.
The NdisPoll callback may be invoked at both PASSIVE_LEVEL and DISPATCH_LEVEL IRQL. The driver shouldn't make assumptions about which level it will be.
The driver must check the receive or transmit parameters of the NDIS_POLL_DATA structure to get the maximum number of NBLs it can indicate or complete.
For receive indications, the driver should:
For transmit completions, the driver should:
The driver should not enable the Poll object's interrupt before exiting the NdisPoll function. NDIS will keep polling the driver until it assesses that no forward progress is being made. At this point NDIS will stop polling and ask the driver to reenable the interrupt by invoking the NdisSetPollNotification callback.