This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

WinPcap sample application crashed

0

Got wireshark with wpcap 4.1.3 installed on my win7 (64bit) PC.

I downloaded wpcap developer pack 4.1.2 (the top one, it claims to be compatible with 4.1.3). I unzipped it and went to directory "WpdPack\Examples-pcap\UDPdump" and made an exe UDPDump.exe using MinGW Gcc (64bit). However, when I ran it, it crashed. GDB showed that it failed at the call to pcap_findalldevs. Any ideas why?

asked 04 May '16, 13:29

pktUser1001's gravatar image

pktUser1001
201495054
accept rate: 12%

edited 05 May '16, 03:36

grahamb's gravatar image

grahamb ♦
19.8k330206


One Answer:

0

Somewhat off topic for this site, but works for me using VS2013 Community Edition and converting the old solution and project files.

I'm not sure that compilers other than VS and Cygwin gcc are supported.

answered 05 May '16, 03:12

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

edited 05 May '16, 03:37

I'm not sure Cygwin GCC is supported; unfortunately, Cygwin and MSVC differ on what a struct timeval looks like, and WinPcap uses MSVC's definition, causing Bad Things to happen if you try to use WinPcap from Cygwin.

MinGW might actually be better, as it might not "helpfully" supply UN*X-style definitions of structures that MSVC or various Microsoft SDKs also define in a not-necessarily-compatible fashion. If it does do so, however, it might have the same problem as Cygwin does.

(06 May '16, 01:03) Guy Harris ♦♦

I only mentioned Cygwin gcc as there is a Makefile for that in the WinPcap Devpack. I haven't tested it though.

(06 May '16, 02:46) grahamb ♦