Conditions Needed For ReceivePacketHandler
To Be Called

 

Knowledge Base ID

KB07130001
Category INFORMATION

Effected Product

Any NDIS Protocol Driver

Effected Versions

N/A
Effected Platforms Windows NT, Windows 2000

 

Symptoms

A NDIS protocol driver may provide a ReceivePacketHandler, but it is never called.

Cause

NDIS indicates the packet with ReceivePacketHandler if all of the following four conditions are met:

bulletThe binding is not NDIS_PACKET_TYPE_ALL_LOCAL or NDIS_PACKET_TYPE_PROMISCUOUS.
bulletThe binding specifies a ReceivePacketHandler.
bulletThe miniport indicates that is willing to let of the packet by setting the packet status to NDIS_STATUS_SUCCESS.
bulletNo other binding has already claimed the packet.

Resolution

None required. This is for information only.

 

Discussion

Microsoft makes the following suggestion in the DDK documentation:

"Protocols that bind to any driver that supports multipacket receive indications should supply a ProtocolReceivePacket function to enhance their performance."

However, it appears that this applies primarily to "true" protocol implementation drivers (e.g., "transport drivers") such as TCP/IP, that are logically the "true consumer" of a specific packet.

One probable characteristic of the true consumer of a packet is that it would NOT set its NDIS packet filter to NDIS_PACKET_TYPE_ALL_LOCAL or NDIS_PACKET_TYPE_PROMISCUOUS. Instead, it would probably set its filter to NDIS_PACKET_TYPE_DIRECTED (possibly with a multicast list as well). If such a transport driver provided a ReceivePacketHandler and the other conditions were met, then one would expect its ReceivePacketHandler to be called.

On the other hand, NDIS protocol drivers used for network monitoring (such as WinDis 32) usually operate with a NDIS packet filter set to NDIS_PACKET_TYPE_ALL_LOCAL or NDIS_PACKET_TYPE_PROMISCUOUS. These protocol drivers do not have a need for a ReceivePacketHandler since it will never be called.

 

Related Note - MiniportSendPackets on TCP/IP Binding

Also another related point to note is that a deserialized miniport driver bound to TCP/IP will get a single packet in it's MiniportSendPackets instead of an array of packets. This is because the TCP/IP currently sends one packet at a time. Hopefully in the future, it will be changed to send array of packets - at least through Windows 2000 SP1.

Status

July 17, 2000 Information posted.

Comments

Please click the following link to send e-mail relating to this PCAUSA Knowledge Base topic:

<Send Mail To KB07130001 Technical Contact>

 

Keywords NDIS, ReceivePacketHandler
Created July 13, 2000
Last Reviewed October 4, 2000

 
 

PCAUSA Home · Privacy Statement · Products · Ordering · Support · Utilities · Resources
Mailing Lists  · PCAUSA Newsletter · PCAUSA Discussion List
 
Rawether for Windows and WinDis 32 are trademarks of Printing Communications Assoc., Inc. (PCAUSA)
Microsoft, MS, Windows, Windows 95, Windows 98, Windows Millennium, Windows 2000, and Win32 are registered trademarks and Visual C++ and Windows NT are trademarks of the Microsoft Corporation.
Send mail to webmaster@pcausa.com with questions or comments about this web site.
Copyright © 1996-2008 Printing Communications Assoc., Inc. (PCAUSA)
Last modified: December 31, 2007