<!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.5730.11" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2></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=epriggin@us.ibm.com href="mailto:epriggin@us.ibm.com">Betsy
Riggins</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> Friday, February 09, 2007 5:10
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Winpcap-users] rc 192 on
read</DIV>
<DIV><BR></DIV>
<DIV><BR><FONT face=sans-serif size=2>Using 4.0 alpha 1 and have found that if
I disable the adapter or pull the ethernet wire, I start getting error code
192 from pcap_geterr when pcap_next_ex gets a -1 rc. This is not surprising
but when I re-enabled the card or plug the ethernet wire back in, I continue
to get 192 errors on subsequent reads.</FONT> <BR></DIV></BLOCKQUOTE>
<DIV><FONT size=2>Uhm, it seems strange to me that pcap_next_ex fails when the
wire is disconnected. WinPcap doesn't detect media disconnect events on ethernet
adapters. But it definitely detects when a network card is
disabled/removed.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>What is the exact error message returned by pcap_geterr()?
pcap_geterr() returns a string, and the string usually starts with something
like "read error:" or similar.</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=sans-serif size=2>
a) What does the 192 mean?</FONT> <BR><FONT face=sans-serif
size=2></FONT></DIV></BLOCKQUOTE>
<DIV><FONT face=sans-serif size=2>See my previous answer. 192 doesn't make much
sense.</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=sans-serif size=2>
b) Is there some action (other than stopping and restarting) that I can take
(programaticly) to recover from this situation?</FONT> </DIV></BLOCKQUOTE>
<DIV><FONT face=Arial size=2>No. If an adapter is disabled, the only way to
capture from adapter again is to reopen the adapter with pcap_close() --
pcap_open_xxx().</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"><FONT
size=2></FONT><FONT size=2></FONT><FONT size=2></FONT><FONT size=2></FONT>
<DIV><BR><FONT face=sans-serif size=2>Also, I downloaded WinPcap 4.0 to
upgrade to see if this issue had been resolved
(www.winpcap.org/install/bin/WpdPack_4_0.zip) but wpcap.lib appears to not be
packaged in the zip file. The documentation still states that it is in the
developers pack : "</FONT><FONT size=3>Set the options of the linker to
include the <I>wpcap.lib</I> library file. <I>wpcap.lib</I> can be found in
the WinPcap developer's pack. </FONT><FONT face=sans-serif size=2>" from
</FONT><BR><FONT face=sans-serif
size=2>http://www.winpcap.org/docs/docs_40/html/group__wpcapsamps.html</FONT>
<BR><FONT face=sans-serif size=2> so I wondering if
I downloaded the wrong thing or if the linking instructions have
changed.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BLOCKQUOTE>
<DIV><FONT face=Arial size=2>I just checked, and the wpcap.lib file is packaged.
It's in the lib folder. Just to make sure that you have unzipped the dev pack
correctly, please try to compile any of the samples in exaples-pcap or
examples-remote.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Hope it helps</FONT></DIV>
<DIV><FONT face=Arial size=2>GV</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<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>