<div>I am relatively new to using winpcap library. I am having issues with the Win32 extension pcap_getevent() API call.</div> <div> </div> <div>I have a windows application on my host system, asynchronously reading for ethernet type packets sent by another system (again using Winpcap SendPacket() function) . I am waiting on an event that I am holding from the pcap_getevent() call. I also have my ethereal window open to confirm if my application is reading packets when they arrive.</div> <div> </div> <div>The problem is my application is not notified when the packet actually arrives. I looked through old archives and saw a note saying it is due to the kernel buffer being set to some high value. So I modified my open call to include PC<FONT size=2>AP_OPENFLAG_MAX_RESPONSIVENESS flag. I was hoping this will ensure the event will be triggered as soon as the packet arrives. But it did not happen. I also realized that I can
use the pcap_setmintocopy() to set the buffer value So I went ahead and set this value to a low number (less than my anticipated packet size). This lead to a different problem. I see that my host program is getting the event now but it gets a slew of duplicate packets. I can see my ethereal window on the host system show duplicates as well.</FONT></div> <div><FONT size=2></FONT> </div> <div><FONT size=2>I am sure the client did not send all those duplicate packets becasue the ethereal window on the client system is showing only one packet. I also confirmed this by commenting out the pcap_setmintocopy() call and see only one packet on my host ethereal window (but not on my application).</FONT></div> <div><FONT size=2></FONT> </div> <div><FONT size=2>Am I doing something wrong here? The documentation says "use of pcap_getevent is discouraged because it is not portable" but mine is a pure windows app and I am not worried about
portability.</FONT></div> <div> </div> <div>I also do not want to go to a polling mode using pcap_read_next and all that because I am using this in a thread which is waiting for other events as well. I hate to write yet another thread that will poll and send the event.</div> <div><FONT size=2></FONT> </div> <div><FONT size=2>Any help will be much appreciated.</FONT></div> <div><FONT size=2></FONT> </div> <div>Thanks</div> <div><FONT size=2>Swami</div></FONT> <div> </div> <div> </div><BR><BR><DIV>
<DIV>Swaminathan Gurumoorthy</DIV>
<DIV>1775 Milmont Dr, Apt S101</DIV>
<DIV>Milpitas CA 95035</DIV></DIV><p> 
Choose the right car based on your needs.
Check out Yahoo! Autos new Car Finder tool.
http://us.rd.yahoo.com/evt=48518/*http://autos.yahoo.com/carfinder/;_ylc=X3oDMTE3NWsyMDd2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDY2FyLWZpbmRlcg--
hot CTA = Yahoo! Autos new Car Finder tool