2.3.1 Miniport NIC Driver Upper-Edge Functions

The miniport NIC driver must export some or all of the functions described in the following table. NDIS calls these functions on behalf of other layers of the network software, such as a higher level protocol driver that is bound to a NIC managed by the NIC driver.

Some of the NIC driver functions are inherently synchronous, while others can complete either synchronously or asynchronously. When a miniport function returns the status NDIS_STATUS_PENDING, the miniport must later complete the request by calling the appropriate NdisM...Complete function. NDIS takes care of any further coordination with other layers, calling the completion functions of those layers for asynchronous requests as required.

Names of the miniport driver functions discussed here use Miniport as a generic prefix. Functions written for an actual miniport driver should be named with a more descriptive prefix in place of the Miniport prefix to make debugging easier. Because the addresses of the functions (not the names) are passed to the NDIS library during initialization, function naming is at the discretion of the driver developer.

Function

Description

Async Option

DriverEntry

Called by the operating system to activate and initialize the NIC driver.

Not Applicable

MiniportCheckForHang

Checks the internal state of the network interface card.

No

MiniportDisableInterrupt

Disables the network interface card from generating interrupts.

No

MiniportEnableInterrupt

Enables the network interface card to generate interrupts.

No

MiniportHalt

Deallocates and deregisters resources used for the NIC, and halts the NIC so it is no longer functioning.

No

MiniportHandleInterrupt

Deferred processing function called to complete interrupt-driven I/O processing.

No

MiniportInitialize

Initializes the network interface card.

No

MiniportISR

Runs at a high priority as the interrupt service function for the network interface card.

No

MiniportQueryInformation

Queries the capabilities and current status of the miniport driver.

Yes

MiniportReconfigure

Not used.

No

MiniportReset

Issues a hardware reset to the network interface card.

Yes

MiniportSend

Transmits a packet through the network interface card onto the network.

Yes

MiniportSetInformation

Changes (sets) information about the miniport driver or its NIC.

Yes

MiniportTransferData

Copies the contents of a packet received by the network interface card into a given packet buffer.

Yes

MiniportSendPackets

Transmits an array of packets through the network interface card onto the network.

Yes

MiniportReceivePacket

Receives a packet from an upper layer that was previously passed up by a call to NdisMIndicateReceivePacket

No

MiniportAllocateMemoryComplete

Called to indicate that a preceding call to NdisMAllocateMemoryAsync is now complete.

No

The corresponding NDIS completion function that is associated with each possibly asynchronous upper-edge driver function is listed here.

Function

Asynchronous Completion Function

MiniportQueryInformation

NdisMQueryInformationComplete

MiniportReset

NdisMResetComplete

MiniportSend

NdisMSendComplete

MiniportSetInformation

NdisMSetInformationComplete

MiniportTransferData

NdisMTransferDataComplete