Uhm...
I'm not sure that this workaround will work every time:
what happens if another adapter does not have any IP address?
Have a nice day GV
----- Original Message ----- From: "Ed Remmell" <[EMAIL PROTECTED]>
To: <winpcap-users@winpcap.polito.it>
Sent: Saturday, January 15, 2005 3:38 AM
Subject: [WinPcap-users] Bug in v3.1beta4 of winpcap? Crash when open and close WAN adapter
FYI, I did the following hack for this, which seems to work fine - please let me know if this won't detect all WAN adapters and I then need to code it differently:
After the call to pcap_findalldevs, when I'm iterating through the pcap_if_t's, if dev->addresses is NULL then I treat this as an indication that it is a WAN adapter and skip it:
if (pcap_findalldevs(&alldevs, tlPcapErrbuf) != -1) { AdapterNum = 0;
for (dev = alldevs; dev != NULL; dev = dev->next) { /* Skip the WAN adapter, if we try to open it with winpcap v3.1beta4 this causes a crash */ if (dev->addresses != NULL) {
Etc.
Thanks. - Ed Remmell
Treck, Inc. (formerly Elmic Systems, USA)
Best of Show Winner, ESC 2003
-- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.6.12 - Release Date: 1/14/2005
--- Treck, Inc. - Confidentiality Notice
This electronic transmission may contain information that is proprietary or confidential. You are hereby notified that any dissemination, distribution or duplication of this electronic transmission to some other entity, without the expressed written consent of Treck, Inc. is strictly prohibited, unless the contents of this electronic transmission specifically authorizes you to do so. If your receipt of this electronic transmission is in error, please notify the corporate offices of Treck, Inc. immediately by calling (513) 528-5732, or by reply to this transmission.
====================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/winpcap-users@winpcap.polito.it/
To unsubscribe use mailto: [EMAIL PROTECTED] ======================
================================================================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/winpcap-users@winpcap.polito.it/
To unsubscribe use mailto: [EMAIL PROTECTED]
==================================================================