Registering an Intermediate Driver as a Protocol (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.
An intermediate driver registers its ProtocolXxx functions with NDIS in the context of its DriverEntryfunction by calling NdisRegisterProtocol.
Registering an intermediate driver as a protocol is nearly identical to registering as a protocol driver. For more information, see Registering as an NDIS Protocol Driver.
An intermediate driver with a connection-oriented lower edge must register as a connection-oriented client. A connection-oriented client uses the call-set-up and tear-down services of a call manager or integrated miniport call manager (MCM). A connection-oriented client also uses the send and receive capabilities of a connection-oriented miniport driver or an MCM to send and receive data. For more information, see Connection-Oriented Operations Performed by Clients.
Intermediate driver's protocol handler functions differ from protocol drivers as follows:
ReceivePacketHandler
This is a required function. Intermediate drivers must provide a ProtocolReceivePacket function to handle receive data that an underlying miniport driver indicates by calling NdisMIndicateReceivePacket. These receive indications include an array of pointers to one or more packet descriptors or out-of-band data.ResetCompleteHandler
This is a required function. NDIS calls ProtocolResetComplete when a reset operation, begun with a call to NdisReset that returned NDIS_STATUS_PENDING, is done. Usually, intermediate drivers do not call NdisReset, but the drivers above them might, so an intermediate driver could forward such a reset request to the underlying NDIS driver.PnPEventHandler
This is a required function. NDIS calls ProtocolPnPEvent to indicate a Plug and Play event or a Power Management event. For more information, see Handling PnP Events and PM Events in an Intermediate Driver.