<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Eli,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>(un)fortunately there were several modifications to the driver
to better handle cable and board removal that could cause weird problems and
crashes (BSODs).</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Do you know exactly where your application hangs? Does it hang
on a PacketReceive or PacketSend? Can you kill the app while the app is hung? Or
it stays as a zombie (i.e. you still see the executable listed in the processes
tab of task manager?). Debugging such issues is not straightforward, sometimes
involving a bit of kernel debugging and two machines...</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>First I suggest you to migrate to WinPcap 4.0 (at least for
testing). Moreover, it would be useful if you can create a small application
that shows the issue, and send it to winpcap-bugs.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Have a nice day</FONT></DIV>
<DIV><FONT size=2>GV</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=eli.iser@gmail.com href="mailto:eli.iser@gmail.com">Eli Iser</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, February 20, 2007 12:04
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Winpcap-users] Losing link
hangs the application</DIV>
<DIV><BR></DIV>
<DIV>
<P>Hello,</P>
<P>I'm developing a router application on Windows XP using Packet32 from
WinPCap version 3.1. I know I should use WinPCap, but I prefer the simpler
interface of Packet32, as I do every aspect of the application myself. </P>
<P>The application basicly has two threads: one reads packets from NIC A,
checks in the routing table and then sends via NIC B. The other thread reads
packets from NIC B and routes them via NIC A. Answering ARP requests and
receiving ARP replies is a case where I have cross-thread access, so the
sending of the packets is protected with a mutex for every NIC. </P>
<P>The problem I have is thus: when I pull the ethernet cable from NIC A I
obviously lose the packets from it, but sometimes (quite reproducable, though
not predictable) my entire application threads hang until I plug the cable
back, restoring link to the adapter. I examined the state of both threads and
it seems that both threads are accessing the same adapter, which I've
unplugged. In one occasion one thread is writing to the adapter and the other
is reading from it. In another case one thread is writing while the other is
getting statistics from it. </P>
<P>At first I was sure that this was because I modified the Packet32 code to
use Overlapped IO, but I than reverted back to the original code and the
problem still happens. </P>
<P>Maybe I'm doing something wrong? How well does the Packet32 code handle
multithreaded access?<BR>I'll be glad for any help and suggestions.</P>
<P>As a side note, I'd rather try and figure out the problem before moving my
code to use WinPCap 4 (if indeed it is a know bug of 3.1), since I've been
developing the app for quite some time, and wouldn't like to retest all of it
again. </P>
<P>Thank you,<BR>Eli Iser</P></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Winpcap-users
mailing
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BLOCKQUOTE></BODY></HTML>