Registering MiniportXxx Functions (NDIS 5.1)

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

Each address member of the NDIS_MINIPORT_CHARACTERISTICS structure must be initialized -- that is, it must be set to the address of a miniport driver-supplied function or to NULL. The miniport driver must supply entry points for all mandatory MiniportXxx functions; otherwise, NDIS will fail the driver. The MiniportXxx functions are defined in the ndis.h header file.

Because the miniport driver supplies the addresses, and not the names, of its MiniportXxxfunctions, driver developers are free to name these functions whatever they wish. A reasonable miniport driver-development strategy is to give these functions names that make debugging easier. For instance, the miniport driver mp.sys could name the entry points MpISR, MpSend, etc.

Registering MiniportXxx Functions of Connectionless Miniport Drivers (NDIS 5.1)

A connectionless miniport driver must register the following mandatory MiniportXxx functions:

MiniportHalt

MiniportInitialize

MiniportQueryInformation

MiniportReset

MiniportReturnPacket or MiniportTransferData

MiniportSetInformation

MiniportShutdown(required for miniport drivers that directly manage hardware)

A LAN miniport driver must export a MiniportReturnPacket function if it supports multipacket-receive indications by calling NdisMIndicateReceivePacket or NdisMIndicateReceivePacket. If a LAN miniport driver indicates the initial portions of received network packets in lookahead buffers from which received data is copied by interested upper layers, it must export a MiniportTransferData function. A WAN miniport driver does not export either a MiniportReturnPacket function or a MiniportTransferData function.

MiniportSend or MiniportSendPackets

A LAN miniport driver must export either a MiniportSendPackets function or a MiniportSend function. A WAN miniport driver must export a MiniportWanSend function.

MiniportSetInformation

A connectionless miniport driver can also, and in some cases must, register the following MiniportXxx functions:

  • MiniportAllocateComplete

    Required if the miniport driver controls a bus-master DMA NIC and allocates shared memory at raised IRQL with NdisMAllocateSharedMemoryAsync.

  • MiniportISR

    Not required if the NIC managed by the miniport driver does not generate interrupts. For more information, see Registering Handlers for Interrupt Support.

  • MiniportHandleInterrupt

    Required if a NIC managed by the miniport driver generates interrupts.

  • MiniportEnableInterrupt and MiniportDisableInterrupt

    Not required if the NIC managed by the miniport driver does not generate interrupts.

  • MiniportCheckForHang

    If not supplied, the miniport driver relies on NDIS to determine whether the NIC has stopped responding, based on sends and requests that time-out.

A connectionless miniport driver cannot export the following MiniportXxx functions:

MiniportCoActivateVc

MiniportCoCreateVc

MiniportCoDeactivateVc

MiniportCoDeleteVc

MiniportCoRequest

MiniportCoSendPackets

Registering MiniportXxx Functions of Connection-Oriented Miniport Drivers (NDIS 5.1)

A connection-oriented miniport driver must register the following mandatory MiniportXxx functions:

MiniportCoActivateVc

MiniportCoCreateVc

MiniportCoDeactivateVc

MiniportCoDeleteVc

MiniportCoRequest

MiniportCoSendPackets

MiniportHalt

MiniportInitialize

MiniportReset

MiniportReturnPacket

A connection-oriented miniport driver can also, and in some cases must, export the following MiniportXxx functions:

  • MiniportAllocateComplete

    Required if the miniport driver controls a bus-master DMA NIC and allocates memory at raised IRQL with NdisMAllocateSharedMemoryAsync.

  • MiniportISR

    Not required if the NIC managed by the miniport driver does not generate interrupts, the miniport driver polls the NIC state with a miniport driver-supplied timer function, or if other conditions apply. For more information, see Registering Handlers for Interrupt Support.

  • MiniportHandleInterrupt

    Required if a NIC managed by the miniport driver generates interrupts.

  • MiniportEnableInterrupt and MiniportDisableInterrupt

    Not required if the NIC managed by the miniport driver does not generate interrupts.

  • MiniportCheckForHang

    If not supplied, the miniport driver relies on NDIS to determine whether the NIC has stopped responding, based on sends and requests that time-out.

A connection-oriented miniport driver cannot export the following MiniportXxx functions:

MiniportQueryInformation

MiniportSetInformation

MiniportSend

MiniportSendPackets

MiniportTransferData

The following topics describe the criteria for choosing when to register optional MiniportXxx functions.

Registering MiniportXxx Functions of NDIS 5.1 Miniport Drivers (NDIS 5.1)

An NDIS 5.1 miniport driver must register the following mandatory MiniportXxx functions:

MiniportPnPEventNotify

MiniportShutdown

An NDIS 5.1 miniport driver that queues send packets for more than one second should also register the following MiniportXxx function:

MiniportCancelSendPackets

 

 

Send comments about this topic to Microsoft