Frequently Asked Questions

Q. How can I prevent packets that I send from being looped back?
 

A. On Windows 2000 and higher a protocol can set information in the send packet descriptor Flags field to tell NDIS not to loopback the packet at all. This flag overrides any other loopback that NDIS may make.

The Flags used to inhibit loopback is the NDIS_FLAGS_DONT_LOOPBACK flag, defined in NDIS.H in the Windows 2000 and higher DDK.

However, the NDIS_FLAGS_DONT_LOOPBACK flag does not work correctly on Windows 2000.

On Windows 2000 (only) it is necessary to OR the undocumented value 0x400 with the NDIS_FLAGS_DONT_LOOPBACK flag to inhibit loopback of a send packet. This value is used in the Windows 2000 DDK MUX driver sample, where it is defined as:

#define NDIS_FLAGS_SKIP_LOOPBACK_W2K    0x400

Only use NDIS_FLAGS_SKIP_LOOPBACK_W2K on Windows 2000. It is reserved and may have other meanings on other platforms.

Please do review the details of using these flags by examining the Windows XP DDK MUX driver sample.

Unfortunately there are no similar loopback-inhibit flags on Windows 9X/ME or Windows NT 4.0. On those platforms there is no NDIS mechanism to inhibit loopback. One approach that may work in some designs is to filter received packets based on their source link address. If the received packet's source link address is the same as that of the NIC the packet is being received on, then the packet is a loopback packet.

For more information see the NDIS Loopback Discussion.

 

Topic Status

February 6, 2003 Information posted.
 

PCAUSA Home · Privacy Statement · Products · Ordering · Support · Utilities · Resources
Mailing Lists  · PCAUSA Newsletter · PCAUSA Discussion List
Rawether for Windows, Rawether .NET, WinDis 32 and NDIS Press are trademarks of Printing Communications Assoc., Inc. (PCAUSA)
Microsoft, MS, Windows, Windows Vista, 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.
Copyright © 1996-2007 Printing Communications Assoc., Inc. (PCAUSA)
Last modified: January 20, 2007