[Winpcap-users] rc 192 on read

Gianluca Varenni gianluca.varenni at cacetech.com
Tue Feb 13 01:42:59 GMT 2007


  ----- Original Message ----- 
  From: Betsy Riggins 
  To: winpcap-users at winpcap.org 
  Sent: Friday, February 09, 2007 5:10 PM
  Subject: [Winpcap-users] rc 192 on read



  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. 

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.

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.
          a) What does the 192 mean? 

See my previous answer. 192 doesn't make much sense.

          b) Is there some action (other than stopping and restarting) that I can take (programaticly) to recover from this situation? 
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().

  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 : "Set the options of the linker to include the wpcap.lib library file. wpcap.lib can be found in the WinPcap developer's pack. " from 
  http://www.winpcap.org/docs/docs_40/html/group__wpcapsamps.html 
          so I wondering if I downloaded the wrong thing or if the linking instructions have changed.

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.

Hope it helps
GV


------------------------------------------------------------------------------


  _______________________________________________
  Winpcap-users mailing list
  Winpcap-users at winpcap.org
  https://www.winpcap.org/mailman/listinfo/winpcap-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20070213/8e1113d9/attachment.htm


More information about the Winpcap-users mailing list