Hi, I've been testing the new WinPcap 3.0 alpha, and I've discovered the following problem:
Occasionally, after sending a packet with PacketSendPacket, when I am receiving packets with PacketReceivePacket, I will get a seemingly corrupted header with bh_caplen = bh_datalen - 1; For example, sending 60 byte packets onto the network, I receive most of them as 60 byte packets but an occasional one as a 59 byte captured with 60 byte original data. This is a big problem for me. I have reproduced the problem using a simple test program, the source code of which I am attaching to this e-mail. Operation of the test program should be reasonably obvious from reading the source code, but basically it asks interactively for a device number to capture on, and then starts capturing packets, comparing bh_caplen to bh_datalen and printing them if they are mismatched, otherwise printing a spinning character, and sending packets in between. You can toggle sending packets on and off by pressing a key. I have not been able to reproduce the problem when receiving packets only. For example, using TG.EXE in another process and receiving those packets with my test program doesn't trigger the bug, no matter what packet size I use. Also, I have no packet filter set, so it shouldn't be a a filter problem. I have poured over the source code for all the various parts of the WinPcap library (mostly packet.dll and driver source) and haven't found any clues, but I'm hoping somebody who knows this from the inside will be able to reproduce it armed with my test program and figure out what is going on... Regards, David Beattie Software Test Engineer Intel Corporation P.S. Please ignore the filename; it is leftover from the previous use of this test program.
wpgetconfig.ZIP
Description: Binary data
